Class EquivalentAxiomGenerator

java.lang.Object
org.incenp.obofoundry.sssom.owl.EquivalentAxiomGenerator
All Implemented Interfaces:
IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom>

public class EquivalentAxiomGenerator extends Object implements IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom>
A class to generate OWL equivalence axioms from mappings. Given a mapping between a subject S and an object O, this class will generate an equivalence axiom between S and O.

If a filler class expression F is given to the constructor, the equivalence axiom will be between S and (O and F).

  • Constructor Summary

    Constructors
    Constructor
    Description
    EquivalentAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, IMappingTransformer<org.semanticweb.owlapi.model.OWLClassExpression> expr, boolean invert)
    Creates a new instance with a class expression that is derived from the mapping at application time.
    EquivalentAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.OWLClassExpression expr)
    Creates a new instance.
    EquivalentAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.OWLClassExpression expr, boolean invert)
    Creates a new instance, with the possibility of inverting the direction of the generated axioms.
  • 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

    • EquivalentAxiomGenerator

      public EquivalentAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.OWLClassExpression expr)
      Creates a new instance.
      Parameters:
      ontology - The ontology to generate axioms for.
      expr - A class expression to combine with the object of the mapping (may be null).
    • EquivalentAxiomGenerator

      public EquivalentAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.OWLClassExpression expr, boolean invert)
      Creates a new instance, with the possibility of inverting the direction of the generated axioms.
      Parameters:
      ontology - The ontology to generate axioms for.
      expr - A class expression to combined with the object of the mapping (may be null).
      invert - If true, invert the subject and object of the mapping when generating the axiom; this is only really meaningful if a class expression is provided.
    • EquivalentAxiomGenerator

      public EquivalentAxiomGenerator(org.semanticweb.owlapi.model.OWLOntology ontology, IMappingTransformer<org.semanticweb.owlapi.model.OWLClassExpression> expr, boolean invert)
      Creates a new instance with a class expression that is derived from the mapping at application time.
      Parameters:
      ontology - The ontology to generate axioms for.
      expr - A mapping transformer that will yield the class expression to combined with the object of the mapping (may be null).
      invert - If true, invert the subject and object of the mapping when generating the axiom; this is only really meaningfull if an expression generator is provided.
  • 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.