Interface QualifiedRestriction

All Superinterfaces:
FrontsNode, OntClass, OntResource, RDFNode, Resource, Restriction
All Known Subinterfaces:
CardinalityQRestriction, MaxCardinalityQRestriction, MinCardinalityQRestriction
All Known Implementing Classes:
CardinalityQRestrictionImpl, MaxCardinalityQRestrictionImpl, MinCardinalityQRestrictionImpl, QualifiedRestrictionImpl

public interface QualifiedRestriction extends Restriction

Represents a qualified restriction, in which all values of the restricted property are required to be members of a given class. At present, this capability is only part of DAML+OIL, not OWL.

  • Method Details

    • setHasClassQ

      void setHasClassQ(OntClass cls)

      Assert that this qualified restriction restricts the property to have a given cardinality and to have values belonging to the class denoted by hasClassQ. Any existing statements for hasClassQ will be removed.

      Parameters:
      cls - The class to which all of the value of the restricted property must belong
      Throws:
      ProfileException - If the Profile.HAS_CLASS_Q() property is not supported in the current language profile.
    • getHasClassQ

      OntResource getHasClassQ()

      Answer the class or datarange to which all values of the restricted property belong.

      Returns:
      The ontology class of the restricted property values
      Throws:
      ProfileException - If the Profile.HAS_CLASS_Q() property is not supported in the current language profile.
    • hasHasClassQ

      boolean hasHasClassQ(OntClass cls)

      Answer true if this qualified property restriction has the given class as the class to which all of the property values must belong.

      Parameters:
      cls - The class to test against
      Returns:
      True if the given class is the class to which all members of this restriction must belong
      Throws:
      ProfileException - If the Profile.HAS_CLASS_Q() property is not supported in the current language profile.
    • hasHasClassQ

      boolean hasHasClassQ(DataRange dr)

      Answer true if this qualified property restriction has the given datarange as the class to which all of the property values must belong.

      Parameters:
      dr - The datarange to test against
      Returns:
      True if the given class is the class to which all members of this restriction must belong
      Throws:
      ProfileException - If the Profile.HAS_CLASS_Q() property is not supported in the current language profile.
    • removeHasClassQ

      void removeHasClassQ(OntClass cls)

      Remove the statement that this restriction has the given class as the class to which all values must belong. If this statement is not true of the current model, nothing happens.

      Parameters:
      cls - The ont class that is the object of the hasClassQ property.
    • removeHasClassQ

      void removeHasClassQ(DataRange dr)

      Remove the statement that this restriction has the given datarange as the class to which all values must belong. If this statement is not true of the current model, nothing happens.

      Parameters:
      dr - The datarange that is the object of the hasClassQ property.