Package org.incenp.obofoundry.sssom.owl
Class OWLGenerator
java.lang.Object
org.incenp.obofoundry.sssom.transform.MappingProcessor<org.semanticweb.owlapi.model.OWLAxiom>
org.incenp.obofoundry.sssom.owl.OWLGenerator
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRule
(IMappingFilter filter, IMappingTransformer<Mapping> preprocessor, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> generator) Adds a processing rule.void
setCheckObjectExistence
(org.semanticweb.owlapi.model.OWLOntology ontology) Enables checking for the existence of the mapping object.void
setCheckSubjectExistence
(org.semanticweb.owlapi.model.OWLOntology ontology) Enables checking for the existence of the mapping subject.Methods inherited from class org.incenp.obofoundry.sssom.transform.MappingProcessor
addGeneratedListener, addRule, addRules, addStopingRule, excludeRules, hasRules, includeRules, onGeneratedProduct, process
-
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 benull
for a rule that must be applied to all mappings.preprocessor
- The preprocessor used to modify the mapping. May benull
if no preprocessing is needed. If the preprocessor returnsnull
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.
-