Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] Protege-OWL API, Problem saving an Ontology

Timothy Redmond tredmond at stanford.edu
Thu Jan 7 07:06:14 PST 2010


Kevin Alonso wrote:
> Dear all,
>
> I´m using Protege-OWL API and when i´m going to save the ontology the 
> process takes about 30 minutes. Is it normal?
I have more information but it really is just a confirmation of what I 
said before.  I wrote a small program with the elements that you 
described.  It opened a pizza ontology, added 5000 individuals and saved 
the ontology in 8 seconds.  I loaded the resulting project back into 
protege to check that I had succeeded.

It is possible that generating a thread dump [1] would help diagnose the 
issue.  Is the process using 100% of the cpu?  A possibility is that 
java is hung or waiting and the save completed or failed.  It is also 
possible that you are generating much more data than I did.  I just 
created 5000 individuals and found that this was a very small amount of 
data.  But you might have added much more information to your individuals.

-Timothy

[1] http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/


>
> The code I used:
>
> OWLModel owlModel = null;
> try {
>     owlModel = ProtegeOWL.createJenaOWLModelFromURI(phuri);
> } catch (OntologyLoadException e) {
>     // TODO Auto-generated catch block
>     e.printStackTrace();
>     System.out.println("Errror Loading Ontology: "+ phuri);
> }
>
>
> Then I use a Protege-OWL Java cede classes to create a factory and add 
> some individuals to the ontology.
>
> Factory model = new Factory(owlModel);
> ...
>
>
> And finally I save the ontology:
> JenaOWLModel jenaModel =(JenaOWLModel)owlModel;
> try {
>     jenaModel.save(new File("ModifiedOntology.owl").toURI());
> } catch (Exception e) {
>     // TODO Auto-generated catch block
>     e.printStackTrace();
>     System.out.println("Error saving Ontology");
> }
> System.out.println("Done.");
>
> Is another way to save the ontology more efficiently?
>
>
> Thanks in advance,
>
> Kevin.
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: 
> http://protege.stanford.edu/doc/faq.html#01a.03

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CreateAndSave.java
Type: text/x-java
Size: 1106 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20100107/eb23f488/attachment.java>


More information about the protege-owl mailing list