Interface MinCardinalityRestriction

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

public interface MinCardinalityRestriction extends Restriction

A property restriction that requires the named property to have have at least the given number of values for a given instance to be a member of the class defined by the restriction.

  • Method Details

    • setMinCardinality

      void setMinCardinality(int cardinality)

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

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

      int getMinCardinality()

      Answer the minimum cardinality of the restricted property.

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

      boolean hasMinCardinality(int cardinality)

      Answer true if this property restriction has the given minimum cardinality.

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

      void removeMinCardinality(int cardinality)

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

      Parameters:
      cardinality - A min cardinality value to be removed from this restriction