Interface AllValuesFromRestriction

    • Method Detail

      • setAllValuesFrom

        void setAllValuesFrom​(Resource cls)

        Assert that this restriction restricts the property to have all values be members of the given class. Any existing statements for allValuesFrom will be removed.

        Parameters:
        cls - The class that all values of the property must belong to
        Throws:
        ProfileException - If the Profile.ALL_VALUES_FROM() property is not supported in the current language profile.
      • getAllValuesFrom

        Resource getAllValuesFrom()

        Answer the resource characterising the constraint on all values of the restricted property. This may be a class, the URI of a concrete datatype, a DataRange object or the URI rdfs:Literal.

        Returns:
        A resource, which will have been pre-converted to the appropriate Java value type (OntClass or DataRange) if appropriate.
        Throws:
        ProfileException - If the Profile.ALL_VALUES_FROM() property is not supported in the current language profile.
      • hasAllValuesFrom

        boolean hasAllValuesFrom​(Resource cls)

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

        Parameters:
        cls - A class to test
        Returns:
        True if the given class is the class to which all values must belong
        Throws:
        ProfileException - If the Profile.ALL_VALUES_FROM() property is not supported in the current language profile.
      • removeAllValuesFrom

        void removeAllValuesFrom​(Resource cls)

        Remove the statement that this restriction has all values from the given class among the values for the restricted property. If this statement is not true of the current model, nothing happens.

        Parameters:
        cls - A Resource the denotes the class to be removed from this restriction