Mercurial > repos > mikel-egana-aranguren > oppl
view src/MergeImportedOntologies.java @ 21:ffde1fafa066 draft
README corrected with proper installation instructions for mercurial (hg pull + hg update)
author | Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu> |
---|---|
date | Mon, 08 Oct 2012 13:10:44 +0200 |
parents | cc270db37d33 |
children |
line wrap: on
line source
package es.upm.cbgp.opplquery.oppl.galaxy; import java.io.IOException; import org.semanticweb.owlapi.model.OWLOntologyCreationException; import org.semanticweb.owlapi.model.OWLOntologyStorageException; import es.upm.fi.dia.oeg.oppl.galaxy.GalaxyOWLAPI; public class MergeImportedOntologies { /** * @param args * @throws OWLOntologyCreationException * @throws IOException * @throws OWLOntologyStorageException */ public static void main(String[] args) throws OWLOntologyCreationException, OWLOntologyStorageException, IOException { String OWLFilePath = args [0]; String MergedOntologyNewURI = args [1]; // String OWLFilePath = "/home/mikel/UPM/OPPL_galaxy/OPPL/OPPL/test-data/ontology/imports/merge_test.owl"; // String MergedOntologyNewURI = "http://cbgp.upm.es/merged.owl"; // Create the manager GalaxyOWLAPI galaxyowlapi = new GalaxyOWLAPI(); // Load the main ontology and hope for the imported URIs to be resolvable galaxyowlapi.loadMainOntology(OWLFilePath); // Merge and save if(MergedOntologyNewURI.isEmpty()){ MergedOntologyNewURI = "http://cbgp.upm.es/BiologicalInformatics/OPPLGalaxy/merged.owl"; } galaxyowlapi.merge(MergedOntologyNewURI); galaxyowlapi.saveOntology(true); } }