Package org.incenp.obofoundry.sssom.owl
Class AnnotatedAxiomGenerator
java.lang.Object
org.incenp.obofoundry.sssom.owl.AnnotatedAxiomGenerator
- All Implemented Interfaces:
IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom>
public class AnnotatedAxiomGenerator
extends Object
implements IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom>
A class to generated annotated OWL axioms from a mapping. This class uses
another mapping transformer to create the initial axiom from the mapping
itself, then annotates that axiom with the mapping metadata.
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotatedAxiomGenerator
(org.semanticweb.owlapi.model.OWLOntology ontology) Creates a new instance that generate “direct” OWL axioms with standard annotations from the mapping metadata.AnnotatedAxiomGenerator
(org.semanticweb.owlapi.model.OWLOntology ontology, boolean onlyMetadata) Creates a new instance that generates “direct” OWL axioms with standard annotations from either the mapping metadata slots or all the mapping slots.AnnotatedAxiomGenerator
(org.semanticweb.owlapi.model.OWLOntology ontology, Collection<String> slots) Creates a new instance that generates “direct” OWL axioms with standard annotations from the specified list of slots.AnnotatedAxiomGenerator
(org.semanticweb.owlapi.model.OWLOntology ontology, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> innerGenerator, IMetadataTransformer<Mapping, org.semanticweb.owlapi.model.IRI> slotTranslator) Creates a new instance with the specified generator and metadata transformer.AnnotatedAxiomGenerator
(org.semanticweb.owlapi.model.OWLOntology ontology, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> innerGenerator, IMetadataTransformer<Mapping, org.semanticweb.owlapi.model.IRI> slotTranslator, boolean onlyMetadata) Creates a new instance with the specified generator and metadata transformer.AnnotatedAxiomGenerator
(org.semanticweb.owlapi.model.OWLOntology ontology, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> innerGenerator, IMetadataTransformer<Mapping, org.semanticweb.owlapi.model.IRI> slotTranslator, Collection<String> slots) Creates a new instance with the specified generator and metadata transformer, and a customised list of slots to use to generate the annotations. -
Method Summary
-
Constructor Details
-
AnnotatedAxiomGenerator
public AnnotatedAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology) Creates a new instance that generate “direct” OWL axioms with standard annotations from the mapping metadata.- Parameters:
ontology
- The ontology to generate axioms for.
-
AnnotatedAxiomGenerator
public AnnotatedAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, boolean onlyMetadata) Creates a new instance that generates “direct” OWL axioms with standard annotations from either the mapping metadata slots or all the mapping slots.- Parameters:
ontology
- The ontology to generate axioms for.onlyMetadata
- Iftrue
, only generate annotations from metadata slots (excluding subject_id, predicate_id, and object_id, as well as mapping_cardinality); otherwise, generate annotations from available slots.
-
AnnotatedAxiomGenerator
public AnnotatedAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, Collection<String> slots) Creates a new instance that generates “direct” OWL axioms with standard annotations from the specified list of slots.- Parameters:
ontology
- The ontology to generate axioms for.slots
- The list of slots from which to derive annotations; ifnull
, all available slots will be used.
-
AnnotatedAxiomGenerator
public AnnotatedAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> innerGenerator, IMetadataTransformer<Mapping, org.semanticweb.owlapi.model.IRI> slotTranslator) Creates a new instance with the specified generator and metadata transformer. Axiom annotations are derived from the mapping metadata slots only.- Parameters:
ontology
- The ontology to generate axioms for.innerGenerator
- The mapping transformer to produce the axioms to annotate.slotTranslator
- The metadata-to-IRI translator indicating the annotation property to use for each slot.
-
AnnotatedAxiomGenerator
public AnnotatedAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> innerGenerator, IMetadataTransformer<Mapping, org.semanticweb.owlapi.model.IRI> slotTranslator, boolean onlyMetadata) Creates a new instance with the specified generator and metadata transformer. Axiom annotations are derived from either the metadata slots only or from all the mapping slots.- Parameters:
ontology
- The ontology to generate axioms for.innerGenerator
- The mapping transformer to produce the axioms to annotate.slotTranslator
- The metadata-to-IRI translator indicating the annotation property to use for each metadata slot.onlyMetadata
- Iftrue
, only generate annotations from metadata slots (excluding subject_id, predicate_id, and object_id, as well as mapping_cardinality); otherwise, generate annotations from available slots.
-
AnnotatedAxiomGenerator
public AnnotatedAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> innerGenerator, IMetadataTransformer<Mapping, org.semanticweb.owlapi.model.IRI> slotTranslator, Collection<String> slots) Creates a new instance with the specified generator and metadata transformer, and a customised list of slots to use to generate the annotations.- Parameters:
ontology
- The ontology to generate axioms for.innerGenerator
- The mapping transformer to produce the axioms to annotate.slotTranslator
- The metadata-to-IRI translator indicating the annotation property to use for each slot.slots
- The list of slots from which to derive annotations; ifnull
, all available slots will be used.
-
-
Method Details
-
transform
Description copied from interface:IMappingTransformer
Transform a mapping into something else.- Specified by:
transform
in interfaceIMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom>
- Parameters:
mapping
- The mapping to transform.- Returns:
- The object generated from the mapping.
-