Class OWLGenerator

java.lang.Object
org.incenp.obofoundry.sssom.transform.MappingProcessor<org.semanticweb.owlapi.model.OWLAxiom>
org.incenp.obofoundry.sssom.owl.OWLGenerator

public class OWLGenerator extends MappingProcessor<org.semanticweb.owlapi.model.OWLAxiom>
Generates OWL axioms from mappings. This class extends the MappingProcessor class (type-specialised to produce OWLAxiom) to add the possibility of checking whether the subject and or the object of a mapping exists in a given ontology before generating an axiom for the mapping.
  • Constructor Details

    • OWLGenerator

      public OWLGenerator()
  • Method Details

    • addRule

      public void addRule(IMappingFilter filter, IMappingTransformer<Mapping> preprocessor, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> generator)
      Adds a processing rule.
      Parameters:
      filter - The filter used to determine whether the rule applies to a given mapping. May be null for a rule that must be applied to all mappings.
      preprocessor - The preprocessor used to modify the mapping. May be null if no preprocessing is needed. If the preprocessor returns null for a given mapping, no further rules are applied for this mapping.
      generator - The OWL axiom generator for the current mapping.
    • setCheckSubjectExistence

      public void setCheckSubjectExistence(org.semanticweb.owlapi.model.OWLOntology ontology)
      Enables checking for the existence of the mapping subject. When this option is enabled, no axioms will be generated for mappings whose subject ID does not exist in the given ontology or is marked as deprecated.
      Parameters:
      ontology - The ontology where the existence of the mapping subject should be checked.
    • setCheckObjectExistence

      public void setCheckObjectExistence(org.semanticweb.owlapi.model.OWLOntology ontology)
      Enables checking for the existence of the mapping object. When this option is enabled, no axioms will be generated for mappings whose object ID does not exist in the given ontology or is marked as deprecated.
      Parameters:
      ontology - The ontology where the existence of the mapping object should be checked.