diff OPPL/src/OWLQueryGalaxy.java @ 18:d3616fac4ca5 draft

Elk support added
author Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
date Thu, 20 Sep 2012 12:46:36 +0200
parents 7e6604a5ee55
children
line wrap: on
line diff
--- 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<OWLNamedIndividual> 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<OWLClass> 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<OWLClass> 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<OWLClass> 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<OWLClass> 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<OWLClass> answer_classes = galaxyowlapi.getDescendants(class_expr);
+			galaxyowlapi.disposeReasoner();
 			for(OWLClass cls : answer_classes){
 				print_result_entity(cls.getIRI(), Answer_render);
 			}