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
-
public class OWLGenerator extends MappingProcessor<org.semanticweb.owlapi.model.OWLAxiom>
Generates OWL axioms from mappings. This class extends theMappingProcessorclass (type-specialised to produceOWLAxiom) 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 Constructor Description OWLGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRule(IMappingFilter filter, IMappingTransformer<Mapping> preprocessor, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> generator)Adds a processing rule.voidsetCheckObjectExistence(org.semanticweb.owlapi.model.OWLOntology ontology)Enables checking for the existence of the mapping object.voidsetCheckSubjectExistence(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
-
-
-
-
Method Detail
-
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 benullfor a rule that must be applied to all mappings.preprocessor- The preprocessor used to modify the mapping. May benullif no preprocessing is needed. If the preprocessor returnsnullfor 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.
-
-