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

    Constructors
    Constructor
    Description
    AnnotatedAxiomGenerator(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

    Modifier and Type
    Method
    Description
    org.semanticweb.owlapi.model.OWLAxiom
    transform(Mapping mapping)
    Transform a mapping into something else.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 - If true, 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; if null, 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 - If true, 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; if null, all available slots will be used.
  • Method Details

    • transform

      public org.semanticweb.owlapi.model.OWLAxiom transform(Mapping mapping)
      Description copied from interface: IMappingTransformer
      Transform a mapping into something else.
      Specified by:
      transform in interface IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom>
      Parameters:
      mapping - The mapping to transform.
      Returns:
      The object generated from the mapping.