comparison src/MergeImportedOntologies.java @ 19:cc270db37d33 draft

Directories re-arranged
author Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
date Sat, 06 Oct 2012 21:50:39 +0200
parents OPPL/src/MergeImportedOntologies.java@c9e01f86b07c
children
comparison
equal deleted inserted replaced
18:d3616fac4ca5 19:cc270db37d33
1 package es.upm.cbgp.opplquery.oppl.galaxy;
2
3 import java.io.IOException;
4
5 import org.semanticweb.owlapi.model.OWLOntologyCreationException;
6 import org.semanticweb.owlapi.model.OWLOntologyStorageException;
7
8 import es.upm.fi.dia.oeg.oppl.galaxy.GalaxyOWLAPI;
9
10 public class MergeImportedOntologies {
11
12 /**
13 * @param args
14 * @throws OWLOntologyCreationException
15 * @throws IOException
16 * @throws OWLOntologyStorageException
17 */
18 public static void main(String[] args) throws OWLOntologyCreationException, OWLOntologyStorageException, IOException {
19 String OWLFilePath = args [0];
20 String MergedOntologyNewURI = args [1];
21 // String OWLFilePath = "/home/mikel/UPM/OPPL_galaxy/OPPL/OPPL/test-data/ontology/imports/merge_test.owl";
22 // String MergedOntologyNewURI = "http://cbgp.upm.es/merged.owl";
23
24 // Create the manager
25 GalaxyOWLAPI galaxyowlapi = new GalaxyOWLAPI();
26
27 // Load the main ontology and hope for the imported URIs to be resolvable
28 galaxyowlapi.loadMainOntology(OWLFilePath);
29
30 // Merge and save
31
32 if(MergedOntologyNewURI.isEmpty()){
33 MergedOntologyNewURI = "http://cbgp.upm.es/BiologicalInformatics/OPPLGalaxy/merged.owl";
34 }
35
36 galaxyowlapi.merge(MergedOntologyNewURI);
37 galaxyowlapi.saveOntology(true);
38 }
39 }