- All Implemented Interfaces:
FrontsNode,BooleanClassDescription,ComplementClass,OntClass,OntResource,RDFNode,Resource
Implementation of a node representing a complement class description.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ImplementationA factory for generating ComplementClass facets from nodes in enhanced graphs.Fields inherited from class org.apache.jena.ontology.impl.OntResourceImpl
KNOWN_LANGUAGESFields inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
rdfNodeFactory -
Constructor Summary
ConstructorsConstructorDescriptionComplementClassImpl(Node n, EnhGraph g) Construct a complement class node represented by the given node in the given graph. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOperand(Resource cls) Add a class the operands of this boolean expression.voidaddOperands(Iterator<? extends Resource> classes) Add all of the classes from the given iterator to the operands of this boolean expression.Answer the class that the class described by this class description is a complement of.Answer the list of operands for this Boolean class expression.booleanhasOperand(Resource cls) Answer true if this Boolean class expression has the given class as an operand.ExtendedIterator<? extends OntClass>Answer an iterator over all of the classes that are the operands of this Boolean class expression.operator()Answer the property that is used to construct this boolean expression, for exampleProfile.UNION_OF().voidremoveOperand(Resource res) Remove the given resource from the operands of this class expression.voidsetOperand(Resource cls) Set the class that the class represented by this class expression is a complement of.voidsetOperands(RDFList operands) Assert that the operands for this boolean class expression are the classes in the given list.Methods inherited from class org.apache.jena.ontology.impl.OntClassImpl
addDisjointWith, addEquivalentClass, addSubClass, addSuperClass, asComplementClass, asEnumeratedClass, asIntersectionClass, asRestriction, asUnionClass, convertToComplementClass, convertToEnumeratedClass, convertToIntersectionClass, convertToRestriction, convertToUnionClass, createIndividual, createIndividual, dropIndividual, getDisjointWith, getEquivalentClass, getSubClass, getSuperClass, hasDeclaredProperty, hasEquivalentClass, hasSubClass, hasSubClass, hasSubClass, hasSuperClass, hasSuperClass, hasSuperClass, isComplementClass, isDisjointWith, isEnumeratedClass, isHierarchyRoot, isIntersectionClass, isRestriction, isUnionClass, listDeclaredProperties, listDeclaredProperties, listDisjointWith, listEquivalentClasses, listInstances, listInstances, listSubClasses, listSubClasses, listSuperClasses, listSuperClasses, removeDisjointWith, removeEquivalentClass, removeSubClass, removeSuperClass, setDisjointWith, setEquivalentClass, setSubClass, setSuperClassMethods inherited from class org.apache.jena.ontology.impl.OntResourceImpl
addComment, addComment, addDifferentFrom, addIsDefinedBy, addLabel, addLabel, addRDFType, addSameAs, addSeeAlso, addVersionInfo, asAllDifferent, asAnnotationProperty, asClass, asDataRange, asDatatypeProperty, asIndividual, asObjectProperty, asOntology, asProperty, getCardinality, getComment, getDifferentFrom, getIsDefinedBy, getLabel, getOntModel, getProfile, getPropertyValue, getRDFType, getRDFType, getSameAs, getSeeAlso, getVersionInfo, hasComment, hasComment, hasLabel, hasLabel, hasRDFType, hasRDFType, hasRDFType, hasSeeAlso, hasVersionInfo, isAllDifferent, isAnnotationProperty, isClass, isDataRange, isDatatypeProperty, isDefinedBy, isDifferentFrom, isIndividual, isObjectProperty, isOntLanguageTerm, isOntology, isProperty, isSameAs, listComments, listDifferentFrom, listIsDefinedBy, listLabels, listPropertyValues, listRDFTypes, listSameAs, listSeeAlso, listVersionInfo, remove, removeComment, removeComment, removeDefinedBy, removeDifferentFrom, removeLabel, removeLabel, removeProperty, removeRDFType, removeSameAs, removeSeeAlso, removeVersionInfo, setComment, setDifferentFrom, setIsDefinedBy, setLabel, setPropertyValue, setRDFType, setSameAs, setSeeAlso, setVersionInfoMethods inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, asLiteral, asResource, asStatementTerm, begin, commit, getId, getLocalName, getModel, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString, visitWithMethods inherited from class org.apache.jena.enhanced.EnhNode
as, asNode, canAs, equals, getGraph, hashCode, isAnon, isLiteral, isResource, isStatementTerm, isURIResource, isValid, viewAsMethods inherited from class org.apache.jena.enhanced.Polymorphic
addView, supportsMethods inherited from interface org.apache.jena.graph.FrontsNode
asNodeMethods inherited from interface org.apache.jena.ontology.OntClass
addDisjointWith, addEquivalentClass, addSubClass, addSuperClass, asComplementClass, asEnumeratedClass, asIntersectionClass, asRestriction, asUnionClass, convertToComplementClass, convertToEnumeratedClass, convertToIntersectionClass, convertToRestriction, convertToUnionClass, createIndividual, createIndividual, dropIndividual, getDisjointWith, getEquivalentClass, getSubClass, getSuperClass, hasDeclaredProperty, hasEquivalentClass, hasSubClass, hasSubClass, hasSubClass, hasSuperClass, hasSuperClass, hasSuperClass, isComplementClass, isDisjointWith, isEnumeratedClass, isHierarchyRoot, isIntersectionClass, isRestriction, isUnionClass, listDeclaredProperties, listDeclaredProperties, listDisjointWith, listEquivalentClasses, listInstances, listInstances, listSubClasses, listSubClasses, listSuperClasses, listSuperClasses, removeDisjointWith, removeEquivalentClass, removeSubClass, removeSuperClass, setDisjointWith, setEquivalentClass, setSubClass, setSuperClassMethods inherited from interface org.apache.jena.ontology.OntResource
addComment, addComment, addDifferentFrom, addIsDefinedBy, addLabel, addLabel, addRDFType, addSameAs, addSeeAlso, addVersionInfo, asAllDifferent, asAnnotationProperty, asClass, asDataRange, asDatatypeProperty, asIndividual, asObjectProperty, asOntology, asProperty, getCardinality, getComment, getDifferentFrom, getIsDefinedBy, getLabel, getOntModel, getProfile, getPropertyValue, getRDFType, getRDFType, getSameAs, getSeeAlso, getVersionInfo, hasComment, hasComment, hasLabel, hasLabel, hasRDFType, hasRDFType, hasRDFType, hasSeeAlso, hasVersionInfo, isAllDifferent, isAnnotationProperty, isClass, isDataRange, isDatatypeProperty, isDefinedBy, isDifferentFrom, isIndividual, isObjectProperty, isOntLanguageTerm, isOntology, isProperty, isSameAs, listComments, listDifferentFrom, listIsDefinedBy, listLabels, listPropertyValues, listRDFTypes, listSameAs, listSeeAlso, listVersionInfo, remove, removeComment, removeComment, removeDefinedBy, removeDifferentFrom, removeLabel, removeLabel, removeProperty, removeRDFType, removeSameAs, removeSeeAlso, removeVersionInfo, setComment, setDifferentFrom, setIsDefinedBy, setLabel, setPropertyValue, setRDFType, setSameAs, setSeeAlso, setVersionInfoMethods inherited from interface org.apache.jena.rdf.model.RDFNode
as, asLiteral, asResource, asStatementTerm, canAs, getModel, isAnon, isLiteral, isResource, isStatementTerm, isURIResource, visitWithMethods inherited from interface org.apache.jena.rdf.model.Resource
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
-
Field Details
-
factory
A factory for generating ComplementClass facets from nodes in enhanced graphs. Note: should not be invoked directly by user code: useas()instead.
-
-
Constructor Details
-
ComplementClassImpl
Construct a complement class node represented by the given node in the given graph.
- Parameters:
n- The node that represents the resourceg- The enh graph that contains n
-
-
Method Details
-
setOperands
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:
setOperandsin interfaceBooleanClassDescription- Parameters:
operands- The list of operands to this expression.- Throws:
UnsupportedOperationException- since a complement expression takes only a single argument.
-
setOperand
Set the class that the class represented by this class expression is a complement of. Any existing value for
complementOfwill be replaced.- Specified by:
setOperandin interfaceComplementClass- Parameters:
cls- The class that this class is a complement of.
-
addOperand
Add a class the operands of this boolean expression.
- Specified by:
addOperandin interfaceBooleanClassDescription- Parameters:
cls- A class that will be added to the operands of this Boolean expression- Throws:
UnsupportedOperationException- since a complement expression takes only a single argument.
-
addOperands
Add all of the classes from the given iterator to the operands of this boolean expression.
- Specified by:
addOperandsin interfaceBooleanClassDescription- Parameters:
classes- A iterator over classes that will be added to the operands of this Boolean expression- Throws:
UnsupportedOperationException- since a complement expression takes only a single argument.
-
getOperands
Answer the list of operands for this Boolean class expression.
- Specified by:
getOperandsin interfaceBooleanClassDescription- Returns:
- A list of the operands of this expression.
- Throws:
ProfileException- If the operand property is not supported in the current language profile.
-
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:
listOperandsin interfaceBooleanClassDescription- Returns:
- An iterator over the operands of the expression.
- Throws:
ProfileException- If the operand property is not supported in the current language profile.
-
hasOperand
Answer true if this Boolean class expression has the given class as an operand.
- Specified by:
hasOperandin interfaceBooleanClassDescription- 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.
-
getOperand
Answer the class that the class described by this class description is a complement of.
- Specified by:
getOperandin interfaceComplementClass- Returns:
- The class that this class is a complement of.
-
removeOperand
Remove the given resource from the operands of this class expression.
- Specified by:
removeOperandin interfaceBooleanClassDescription- Parameters:
res- An resource to be removed from the operands of this class expression
-
operator
Answer the property that is used to construct this boolean expression, for example
Profile.UNION_OF().- Specified by:
operatorin interfaceBooleanClassDescription- Returns:
Profile.COMPLEMENT_OF()
-