# HG changeset patch # User Mikel Egana Aranguren # Date 1348137996 -7200 # Node ID d3616fac4ca5a599a925d46331b6ae5343d6b38d # Parent c9e01f86b07c672d2552eee36a9236fef51f7ece Elk support added diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/README --- a/OPPL/README Mon Aug 20 11:39:56 2012 +0200 +++ b/OPPL/README Thu Sep 20 12:46:36 2012 +0200 @@ -45,11 +45,11 @@ ================= - Support for processing ontologies that import other ontologies loaded -in galaxy (i.e. to resolve imports within galaxy). +in Galaxy (i.e. to resolve imports within galaxy). - Entities rendering definition (URI fragment, rdfs:label, QName, etc). -- OWLLink, Racer and ELK support. +- OWLLink and Racer support. - Standalone OPPL assertions parsing (e.g. ADD phagocyte subClassOf cell). @@ -107,6 +107,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . -OPPL API, OWL API, Pellet, HermiT, and FaCT++ have their own licenses. +OPPL API, OWL API, Pellet, HermiT, Elk and FaCT++ have their own licenses. diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/inference.jar Binary file OPPL/inference.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/inference.xml --- a/OPPL/inference.xml Mon Aug 20 11:39:56 2012 +0200 +++ b/OPPL/inference.xml Thu Sep 20 12:46:36 2012 +0200 @@ -13,6 +13,7 @@ + @@ -37,40 +38,16 @@ **About Inference-Galaxy** - Inference galaxy offers the possibility of performing automated reasoning in an ontology and then injecting the inferred axioms as asserted axioms, generating a new OWL ontology. - -**Formats** - - Inference-Galaxy uses the OWL API, and therefore it can load any ontology format that such API is able to load: OBO flat file, OWL (RDF/XML, OWL/XML, Functional, Manchester), turtle, and KRSS. The output is OWL (RDF/XML). + Inference-Galaxy offers the possibility of performing automated reasoning in an ontology and then injecting the inferred axioms as asserted axioms, generating a new OWL ontology. **Usage** - An ontology is needed as input: load it with Get Data >> Upload File from your computer or redirect the output of another galaxy tool. In case the ontology includes imports, they should be resolvable. - - The reasoner can be Pellet, HermiT or FaCT++. - - The inferred axioms to add as asserted axioms can be chosen. - -**More information** - - Galaxy public instances with Inference-Galaxy pre-installed: - - http://sele.inf.um.es:8080/ + An ontology is needed as input: load it with Get Data >> Upload File from your computer or redirect the output of another galaxy tool. Inference-Galaxy uses the OWL API, and therefore it can load any ontology format that such API is able to load: OBO flat file, OWL (RDF/XML, OWL/XML, Functional, Manchester), turtle, and KRSS. In case the loaded ontology includes OWL imports, Inference-Galaxy will try to resolve them. - http://linkeddata2.dia.fi.upm.es:8080 - - Links of interest: - - http://owlapi.sourceforge.net/ - - http://www.w3.org/TR/owl2-manchester-syntax/ - - http://clarkparsia.com/pellet - - http://hermit-reasoner.com/ - - http://code.google.com/p/factplusplus/ - + The reasoner can be Pellet, HermiT, FaCT++ or Elk. + + The inferred axioms to add as asserted axioms can be chosen. + **Contact** Please send any request or comment to mikel.egana.aranguren@gmail.com. diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/inference_lib/elk-owlapi.jar Binary file OPPL/inference_lib/elk-owlapi.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/inference_lib/log4j-sources.jar Binary file OPPL/inference_lib/log4j-sources.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/inference_lib/log4j.jar Binary file OPPL/inference_lib/log4j.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/merge.jar Binary file OPPL/merge.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/merge.xml --- a/OPPL/merge.xml Mon Aug 20 11:39:56 2012 +0200 +++ b/OPPL/merge.xml Thu Sep 20 12:46:36 2012 +0200 @@ -27,11 +27,13 @@ **About Merge-Galaxy** - Merge-Galaxy can be used to merge any imported ontologies into the main ontology, creating a new ontology. + Merge-Galaxy can be used to merge any (resolvable) imported ontologies into the main ontology, creating a new ontology. -**Formats** - - Merge-Galaxy uses the OWL API, and therefore it can load any ontology format that such API is able to load, provided that imports are correctly represented: OBO flat file, OWL (RDF/XML, OWL/XML, Functional, Manchester), turtle, and KRSS. The output is an OWL ontology in RDF/XML format. +**Usage** + + An ontology is needed as input: load it with Get Data >> Upload File from your computer or redirect the output of another galaxy tool. Merge-Galaxy uses the OWL API, and therefore it can load any ontology format that such API is able to load: OBO flat file, OWL (RDF/XML, OWL/XML, Functional, Manchester), turtle, and KRSS. + + An URI can be specified for the new merged ontology. In case non is specified, the following URI will be used: http://cbgp.upm.es/BiologicalInformatics/OPPLGalaxy/merged.owl. **Contact** diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/merge_lib/elk-owlapi.jar Binary file OPPL/merge_lib/elk-owlapi.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/merge_lib/log4j-sources.jar Binary file OPPL/merge_lib/log4j-sources.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/merge_lib/log4j.jar Binary file OPPL/merge_lib/log4j.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/oppl.xml --- a/OPPL/oppl.xml Mon Aug 20 11:39:56 2012 +0200 +++ b/OPPL/oppl.xml Thu Sep 20 12:46:36 2012 +0200 @@ -11,20 +11,18 @@ - - java -Xmx3000M -Xms250M -DentityExpansionLimit=1000000000 -jar ${__tool_data_path__}/shared/jars/oppl_galaxy.jar $input $reasoner $OPPL $format > $output 2>/dev/null - - - + - + @@ -42,12 +40,13 @@ + + - @@ -69,29 +68,21 @@ **About OPPL-Galaxy** - OPPL-Galaxy can be used to execute an OPPL script against an ontology, generating a new ontology. OPPL (Ontology Pre Processor Language) is a high level scripting language, based in the Manchester OWL Syntax, to automate the manipulation of an ontology. An OPPL script (See test.oppl) defines a query to be performed against the ontology, and some actions (Adding or removing axioms) that affect the entities that will be retrieved. Those entities can be named or defined by a variable. OPPL is a powerful method for defining and executing modelling patterns that are repeated in an ontology, saving time and efforts. - -**Formats** - - OPPL-Galaxy uses the OWL API, and therefore it can load any ontology format that such API is able to load: OBO flat file, OWL (RDF/XML, OWL/XML, Functional, Manchester), turtle, and KRSS. The available output formats are OBO flat file and OWL (RDF/XML). + OPPL-Galaxy can be used to execute an OPPL script against an ontology, generating a new ontology. OPPL (Ontology Pre Processor Language) is a high level scripting language, based in the Manchester OWL Syntax, to automate the manipulation of an ontology. An OPPL script (See test.oppl) defines a query to be performed against the ontology, and some actions (Adding or removing axioms) that affect the entities that will be retrieved. Those entities can be named or defined by a variable. OPPL is a powerful method for defining and executing modelling patterns that are repeated in an ontology, saving time and energy. **Usage** - An ontology and an OPPL file are needed (test.owl and test.oppl can be used as samples, both available in the bundle). Load both with Get Data >> Upload File from your computer, or redirect from another Galaxy tool. - - Then execute the OPPL file against the OWL file with Ontology Pre Processor Language >> Execute an OPPL file against an OWL file. A new output ontology will be generated. + An ontology and an OPPL file are needed (test.owl and test.oppl can be used as samples, both available in the bundle). Load both with Get Data >> Upload File from your computer, or redirect from another Galaxy tool. OPPL-Galaxy uses the OWL API, and therefore it can load any ontology format that such API is able to load: OBO flat file, OWL (RDF/XML, OWL/XML, Functional, Manchester), turtle, and KRSS. In case the loaded ontology includes OWL imports, OPPL-Galaxy will try to resolve them. + + The reasoner can be Pellet, HermiT, FaCT++ or Elk. - In case the loaded ontology includes OWL imports, OPPL-Galaxy will try to resolve them. - - The output ontology can be OBO or OWL (RDF/XML). - - The reasoner can be Pellet, HermiT FaCT++. Sometimes, if an execution fails it can be fixed by using a different reasoner. + The output ontology can be OBO or OWL (RDF/XML). **More information** Galaxy public instances with OPPL-Galaxy pre-installed: - http://sele.inf.um.es:8080/ + http://sele.inf.um.es:9080/ http://linkeddata2.dia.fi.upm.es:8080 @@ -107,8 +98,6 @@ http://oppl.sf.net/ - http://owlapi.sourceforge.net/ - http://www.w3.org/TR/owl2-manchester-syntax/ http://clarkparsia.com/pellet @@ -117,9 +106,13 @@ http://code.google.com/p/factplusplus/ + http://code.google.com/p/elk-reasoner/ + + http://owlapi.sourceforge.net/ + **Citation** - Mikel Egaña Aranguren, Jesualdo Tomás Fernández-Breis and Erick Antezana. OPPL-Galaxy: Enhancing ontology exploitation in Galaxy with OPPL. SWAT4LS 2011. + Mikel Egaña Aranguren, Jesualdo Tomás Fernández-Breis, Erick Antezana. OPPL-Galaxy: Enhancing ontology exploitation in Galaxy with OPPL. In Proceedings of the 4th International Workshop on Semantic Web Applications and Tools for the Life Sciences, SWAT4LS 2011, pages 12–19, ACM 2012. **Contact** diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/oppl_galaxy.jar Binary file OPPL/oppl_galaxy.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/oppl_galaxy_lib/elk-owlapi.jar Binary file OPPL/oppl_galaxy_lib/elk-owlapi.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/oppl_galaxy_lib/log4j-sources.jar Binary file OPPL/oppl_galaxy_lib/log4j-sources.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/oppl_galaxy_lib/log4j.jar Binary file OPPL/oppl_galaxy_lib/log4j.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/oppl_query.jar Binary file OPPL/oppl_query.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/oppl_query.xml --- a/OPPL/oppl_query.xml Mon Aug 20 11:39:56 2012 +0200 +++ b/OPPL/oppl_query.xml Thu Sep 20 12:46:36 2012 +0200 @@ -20,7 +20,7 @@ + --> @@ -30,6 +30,7 @@ + @@ -53,11 +54,17 @@ **About OPPL-Query-Galaxy** - OPPL-Query-Galaxy can be used to execute an OPPL query against an OWL ontology (?whole:CLASS, ?part:CLASS SELECT ?part SubClassOf part_of some ?whole WHERE ?part != Nothing). The result is a two column table with the entities that have been bound by the variables. + OPPL-Query-Galaxy can be used to execute an OPPL query against an OWL ontology. The result is a two column table with the entities that have been bound by the variables. + +**Usage** + + An ontology is needed as input: load it with Get Data >> Upload File from your computer or redirect the output of another galaxy tool. OPPL-Query-Galaxy uses the OWL API, and therefore it can load any ontology format that such API is able to load: OBO flat file, OWL (RDF/XML, OWL/XML, Functional, Manchester), turtle, and KRSS. In case the loaded ontology includes OWL imports, OPPL-Query-Galaxy will try to resolve them. -**Formats** - - OPPL-Query-Galaxy uses the OWL API, and therefore it can load any ontology format that such API is able to load: OBO flat file, OWL (RDF/XML, OWL/XML, Functional, Manchester), turtle, and KRSS. The output is a list of terms. + An OPPL query must be provided, e.g. ?whole:CLASS, ?part:CLASS SELECT ?part SubClassOf part_of some ?whole WHERE ?part != Nothing. + + The reasoner can be Pellet, HermiT, FaCT++ or Elk. + + The returned entities can be rendered using their URI, their URI fragment, or OBO type URI fragment (e.g. GO_0000022 to GO:0000022). **Contact** diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/oppl_query_lib/elk-owlapi.jar Binary file OPPL/oppl_query_lib/elk-owlapi.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/oppl_query_lib/log4j-sources.jar Binary file OPPL/oppl_query_lib/log4j-sources.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/oppl_query_lib/log4j.jar Binary file OPPL/oppl_query_lib/log4j.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/query.jar Binary file OPPL/query.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/query.xml --- a/OPPL/query.xml Mon Aug 20 11:39:56 2012 +0200 +++ b/OPPL/query.xml Thu Sep 20 12:46:36 2012 +0200 @@ -16,7 +16,7 @@ + --> @@ -26,6 +26,7 @@ + @@ -58,11 +59,19 @@ **About Query-Galaxy** - Query-Galaxy can be used to execute a DL query against an OWL ontology (e.g. GO_0007049 or part_of some GO_0007049). The result is a list of entities from the target ontology. How those entities relate to the query can be chosen (A DL query is just an anonymous OWL Class). + Query-Galaxy can be used to execute a DL query against an OWL ontology. The result is a list of entities from the target ontology. -**Formats** - - Query-Galaxy uses the OWL API, and therefore it can load any ontology format that such API is able to load: OBO flat file, OWL (RDF/XML, OWL/XML, Functional, Manchester), turtle, and KRSS. The output is a list of terms. +**Usage** + + An ontology is needed as input: load it with Get Data >> Upload File from your computer or redirect the output of another galaxy tool. Query-Galaxy uses the OWL API, and therefore it can load any ontology format that such API is able to load: OBO flat file, OWL (RDF/XML, OWL/XML, Functional, Manchester), turtle, and KRSS. In case the loaded ontology includes OWL imports, Query-Galaxy will try to resolve them. + + A DL query must be provided, e.g. GO_0007049 or part_of some GO_0007049. + + The reasoner can be Pellet, HermiT, FaCT++ or Elk. + + How the retrieved entities relate to the query can be chosen: a DL query is just an anonymous OWL Class, and the retrieved entities can be descendant classes, direct sub-classes, ancestor classes, direct super-classes, equivalent classes, or member individuals. + + The returned entities can be rendered using their URI, their URI fragment, or OBO type URI fragment (e.g. GO_0000022 to GO:0000022). **Contact** diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/query_lib/elk-owlapi.jar Binary file OPPL/query_lib/elk-owlapi.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/query_lib/log4j-sources.jar Binary file OPPL/query_lib/log4j-sources.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/query_lib/log4j.jar Binary file OPPL/query_lib/log4j.jar has changed diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/src/GalaxyOWLAPI.java --- a/OPPL/src/GalaxyOWLAPI.java Mon Aug 20 11:39:56 2012 +0200 +++ b/OPPL/src/GalaxyOWLAPI.java Thu Sep 20 12:46:36 2012 +0200 @@ -12,10 +12,13 @@ import java.util.Scanner; import java.util.Set; +import org.apache.log4j.Level; +import org.apache.log4j.Logger; import org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser; import org.coode.owlapi.obo.parser.OBOOntologyFormat; import org.coode.parsers.BidirectionalShortFormProviderAdapter; import org.semanticweb.HermiT.Reasoner; +import org.semanticweb.elk.owlapi.ElkReasonerFactory; import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.expression.OWLEntityChecker; import org.semanticweb.owlapi.expression.ParserException; @@ -110,6 +113,14 @@ reasonerFactory = new Reasoner.ReasonerFactory(); reasoner = reasonerFactory.createReasoner(ontology); } + public void setReasonerElk (){ + reasonerFactory = new ElkReasonerFactory(); + Logger.getLogger("org.semanticweb.elk").setLevel(Level.OFF); + reasoner = reasonerFactory.createReasoner(ontology); + } + public void disposeReasoner(){ + reasoner.dispose(); + } public void merge (String ontologyIRI) throws OWLOntologyCreationException, OWLOntologyStorageException{ OWLOntologyMerger merger = new OWLOntologyMerger(manager); // OWLOntologyMerger merger = new OWLOntologyMerger(new OWLOntologyImportsClosureSetProvider(manager, ontology)); diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/src/InferenceGalaxy.java --- a/OPPL/src/InferenceGalaxy.java Mon Aug 20 11:39:56 2012 +0200 +++ b/OPPL/src/InferenceGalaxy.java Thu Sep 20 12:46:36 2012 +0200 @@ -11,7 +11,7 @@ /** - * @author Mikel Egaña Aranguren + * @author Mikel Ega��a Aranguren * */ public class InferenceGalaxy { @@ -25,7 +25,7 @@ public static void main(String[] args) throws OWLOntologyStorageException, OWLOntologyCreationException, IOException { // Get the arguments from command-line String OWLFilePath = args [0]; - String reasoner_type = args [1]; // Pellet|FaCTPlusPlus|HermiT + String reasoner_type = args [1]; // Pellet|FaCTPlusPlus|HermiT|Elk String axioms_to_inject = args [2]; // CLASS_ASSERTIONS,CLASS_HIERARCHY,DATA_PROPERTY_ASSERTIONS // CLASS_ASSERTIONS Denotes the computation of the direct types of individuals for each individual in the signature of the imports closure of the root ontology. @@ -54,6 +54,10 @@ else if (reasoner_type.equals("FaCTPlusPlus")){ galaxyowlapi.setReasonerFaCT(); } + // Elk + else if (reasoner_type.equals("Elk")){ + galaxyowlapi.setReasonerElk(); + } // HermiT else{ galaxyowlapi.setReasonerHermit(); @@ -70,6 +74,8 @@ injectAxiom (axioms_to_inject, galaxyowlapi); } + galaxyowlapi.disposeReasoner(); + // Merge imported ontologies if requested // if(merge.equals("Merge")){ // galaxyowlapi.merge(); diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/src/OPPLGalaxy.java --- a/OPPL/src/OPPLGalaxy.java Mon Aug 20 11:39:56 2012 +0200 +++ b/OPPL/src/OPPLGalaxy.java Thu Sep 20 12:46:36 2012 +0200 @@ -7,13 +7,16 @@ import java.io.IOException; import java.util.List; import java.util.Scanner; +import java.util.logging.Level; import java.util.logging.Logger; +//import org.apache.log4j.Level; import org.coode.oppl.ChangeExtractor; import org.coode.oppl.OPPLParser; import org.coode.oppl.OPPLScript; import org.coode.oppl.ParserFactory; import org.coode.oppl.exceptions.QuickFailRuntimeExceptionHandler; +import org.coode.oppl.log.Logging; import org.coode.parsers.ErrorListener; import org.coode.parsers.LoggerErrorListener; import org.semanticweb.owlapi.model.OWLAxiomChange; @@ -25,8 +28,9 @@ + /** - * @author Mikel Egaña Aranguren + * @author Mikel Ega��a Aranguren * */ public class OPPLGalaxy { @@ -40,7 +44,7 @@ public static void main(String[] args) throws OWLOntologyCreationException, OWLOntologyStorageException, IOException { // Get the arguments from command-line String OWLFilePath = args [0]; - String reasoner_type = args [1]; // Pellet|FaCTPlusPlus|HermiT + String reasoner_type = args [1]; // Pellet|FaCTPlusPlus|Elk|HermiT String OPPL_script_file = args [2]; String OWL = args [3]; // OWL|OBO @@ -61,6 +65,10 @@ else if (reasoner_type.equals("FaCTPlusPlus")){ galaxyowlapi.setReasonerFaCT(); } + // Elk + else if (reasoner_type.equals("Elk")){ + galaxyowlapi.setReasonerElk(); + } // HermiT else{ galaxyowlapi.setReasonerHermit(); @@ -83,18 +91,20 @@ // Parse the OPPL script ParserFactory parserFactory = new ParserFactory(manager, ontology, reasoner); Logger logger = Logger.getLogger(OPPLGalaxy.class.getName()); +// logger.setLevel(Level.OFF); // Logging.getQueryLogger().setLevel(Level.OFF); // The normal messages are errors for galaxy (Fixed in Galaxy by 2 > /dev/null) + ErrorListener errorListener = (ErrorListener)new LoggerErrorListener(logger); OPPLParser opplparser = parserFactory.build(errorListener); OPPLScript OPPLscript = opplparser.parse(OPPL_script_source); - - // Execute the script ChangeExtractor extractor = new ChangeExtractor(new QuickFailRuntimeExceptionHandler(), true); List changes = extractor.visit(OPPLscript); manager.applyChanges(changes); + galaxyowlapi.disposeReasoner(); + // Merge imported ontologies if requested // if(merge.equals("Merge")){ // galaxyowlapi.merge(); diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/src/OPPLQueryGalaxy.java --- a/OPPL/src/OPPLQueryGalaxy.java Mon Aug 20 11:39:56 2012 +0200 +++ b/OPPL/src/OPPLQueryGalaxy.java Thu Sep 20 12:46:36 2012 +0200 @@ -42,7 +42,7 @@ public static void main(String[] args) throws OWLOntologyCreationException, ParserException, FileNotFoundException { // Get the arguments from command-line String OWLFilePath = args [0]; // /home/mikel/UPM/OPPL_galaxy/OPPL/OPPL/test-data/ontology/single/test.owl - String reasoner_type = args [1]; // Pellet|FaCTPlusPlus|HermiT + String reasoner_type = args [1]; // Pellet|FaCTPlusPlus|HermiT|Elk String Answer_render = args [2]; // URI|URIfragment|URIfragment2OBO String OPPL_script_source = args [3]; @@ -75,6 +75,10 @@ else if (reasoner_type.equals("FaCTPlusPlus")){ galaxyowlapi.setReasonerFaCT(); } + // Elk + else if (reasoner_type.equals("Elk")){ + galaxyowlapi.setReasonerElk(); + } // HermiT else{ galaxyowlapi.setReasonerHermit(); @@ -93,6 +97,8 @@ extractor.visit(OPPLscript); ConstraintSystem cs = OPPLscript.getConstraintSystem(); Set nodes = cs.getLeaves(); + + galaxyowlapi.disposeReasoner(); Iterator NodesIterator = nodes.iterator(); while(NodesIterator.hasNext()){ diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/src/OWLQueryGalaxy.java --- a/OPPL/src/OWLQueryGalaxy.java Mon Aug 20 11:39:56 2012 +0200 +++ b/OPPL/src/OWLQueryGalaxy.java Thu Sep 20 12:46:36 2012 +0200 @@ -19,7 +19,7 @@ public static void main(String[] args) throws OWLOntologyCreationException, ParserException { // Get the arguments from command-line String OWLFilePath = args [0]; // /home/pik/UPM/Paper/SWAT4LS_2011/JBS/Workflows_JBS/GO_module_transitive/go_no_trans.owl - String reasoner_type = args [1]; // Pellet|FaCTPlusPlus|HermiT + String reasoner_type = args [1]; // Pellet|FaCTPlusPlus|HermiT|Elk String Answer_type = args [2]; // Individuals|EquivalentClasses|DirectSuperClasses|Ancestors|DirectSubClasses|Descendants String Answer_render = args [3]; // URI|URIfragment|URIfragment2OBO @@ -41,6 +41,10 @@ else if (reasoner_type.equals("FaCTPlusPlus")){ galaxyowlapi.setReasonerFaCT(); } + // Elk + else if (reasoner_type.equals("Elk")){ + galaxyowlapi.setReasonerElk(); + } // HermiT else{ galaxyowlapi.setReasonerHermit(); @@ -52,30 +56,35 @@ // Execute query and print results if(Answer_type.equals("Individuals")){ Set inds = galaxyowlapi.getIndividuals(class_expr); + galaxyowlapi.disposeReasoner(); for(OWLNamedIndividual ind : inds){ print_result_entity(ind.getIRI(), Answer_render); } } else if (Answer_type.equals("EquivalentClasses")) { Set answer_classes = galaxyowlapi.getEquivalentClasses(class_expr); + galaxyowlapi.disposeReasoner(); for(OWLClass cls : answer_classes){ print_result_entity(cls.getIRI(), Answer_render); } } else if (Answer_type.equals("DirectSuperClasses")) { Set answer_classes = galaxyowlapi.getDirectSuperClasses(class_expr); + galaxyowlapi.disposeReasoner(); for(OWLClass cls : answer_classes){ print_result_entity(cls.getIRI(), Answer_render); } } else if (Answer_type.equals("Ancestors")) { Set answer_classes = galaxyowlapi.getAncestors(class_expr); + galaxyowlapi.disposeReasoner(); for(OWLClass cls : answer_classes){ print_result_entity(cls.getIRI(), Answer_render); } } else if (Answer_type.equals("DirectSubClasses")) { Set answer_classes = galaxyowlapi.getDirectSubClasses(class_expr); + galaxyowlapi.disposeReasoner(); for(OWLClass cls : answer_classes){ print_result_entity(cls.getIRI(), Answer_render); } @@ -83,6 +92,7 @@ // Descendants else { Set answer_classes = galaxyowlapi.getDescendants(class_expr); + galaxyowlapi.disposeReasoner(); for(OWLClass cls : answer_classes){ print_result_entity(cls.getIRI(), Answer_render); } diff -r c9e01f86b07c -r d3616fac4ca5 OPPL/test-data/ontology/single/elk.owl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OPPL/test-data/ontology/single/elk.owl Thu Sep 20 12:46:36 2012 +0200 @@ -0,0 +1,106 @@ + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +