I cannot save an update to a record in my OWL RDF / XML file using Protege. Every time I close the application, I lose all my editing. I used the JENA library to read this file as follows:
OntModel model = ModelFactory.createOntologyModel (OntModelSpec.OWL_DL_MEM,null); model.setNsPrefix("", ns); FileInputStream fis = new FileInputStream(this.sourceFile); model.read(fis,ns);
I tried to fix this problem:
FileOutputStream fos = new FileOutputStream(this.sourceFile); model.writeAll(fos, "RDF/XML-ABBREV","xmlbase"); model.close();
But my file closes and is finally empty. If I try to rename the output file, it works fine (try to avoid the output file matching the input file).
At the end, my question is: how can I update my OWL file?
source share