Class AnnotationVisitor<T>
java.lang.Object
org.incenp.obofoundry.sssom.owl.AnnotationVisitor<T>
- All Implemented Interfaces:
ISlotVisitor<T>
A mapping slots visitor that converts mapping metadata to OWL annotations.
-
Method Summary
Modifier and TypeMethodDescriptionorg.semanticweb.owlapi.model.OWLAxiomannotate(org.semanticweb.owlapi.model.OWLAxiom axiom) Annotates an axiom with the annotations generated from the visited slots.org.semanticweb.owlapi.model.OWLAxiomannotate(org.semanticweb.owlapi.model.OWLAxiom axiom, boolean reset) Annotates an axiom with the annotations generated from the visited slots.voidannotate(org.semanticweb.owlapi.model.OWLOntology ontology) Annotates an ontology with the annotations generated from the visited slots.voidannotate(org.semanticweb.owlapi.model.OWLOntology ontology, boolean reset) Annotates an ontology with the annotations generated from the visited slots.voidrenderExtensionSlots(boolean value) Specifies whether extension slots should be rendered as well as standard slots.voidrenderURISlotsAsResources(boolean value) Specifies whether URI-typed slots (e.g., sssom:license) should be rendered as IRI-identified resources rather than as xsd:anyURI literals.voidreset()Resets this visitor.voidVisits a slot that holds a curie map.voidVisits a date-typed slot.voidvisit(DoubleSlot<T> slot, T object, Double value) Visits a double-typed slot.voidvisit(EntityReferenceSlot<T> slot, T object, String value) Visits a slot that holds an entity reference.voidVisits a multi-valued slot that holds entity references.voidvisit(EntityTypeSlot<T> slot, T object, EntityType value) Visits a slot that holds an entity type enumeration value.voidvisit(ExtensionDefinitionSlot<T> slot, T object, List<ExtensionDefinition> values) Visits a slot that holds a list of extension definitions for non-standard metadata.voidvisit(ExtensionSlot<T> slot, T object, Map<String, ExtensionValue> values) Visits a slot that holds extension values (non-standard metadata).voidvisit(MappingCardinalitySlot<T> slot, T object, MappingCardinality value) Visits a slot that holds a mapping cardinality enumeration value.voidvisit(PredicateModifierSlot<T> slot, T object, PredicateModifier value) Visits a slot that holds a predicate modifier enumeration value.voidVisits a generic slot.voidvisit(StringSlot<T> slot, T object, String value) Visits a string-typed slot.voidVisits a multi-valued string-typed slot.voidVisits a URI-typed slot.voidVisits a multi-valued URI-typed slot.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ISlotVisitor
visit
-
Method Details
-
renderURISlotsAsResources
public void renderURISlotsAsResources(boolean value) Specifies whether URI-typed slots (e.g., sssom:license) should be rendered as IRI-identified resources rather than as xsd:anyURI literals.URI-typed slots are rendered as resources in the RDF serialisation, so it seems logical that they should be rendered similarly in the OWL serialisation. But that has not been decided yet, so for now we support both.
- Parameters:
value- Iftrue, URI-typed slots are rendered as IRIs.
-
renderExtensionSlots
public void renderExtensionSlots(boolean value) Specifies whether extension slots should be rendered as well as standard slots.The default behaviour is to render extension slots.
- Parameters:
value- Iffalse, extension slots will not be rendered.
-
annotate
public org.semanticweb.owlapi.model.OWLAxiom annotate(org.semanticweb.owlapi.model.OWLAxiom axiom) Annotates an axiom with the annotations generated from the visited slots.- Parameters:
axiom- The axiom to annotate.- Returns:
- The annotated axiom.
-
annotate
public org.semanticweb.owlapi.model.OWLAxiom annotate(org.semanticweb.owlapi.model.OWLAxiom axiom, boolean reset) Annotates an axiom with the annotations generated from the visited slots.- Parameters:
axiom- The axiom to annotate.reset- Iftrue, reset this visitor after annotating the axiom, so that it is ready to visit the slots of another object.- Returns:
- The annotated axiom.
-
annotate
public void annotate(org.semanticweb.owlapi.model.OWLOntology ontology) Annotates an ontology with the annotations generated from the visited slots.- Parameters:
ontology- The ontology to annotate.
-
annotate
public void annotate(org.semanticweb.owlapi.model.OWLOntology ontology, boolean reset) Annotates an ontology with the annotations generated from the visited slots.- Parameters:
ontology- The ontology to annotate.reset- Iftrue, reset this visitor after annotating the ontology, so that it is ready to visit the slots of another object.
-
reset
public void reset()Resets this visitor. This clears all accumulated annotations from previously visited slots. -
visit
Description copied from interface:ISlotVisitorVisits a string-typed slot.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.value- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a multi-valued string-typed slot.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.values- The values of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a URI-typed slot.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.value- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a multi-valued URI-typed slot.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.values- The values of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a slot that holds an entity reference.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.value- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a multi-valued slot that holds entity references.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.values- The values of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a double-typed slot.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.value- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a date-typed slot.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.value- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a generic slot.This method is normally not used as all slots in a SSSOM object have more precise types. But it can be used to implement behaviours that should be common to several slot types.
- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.mapping- The object to which the slot is attached.value- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a slot that holds extension values (non-standard metadata).- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.values- The values of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a slot that holds an entity type enumeration value.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.value- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a slot that holds a mapping cardinality enumeration value.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.value- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a slot that holds a predicate modifier enumeration value.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.value- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a slot that holds a curie map.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.value- The value of the slot.
-
visit
Description copied from interface:ISlotVisitorVisits a slot that holds a list of extension definitions for non-standard metadata.- Specified by:
visitin interfaceISlotVisitor<T>- Parameters:
slot- The slot that is being visited.object- The object to which the slot is attached.values- The values of the slot.
-