- From: <divino@telemedicina.ufsc.br>
- Date: Wed, 11 Nov 2009 01:35:15 -0000 (UTC)
- To: public-owl-dev@w3.org
Dears, I am developing an ontology and I want to store the owl code to disk. I got the code sample from protege-owl guide to store the owl code to disk, but something is wrong. This error is showed when the code is executed: URI da Classe: file:///C:/Users/divino/Documents/UFSC/TELE-CIT/Ontologia/ URI criada: file:///C:/Users/divino/TELECIT342.owl SEVERE: Failed to save file file:///C:/Users/divino/TELECIT342.owl using Protege2Jena. -- com.hp.hpl.jena.shared.BadURIException: Only well-formed absolute URIrefs can be included in RDF/XML output: <d> Code: 58/REQUIRED_COMPONENT_MISSING in SCHEME: A component that is required by the scheme is missing. at com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.checkURI(BaseXMLWriter.java:768) at com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.xmlnsDecl(BaseXMLWriter.java:300) at com.hp.hpl.jena.xmloutput.impl.Unparser.printNameSpaceDefn(Unparser.java:1036) at com.hp.hpl.jena.xmloutput.impl.Unparser.wRDF(Unparser.java:286) at com.hp.hpl.jena.xmloutput.impl.Unparser.write(Unparser.java:195) at com.hp.hpl.jena.xmloutput.impl.Abbreviated.writeBody(Abbreviated.java:138) at com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.writeXMLBody(BaseXMLWriter.java:455) at com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.write(BaseXMLWriter.java:424) at com.hp.hpl.jena.xmloutput.impl.Abbreviated.write(Abbreviated.java:124) at edu.stanford.smi.protegex.owl.jena.JenaOWLModel.saveModel(Unknown Source) Arquivo salvo com 1 erro(s). at edu.stanford.smi.protegex.owl.jena.JenaOWLModel.save(Unknown Source) at edu.stanford.smi.protegex.owl.jena.JenaOWLModel.save(Unknown Source) at edu.stanford.smi.protegex.owl.jena.protege2jena.Protege2Jena.saveAll(Unknown Source) at edu.stanford.smi.protegex.owl.jena.JenaOWLModel.save(Unknown Source) at ontosample.ontoReader.createSubstances(ontoReader.java:65) at ontosample.ontoReader.main(ontoReader.java:24) This is the code used to save the ontology: String fileName = "TELECIT342.owl"; Collection errors = new ArrayList(); File arqowl=new File(fileName); URI uri = arqowl.toURI(); System.out.println("URI criada: " + uri.toString()); onto.save(uri, FileUtils.langXMLAbbrev, errors); System.out.println("Arquivo salvo com " + errors.size() + " erro(s).");
Received on Wednesday, 11 November 2009 21:16:32 UTC