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

Muhammad Javed mjaved at computing.dcu.ie
Mon Aug 31 08:10:13 PDT 2009


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.");

----------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20090831/95f82943/attachment.html>


More information about the protege-owl mailing list