/** * <p>Add a class the operands of this boolean expression.</p> * @param cls A class that will be added to the operands of this Boolean expression * @exception ProfileException If the operand property is not supported in the current language profile. */ @Override public void addOperand( Resource cls ) { addListPropertyValue( operator(), getOperatorName(), cls ); }
/** * <p>Answer the list of operands for this Boolean class expression.</p> * @return A list of the operands of this expression. * @exception ProfileException If the operand property is not supported in the current language profile. */ @Override public RDFList getOperands() { return objectAs( operator(), getOperatorName(), RDFList.class ); }
/** * <p>Assert that the operands for this boolean class expression are the classes * in the given list. Any existing * statements for the operator will be removed.</p> * @param operands The list of operands to this expression. * @exception ProfileException If the operand property is not supported in the current language profile. */ @Override public void setOperands( RDFList operands ) { setPropertyValue( operator(), getOperatorName(), operands ); }
/** * <p>Remove the given resource from the operands of this class expression.</p> * @param res An resource to be removed from the operands of this class expression */ @Override public void removeOperand( Resource res ) { setOperands( getOperands().remove( res ) ); }
/** * <p>Answer true if this Boolean class expression has the given class as an operand.</p> * @param cls A class to test * @return True if the given class is an operand to this expression. * @exception ProfileException If the operand property is not supported in the current language profile. */ @Override public boolean hasOperand( Resource cls ) { return getOperands().contains( cls ); }
/** * <p>Add all of the classes from the given iterator to the operands of this boolean expression.</p> * @param classes A iterator over classes that will be added to the operands of this Boolean expression * @exception ProfileException If the operand property is not supported in the current language profile. */ @Override public void addOperands( Iterator<? extends Resource> classes ) { while (classes.hasNext()) { addOperand( classes.next() ); } }
/** * <p>Remove the given resource from the operands of this class expression.</p> * @param res An resource to be removed from the operands of this class expression */ @Override public void removeOperand( Resource res ) { setOperands( getOperands().remove( res ) ); }
/** * <p>Answer true if this Boolean class expression has the given class as an operand.</p> * @param cls A class to test * @return True if the given class is an operand to this expression. * @exception ProfileException If the operand property is not supported in the current language profile. */ @Override public boolean hasOperand( Resource cls ) { return getOperands().contains( cls ); }
/** * <p>Add all of the classes from the given iterator to the operands of this boolean expression.</p> * @param classes A iterator over classes that will be added to the operands of this Boolean expression * @exception ProfileException If the operand property is not supported in the current language profile. */ @Override public void addOperands( Iterator<? extends Resource> classes ) { while (classes.hasNext()) { addOperand( classes.next() ); } }
/** * <p>Assert that the operands for this boolean class expression are the classes * in the given list. Any existing * statements for the operator will be removed.</p> * @param operands The list of operands to this expression. * @exception ProfileException If the operand property is not supported in the current language profile. */ @Override public void setOperands( RDFList operands ) { setPropertyValue( operator(), getOperatorName(), operands ); }
/** * <p>Answer the list of operands for this Boolean class expression.</p> * @return A list of the operands of this expression. * @exception ProfileException If the operand property is not supported in the current language profile. */ @Override public RDFList getOperands() { return objectAs( operator(), getOperatorName(), RDFList.class ); }
/** * <p>Add a class the operands of this boolean expression.</p> * @param cls A class that will be added to the operands of this Boolean expression * @exception ProfileException If the operand property is not supported in the current language profile. */ @Override public void addOperand( Resource cls ) { addListPropertyValue( operator(), getOperatorName(), cls ); }
/** * <p>Answer an iterator over all of the classes that are the operands of this * Boolean class expression. Each element of the iterator will be an {@link OntClass}.</p> * @return An iterator over the operands of the expression. * @exception ProfileException If the operand property is not supported in the current language profile. */ @Override public ExtendedIterator<? extends OntClass> listOperands() { return getOperands().iterator().mapWith( n -> n.as( OntClass.class ) ); }
/** * <p>Answer an iterator over all of the classes that are the operands of this * Boolean class expression. Each element of the iterator will be an {@link OntClass}.</p> * @return An iterator over the operands of the expression. * @exception ProfileException If the operand property is not supported in the current language profile. */ @Override public ExtendedIterator<? extends OntClass> listOperands() { return getOperands().iterator().mapWith( n -> n.as( OntClass.class ) ); }