I'm using java protege API to create individuals and properties in a owl file, changes are made only at run time so when i close the application the owl file returns to its initial state, how can i submit the changes i made to the owl file

asked 28 Nov '12, 16:19

Ibrahim%20Koubeissy's gravatar image

Ibrahim Koub...
accept rate: 0%

owlModel.save() - http://protege.stanford.edu/protege/3.4/docs/api/owl/edu/stanford/smi/protegex/owl/jena/JenaOWLModel.html#save(java.net.URI)

seeAlso: http://protegewiki.stanford.edu/wiki/ProtegeOWL_API_Advanced_Topics#Loading_and_Saving_Files

String uri = "http://protege.cim3.net/file/pub/ontologies/travel/travel.owl";
JenaOWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);
OWLNamedClass destinationClass = owlModel.getOWLNamedClass("Destination");
String fileName = "travel-saved.owl";
Collection errors = new ArrayList();
owlModel.save(new File(fileName).toURI(), FileUtils.langXMLAbbrev, errors);
System.out.println("File saved with " + errors.size() + " errors.");
permanent link

answered 02 Dec '12, 01:58

Sweet%20Burlap's gravatar image

Sweet Burlap
accept rate: 19%

10x a lot guys

(02 Dec '12, 15:04) Ibrahim Koub... Ibrahim%20Koubeissy's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 28 Nov '12, 16:19

question was seen: 1,489 times

last updated: 02 Dec '12, 15:04