Class BooleanClassDescriptionImpl

    • Constructor Detail

      • BooleanClassDescriptionImpl

        public BooleanClassDescriptionImpl​(Node n,
                                           EnhGraph g)

        Construct an boolean class description represented by the given node in the given graph.

        Parameters:
        n - The node that represents the resource
        g - The enh graph that contains n
    • Method Detail

      • setOperands

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

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

        public void addOperand​(Resource cls)

        Add a class the operands of this boolean expression.

        Specified by:
        addOperand in interface BooleanClassDescription
        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

        public void addOperands​(java.util.Iterator<? extends Resource> classes)

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

        Specified by:
        addOperands in interface BooleanClassDescription
        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

        public RDFList getOperands()

        Answer the list of operands for this Boolean class expression.

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

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

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

        public boolean hasOperand​(Resource cls)

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

        Specified by:
        hasOperand in interface BooleanClassDescription
        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

        public void removeOperand​(Resource res)

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

        Specified by:
        removeOperand in interface BooleanClassDescription
        Parameters:
        res - An resource to be removed from the operands of this class expression