Annotation

class Annotation(annotation_property, value, *, annotations=None)[source]

Bases: Box

An element defined in 10.1 “Annotations of Ontologies, Axioms, and other Annotations”.

https://www.w3.org/TR/owl2-syntax/Annotations.gif

Annotations can be used to add additional context, like curation provenance, to assertions

>>> AnnotationAssertion(
...     "skos:exactMatch",
...     "agrovoc:0619dd9e",
...     "agro:00000137",
...     annotations=[
...         Annotation("dcterms:contributor", "orcid:0000-0003-4423-4370"),
...         Annotation("sssom:mapping_justification", "semapv:ManualMappingCuration"),
...     ],
... )

Annotations can even be used on themselves, adding arbitrary levels of detail. In the following example, we annotate the affiliation of the contributor via the wd:P1416 (affiliation) predicate.

>>> AnnotationAssertion(
...     "skos:exactMatch",
...     "agrovoc:0619dd9e",
...     "agro:00000137",
...     annotations=[
...         Annotation(
...             "dcterms:contributor",
...             "orcid:0000-0003-4423-4370",
...             annotations=[
...                 Annotation("wd:P1416", "wd:Q126066280"),
...             ],
...         ),
...         Annotation("sssom:mapping_justification", "semapv:ManualMappingCuration"),
...     ],
... )

Initialize an annotation.

Methods Summary

to_funowl_args()

Get the inside of the functional OWL tag representing the annotation.

to_rdflib_node(graph, converter)

Represent the annotation as an RDF node (unused).

Methods Documentation

Parameters:
  • annotation_property (IdentifierBox)

  • value (LiteralBox | IdentifierBox)

  • annotations (list[Annotation])

to_funowl_args()[source]

Get the inside of the functional OWL tag representing the annotation.

Return type:

str

to_rdflib_node(graph, converter)[source]

Represent the annotation as an RDF node (unused).

Parameters:
  • graph (Graph)

  • converter (Converter)

Return type:

IdentifiedNode