comparison OPPL/src/InferenceGalaxy.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 6ca67b155e32
children
comparison
equal deleted inserted replaced
17:c9e01f86b07c 18:d3616fac4ca5
9 import org.semanticweb.owlapi.model.OWLOntologyCreationException; 9 import org.semanticweb.owlapi.model.OWLOntologyCreationException;
10 import org.semanticweb.owlapi.model.OWLOntologyStorageException; 10 import org.semanticweb.owlapi.model.OWLOntologyStorageException;
11 11
12 12
13 /** 13 /**
14 * @author Mikel Egaña Aranguren 14 * @author Mikel Ega��a Aranguren
15 * 15 *
16 */ 16 */
17 public class InferenceGalaxy { 17 public class InferenceGalaxy {
18 18
19 /** 19 /**
23 * @throws OWLOntologyStorageException 23 * @throws OWLOntologyStorageException
24 */ 24 */
25 public static void main(String[] args) throws OWLOntologyStorageException, OWLOntologyCreationException, IOException { 25 public static void main(String[] args) throws OWLOntologyStorageException, OWLOntologyCreationException, IOException {
26 // Get the arguments from command-line 26 // Get the arguments from command-line
27 String OWLFilePath = args [0]; 27 String OWLFilePath = args [0];
28 String reasoner_type = args [1]; // Pellet|FaCTPlusPlus|HermiT 28 String reasoner_type = args [1]; // Pellet|FaCTPlusPlus|HermiT|Elk
29 String axioms_to_inject = args [2]; // CLASS_ASSERTIONS,CLASS_HIERARCHY,DATA_PROPERTY_ASSERTIONS 29 String axioms_to_inject = args [2]; // CLASS_ASSERTIONS,CLASS_HIERARCHY,DATA_PROPERTY_ASSERTIONS
30 30
31 // 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. 31 // 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.
32 // CLASS_HIERARCHY Denotes the computation of the class hierarchy. 32 // CLASS_HIERARCHY Denotes the computation of the class hierarchy.
33 // DATA_PROPERTY_ASSERTIONS Denotes the computation of relationships between individuals and data property values for each individual in the signature of the imports closure of the root ontology. 33 // DATA_PROPERTY_ASSERTIONS Denotes the computation of relationships between individuals and data property values for each individual in the signature of the imports closure of the root ontology.
52 } 52 }
53 // FaCTPlusPlus 53 // FaCTPlusPlus
54 else if (reasoner_type.equals("FaCTPlusPlus")){ 54 else if (reasoner_type.equals("FaCTPlusPlus")){
55 galaxyowlapi.setReasonerFaCT(); 55 galaxyowlapi.setReasonerFaCT();
56 } 56 }
57 // Elk
58 else if (reasoner_type.equals("Elk")){
59 galaxyowlapi.setReasonerElk();
60 }
57 // HermiT 61 // HermiT
58 else{ 62 else{
59 galaxyowlapi.setReasonerHermit(); 63 galaxyowlapi.setReasonerHermit();
60 } 64 }
61 65
67 injectAxiom (axioms[i], galaxyowlapi); 71 injectAxiom (axioms[i], galaxyowlapi);
68 } 72 }
69 else{ 73 else{
70 injectAxiom (axioms_to_inject, galaxyowlapi); 74 injectAxiom (axioms_to_inject, galaxyowlapi);
71 } 75 }
76
77 galaxyowlapi.disposeReasoner();
72 78
73 // Merge imported ontologies if requested 79 // Merge imported ontologies if requested
74 // if(merge.equals("Merge")){ 80 // if(merge.equals("Merge")){
75 // galaxyowlapi.merge(); 81 // galaxyowlapi.merge();
76 // } 82 // }