- All Implemented Interfaces:
FrontsNode,AllDifferent,OntResource,RDFNode,Resource
Implementation of the abstraction of axioms that denote the single name assumption.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ImplementationA factory for generating AllDifferent 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
ConstructorsConstructorDescriptionAllDifferentImpl(Node n, EnhGraph g) Construct an all different axiom represented by the given node in the given graph. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the given individual to the list of distinct members of this AllDifferent declaration.voidaddDistinctMembers(Iterator<? extends Resource> individuals) Add the given individuals to the list of distinct members of this AllDifferent declaration.Answer the list of distinct members for this AllDifferent declaration.booleanAnswer true if this AllDifferent declaration includesresas one of the distinct individuals.ExtendedIterator<? extends OntResource>Answer an iterator over all of the individuals that are declared to be distinct by this AllDifferent declaration.voidRemove the given resource from the list of distinct individuals.voidsetDistinctMembers(RDFList members) Assert that the list of distinct individuals in this AllDifferent declaration is the given list.Methods 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.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 AllDifferent facets from nodes in enhanced graphs. Note: should not be invoked directly by user code: useas()instead.
-
-
Constructor Details
-
AllDifferentImpl
Construct an all different axiom represented by the given node in the given graph.
- Parameters:
n- The node that represents the axiomg- The enhanced graph that contains n
-
-
Method Details
-
setDistinctMembers
Assert that the list of distinct individuals in this AllDifferent declaration is the given list. Any existing statements for
distinctMemberswill be removed.- Specified by:
setDistinctMembersin interfaceAllDifferent- Parameters:
members- A list of the members that are declared to be distinct.- Throws:
ProfileException- If theProfile.DISTINCT_MEMBERS()property is not supported in the current language profile.
-
addDistinctMember
Add the given individual to the list of distinct members of this AllDifferent declaration.
- Specified by:
addDistinctMemberin interfaceAllDifferent- Parameters:
res- A resource that will be added to the list of all different members.- Throws:
ProfileException- If theProfile.DISTINCT_MEMBERS()property is not supported in the current language profile.
-
addDistinctMembers
Add the given individuals to the list of distinct members of this AllDifferent declaration.
- Specified by:
addDistinctMembersin interfaceAllDifferent- Parameters:
individuals- An iterator over the distinct invididuals that will be added- Throws:
ProfileException- If theProfile.DISTINCT_MEMBERS()property is not supported in the current language profile.
-
getDistinctMembers
Answer the list of distinct members for this AllDifferent declaration.
- Specified by:
getDistinctMembersin interfaceAllDifferent- Returns:
- The list of individuals declared distinct by this AllDifferent declaration.
- Throws:
ProfileException- If theProfile.DISTINCT_MEMBERS()property is not supported in the current language profile.
-
listDistinctMembers
Answer an iterator over all of the individuals that are declared to be distinct by this AllDifferent declaration. Each element of the iterator will be an
OntResource.- Specified by:
listDistinctMembersin interfaceAllDifferent- Returns:
- An iterator over distinct individuals.
- Throws:
ProfileException- If theProfile.DISTINCT_MEMBERS()property is not supported in the current language profile.
-
hasDistinctMember
Answer true if this AllDifferent declaration includes
resas one of the distinct individuals.- Specified by:
hasDistinctMemberin interfaceAllDifferent- Parameters:
res- A resource to test against- Returns:
- True if
resis declared to be distinct from the other individuals in this declaration. - Throws:
ProfileException- If theProfile.DISTINCT_MEMBERS()property is not supported in the current language profile.
-
removeDistinctMember
Remove the given resource from the list of distinct individuals. If this statement is not true of the current model, nothing happens.
- Specified by:
removeDistinctMemberin interfaceAllDifferent- Parameters:
res- A resource that is no longer distinct from the other listed individuals
-