/** * <p>Remove the given class from the super-classes of this class. If this statement * is not true of the current model, nothing happens.</p> * @param cls A class to be removed from the super-classes of this class * @exception ProfileException If the {@link Profile#SUB_CLASS_OF()} class is not supported in the current language profile. */ @Override public void removeSuperClass( Resource cls ) { removePropertyValue( getProfile().SUB_CLASS_OF(), "SUB_CLASS_OF", cls ); }
/** * <p>Answer true if this class is a property restriction</p> * @return True if this is a restriction */ @Override public boolean isRestriction() { checkProfile( getProfile().RESTRICTION(), "RESTRICTION" ); return hasProperty( getProfile().ON_PROPERTY() ) || hasProperty( RDF.type, getProfile().RESTRICTION() ); }
/** * <p>Answer a class that is the super-class of this class. If there is * more than one such class, an arbitrary selection is made.</p> * @return A super-class of this class * @exception ProfileException If the {@link Profile#SUB_CLASS_OF()} property is not supported in the current language profile. */ @Override public OntClass getSuperClass() { return objectAs( getProfile().SUB_CLASS_OF(), "SUB_CLASS_OF", OntClass.class ); }
/** * <p>Add a class that is equivalent to this class.</p> * @param cls A class that is equivalent to this class. * @exception ProfileException If the {@link Profile#EQUIVALENT_CLASS()} property is not supported in the current language profile. */ @Override public void addEquivalentClass( Resource cls ) { addPropertyValue( getProfile().EQUIVALENT_CLASS(), "EQUIVALENT_CLASS", cls ); }
/** * <p>Answer true if the given class is equivalent to this class.</p> * @param cls A class to test for * @return True if the given property is equivalent to this class. * @exception ProfileException If the {@link Profile#EQUIVALENT_CLASS()} property is not supported in the current language profile. */ @Override public boolean hasEquivalentClass( Resource cls ) { return hasPropertyValue( getProfile().EQUIVALENT_CLASS(), "EQUIVALENT_CLASS", cls ); }
/** * <p>Remove the statement that this class and the given class are * equivalent. If this statement * is not true of the current model, nothing happens.</p> * @param cls A class that may be declared to be equivalent to this class, and which is no longer equivalent * @exception ProfileException If the {@link Profile#EQUIVALENT_CLASS()} property is not supported in the current language profile. */ @Override public void removeEquivalentClass( Resource cls ) { removePropertyValue( getProfile().EQUIVALENT_CLASS(), "EQUIVALENT_CLASS", cls ); }
/** * <p>Assert that this class is disjoint with the given class. Any existing * statements for <code>disjointWith</code> will be removed.</p> * @param cls The property that this class is disjoint with. * @exception ProfileException If the {@link Profile#DISJOINT_WITH()} property is not supported in the current language profile. */ @Override public void setDisjointWith( Resource cls ) { setPropertyValue( getProfile().DISJOINT_WITH(), "DISJOINT_WITH", cls ); }
/** * <p>Answer true if this class is disjoint with the given class.</p> * @param cls A class to test * @return True if the this class is disjoint with the the given class. * @exception ProfileException If the {@link Profile#DISJOINT_WITH()} property is not supported in the current language profile. */ @Override public boolean isDisjointWith( Resource cls ) { return hasPropertyValue( getProfile().DISJOINT_WITH(), "DISJOINT_WITH", cls ); }
/** * <p>Remove the statement that this class and the given class are * disjoint. If this statement * is not true of the current model, nothing happens.</p> * @param cls A class that may be declared to be disjoint with this class, and which is no longer disjoint * @exception ProfileException If the {@link Profile#DISJOINT_WITH()} property is not supported in the current language profile. */ @Override public void removeDisjointWith( Resource cls ) { removePropertyValue( getProfile().DISJOINT_WITH(), "DISJOINT_WITH", cls ); }
/** * <p>Answer true if this class is an enumerated class expression</p> * @return True if this is an enumerated class expression */ @Override public boolean isEnumeratedClass() { checkProfile( getProfile().ONE_OF(), "ONE_OF" ); return hasProperty( getProfile().ONE_OF() ); }
/** * <p>Assert that this class is sub-class of the given class. Any existing * statements for <code>subClassOf</code> will be removed.</p> * @param cls The class that this class is a sub-class of * @exception ProfileException If the {@link Profile#SUB_CLASS_OF()} property is not supported in the current language profile. */ @Override public void setSuperClass( Resource cls ) { setPropertyValue( getProfile().SUB_CLASS_OF(), "SUB_CLASS_OF", cls ); }
/** * <p>Answer true if this class is a union class expression</p> * @return True if this is a union class expression */ @Override public boolean isUnionClass() { checkProfile( getProfile().UNION_OF(), "UNION_OF" ); return hasProperty( getProfile().UNION_OF() ); }
/** * <p>Answer a view of this class as an intersection of the given classes.</p> * @param classes A list of the classes that will comprise the operands of the intersection * @return This ontology class, converted to an intersection of the given classes */ @Override public IntersectionClass convertToIntersectionClass( RDFList classes ) { setPropertyValue( getProfile().INTERSECTION_OF(), "INTERSECTION_OF", classes ); return as( IntersectionClass.class ); }
/** * <p>Answer a view of this class as an complement of the given class.</p> * @param cls An ontology classs that will be operand of the complement * @return This ontology class, converted to an complement of the given class */ @Override public ComplementClass convertToComplementClass( Resource cls ) { setPropertyValue( getProfile().COMPLEMENT_OF(), "COMPLEMENT_OF", cls ); return as( ComplementClass.class ); }
/** * <p>Answer a view of this class as an enumeration of the given individuals.</p> * @param individuals A list of the individuals that will comprise the permitted values of this * class converted to an enumeration * @return This ontology class, converted to an enumeration of the given individuals */ @Override public EnumeratedClass convertToEnumeratedClass( RDFList individuals ) { setPropertyValue( getProfile().ONE_OF(), "ONE_OF", individuals ); return as( EnumeratedClass.class ); }
/** * <p>Answer a view of this class as a union of the given classes.</p> * @param classes A list of the classes that will comprise the operands of the union * @return This ontology class, converted to an union of the given classes */ @Override public UnionClass convertToUnionClass( RDFList classes ) { setPropertyValue( getProfile().UNION_OF(), "UNION_OF", classes ); return as( UnionClass.class ); }
/** * <p>Answer a view of this class as a union of the given classes.</p> * @param classes A list of the classes that will comprise the operands of the union * @return This ontology class, converted to an union of the given classes */ @Override public UnionClass convertToUnionClass( RDFList classes ) { setPropertyValue( getProfile().UNION_OF(), "UNION_OF", classes ); return as( UnionClass.class ); }
/** * <p>Answer a view of this class as an complement of the given class.</p> * @param cls An ontology classs that will be operand of the complement * @return This ontology class, converted to an complement of the given class */ @Override public ComplementClass convertToComplementClass( Resource cls ) { setPropertyValue( getProfile().COMPLEMENT_OF(), "COMPLEMENT_OF", cls ); return as( ComplementClass.class ); }
/** * <p>Answer an iterator over all of the classes that this class is declared to be disjoint with. * Each element of the iterator will be an {@link OntClass}.</p> * @return An iterator over the classes disjoint with this class. * @exception ProfileException If the {@link Profile#DISJOINT_WITH()} property is not supported in the current language profile. */ @Override public ExtendedIterator<OntClass> listDisjointWith() { return listAs( getProfile().DISJOINT_WITH(), "DISJOINT_WITH", OntClass.class ).filterKeep( new UniqueFilter<OntClass>() ) ; }
/** * <p>Answer an iterator over all of the classes that this class is declared to be disjoint with. * Each element of the iterator will be an {@link OntClass}.</p> * @return An iterator over the classes disjoint with this class. * @exception ProfileException If the {@link Profile#DISJOINT_WITH()} property is not supported in the current language profile. */ @Override public ExtendedIterator<OntClass> listDisjointWith() { return listAs( getProfile().DISJOINT_WITH(), "DISJOINT_WITH", OntClass.class ).filterKeep( new UniqueFilter<OntClass>() ) ; }