OWL2Parser.java revision 72612745c4e86f3395a88b435d26830d8f7f70b3
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandimport org.coode.owlapi.owlxml.renderer.OWLXMLRenderer;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandimport org.coode.owlapi.rdf.rdfxml.RDFXMLRenderer;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandimport org.semanticweb.owlapi.apibinding.OWLManager;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandimport org.semanticweb.owlapi.io.OWLRendererException;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandimport org.semanticweb.owlapi.util.OWLOntologyMerger;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandimport uk.ac.manchester.cs.owl.owlapi.mansyntaxrenderer.ManchesterOWLSyntaxRenderer;
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland private static enum OPTION {OWL_XML, MANCHESTER, RDF_XML}
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland private static final List<OWLOntology> loadedImportsList = new ArrayList<OWLOntology>();
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland private static final ArrayList<IRI> importsIRI = new ArrayList<IRI>();
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland private static final Map<OWLOntology, List<OWLOntology>> m = new HashMap<OWLOntology, List<OWLOntology>>();
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland private static final Set<OWLOntology> s = new HashSet<OWLOntology>();
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland private static final Set<OWLOntology> expanded = new HashSet<OWLOntology>();
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland System.out.println("Usage: processor <URI> [FILENAME] <OPTION>");
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland // A simple example of how to load and save an ontology
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland // args[0]: IRI
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland // args[1]: name of output file
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland // args[2]: type of output file: xml, rdf, or otherwise assume Manchester syntax
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland out = new BufferedWriter(new FileWriter(filename));
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland // args[0]: IRI
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland // args[1]: type of output (or output file for Manchester syntax)
} catch (Exception e) {
e.printStackTrace();
return st;
eq = false;
eq = false;
return eq;
return keys;
switch (op) {
case OWL_XML:
case MANCHESTER:
case RDF_XML: