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] Problem in reading and writing owl file

Timothy Redmond tredmond at stanford.edu
Mon Aug 31 08:22:13 PDT 2009


> Following code gives error... on second last line.

You will have to give a bit more information.  I just ran the program  
here.  I did change the location that the file was saved to but other  
than that I ran the program with no errors (see below).   The warning  
at the beginning comes because of how I ran the program in an ide.

What error are you getting?

-Timothy


WARNING: [Local Folder Repository] The specified file must be a  
directory. (/Andromeda/Users/tredmond/Shared/code/Test.p3/plugins/ 
edu.stanford.smi.protegex.owl) -- LocalFolderRepository.update()
Loading triples from: http://protege.cim3.net/file/pub/ontologies/travel/travel.owl
     Completed triple loading after 2264 ms
Postprocess: Process entities with incorrect Java type (0  
entities) ... 0 ms
Postprocess: Process metaclasses (3 metaclasses) ... 0 ms
Postprocess: Process subclasses of rdf:List (1 classes) ... 0 ms
Postprocess: Instances with multiple types (23 instances) ... 4 ms
Postprocess: Add inferred superclasses ... 44 ms
Postprocess: Process orphan classes (34 classes) ... 8 ms
Postprocess: Generalized Concept Inclusion (0 axioms) ... 0 ms
Postprocess: Abstract classes... 0 ms
Postprocess: Domain and range of properties... 5 ms
Postprocess: Possibly typed entities (0 resources) ... 0 ms
Updating underlying frames model in 0 ms
Aug 31, 2009 8:18:50 AM  
edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser  
doFinalPostProcessing
INFO: Updating underlying frames model in 0 ms
... saving successful to: /tmp/travel-saved.owl
File saved with 0 errors.

On Aug 31, 2009, at 8:10 AM, Muhammad Javed wrote:

>
> Hi,
> I am new to OWL API,
>
> I was using step by step procedure given at http://protege.stanford.edu/plugins/owl/api/guide.html#IO 
>   to create owl files,
> however i am not able to load or save owl files.
> Following code gives error... on second last line. Can anyone help  
> me in this regards. Thanks
>
> String uri = "http://protege.cim3.net/file/pub/ontologies/travel/travel.owl 
> ";
>     //alternatively, you can specify a local path on your computer
>     //for the travel.owl ontology. Example:
>     //String uri = "file:///c:/Work/Projects/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.");
> ----------------------------------------------
>
> _______________________________________________
> 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




More information about the protege-owl mailing list