Package org.incenp.obofoundry.sssom.owl
Class AnnotationAxiomGenerator
- java.lang.Object
-
- org.incenp.obofoundry.sssom.owl.AnnotationAxiomGenerator
-
- All Implemented Interfaces:
IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom>
public class AnnotationAxiomGenerator extends Object implements IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom>
A class to generate OWL annotation assertion axioms from mappings.
-
-
Constructor Summary
Constructors Constructor Description AnnotationAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.IRI property, IMappingTransformer<String> texter)Creates a new instance.AnnotationAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.IRI property, IMappingTransformer<String> texter, boolean invert)Creates a new instance to annotate the object of a mapping rather than the subject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.semanticweb.owlapi.model.OWLAxiomtransform(Mapping mapping)Transform a mapping into something else.
-
-
-
Constructor Detail
-
AnnotationAxiomGenerator
public AnnotationAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.IRI property, IMappingTransformer<String> texter)Creates a new instance. This generator will create an annotation assertion axiom for the subject of the mapping.- Parameters:
ontology- The ontology to generate axioms for.property- The property to create an annotation with.texter- A transformer that will format a mapping into the annotation value. For example, to create an annotation with mapping's subject label as value:AnnotationAxiomGenerator g = new AnnotationAxiomGenerator(ontology, property, (mapping) -> mapping.getSubjectLabel());
-
AnnotationAxiomGenerator
public AnnotationAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.IRI property, IMappingTransformer<String> texter, boolean invert)Creates a new instance to annotate the object of a mapping rather than the subject.- Parameters:
ontology- The ontology to generate axioms for.property- The property to create an annotation with.texter- A transformer that will format a mapping into the annotation value.invert- Iftrue, the object of the mapping will be annotated, rather than the subject.
-
-
Method Detail
-
transform
public org.semanticweb.owlapi.model.OWLAxiom transform(Mapping mapping)
Description copied from interface:IMappingTransformerTransform a mapping into something else.- Specified by:
transformin interfaceIMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom>- Parameters:
mapping- The mapping to transform.- Returns:
- The object generated from the mapping.
-
-