Package org.incenp.obofoundry.sssom.owl
Class SSSOMTOwlApplication
java.lang.Object
org.incenp.obofoundry.sssom.transform.SSSOMTransformApplication<org.semanticweb.owlapi.model.OWLAxiom>
org.incenp.obofoundry.sssom.owl.SSSOMTOwlApplication
- All Implemented Interfaces:
ISSSOMTransformApplication<org.semanticweb.owlapi.model.OWLAxiom>
public class SSSOMTOwlApplication
extends SSSOMTransformApplication<org.semanticweb.owlapi.model.OWLAxiom>
A specialised application of the SSSOM/Transform language to read mapping
processing rules that produce OWL axioms.
-
Constructor Summary
ConstructorsConstructorDescriptionSSSOMTOwlApplication
(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
classExists
(String cls) Deprecated.IMappingTransformer
<org.semanticweb.owlapi.model.OWLAxiom> createAnnotatedTransformer
(IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> innerTransformer, String spec) Deprecated.boolean
entityExists
(String entity) Checks if a given entity exists in the helper ontology and if it is not obsolete.Gets the ontology checker used by this application.org.semanticweb.owlapi.model.OWLOntology
Gets the helper ontology used by this application.getSubClassesOf
(String root) Gets a list of all descendants of a given class.getSubPropertiesOf
(String root) Gets a list of all descendants of a given property.Gets the registry of URI Expression templates, needed to expand a URI Expression into a OWL expression.void
onInit
(PrefixManager prefixManager) Initialises the application.Methods inherited from class org.incenp.obofoundry.sssom.transform.SSSOMTransformApplication
getFormatter, getPrefixManager, getVariableManager, onCallback, onDirectiveAction, onFilter, onGeneratingAction, onPreprocessingAction, registerCallback, registerDirective, registerFilter, registerGenerator, registerPreprocessor
-
Constructor Details
-
SSSOMTOwlApplication
public SSSOMTOwlApplication(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory) Creates a new instance.- Parameters:
ontology
- A helper ontology. This does not need to be the ontology the axioms will be injected to afterwards, but it must contain declaration axioms for all the object and annotation properties that may be used increate_axiom
function calls. It is also the ontology used by the functions that check whether a given entity exists or is a subclass of another entity.reasonerFactory
- The reasoner factory to use when this application will need to reason over the ontology.
-
-
Method Details
-
onInit
Description copied from interface:ISSSOMTransformApplication
Initialises the application. This method is called by the SSSOM/Transform parser when all rules have been syntaxically parsed, before the parser attempts to process the action part of each rule.- Specified by:
onInit
in interfaceISSSOMTransformApplication<org.semanticweb.owlapi.model.OWLAxiom>
- Overrides:
onInit
in classSSSOMTransformApplication<org.semanticweb.owlapi.model.OWLAxiom>
- Parameters:
prefixManager
- A prefix manager initialised with all the prefix declarations found in the SSSOM/Transform file.
-
getEntityChecker
Gets the ontology checker used by this application. SSSOM/T-Owl functions may use that object to add entities that should be recognised by OWLAPI classes and methods even if they do not actually exist in the ontology.- Returns:
- The application’s entity checker.
-
getOntology
public org.semanticweb.owlapi.model.OWLOntology getOntology()Gets the helper ontology used by this application.- Returns:
- The helper ontology.
-
getUriExpressionRegistry
Gets the registry of URI Expression templates, needed to expand a URI Expression into a OWL expression.- Returns:
- The registry.
-
classExists
Deprecated.UseentityExists(String)
instead.Checks if a given class exists in the helper ontology and if it is not obsolete.For this method, “exists” means that the class is present in the ontology’s signature.
- Parameters:
cls
- The name of the class to check.- Returns:
true
if the class exists and is not deprecated, otherwisefalse
.
-
entityExists
Checks if a given entity exists in the helper ontology and if it is not obsolete.For this method, “exists” means that the entity is present in the ontology’s signature.
- Parameters:
entity
- The name of the entity to check.- Returns:
true
if the entity exists and is not deprecated, otherwisefalse
.
-
getSubClassesOf
Gets a list of all descendants of a given class.Implementation detail: the results are cached, so that calling this method several times for the same parent will query the ontology only once.
- Parameters:
root
- The name of the parent class.- Returns:
- A set containing all the descendants of the parent class (including the parent class itself).
-
getSubPropertiesOf
Gets a list of all descendants of a given property.Implementation details: the results are cached, so that calling this method several times for the same parent will query the ontology only once.
- Parameters:
root
- The name of the parent property.- Returns:
- A set containing all the descendants of the parent property (including the parent property itself).
-
createAnnotatedTransformer
@Deprecated public IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> createAnnotatedTransformer(IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> innerTransformer, String spec) Deprecated.Given an axiom generator, gets another generator that would produce the same axiom but annotated with metadata from the mapping.- Parameters:
innerTransformer
- The original axiom generator.spec
- A list of SSSOM metadata slot names to annotate the produced axiom with. SeeSlotHelper.getMappingSlotList(String)
for details about the expected format of that argument.- Returns:
- The modified axiom generator.
-
entityExists(String)
instead.