Interface CardinalityQRestriction

All Superinterfaces:
FrontsNode, OntClass, OntResource, QualifiedRestriction, RDFNode, Resource, Restriction
All Known Implementing Classes:
CardinalityQRestrictionImpl

public interface CardinalityQRestriction extends QualifiedRestriction

Interface representing the ontology abstraction for a qualified cardinality restriction. A qualified restriction is a DAML+OIL term for a restriction with a cardinality constraint and a constraint that the values of the restricted property must all belong to the given class.

  • Method Details

    • setCardinalityQ

      void setCardinalityQ(int cardinality)

      Assert that this restriction restricts the property to have the given cardinality. Any existing statements for cardinalityQ will be removed.

      Parameters:
      cardinality - The cardinality of the restricted property
      Throws:
      ProfileException - If the Profile.CARDINALITY_Q() property is not supported in the current language profile.
    • getCardinalityQ

      int getCardinalityQ()

      Answer the cardinality of the restricted property.

      Returns:
      The cardinality of the restricted property
      Throws:
      ProfileException - If the Profile.CARDINALITY_Q() property is not supported in the current language profile.
    • hasCardinalityQ

      boolean hasCardinalityQ(int cardinality)

      Answer true if this property restriction has the given cardinality.

      Parameters:
      cardinality - The cardinality to test against
      Returns:
      True if the given cardinality is the cardinality of the restricted property in this restriction
      Throws:
      ProfileException - If the Profile.CARDINALITY_Q() property is not supported in the current language profile.
    • removeCardinalityQ

      void removeCardinalityQ(int cardinality)

      Remove the statement that this restriction has the given cardinality for the restricted property. If this statement is not true of the current model, nothing happens.

      Parameters:
      cardinality - A cardinality value to be removed from this restriction
      Throws:
      ProfileException - If the Profile.CARDINALITY_Q() property is not supported in the current language profile.