Package org.semanticweb.owlapi.model
Interface OWLAxiom
- All Superinterfaces:
Comparable<OWLObject>
,HasAnnotationPropertiesInSignature
,HasAnnotations
,HasAnonymousIndividuals
,HasClassesInSignature
,HasComponents
,HasContainsEntityInSignature
,HasDataPropertiesInSignature
,HasDatatypesInSignature
,HasHashIndex
,HasIndex
,HasIndividualsInSignature
,HasObjectPropertiesInSignature
,HasSignature
,IsAnonymous
,OWLObject
,Serializable
- All Known Subinterfaces:
OWLAnnotationAssertionAxiom
,OWLAnnotationAxiom
,OWLAnnotationPropertyDomainAxiom
,OWLAnnotationPropertyRangeAxiom
,OWLAsymmetricObjectPropertyAxiom
,OWLClassAssertionAxiom
,OWLClassAxiom
,OWLDataPropertyAssertionAxiom
,OWLDataPropertyAxiom
,OWLDataPropertyCharacteristicAxiom
,OWLDataPropertyDomainAxiom
,OWLDataPropertyRangeAxiom
,OWLDatatypeDefinitionAxiom
,OWLDeclarationAxiom
,OWLDifferentIndividualsAxiom
,OWLDisjointClassesAxiom
,OWLDisjointDataPropertiesAxiom
,OWLDisjointObjectPropertiesAxiom
,OWLDisjointUnionAxiom
,OWLEquivalentClassesAxiom
,OWLEquivalentDataPropertiesAxiom
,OWLEquivalentObjectPropertiesAxiom
,OWLFunctionalDataPropertyAxiom
,OWLFunctionalObjectPropertyAxiom
,OWLHasKeyAxiom
,OWLIndividualAxiom
,OWLInverseFunctionalObjectPropertyAxiom
,OWLInverseObjectPropertiesAxiom
,OWLIrreflexiveObjectPropertyAxiom
,OWLLogicalAxiom
,OWLNaryAxiom<C>
,OWLNaryClassAxiom
,OWLNaryIndividualAxiom
,OWLNaryPropertyAxiom<P>
,OWLNegativeDataPropertyAssertionAxiom
,OWLNegativeObjectPropertyAssertionAxiom
,OWLObjectPropertyAssertionAxiom
,OWLObjectPropertyAxiom
,OWLObjectPropertyCharacteristicAxiom
,OWLObjectPropertyDomainAxiom
,OWLObjectPropertyRangeAxiom
,OWLPropertyAssertionAxiom<P,
,O> OWLPropertyAxiom
,OWLPropertyDomainAxiom<P>
,OWLPropertyRangeAxiom<P,
,R> OWLReflexiveObjectPropertyAxiom
,OWLSameIndividualAxiom
,OWLSubAnnotationPropertyOfAxiom
,OWLSubClassOfAxiom
,OWLSubDataPropertyOfAxiom
,OWLSubObjectPropertyOfAxiom
,OWLSubPropertyAxiom<P>
,OWLSubPropertyChainOfAxiom
,OWLSymmetricObjectPropertyAxiom
,OWLTransitiveObjectPropertyAxiom
,OWLUnaryPropertyAxiom<P>
,SWRLRule
Represents Axioms in the OWL 2
Specification.
An OWL ontology contains a set of axioms. These axioms can be annotation axioms, declaration axioms, imports axioms or logical axioms
An OWL ontology contains a set of axioms. These axioms can be annotation axioms, declaration axioms, imports axioms or logical axioms
- Since:
- 2.0.0
- Author:
- Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(OWLAxiomVisitor visitor) <O> O
accept
(OWLAxiomVisitorEx<O> visitor) default boolean
equalsIgnoreAnnotations
(OWLAxiom axiom) Determines if another axiom is equal to this axiom not taking into consideration the annotations on the axiomdefault <T extends OWLAxiom>
TgetAnnotatedAxiom
(Class<T> witness, Stream<OWLAnnotation> annotations) Gets a copy of this axiom that is annotated with the specified annotations.default <T extends OWLAxiom>
TgetAnnotatedAxiom
(Collection<OWLAnnotation> annotations) Gets a copy of this axiom that is annotated with the specified annotations.static <T extends OWLAxiom>
TgetAnnotatedAxiom
(Collection<OWLAnnotation> annotations, T axiom) Gets a copy of the input axiom that is annotated with the specified annotations.<T extends OWLAxiom>
TgetAnnotatedAxiom
(Stream<OWLAnnotation> annotations) Gets a copy of this axiom that is annotated with the specified annotations.static <T extends OWLAxiom>
TgetAnnotatedAxiom
(Stream<OWLAnnotation> annotations, T axiom) Gets a copy of the input axiom that is annotated with the specified annotations.AxiomType<?>
Gets the axiom type for this axiom.<T extends OWLAxiom>
TGets an axiom that is structurally equivalent to this axiom without annotations.default <T extends OWLAxiom>
TgetAxiomWithoutAnnotations
(Class<T> witness) Gets an axiom that is structurally equivalent to this axiom without annotations.static <T extends OWLAxiom>
TgetAxiomWithoutAnnotations
(T axiom) Gets an axiom that is structurally equivalent to the input axiom without annotations.getNNF()
Gets this axioms in negation normal form.boolean
Determines if this axiom has any annotations on itdefault boolean
Determines if this axioms in an annotation axiom (an instance ofOWLAnnotationAxiom
)default boolean
isAxiom()
default boolean
default boolean
Determines if this axiom is a logical axiom.default boolean
isOfType
(Collection<AxiomType<?>> types) Determines if this axiom is one of the specified typesdefault boolean
Determines if this axiom is one of the specified typesdefault boolean
Determines if this axiom is one of the specified typesdefault int
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.semanticweb.owlapi.model.HasAnnotationPropertiesInSignature
annotationPropertiesInSignature, getAnnotationPropertiesInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasAnnotations
annotations, annotations, annotations, annotationsAsList, getAnnotations, getAnnotations
Methods inherited from interface org.semanticweb.owlapi.model.HasAnonymousIndividuals
anonymousIndividuals, getAnonymousIndividuals
Methods inherited from interface org.semanticweb.owlapi.model.HasClassesInSignature
classesInSignature, getClassesInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasComponents
components, componentsAnnotationsFirst, componentsWithoutAnnotations
Methods inherited from interface org.semanticweb.owlapi.model.HasContainsEntityInSignature
containsEntityInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasDataPropertiesInSignature
dataPropertiesInSignature, getDataPropertiesInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasDatatypesInSignature
datatypesInSignature, getDatatypesInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasHashIndex
hashIndex
Methods inherited from interface org.semanticweb.owlapi.model.HasIndividualsInSignature
getIndividualsInSignature, individualsInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasObjectPropertiesInSignature
getObjectPropertiesInSignature, objectPropertiesInSignature
Methods inherited from interface org.semanticweb.owlapi.model.HasSignature
getSignature, signature, unsortedSignature
Methods inherited from interface org.semanticweb.owlapi.model.IsAnonymous
isAnonymous, isNamed
Methods inherited from interface org.semanticweb.owlapi.model.OWLObject
accept, accept, getNestedClassExpressions, hasSharedStructure, initHashCode, isAnonymousExpression, isBottomEntity, isIRI, isOntology, isTopEntity, nestedClassExpressions
-
Method Details
-
getAxiomWithoutAnnotations
Gets an axiom that is structurally equivalent to the input axiom without annotations. This essentially returns a version of the axiom stripped of any annotations.- Type Parameters:
T
- type- Parameters:
axiom
- axiom to divest of annotations- Returns:
- The axiom without annotations
-
getAnnotatedAxiom
Gets a copy of the input axiom that is annotated with the specified annotations. If the axiom has any annotations on it they will be merged with the specified set of annotations. Note that the input axiom will not be modified (or removed from any ontologies).- Type Parameters:
T
- type of axiom returned- Parameters:
axiom
- axiom to be copiedannotations
- The annotations that will be added to existing annotations to annotate the copy of this axiom- Returns:
- A copy of this axiom that has the specified annotations plus any existing annotations
returned by the
OWLAxiom#getAnnotations()
method.
-
getAnnotatedAxiom
Gets a copy of the input axiom that is annotated with the specified annotations. If the axiom has any annotations on it they will be merged with the specified set of annotations. Note that the input axiom will not be modified (or removed from any ontologies).- Type Parameters:
T
- type of axiom returned- Parameters:
axiom
- axiom to be copiedannotations
- The annotations that will be added to existing annotations to annotate the copy of this axiom- Returns:
- A copy of this axiom that has the specified annotations plus any existing annotations
returned by the
OWLAxiom#getAnnotations()
method.
-
typeIndex
default int typeIndex() -
isIndividual
default boolean isIndividual()- Specified by:
isIndividual
in interfaceOWLObject
- Returns:
- true if this object is an individual.
-
isAxiom
default boolean isAxiom() -
accept
- Parameters:
visitor
- visitor to accept
-
accept
- Type Parameters:
O
- visitor return type- Parameters:
visitor
- visitor to accept- Returns:
- visitor value
-
getAxiomWithoutAnnotations
Gets an axiom that is structurally equivalent to this axiom without annotations. This essentially returns a version of this axiom stripped of any annotations.- Type Parameters:
T
- type- Returns:
- The axiom without annotations
-
getAxiomWithoutAnnotations
Gets an axiom that is structurally equivalent to this axiom without annotations. This essentially returns a version of this axiom stripped of any annotations.
Callingaxiom.getAxiomWithoutAnnotations(axiom.getClass())
is equivalent toaxiom.getAxiomWithoutAnnotations()
, but it provides compile time type safety - there will be no attempt to cast to an incompatible type.- Type Parameters:
T
- type- Parameters:
witness
- Variable to ground the generic return type- Returns:
- The axiom without annotations
-
getAnnotatedAxiom
default <T extends OWLAxiom> T getAnnotatedAxiom(Class<T> witness, Stream<OWLAnnotation> annotations) Gets a copy of this axiom that is annotated with the specified annotations. If this axiom has any annotations on it they will be merged with the specified set of annotations. Note that this axiom will not be modified (or removed from any ontologies).
Callingaxiom.getAnnotatedAxiom(axiom.getClass(), annotations)
is equivalent toaxiom.getAnnotatedAxiom(annotations)
, but it provides compile time type safety - there will be no attempt to cast to an incompatible type.- Type Parameters:
T
- type- Parameters:
witness
- Variable to ground the generic return typeannotations
- The annotations that will be added to existing annotations to annotate the copy of this axiom- Returns:
- A copy of this axiom that has the specified annotations plus any existing annotations
returned by the
OWLAxiom#getAnnotations()
method.
-
getAnnotatedAxiom
Gets a copy of this axiom that is annotated with the specified annotations. If this axiom has any annotations on it they will be merged with the specified set of annotations. Note that this axiom will not be modified (or removed from any ontologies).- Type Parameters:
T
- type- Parameters:
annotations
- The annotations that will be added to existing annotations to annotate the copy of this axiom- Returns:
- A copy of this axiom that has the specified annotations plus any existing annotations
returned by the
OWLAxiom#getAnnotations()
method.
-
getAnnotatedAxiom
Gets a copy of this axiom that is annotated with the specified annotations. If this axiom has any annotations on it they will be merged with the specified set of annotations. Note that this axiom will not be modified (or removed from any ontologies).- Type Parameters:
T
- type- Parameters:
annotations
- The annotations that will be added to existing annotations to annotate the copy of this axiom- Returns:
- A copy of this axiom that has the specified annotations plus any existing annotations
returned by the
OWLAxiom#getAnnotations()
method.
-
equalsIgnoreAnnotations
Determines if another axiom is equal to this axiom not taking into consideration the annotations on the axiom- Parameters:
axiom
- The axiom to test if equal- Returns:
true
ifaxiom
without annotations is equal to this axiom without annotations otherwisefalse
.
-
isLogicalAxiom
default boolean isLogicalAxiom()Determines if this axiom is a logical axiom. Logical axioms are defined to be axioms other than both declaration axioms (including imports declarations) and annotation axioms.- Returns:
true
if the axiom is a logical axiom,false
if the axiom is not a logical axiom.
-
isAnnotationAxiom
default boolean isAnnotationAxiom()Determines if this axioms in an annotation axiom (an instance ofOWLAnnotationAxiom
)- Returns:
true
if this axiom is an instance ofOWLAnnotationAxiom
, otherwisefalse
.- Since:
- 3.2
-
isAnnotated
boolean isAnnotated()Determines if this axiom has any annotations on it- Returns:
true
if this axiom has annotations on it, otherwisefalse
-
getAxiomType
AxiomType<?> getAxiomType()Gets the axiom type for this axiom.- Returns:
- The axiom type that corresponds to the type of this axiom.
-
isOfType
Determines if this axiom is one of the specified types- Parameters:
axiomTypes
- The axiom types to check for- Returns:
true
if this axiom is one of the specified types, otherwisefalse
- Since:
- 3.0
-
isOfType
Determines if this axiom is one of the specified types- Parameters:
types
- The axiom types to check for- Returns:
true
if this axioms is one of the specified types, otherwisefalse
- Since:
- 3.0
-
isOfType
Determines if this axiom is one of the specified types- Parameters:
types
- The axiom types to check for- Returns:
true
if this axioms is one of the specified types, otherwisefalse
- Since:
- 3.0
-
getNNF
OWLAxiom getNNF()Gets this axioms in negation normal form. i.e. any class expressions involved in this axiom are converted into negation normal form.- Returns:
- The axiom in negation normal form.
-