/** * <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 OntProfileException 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>Add a class that this class is disjoint with.</p> * @param cls A class that has no instances in common with this class. * @exception OntProfileException If the {@link Profile#DISJOINT_WITH()} property is not supported in the current language profile. */ @Override public void addDisjointWith( Resource cls ) { addPropertyValue( 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 OntProfileException 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 a class with which this class is disjoint. If there is * more than one such class, an arbitrary selection is made.</p> * @return A class disjoint with this class * @exception OntProfileException If the {@link Profile#DISJOINT_WITH()} property is not supported in the current language profile. */ @Override public OntClass getDisjointWith() { return objectAs( getProfile().DISJOINT_WITH(), "DISJOINT_WITH", OntClass.class ); }
/** * <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 OntProfileException 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 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 OntProfileException 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>() ) ; }