Interface HasAnnotations

All Known Subinterfaces:
OWLAnnotation, OWLAnnotationAssertionAxiom, OWLAnnotationAxiom, OWLAnnotationPropertyDomainAxiom, OWLAnnotationPropertyRangeAxiom, OWLAsymmetricObjectPropertyAxiom, OWLAxiom, 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, OWLMutableOntology, OWLNaryAxiom<C>, OWLNaryClassAxiom, OWLNaryIndividualAxiom, OWLNaryPropertyAxiom<P>, OWLNegativeDataPropertyAssertionAxiom, OWLNegativeObjectPropertyAssertionAxiom, OWLObjectPropertyAssertionAxiom, OWLObjectPropertyAxiom, OWLObjectPropertyCharacteristicAxiom, OWLObjectPropertyDomainAxiom, OWLObjectPropertyRangeAxiom, OWLOntology, OWLPropertyAssertionAxiom<P,O>, OWLPropertyAxiom, OWLPropertyDomainAxiom<P>, OWLPropertyRangeAxiom<P,R>, OWLReflexiveObjectPropertyAxiom, OWLSameIndividualAxiom, OWLSubAnnotationPropertyOfAxiom, OWLSubClassOfAxiom, OWLSubDataPropertyOfAxiom, OWLSubObjectPropertyOfAxiom, OWLSubPropertyAxiom<P>, OWLSubPropertyChainOfAxiom, OWLSymmetricObjectPropertyAxiom, OWLTransitiveObjectPropertyAxiom, OWLUnaryPropertyAxiom<P>, SWRLRule
All Known Implementing Classes:
ConcurrentOWLOntologyImpl, OWLAnnotationAssertionAxiomImpl, OWLAnnotationImpl, OWLAnnotationImplNotAnnotated, OWLAnnotationPropertyDomainAxiomImpl, OWLAnnotationPropertyRangeAxiomImpl, OWLAsymmetricObjectPropertyAxiomImpl, OWLAxiomImpl, OWLClassAssertionAxiomImpl, OWLClassAxiomImpl, OWLDataPropertyAssertionAxiomImpl, OWLDataPropertyCharacteristicAxiomImpl, OWLDataPropertyDomainAxiomImpl, OWLDataPropertyRangeAxiomImpl, OWLDatatypeDefinitionAxiomImpl, OWLDeclarationAxiomImpl, OWLDifferentIndividualsAxiomImpl, OWLDisjointClassesAxiomImpl, OWLDisjointDataPropertiesAxiomImpl, OWLDisjointObjectPropertiesAxiomImpl, OWLDisjointUnionAxiomImpl, OWLEquivalentClassesAxiomImpl, OWLEquivalentDataPropertiesAxiomImpl, OWLEquivalentObjectPropertiesAxiomImpl, OWLFunctionalDataPropertyAxiomImpl, OWLFunctionalObjectPropertyAxiomImpl, OWLHasKeyAxiomImpl, OWLImmutableOntologyImpl, OWLIndividualAxiomImpl, OWLIndividualRelationshipAxiomImpl, OWLInverseFunctionalObjectPropertyAxiomImpl, OWLInverseObjectPropertiesAxiomImpl, OWLIrreflexiveObjectPropertyAxiomImpl, OWLLogicalAxiomImpl, OWLNaryClassAxiomImpl, OWLNaryIndividualAxiomImpl, OWLNaryPropertyAxiomImpl, OWLNegativeDataPropertyAssertionAxiomImpl, OWLNegativeObjectPropertyAssertionAxiomImpl, OWLObjectPropertyAssertionAxiomImpl, OWLObjectPropertyCharacteristicAxiomImpl, OWLObjectPropertyDomainAxiomImpl, OWLObjectPropertyRangeAxiomImpl, OWLOntologyImpl, OWLPropertyAxiomImpl, OWLPropertyDomainAxiomImpl, OWLPropertyRangeAxiomImpl, OWLReflexiveObjectPropertyAxiomImpl, OWLSameIndividualAxiomImpl, OWLSubAnnotationPropertyOfAxiomImpl, OWLSubClassOfAxiomImpl, OWLSubDataPropertyOfAxiomImpl, OWLSubObjectPropertyOfAxiomImpl, OWLSubPropertyAxiomImpl, OWLSubPropertyChainAxiomImpl, OWLSymmetricObjectPropertyAxiomImpl, OWLTransitiveObjectPropertyAxiomImpl, OWLUnaryPropertyAxiomImpl, SWRLRuleImpl

public interface HasAnnotations
An interface to an object that has annotation.
Since:
3.4.6
Author:
Matthew Horridge, Stanford University, Bio-Medical Informatics Research Group
  • Method Details

    • annotations

      default Stream<OWLAnnotation> annotations()
      Returns:
      a sorted stream of OWLAnnotation instances on this object. This will only include the annotations contained in this object, not the value of annotation assertion axioms in an ontology or in other ontologies. Use the EntitySearcher methods for that purpose.
    • annotationsAsList

      default List<OWLAnnotation> annotationsAsList()
      Returns:
      annotation collection s list
    • annotations

      default Stream<OWLAnnotation> annotations(Predicate<OWLAnnotation> p)
      Parameters:
      p - filter predicate for annotations. Can be used to match the annotation property or the annotation value
      Returns:
      a stream of OWLAnnotation instances on this object, with filter applied. This will only include the annotations contained in this object, not the value of annotation assertion axioms in an ontology or in other ontologies. Use the EntitySearcher methods for that purpose.
    • annotations

      default Stream<OWLAnnotation> annotations(OWLAnnotationProperty p)
      Parameters:
      p - annotation property to filter on
      Returns:
      a stream of OWLAnnotation instances on this object, with filter applied. This will only include the annotations contained in this object, not the value of annotation assertion axioms in an ontology or in other ontologies. Use the EntitySearcher methods for that purpose.
    • getAnnotations

      default Set<OWLAnnotation> getAnnotations()
      Gets the annotations on this object.
      Returns:
      A set of annotations on this object. For an OWLOntology, these are the ontology annotations, not the annotations attached to axioms or annotation axioms contained in the ontology. For an OWLAnnotation, these are the annotations on the annotation; the annotation itself is not included. The set returned will be a copy - modifying the set will have no effect on the annotations in this object, similarly, any changes that affect the annotations on this object will not change the returned set. Note: for iterating over this set of annotations, using the annotations() stream is more efficient.
    • getAnnotations

      default Set<OWLAnnotation> getAnnotations(OWLAnnotationProperty annotationProperty)
      Gets the annotations whose annotation property is equal to annotationProperty.
      Parameters:
      annotationProperty - The annotation property that will be equal to the annotation property of each returned annotation.
      Returns:
      A set of annotations whose annotation properties is equals to annotationProperty.