Interface BooleanClassDescription

All Superinterfaces:
FrontsNode, OntClass, OntResource, RDFNode, Resource
All Known Subinterfaces:
ComplementClass, IntersectionClass, UnionClass
All Known Implementing Classes:
BooleanClassDescriptionImpl, ComplementClassImpl, IntersectionClassImpl, UnionClassImpl

public interface BooleanClassDescription extends OntClass

Encapsulates a class description formed from a boolean combination of other class descriptions (ie union, intersection or complement).

  • Method Details

    • setOperands

      void setOperands(RDFList operands)

      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.

      Parameters:
      operands - The list of operands to this expression.
      Throws:
      ProfileException - If the operand property is not supported in the current language profile.
    • addOperand

      void addOperand(Resource cls)

      Add a class the operands of this boolean expression.

      Parameters:
      cls - A class that will be added to the operands of this Boolean expression
      Throws:
      ProfileException - If the operand property is not supported in the current language profile.
    • addOperands

      void addOperands(Iterator<? extends Resource> classes)

      Add all of the classes from the given iterator to the operands of this boolean expression.

      Parameters:
      classes - A iterator over classes that will be added to the operands of this Boolean expression
      Throws:
      ProfileException - If the operand property is not supported in the current language profile.
    • getOperands

      RDFList getOperands()

      Answer the list of operands for this Boolean class expression.

      Returns:
      A list of the operands of this expression.
      Throws:
      ProfileException - If the operand property is not supported in the current language profile.
    • listOperands

      ExtendedIterator<? extends OntClass> listOperands()

      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 OntClass.

      Returns:
      An iterator over the operands of the expression.
      Throws:
      ProfileException - If the operand property is not supported in the current language profile.
    • hasOperand

      boolean hasOperand(Resource cls)

      Answer true if this Boolean class expression has the given class as an operand.

      Parameters:
      cls - A class to test
      Returns:
      True if the given class is an operand to this expression.
      Throws:
      ProfileException - If the operand property is not supported in the current language profile.
    • removeOperand

      void removeOperand(Resource res)

      Remove the given resource from the operands of this class expression.

      Parameters:
      res - An resource to be removed from the operands of this class expression
    • operator

      Property operator()

      Answer the property that is used to construct this boolean expression, for example Profile.UNION_OF().

      Returns:
      The property used to construct this Boolean class expression.