Hi, am trying to create individuals and save them in owl file. The owl file was created in protege. The size of the owl file was 10 KB but after trying to save the individuals in the ontology the size of the code becomes 7 KB.

Then I tried to open the owl file using protege but it will not open . The code is :

String SOURCE = "http://www.semanticweb.org/ontologies/2012/9/untitled-ontology-19"; String NS = SOURCE + "#"; OntModel onto = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null); onto.read("file:/home/tourism.owl", "RDF/XML"); OntClass place = onto.getOntClass(NS+"Mountains"); Individual am1 = onto.createIndividual(NS+Concept1, place); FileOutputStream output = null; try { output = new FileOutputStream( "/home/tourism.owl ");

    catch(Exception e)


onto.writeAll(output, "RDF/XML-ABBREV","xmlbase");

asked 02 Dec '12, 19:38

salem's gravatar image

accept rate: 0%

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: 02 Dec '12, 19:38

question was seen: 744 times

last updated: 03 Dec '12, 03:05