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] Importing ontology from a locally stored owl file

Thomas Russ tar at ISI.EDU
Thu Jan 17 17:29:37 PST 2008


On Jan 16, 2008, at 10:01 PM, Surabhi Agarwal wrote:

> I am trying to import an owl ontology stored locally from a java  
> program.
>
> ProtegeOWLParser.addImport(owlModel, new
> URI("file:///home/surabhi/rep/textmining/buzz/trunk/resources/data/camera.owl 
> "),
> "camera");
>
> Its working fine but when I give relative path in import
> ProtegeOWLParser.addImport(owlModel, new
> URI("file:///../data/camera.owl"),"camera");
>
> It says owl ontology not found. How can I give relative path to import
> locally
> stored ontology?

I always have trouble figuring out the correct URI syntax for relative  
paths is, so what I usually do is create the appropriate File object  
and use the File.toURI() method to get the URI.  That also lets be  
easily check for the file's existence first.



More information about the protege-owl mailing list