Annotation

class Annotation(annotation_property: URIRef | Reference | Referenced | str | IdentifierBox, value: URIRef | Reference | Referenced | str | IdentifierBox | LiteralBox | Literal | int | float | bool | date | datetime | OBOLiteral, *, annotations: list[Annotation] | None = 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

to_funowl_args() str[source]

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

to_rdflib_node(graph: Graph, converter: Converter) IdentifiedNode[source]

Represent the annotation as an RDF node (unused).