Class RuleSetPropertyHierarchy

java.lang.Object
fr.lirmm.graphik.integraal.rulesetanalyser.RuleSetPropertyHierarchy

public class RuleSetPropertyHierarchy extends Object
Organises rule-set properties by their specialisation relation.
  • Constructor Details

    • RuleSetPropertyHierarchy

      public RuleSetPropertyHierarchy()
      Creates a hierarchy using the default property set.
    • RuleSetPropertyHierarchy

      public RuleSetPropertyHierarchy(Iterable<RuleSetProperty> pties)
      Creates a hierarchy using the given properties.
      Parameters:
      pties - the properties to organise
  • Method Details

    • setProperties

      public void setProperties(Iterable<RuleSetProperty> pties)
      Replaces the property set handled by this hierarchy.
      Parameters:
      pties - the properties to organise
    • getOrderedProperties

      public Iterable<RuleSetProperty> getOrderedProperties()
      Returns the properties topologically ordered from more specific to more general.
      Returns:
      the ordered properties
    • getGeneralisationsOf

      public Iterable<RuleSetProperty> getGeneralisationsOf(RuleSetProperty p)
      Returns the generalisations of the given property present in this hierarchy.
      Parameters:
      p - the property to inspect
      Returns:
      the matching generalisations
    • generatePropertyMap

      public static final Map<String, RuleSetProperty> generatePropertyMap()
      Prepare the list of rule set properties. If you have implemented a new rule set property, and you want an easy way to test it, you are in the right place. Just add a line that will add an instance of your new class, compile, and everything will (should) work!
      Returns:
      a Map of RuleSetProperty with their label as key.
    • generatePropertyMapSpecializationOf

      public static final Map<String, RuleSetProperty> generatePropertyMapSpecializationOf(RuleSetProperty prop)
      Prepare a map containing all specialization of specified rule property.
      Parameters:
      prop - the property whose specialisations are requested
      Returns:
      a map containing all specialization of specified rule property