Package org.semanticweb.owlapi.model
Interface OWLAnnotation
- All Superinterfaces:
Comparable<OWLObject>
,HasAnnotationPropertiesInSignature
,HasAnnotations
,HasAnnotationValue
,HasAnonymousIndividuals
,HasClassesInSignature
,HasComponents
,HasContainsEntityInSignature
,HasDataPropertiesInSignature
,HasDatatypesInSignature
,HasHashIndex
,HasIndex
,HasIndividualsInSignature
,HasObjectPropertiesInSignature
,HasProperty<OWLAnnotationProperty>
,HasSignature
,IsAnonymous
,OWLObject
,Serializable
- All Known Implementing Classes:
OWLAnnotationImpl
,OWLAnnotationImplNotAnnotated
public interface OWLAnnotation
extends OWLObject, HasAnnotations, HasProperty<OWLAnnotationProperty>, HasAnnotationValue
Annotations are used in the various types of annotation axioms, which bind annotations to their
subjects (i.e. axioms or declarations).
An annotation is equal to another annotation if both objects have equal annotation URIs and have equal annotation values.
An annotation is equal to another annotation if both objects have equal annotation URIs and have equal annotation values.
- Since:
- 2.0.0
- Author:
- Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
accept
(OWLAnnotationObjectVisitor visitor) default <O> O
accept
(OWLAnnotationObjectVisitorEx<O> visitor) default void
accept
(OWLObjectVisitor visitor) Accepts a visitordefault <O> O
accept
(OWLObjectVisitorEx<O> visitor) Accepts a visitordefault OWLAnnotationValue
default Stream<?>
default Stream<?>
default Stream<?>
getAnnotatedAnnotation
(Collection<OWLAnnotation> annotations) Gets an OWLAnnotation which is a copy of this annotation but which has the specified annotations.getAnnotatedAnnotation
(Stream<OWLAnnotation> annotations) Gets an OWLAnnotation which is a copy of this annotation but which has the specified annotations.Gets the property that this annotation acts along.getValue()
Gets the annotation value.default int
default int
boolean
Determines if this annotation is an annotation used to deprecate an IRI.default 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.HasAnnotationValue
anonymousIndividualValue, ifAnonymousIndividual, ifAnonymousIndividualOrElse, ifIri, ifIriOrElse, ifLiteral, ifLiteralOrElse, ifValue, iriValue, literalValue, map, map, mapAnonymousIndividual, mapAnonymousIndividualOrElse, mapAnonymousIndividualOrElseGet, mapIri, mapIriOrElse, mapIriOrElseGet, mapLiteral, mapLiteralOrElse, mapLiteralOrElseGet, mapValue, when
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.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.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
getNestedClassExpressions, hasSharedStructure, isAnonymousExpression, isAxiom, isBottomEntity, isIndividual, isIRI, isOntology, isTopEntity, nestedClassExpressions
-
Method Details
-
componentsWithoutAnnotations
- Specified by:
componentsWithoutAnnotations
in interfaceHasComponents
- Returns:
- components as a stream; for objects that can have annotations on them, these are skipped. This is useful for comparing axioms without taking annotations into account. Note: annotations on nested objects are not affected. The stream is ordered (by visit order) but not sorted. Implementations that override components() must ensure the order is compatible with equals() and hashCode().
-
components
- Specified by:
components
in interfaceHasComponents
- Returns:
- components as a stream. The stream is ordered (by visit order) but not sorted. Implementations that override components() must ensure the order is compatible with equals() and hashCode().
-
initHashCode
default int initHashCode()- Specified by:
initHashCode
in interfaceOWLObject
- Returns:
- hash code for the object; called on first use, cached by OWLObjectImpl in the default implementation.
-
componentsAnnotationsFirst
- Specified by:
componentsAnnotationsFirst
in interfaceHasComponents
- Returns:
- components as a stream; for objects that can have annotations on them, annotation streams appear first. This is useful in renderers. The stream is ordered (by visit order) but not sorted. Implementations that override components() must ensure the order is compatible with equals() and hashCode().
-
hashIndex
default int hashIndex()- Specified by:
hashIndex
in interfaceHasHashIndex
- Returns:
- index for this type. This is not a hashcode for instances, rather a hashcode for the types.
-
typeIndex
default int typeIndex() -
getProperty
OWLAnnotationProperty getProperty()Gets the property that this annotation acts along.- Specified by:
getProperty
in interfaceHasProperty<OWLAnnotationProperty>
- Returns:
- The annotation property
-
getValue
OWLAnnotationValue getValue()Gets the annotation value. The type of value will depend upon the type of the annotation e.g. whether the annotation is anOWLLiteral
, anIRI
or anOWLAnonymousIndividual
.- Returns:
- The annotation value.
- See Also:
-
isDeprecatedIRIAnnotation
boolean isDeprecatedIRIAnnotation()Determines if this annotation is an annotation used to deprecate an IRI. This is the case if the annotation property has an IRI ofowl:deprecated
and the value of the annotation is"true"^^xsd:boolean
- Returns:
true
if this annotation is an annotation that can be used to deprecate an IRI, otherwisefalse
.
-
getAnnotatedAnnotation
Gets an OWLAnnotation which is a copy of this annotation but which has the specified annotations.- Parameters:
annotations
- The annotations- Returns:
- A copy of this annotation with the specified annotations annotating it
-
getAnnotatedAnnotation
Gets an OWLAnnotation which is a copy of this annotation but which has the specified annotations.- Parameters:
annotations
- The annotations- Returns:
- A copy of this annotation with the specified annotations annotating it
-
accept
- Parameters:
visitor
- visitor to accept
-
accept
- Type Parameters:
O
- visitor return type- Parameters:
visitor
- visitor to accept- Returns:
- visitor value
-
accept
Description copied from interface:OWLObject
Accepts a visitor -
accept
Description copied from interface:OWLObject
Accepts a visitor -
annotationValue
- Specified by:
annotationValue
in interfaceHasAnnotationValue
- Returns:
- the annotation value itself; this method allows OWLAnnotationAssertionAxiom and OWLAnnotation to use the default methods rather than replicate the methods. For OWLAnnotationValue instances, the value returned is the object itself.
-