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-discussion] Protege API loadProjectFromFile() question...

Thomas Russ tar at ISI.EDU
Wed Jun 4 18:03:49 PDT 2008


On Jun 4, 2008, at 2:55 PM, Roosh wrote:

>
> Hi everyone!
>
> I am working on a Java program and I need to open a protege project.
>
> For example, my code is like this:
>
> String uri =
> "file:/D:/Program%20Files/Protege_3.3.1/examples/pizza/ 
> pizza.owl.pprj";
> ArrayList errors = new ArrayList();
> Project prj = Project.loadProjectFromFile(uri, errors);
>
> PROBLEM: This is only an example, my actual program uses a file  
> chooser to
> select the file
> and the URI is passed to the loadProjectFromFile() function.

We'll need to see your actual program code.
Apparently something is going wrong between when you get the file  
chooser response and when you call the load function.  How to you  
convert the file choose results into a URL?


> However, when I
> do this the file will not load because it seems that  
> loadProjectFromFile()
> concatenates the current build path to the front of the URI
> passed in. This is what the console says after trying to load the  
> file:
>
> SEVERE: Unable to load project from:
> file:/D:/Program%20Files/Protege_3.3.1/file:/D:/Program%2520Files/ 
> Protege_3.3.1/examples/pizza/pizza.owl.pprj
> -- Project.getProjectInstancesReader()
>
> Is there any way to fix this?
>
> Any input would be appreciated.




More information about the protege-discussion mailing list