diff OPPL/src/GalaxyOWLAPI.java @ 17:c9e01f86b07c draft

New tool added for merging imported ontologies (GalaxyOWLAPI and README changed and test ontologies added accordingly). Memory settings changed in all the tools XML files
author Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
date Mon, 20 Aug 2012 11:39:56 +0200
parents 622cde484f4c
children d3616fac4ca5
line wrap: on
line diff
--- a/OPPL/src/GalaxyOWLAPI.java	Thu Aug 02 09:22:57 2012 +0200
+++ b/OPPL/src/GalaxyOWLAPI.java	Mon Aug 20 11:39:56 2012 +0200
@@ -49,6 +49,7 @@
 import org.semanticweb.owlapi.util.InferredSubDataPropertyAxiomGenerator;
 import org.semanticweb.owlapi.util.InferredSubObjectPropertyAxiomGenerator;
 import org.semanticweb.owlapi.util.OWLEntityRenamer;
+import org.semanticweb.owlapi.util.OWLOntologyImportsClosureSetProvider;
 import org.semanticweb.owlapi.util.OWLOntologyMerger;
 import org.semanticweb.owlapi.util.SimpleShortFormProvider;
 import org.semanticweb.owlapi.vocab.OWL2Datatype;
@@ -62,7 +63,7 @@
 /**
  * A wrapper of the OWL API 
  * 
- * @author Mikel Ega��a Aranguren
+ * @author Mikel Egana Aranguren
  */
 public class GalaxyOWLAPI {
 	private OWLOntologyManager manager;
@@ -109,10 +110,13 @@
 		reasonerFactory = new Reasoner.ReasonerFactory();
 		reasoner = reasonerFactory.createReasoner(ontology);
 	}
-	public void merge () throws OWLOntologyCreationException{
+	public void merge (String ontologyIRI) throws OWLOntologyCreationException, OWLOntologyStorageException{
 		OWLOntologyMerger merger = new OWLOntologyMerger(manager);
-		IRI mergedOntologyIRI = IRI.create("http://oeg-upm.net/oppl_galaxy/merged.owl");
+//		OWLOntologyMerger merger = new OWLOntologyMerger(new OWLOntologyImportsClosureSetProvider(manager, ontology));
+		IRI mergedOntologyIRI = IRI.create(ontologyIRI);
+//		OWLOntology merged_ontology = merger.createMergedOntology(manager, mergedOntologyIRI);
 		ontology = merger.createMergedOntology(manager, mergedOntologyIRI);
+//		manager.saveOntology(ontology, new RDFXMLOntologyFormat(), new SystemOutDocumentTarget());
 	}
 	
 	public OWLClassExpression parseMOSClassExpression (String expr) throws ParserException{