annotate src/OPPLGalaxy.java @ 20:46257c870179 draft

New installation procedure added
author Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
date Mon, 08 Oct 2012 12:55:08 +0200
parents cc270db37d33
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
1 /**
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
2 *
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
3 */
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
4 package es.upm.fi.dia.oeg.oppl.galaxy;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
5
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
6 import java.io.File;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
7 import java.io.IOException;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
8 import java.util.List;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
9 import java.util.Scanner;
18
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
10 import java.util.logging.Level;
11
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
11 import java.util.logging.Logger;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
12
18
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
13 //import org.apache.log4j.Level;
11
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
14 import org.coode.oppl.ChangeExtractor;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
15 import org.coode.oppl.OPPLParser;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
16 import org.coode.oppl.OPPLScript;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
17 import org.coode.oppl.ParserFactory;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
18 import org.coode.oppl.exceptions.QuickFailRuntimeExceptionHandler;
18
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
19 import org.coode.oppl.log.Logging;
11
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
20 import org.coode.parsers.ErrorListener;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
21 import org.coode.parsers.LoggerErrorListener;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
22 import org.semanticweb.owlapi.model.OWLAxiomChange;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
23 import org.semanticweb.owlapi.model.OWLOntology;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
24 import org.semanticweb.owlapi.model.OWLOntologyCreationException;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
25 import org.semanticweb.owlapi.model.OWLOntologyManager;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
26 import org.semanticweb.owlapi.model.OWLOntologyStorageException;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
27 import org.semanticweb.owlapi.reasoner.OWLReasoner;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
28
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
29
13
7e6604a5ee55 New query tool added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 11
diff changeset
30
18
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
31
11
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
32 /**
18
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
33 * @author Mikel Ega��a Aranguren
11
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
34 *
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
35 */
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
36 public class OPPLGalaxy {
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
37
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
38 /**
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
39 * @param args
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
40 * @throws OWLOntologyCreationException
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
41 * @throws OWLOntologyStorageException
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
42 * @throws IOException
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
43 */
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
44 public static void main(String[] args) throws OWLOntologyCreationException, OWLOntologyStorageException, IOException {
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
45 // Get the arguments from command-line
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
46 String OWLFilePath = args [0];
18
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
47 String reasoner_type = args [1]; // Pellet|FaCTPlusPlus|Elk|HermiT
11
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
48
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
49 String OPPL_script_file = args [2];
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
50 String OWL = args [3]; // OWL|OBO
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
51
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
52 // Create the manager
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
53 GalaxyOWLAPI galaxyowlapi = new GalaxyOWLAPI();
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
54
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
55 // Load the main ontology and hope for the imported URIs to be resolvable
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
56 galaxyowlapi.loadMainOntology(OWLFilePath);
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
57
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
58 // Set the reasoner
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
59
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
60 // Pellet
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
61 if(reasoner_type.equals("Pellet")){
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
62 galaxyowlapi.setReasonerPellet();
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
63 }
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
64 // FaCTPlusPlus
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
65 else if (reasoner_type.equals("FaCTPlusPlus")){
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
66 galaxyowlapi.setReasonerFaCT();
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
67 }
18
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
68 // Elk
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
69 else if (reasoner_type.equals("Elk")){
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
70 galaxyowlapi.setReasonerElk();
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
71 }
11
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
72 // HermiT
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
73 else{
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
74 galaxyowlapi.setReasonerHermit();
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
75 }
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
76
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
77 // Load the OPPL flat file with script in memory
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
78 String OPPL_script_source = "";
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
79 File file = new File(OPPL_script_file);
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
80 Scanner input = new Scanner(file);
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
81 while(input.hasNext()) {
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
82 String nextToken = input.next();
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
83 OPPL_script_source = OPPL_script_source + " " + nextToken;
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
84 }
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
85 input.close();
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
86
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
87 OWLOntologyManager manager = galaxyowlapi.getOWLManager();
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
88 OWLOntology ontology = galaxyowlapi.getMainOntology();
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
89 OWLReasoner reasoner = galaxyowlapi.getReasoner();
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
90
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
91 // Parse the OPPL script
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
92 ParserFactory parserFactory = new ParserFactory(manager, ontology, reasoner);
13
7e6604a5ee55 New query tool added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 11
diff changeset
93 Logger logger = Logger.getLogger(OPPLGalaxy.class.getName());
18
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
94 // logger.setLevel(Level.OFF);
11
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
95 // Logging.getQueryLogger().setLevel(Level.OFF); // The normal messages are errors for galaxy (Fixed in Galaxy by 2 > /dev/null)
18
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
96
11
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
97 ErrorListener errorListener = (ErrorListener)new LoggerErrorListener(logger);
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
98 OPPLParser opplparser = parserFactory.build(errorListener);
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
99 OPPLScript OPPLscript = opplparser.parse(OPPL_script_source);
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
100
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
101 // Execute the script
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
102 ChangeExtractor extractor = new ChangeExtractor(new QuickFailRuntimeExceptionHandler(), true);
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
103 List<OWLAxiomChange> changes = extractor.visit(OPPLscript);
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
104 manager.applyChanges(changes);
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
105
18
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
106 galaxyowlapi.disposeReasoner();
d3616fac4ca5 Elk support added
Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents: 13
diff changeset
107
11
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
108 // Merge imported ontologies if requested
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
109 // if(merge.equals("Merge")){
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
110 // galaxyowlapi.merge();
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
111 // }
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
112
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
113 // Save the ontology
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
114 if(OWL.equals("OWL")){
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
115 galaxyowlapi.saveOntology(true);
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
116 }
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
117 else{
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
118 galaxyowlapi.saveOntology(false);
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
119 }
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
120 }
6ca67b155e32 Imports simplified, new tool for inference added
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
121 }