Package org.incenp.obofoundry.sssom.owl
Class SSSOMTHelper
java.lang.Object
org.incenp.obofoundry.sssom.owl.SSSOMTHelper
A helper class intended to host some methods used throughout the SSSOM/T-OWL
code.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IMappingTransformer
<org.semanticweb.owlapi.model.OWLAxiom> maybeCreateAnnotatedTransformer
(SSSOMTOwlApplication application, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> innerTransformer, Map<String, String> keyedArguments) Given an axiom generator, maybe wraps it into another generator that would produce the same axiom but annotated with metadata from the mapping from which the axiom is derived.static IMappingTransformer
<org.semanticweb.owlapi.model.OWLAxiom> maybeCreateAnnotatedTransformer
(SSSOMTOwlApplication application, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> innerTransformer, Map<String, String> keyedArguments, List<String> arguments, int nArgs) Given an axiom generator, maybe wraps it into another generator that would produce the same axiom but annotated with metadata from the mapping from which the axiom is derived.
-
Field Details
-
ANNOTS_KEYWORD
The name of the parameter used to specify the annotations to generate on a mapping-derived axiom.- See Also:
-
ANNOTS_URIS_KEYWORD
The name of the parameter used to specify how SSSOM fields are translated to OWL annotation property IRIs.- See Also:
-
-
Constructor Details
-
SSSOMTHelper
public SSSOMTHelper()
-
-
Method Details
-
maybeCreateAnnotatedTransformer
public static IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> maybeCreateAnnotatedTransformer(SSSOMTOwlApplication application, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> innerTransformer, Map<String, String> keyedArguments) Given an axiom generator, maybe wraps it into another generator that would produce the same axiom but annotated with metadata from the mapping from which the axiom is derived.- Parameters:
application
- The SSSOM/T-OWL application.innerTransformer
- The original axiom generator.keyedArguments
- The named parameters given to a SSSOM/T-OWL function. This method will look for theannots
andannots_uris
keys to determine whether generated axioms should be annotated and how.- Returns:
- The wrapped axiom generator, or the original generator if axiom annotations were not requested in the given parameters.
-
maybeCreateAnnotatedTransformer
public static IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> maybeCreateAnnotatedTransformer(SSSOMTOwlApplication application, IMappingTransformer<org.semanticweb.owlapi.model.OWLAxiom> innerTransformer, Map<String, String> keyedArguments, List<String> arguments, int nArgs) Given an axiom generator, maybe wraps it into another generator that would produce the same axiom but annotated with metadata from the mapping from which the axiom is derived.This method is similar to
maybeCreateAnnotatedTransformer(SSSOMTOwlApplication, IMappingTransformer, Map)
, but if the parameters map does not contain aannots
key, it will look for an optional position argument instead. This is for backwards compatibility only, new SSSOM/T-OWL function should not use this method.- Parameters:
application
- The SSSOM/T-OWL application.innerTransformer
- The original axiom generator.keyedArguments
- The named parameters given to a SSSOM/T-OWL function.arguments
- The positional arguments given to a SSSOM/T-OWL function.nArgs
- The number of non-optional arguments expected by the function.- Returns:
- The wrapped axiom generator, or the original generator if axiom annotations were not requested in the given parameters or positional arguments.
-