Class EquivalentObjectPropertiesTranslator.AxiomImpl
java.lang.Object
com.github.owlcs.ontapi.owlapi.OWLObjectImpl
com.github.owlcs.ontapi.internal.objects.ONTObjectImpl
com.github.owlcs.ontapi.internal.objects.ONTStatementImpl
com.github.owlcs.ontapi.internal.objects.ONTAxiomImpl<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom>
com.github.owlcs.ontapi.internal.axioms.AbstractNaryTranslator.NaryAxiomImpl<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom,org.semanticweb.owlapi.model.OWLObjectPropertyExpression>
com.github.owlcs.ontapi.internal.axioms.AbstractNaryTranslator.ObjectPropertyNaryAxiomImpl<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom>
com.github.owlcs.ontapi.internal.axioms.EquivalentObjectPropertiesTranslator.AxiomImpl
- All Implemented Interfaces:
HasConfig,HasObjectFactory,AsStatement,ModelObject<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom>,ONTComposite,WithAnnotations,ONTObject<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom>,WithMerge<ONTObject<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom>>,Serializable,Comparable<org.semanticweb.owlapi.model.OWLObject>,org.apache.jena.graph.FrontsTriple,org.semanticweb.owlapi.model.HasAnnotationPropertiesInSignature,org.semanticweb.owlapi.model.HasAnnotations,org.semanticweb.owlapi.model.HasAnonymousIndividuals,org.semanticweb.owlapi.model.HasClassesInSignature,org.semanticweb.owlapi.model.HasComponents,org.semanticweb.owlapi.model.HasContainsEntityInSignature,org.semanticweb.owlapi.model.HasDataPropertiesInSignature,org.semanticweb.owlapi.model.HasDatatypesInSignature,org.semanticweb.owlapi.model.HasHashIndex,org.semanticweb.owlapi.model.HasIndex,org.semanticweb.owlapi.model.HasIndividualsInSignature,org.semanticweb.owlapi.model.HasObjectPropertiesInSignature,org.semanticweb.owlapi.model.HasOperands<org.semanticweb.owlapi.model.OWLObjectPropertyExpression>,org.semanticweb.owlapi.model.HasSignature,org.semanticweb.owlapi.model.IsAnonymous,org.semanticweb.owlapi.model.OWLAxiom,org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom,org.semanticweb.owlapi.model.OWLLogicalAxiom,org.semanticweb.owlapi.model.OWLNaryAxiom<org.semanticweb.owlapi.model.OWLObjectPropertyExpression>,org.semanticweb.owlapi.model.OWLNaryPropertyAxiom<org.semanticweb.owlapi.model.OWLObjectPropertyExpression>,org.semanticweb.owlapi.model.OWLObject,org.semanticweb.owlapi.model.OWLObjectPropertyAxiom,org.semanticweb.owlapi.model.OWLPropertyAxiom
- Direct Known Subclasses:
EquivalentObjectPropertiesTranslator.AxiomImpl.ComplexImpl,EquivalentObjectPropertiesTranslator.AxiomImpl.SimpleImpl
- Enclosing class:
EquivalentObjectPropertiesTranslator
public abstract static class EquivalentObjectPropertiesTranslator.AxiomImpl
extends AbstractNaryTranslator.ObjectPropertyNaryAxiomImpl<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom>
implements org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAnOWLEquivalentObjectPropertiesAxiomthat either has annotations or anonymous object property expressions in the subject or the object positions.protected static classAnOWLEquivalentObjectPropertiesAxiomthat has named object property expressions as subject and object and has no annotations. -
Field Summary
Fields inherited from class com.github.owlcs.ontapi.internal.objects.ONTAxiomImpl
SET_HASH_CODEFields inherited from class com.github.owlcs.ontapi.internal.objects.ONTStatementImpl
object, predicate, subjectFields inherited from class com.github.owlcs.ontapi.internal.objects.ONTObjectImpl
modelFields inherited from class com.github.owlcs.ontapi.owlapi.OWLObjectImpl
DEFAULT_COMPARATOR, hashCode, NO_ANNOTATIONSFields inherited from interface com.github.owlcs.ontapi.internal.WithMerge
ONT_OBJECT_MERGER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom> final booleanAnswerstrueif this object-container is allowed to contain anonymous individuals.final booleanAnswerstrueif this object-container is allowed to contain nested class-expressions.final booleanAnswerstrueif this object-container may contain datatypes.final booleanAnswerstrueif this object-container is allowed to contain (named) OWL classes.final booleanAnswerstrueif this object-container is allowed to contain named individuals.protected final longcount()Returns the number of components.create(org.apache.jena.ontapi.model.OntStatement statement, ModelObjectFactory factory, AxiomsSettings config) Creates anONTObjectcontainer, that is alsoOWLEquivalentObjectPropertiesAxiom.protected org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiomcreateAxiom(Collection<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> members, Collection<org.semanticweb.owlapi.model.OWLAnnotation> annotations) Creates a factory instance ofAbstractNaryTranslator.NaryAxiomImpl.protected org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiomcreateSubPropertyOf(org.semanticweb.owlapi.model.OWLObjectPropertyExpression a, org.semanticweb.owlapi.model.OWLObjectPropertyExpression b) fetchONTComponents(org.apache.jena.ontapi.model.OntStatement statement, ModelObjectFactory factory) Gets all components (asONTObjects) in the form of sortedSet.default StringAnswers a URI of the triple's object.default Set<? extends org.semanticweb.owlapi.model.OWLObject> Gets all OWL characteristic components in the form ofSet.Set<? extends org.semanticweb.owlapi.model.OWLObject> getOWLComponentsAsSet(ModelObjectFactory factory) Gets all OWL characteristic components in the form ofSet.Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getPropertiesMinus(org.semanticweb.owlapi.model.OWLObjectPropertyExpression property) default Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getSetMinus(org.semanticweb.owlapi.model.OWLObjectPropertyExpression... excludes) Gets all components as a sortedSetwith exclusion of the specified.default StringAnswers a URI of the triple's subject.default booleanAnswerstrueiff the subject is a URI resource.default booleanAnswerstrueiff the object is a URI resource.default booleanAnswerstrueiff this is anOWL Annotation Property.default booleanAnswerstrueiff this is anOWL Anonymous Individual.default booleanAnswerstrueiff this is anOWL Class Expression.default booleanAnswerstrueiff this is anOWL Data Property.default booleanAnswerstrueiff this is anOWL Datatype.default booleanAnswerstrueiff this is anOWL Class.default booleanAnswerstrueiff this is anOWL Named Individual.default booleanAnswerstrueiff this is anOWL Object Property.members()Lists all characteristic (i.e. without annotations) components of this axiom.members(ModelObjectFactory factory) Lists all components of this axiom.objects()Lists all components in the form ofStream.objects(ModelObjectFactory factory) Lists all components and annotations of this axiom.Stream<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> sorted()Sorts and lists all components of this axiom.sorted(ModelObjectFactory factory) Returns a sorted and distinctStreamover all components (annotations are not included).Methods inherited from class com.github.owlcs.ontapi.internal.axioms.AbstractNaryTranslator.ObjectPropertyNaryAxiomImpl
canContainDataProperties, findByURI, listONTComponentsMethods inherited from class com.github.owlcs.ontapi.internal.axioms.AbstractNaryTranslator.NaryAxiomImpl
asPairwiseAxioms, canContainAnnotationProperties, createAnnotatedAxiom, fromPairs, isReverseTriple, makeCopyWith, merge, splitToAnnotatedPairsMethods inherited from class com.github.owlcs.ontapi.internal.objects.ONTAxiomImpl
collectAnnotations, eraseModel, getAnnotatedAxiom, getAxiomWithoutAnnotations, getConfig, getNNF, getObjectURI, getOWLObject, getSubjectBlankNodeId, getSubjectURI, hasURIObject, hasURIResource, hasURIResource, hasURISubject, setHashCode, triplesMethods inherited from class com.github.owlcs.ontapi.internal.objects.ONTStatementImpl
appendAnnotations, asStatement, asTriple, equals, factoryAnnotations, fromNode, getObjectNode, getPredicateNode, getSubjectNode, sameAs, sameComponents, sameContent, sameObject, samePredicate, sameSubject, sameTriple, stripMethods inherited from class com.github.owlcs.ontapi.internal.objects.ONTObjectImpl
containsAnnotationProperty, containsDataProperty, containsDatatype, containsEntity, containsEntityInSignature, containsNamedClass, containsNamedIndividual, containsObjectProperty, createContentSet, eraseModel, getAnnotationPropertySet, getAnonymousIndividualSet, getClassExpressionSet, getDataPropertySet, getDatatypeSet, getModel, getNamedClassSet, getNamedIndividualSet, getObjectFactory, getObjectPropertySet, getPersonalityModel, getSignatureSet, toStringMethods inherited from class com.github.owlcs.ontapi.owlapi.OWLObjectImpl
annotationPropertiesInSignature, anonymousIndividuals, classesInSignature, compareIterators, compareTo, createSet, createSet, createSortedSet, createSortedSet, dataPropertiesInSignature, datatypesInSignature, equalIterators, equalStreams, forOutput, getAnnotationPropertiesInSignature, getAnonymousIndividuals, getClassesInSignature, getDataPropertiesInSignature, getDatatypesInSignature, getIndividualsInSignature, getNestedClassExpressions, getObjectPropertiesInSignature, getSignature, hashCode, individualsInSignature, mergeAnnotations, nestedClassExpressions, notSame, objectPropertiesInSignature, prepareAnnotations, signature, toContentListMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.owlcs.ontapi.internal.objects.AsStatement
asStatement, asTripleMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.semanticweb.owlapi.model.HasAnnotationPropertiesInSignature
annotationPropertiesInSignature, getAnnotationPropertiesInSignatureMethods inherited from interface org.semanticweb.owlapi.model.HasAnnotations
annotations, annotations, getAnnotations, getAnnotationsMethods inherited from interface org.semanticweb.owlapi.model.HasAnonymousIndividuals
anonymousIndividuals, getAnonymousIndividualsMethods inherited from interface org.semanticweb.owlapi.model.HasClassesInSignature
classesInSignature, getClassesInSignatureMethods inherited from interface org.semanticweb.owlapi.model.HasContainsEntityInSignature
containsEntityInSignatureMethods inherited from interface org.semanticweb.owlapi.model.HasDataPropertiesInSignature
dataPropertiesInSignature, getDataPropertiesInSignatureMethods inherited from interface org.semanticweb.owlapi.model.HasDatatypesInSignature
datatypesInSignature, getDatatypesInSignatureMethods inherited from interface org.semanticweb.owlapi.model.HasIndividualsInSignature
getIndividualsInSignature, individualsInSignatureMethods inherited from interface com.github.owlcs.ontapi.internal.HasObjectFactory
getDataFactory, getObjectFactoryMethods inherited from interface org.semanticweb.owlapi.model.HasObjectPropertiesInSignature
getObjectPropertiesInSignature, objectPropertiesInSignatureMethods inherited from interface org.semanticweb.owlapi.model.HasOperands
getOperandsAsListMethods inherited from interface org.semanticweb.owlapi.model.HasSignature
getSignature, signature, unsortedSignatureMethods inherited from interface org.semanticweb.owlapi.model.IsAnonymous
isAnonymous, isNamedMethods inherited from interface com.github.owlcs.ontapi.internal.objects.ModelObject
getModelMethods inherited from interface com.github.owlcs.ontapi.internal.objects.ONTComposite
canContainObjectPropertiesMethods inherited from interface org.semanticweb.owlapi.model.OWLAxiom
equalsIgnoreAnnotations, getAnnotatedAxiom, getAnnotatedAxiom, getAnnotatedAxiom, getAxiomWithoutAnnotations, getNNF, isAnnotated, isAnnotationAxiom, isAxiom, isIndividual, isOfType, isOfType, isOfType, typeIndexMethods inherited from interface org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom
accept, accept, accept, accept, asPairwiseAxioms, getAxiomType, getAxiomWithoutAnnotations, hashIndex, splitToAnnotatedPairsMethods inherited from interface org.semanticweb.owlapi.model.OWLLogicalAxiom
isLogicalAxiomMethods inherited from interface org.semanticweb.owlapi.model.OWLNaryAxiom
allMatch, allMatchAllPairs, anyMatch, anyMatchAllPairs, forEach, forEachAllPairs, walkAllPairwise, walkPairwiseMethods inherited from interface org.semanticweb.owlapi.model.OWLNaryPropertyAxiom
components, componentsAnnotationsFirst, componentsWithoutAnnotations, getProperties, getPropertiesMinus, initHashCode, operands, propertiesMethods inherited from interface org.semanticweb.owlapi.model.OWLObject
getNestedClassExpressions, hasSharedStructure, isAnonymousExpression, isBottomEntity, isIRI, isOntology, isTopEntity, nestedClassExpressionsMethods inherited from interface com.github.owlcs.ontapi.internal.objects.WithAnnotations
annotations, annotationsAsList, isAnnotated
-
Constructor Details
-
AxiomImpl
protected AxiomImpl(org.apache.jena.graph.Triple t, Supplier<org.apache.jena.ontapi.model.OntModel> m) -
AxiomImpl
-
-
Method Details
-
create
public static EquivalentObjectPropertiesTranslator.AxiomImpl create(org.apache.jena.ontapi.model.OntStatement statement, ModelObjectFactory factory, AxiomsSettings config) Creates anONTObjectcontainer, that is alsoOWLEquivalentObjectPropertiesAxiom.- Parameters:
statement-OntStatement, notnullfactory-ONTObjectFactory, notnullconfig-AxiomsSettings, notnull- Returns:
EquivalentObjectPropertiesTranslator.AxiomImpl
-
count
protected final long count()Description copied from class:AbstractNaryTranslator.NaryAxiomImplReturns the number of components. For single-triple axioms (i.e. a with predicate such asowl:sameAs,owl:equivalentClass) the method returns2. Only n-ary axioms which are based onOntDisjointresource can different members count.- Specified by:
countin classAbstractNaryTranslator.NaryAxiomImpl<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom,org.semanticweb.owlapi.model.OWLObjectPropertyExpression> - Returns:
- long
-
createAxiom
protected org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom createAxiom(Collection<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> members, Collection<org.semanticweb.owlapi.model.OWLAnnotation> annotations) Description copied from class:AbstractNaryTranslator.NaryAxiomImplCreates a factory instance ofAbstractNaryTranslator.NaryAxiomImpl.- Specified by:
createAxiomin classAbstractNaryTranslator.NaryAxiomImpl<org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom,org.semanticweb.owlapi.model.OWLObjectPropertyExpression> - Parameters:
members- aCollectionofAbstractNaryTranslator.NaryAxiomImpl-members, notnullannotations- aCollectionofOWLAnnotations, can benull- Returns:
AbstractNaryTranslator.NaryAxiomImpl
-
createSubPropertyOf
protected org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom createSubPropertyOf(org.semanticweb.owlapi.model.OWLObjectPropertyExpression a, org.semanticweb.owlapi.model.OWLObjectPropertyExpression b) -
asSubObjectPropertyOfAxioms
public Collection<org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom> asSubObjectPropertyOfAxioms()- Specified by:
asSubObjectPropertyOfAxiomsin interfaceorg.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom
-
properties
- Specified by:
propertiesin interfaceorg.semanticweb.owlapi.model.OWLNaryPropertyAxiom<A extends org.semanticweb.owlapi.model.OWLNaryPropertyAxiom<P>>
-
getPropertiesMinus
public Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getPropertiesMinus(org.semanticweb.owlapi.model.OWLObjectPropertyExpression property) - Specified by:
getPropertiesMinusin interfaceorg.semanticweb.owlapi.model.OWLNaryPropertyAxiom<A extends org.semanticweb.owlapi.model.OWLNaryPropertyAxiom<P>>
-
canContainNamedClasses
public final boolean canContainNamedClasses()Description copied from interface:ONTCompositeAnswerstrueif this object-container is allowed to contain (named) OWL classes.- Specified by:
canContainNamedClassesin interfaceONTComposite- Returns:
- boolean
-
canContainClassExpressions
public final boolean canContainClassExpressions()Description copied from interface:ONTCompositeAnswerstrueif this object-container is allowed to contain nested class-expressions.- Specified by:
canContainClassExpressionsin interfaceONTComposite- Returns:
- boolean
-
canContainNamedIndividuals
public final boolean canContainNamedIndividuals()Description copied from interface:ONTCompositeAnswerstrueif this object-container is allowed to contain named individuals.- Specified by:
canContainNamedIndividualsin interfaceONTComposite- Returns:
- boolean
-
canContainDatatypes
public final boolean canContainDatatypes()Description copied from interface:ONTCompositeAnswerstrueif this object-container may contain datatypes.- Specified by:
canContainDatatypesin interfaceONTComposite- Returns:
- boolean
-
canContainAnonymousIndividuals
public final boolean canContainAnonymousIndividuals()Description copied from interface:ONTCompositeAnswerstrueif this object-container is allowed to contain anonymous individuals.- Specified by:
canContainAnonymousIndividualsin interfaceONTComposite- Returns:
- boolean
-
sorted
Stream<ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> sorted(ModelObjectFactory factory) Returns a sorted and distinctStreamover all components (annotations are not included).- Parameters:
factory-ModelObjectFactory, notnull- Returns:
- a
StreamofONTObjects that wrapWithManyObjectss
-
members
Stream<ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> members(ModelObjectFactory factory) Lists all components of this axiom.- Parameters:
factory-ModelObjectFactory, notnull- Returns:
- a
StreamofONTObjects that wrapWithManyObjectss
-
objects
Stream<ONTObject<? extends org.semanticweb.owlapi.model.OWLObject>> objects(ModelObjectFactory factory) Lists all components and annotations of this axiom.- Parameters:
factory-ModelObjectFactory, notnull- Returns:
- a
StreamofONTObjects that wrap eitherWithManyObjectss orOWLAnnotations
-
fetchONTComponents
default Set<ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> fetchONTComponents(org.apache.jena.ontapi.model.OntStatement statement, ModelObjectFactory factory) Gets all components (asONTObjects) in the form of sortedSet.- Parameters:
statement-OntStatement, the source, notnullfactory-ModelObjectFactory, notnull- Returns:
- a
SetofONTObjectwith typeWithManyObjects
-
sorted
default Stream<ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> sorted()Sorts and lists all components of this axiom.- Returns:
- a sorted
StreamofONTObjects that wrapWithManyObjectss
-
members
default Stream<ONTObject<? extends org.semanticweb.owlapi.model.OWLObjectPropertyExpression>> members()Lists all characteristic (i.e. without annotations) components of this axiom.- Returns:
- an unsorted
StreamofONTObjects that wrapWithManyObjectss
-
objects
Description copied from interface:ONTCompositeLists all components in the form ofStream. Neither this object nor parts of its components are not included in the result: it content only top-level direct components. Note thatHasComponents.components()may also contain non-OWLObjectthings: integers (e.g. cardinality),Lists (e.g.ObjectOneOf), etc, while this method is only forOWLObjects which are represented asONTObjects.- Specified by:
objectsin interfaceONTComposite- Returns:
StreamofONTObjects- See Also:
-
getSetMinus
default Set<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> getSetMinus(org.semanticweb.owlapi.model.OWLObjectPropertyExpression... excludes) Gets all components as a sortedSetwith exclusion of the specified.- Parameters:
excludes- anArrayofWithManyObjectss, notnull- Returns:
- a
SetofWithManyObjectss
-
hasURIObject
default boolean hasURIObject()Answerstrueiff the subject is a URI resource.- Returns:
- boolean
-
hasURISubject
default boolean hasURISubject()Answerstrueiff the object is a URI resource.- Returns:
- boolean
-
getSubjectURI
Answers a URI of the triple's subject.- Returns:
- URI of the subject
- Throws:
RuntimeException- in case the main triple has no subject uri (b-node instead)
-
getObjectURI
Answers a URI of the triple's object.- Returns:
- URI of the object
- Throws:
RuntimeException- in case the main triple has no object uri (b-node or literal instead)
-
getOWLComponentsAsSet
Set<? extends org.semanticweb.owlapi.model.OWLObject> getOWLComponentsAsSet(ModelObjectFactory factory) Gets all OWL characteristic components in the form ofSet.OWLAnnotations are not included.- Parameters:
factory-ModelObjectFactory, notnull- Returns:
- a sorted
SetofOWLObjects - See Also:
-
getOWLComponentsAsSet
Gets all OWL characteristic components in the form ofSet.- Returns:
- a sorted
SetofOWLObjects
-
isClassExpression
default boolean isClassExpression()Answerstrueiff this is anOWL Class Expression.- Returns:
- boolean
-
isAnonymousIndividual
default boolean isAnonymousIndividual()Answerstrueiff this is anOWL Anonymous Individual.- Returns:
- boolean
-
isNamedClass
default boolean isNamedClass()Answerstrueiff this is anOWL Class.- Returns:
- boolean
-
isNamedIndividual
default boolean isNamedIndividual()Answerstrueiff this is anOWL Named Individual.- Returns:
- boolean
-
isDatatype
default boolean isDatatype()Answerstrueiff this is anOWL Datatype.- Returns:
- boolean
-
isObjectProperty
default boolean isObjectProperty()Answerstrueiff this is anOWL Object Property.- Returns:
- boolean
-
isDataProperty
default boolean isDataProperty()Answerstrueiff this is anOWL Data Property.- Returns:
- boolean
-
isAnnotationProperty
default boolean isAnnotationProperty()Answerstrueiff this is anOWL Annotation Property.- Returns:
- boolean
-