Creating OWLModel from existing file

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating OWLModel from existing file

Sebastian Leinhos
Hello,

I have an ontology on my local system and I am trying to create an
OWLModel from this file. Using this code

String uri = new String("file:///D:/DA/ontology.owl");
OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);

I get an exception which says:

[DefaultURIResolver] Warning: Could not resolve
file:///D:/DA/ontology.owl: com.hp.hpl.jena.shared.WrappedIOException:
rethrew: java.io.FileNotFoundException:
D:\Programme\Protege_3.1\unibwm\plugins\edu.stanford.smi.protegex.owl\ont-policy.rdf
(System cannot find path)

What am I doing wrong? I tried it by uploading my file to my webspace,
but the same error occured.

Thanks and a nice sunday to everyone,

Sebastian Leinhos
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Creating OWLModel from existing file

philippe-free
Hi Sebastian,

just try lo call your file with a path like
http//www.your_domain.com/your_file.owl

Philippe

Le dimanche 02 avril 2006 à 14:53 +0200, Sebastian Leinhos a écrit :

> Hello,
>
> I have an ontology on my local system and I am trying to create an
> OWLModel from this file. Using this code
>
> String uri = new String("file:///D:/DA/ontology.owl");
> OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);
>
> I get an exception which says:
>
> [DefaultURIResolver] Warning: Could not resolve
> file:///D:/DA/ontology.owl: com.hp.hpl.jena.shared.WrappedIOException:
> rethrew: java.io.FileNotFoundException:
> D:\Programme\Protege_3.1\unibwm\plugins\edu.stanford.smi.protegex.owl\ont-policy.rdf
> (System cannot find path)
>
> What am I doing wrong? I tried it by uploading my file to my webspace,
> but the same error occured.
>
> Thanks and a nice sunday to everyone,
>
> Sebastian Leinhos
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Creating OWLModel from existing file

Sebastian Leinhos
Hi Philippe,

I tried that as well, but the same error occured.

By now I got another solution (the error still exists but my model is
created anyway): My OWL file was created by an XSL Transformation. First
I loaded it with Protege, saved it again and then created the OWL Model.
Now it works , but as I said, the error occurs nevertheless.

Thank you Philippe!

Cheers,
Sebastian


philippe haas schrieb:

> Hi Sebastian,
>
> just try lo call your file with a path like
> http//www.your_domain.com/your_file.owl
>
> Philippe
>
> Le dimanche 02 avril 2006 à 14:53 +0200, Sebastian Leinhos a écrit :
>  
>> Hello,
>>
>> I have an ontology on my local system and I am trying to create an
>> OWLModel from this file. Using this code
>>
>> String uri = new String("file:///D:/DA/ontology.owl");
>> OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);
>>
>> I get an exception which says:
>>
>> [DefaultURIResolver] Warning: Could not resolve
>> file:///D:/DA/ontology.owl: com.hp.hpl.jena.shared.WrappedIOException:
>> rethrew: java.io.FileNotFoundException:
>> D:\Programme\Protege_3.1\unibwm\plugins\edu.stanford.smi.protegex.owl\ont-policy.rdf
>> (System cannot find path)
>>
>> What am I doing wrong? I tried it by uploading my file to my webspace,
>> but the same error occured.
>>
>> Thanks and a nice sunday to everyone,
>>
>> Sebastian Leinhos
>> -------------------------------------------------------------------------
>> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>>
>>
>>    
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>
>  
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Creating OWLModel from existing file

Iulian Alecu

Hi
Try "file:/D:/DA/ontology.owl" (i.e. with only one slash and not three).I.It works like this in my application.


Regards,
Iulian Alecu
-----------------------------------
Laboratoire SPIM
INSERM URM-S 729
 15, rue de l'école de Médecine
 75006 PARIS

Tél :(+33 /0)1 53 10 92 12
Fax :(+33 /0)1 53 10 92 01

On 4/3/06, Sebastian Leinhos <[hidden email]> wrote:
Hi Philippe,

I tried that as well, but the same error occured.

By now I got another solution (the error still exists but my model is
created anyway): My OWL file was created by an XSL Transformation. First
I loaded it with Protege, saved it again and then created the OWL Model.
Now it works , but as I said, the error occurs nevertheless.

Thank you Philippe!

Cheers,
Sebastian


philippe haas schrieb:

> Hi Sebastian,
>
> just try lo call your file with a path like
> http//www.your_domain.com/your_file.owl
>
> Philippe
>
> Le dimanche 02 avril 2006 à 14:53 +0200, Sebastian Leinhos a écrit :
>
>> Hello,
>>
>> I have an ontology on my local system and I am trying to create an
>> OWLModel from this file. Using this code
>>
>> String uri = new String(" file:///D:/DA/ontology.owl");
>> OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);
>>
>> I get an exception which says:
>>
>> [DefaultURIResolver] Warning: Could not resolve

>> file:///D:/DA/ontology.owl: com.hp.hpl.jena.shared.WrappedIOException:
>> rethrew: java.io.FileNotFoundException :
>> D:\Programme\Protege_3.1\unibwm\plugins\edu.stanford.smi.protegex.owl\ont-policy.rdf
>> (System cannot find path)
>>
>> What am I doing wrong? I tried it by uploading my file to my webspace,
>> but the same error occured.
>>
>> Thanks and a nice sunday to everyone,
>>
>> Sebastian Leinhos
>> -------------------------------------------------------------------------
>> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>>
>>
>>
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>
>
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html


Reply | Threaded
Open this post in threaded view
|

Re: Creating OWLModel from existing file

Sebastian Leinhos
Hi,
same error ;.)
Well thank you so far. It works - as I said in my last mail - even with
the error. Main thing is, that it works. Maybe I try it later with
load()-method from JenaOWLModel. I'll let you know if this works out better.

Best regards,
Sebastian

Iulian Alecu schrieb:

>
> Hi
> Try "file:/D:/DA/ontology.owl" (i.e. with only one slash and not
> three).I.It works like this in my application.
>
>
> Regards,
> Iulian Alecu
> -----------------------------------
> Laboratoire SPIM
> INSERM URM-S 729
>  15, rue de l'école de Médecine
>  75006 PARIS
>
> Tél :(+33 /0)1 53 10 92 12
> Fax :(+33 /0)1 53 10 92 01
>
> On 4/3/06, *Sebastian Leinhos * <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Philippe,
>
>     I tried that as well, but the same error occured.
>
>     By now I got another solution (the error still exists but my model is
>     created anyway): My OWL file was created by an XSL Transformation.
>     First
>     I loaded it with Protege, saved it again and then created the OWL
>     Model.
>     Now it works , but as I said, the error occurs nevertheless.
>
>     Thank you Philippe!
>
>     Cheers,
>     Sebastian
>
>
>     philippe haas schrieb:
>     > Hi Sebastian,
>     >
>     > just try lo call your file with a path like
>     > http//www.your_domain.com/your_file.owl
>     >
>     > Philippe
>     >
>     > Le dimanche 02 avril 2006 à 14:53 +0200, Sebastian Leinhos a
>     écrit :
>     >
>     >> Hello,
>     >>
>     >> I have an ontology on my local system and I am trying to create an
>     >> OWLModel from this file. Using this code
>     >>
>     >> String uri = new String(" file:///D:/DA/ontology.owl");
>     >> OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);
>     >>
>     >> I get an exception which says:
>     >>
>     >> [DefaultURIResolver] Warning: Could not resolve
>     >> file:///D:/DA/ontology.owl:
>     com.hp.hpl.jena.shared.WrappedIOException:
>     >> rethrew: java.io.FileNotFoundException :
>     >>
>     D:\Programme\Protege_3.1\unibwm\plugins\edu.stanford.smi.protegex.owl\ont-policy.rdf
>     >> (System cannot find path)
>     >>
>     >> What am I doing wrong? I tried it by uploading my file to my
>     webspace,
>     >> but the same error occured.
>     >>
>     >> Thanks and a nice sunday to everyone,
>     >>
>     >> Sebastian Leinhos
>     >>
>     -------------------------------------------------------------------------
>
>     >> To unsubscribe go to
>     http://protege.stanford.edu/community/subscribe.html
>     >>
>     >>
>     >>
>     >
>     >
>     -------------------------------------------------------------------------
>
>     > To unsubscribe go to
>     http://protege.stanford.edu/community/subscribe.html
>     >
>     >
>     >
>     -------------------------------------------------------------------------
>
>     To unsubscribe go to
>     http://protege.stanford.edu/community/subscribe.html
>
>
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Creating OWLModel from existing file

Nick Drummond
Sebastian,

Are you using Protege3.1.1? I would recommend you move over to 3.2beta.
There is nothing wrong with your URI string (this is why the ontology is
loading).
I believe the error is created because your ontology imports other
ontologies and Protege is trying to use the jena mechanism
(ont-policy.rdf) to find them - it appears that this ont-policy file
cannot be found at:
D:\Programme\Protege_3.1\unibwm\plugins\edu.stanford.smi.protegex.owl\ont-policy.rdf.
Protege3.2 uses a better mechanism to resolve the imports.

Nick

Sebastian Leinhos wrote:

> Hi,
> same error ;.)
> Well thank you so far. It works - as I said in my last mail - even
> with the error. Main thing is, that it works. Maybe I try it later
> with load()-method from JenaOWLModel. I'll let you know if this works
> out better.
>
> Best regards,
> Sebastian
>
> Iulian Alecu schrieb:
>
>>
>> Hi
>> Try "file:/D:/DA/ontology.owl" (i.e. with only one slash and not
>> three).I.It works like this in my application.
>>
>>
>> Regards,
>> Iulian Alecu
>> -----------------------------------
>> Laboratoire SPIM
>> INSERM URM-S 729
>>  15, rue de l'école de Médecine
>>  75006 PARIS
>>
>> Tél :(+33 /0)1 53 10 92 12
>> Fax :(+33 /0)1 53 10 92 01
>>
>> On 4/3/06, *Sebastian Leinhos * <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     Hi Philippe,
>>
>>     I tried that as well, but the same error occured.
>>
>>     By now I got another solution (the error still exists but my
>> model is
>>     created anyway): My OWL file was created by an XSL Transformation.
>>     First
>>     I loaded it with Protege, saved it again and then created the OWL
>>     Model.
>>     Now it works , but as I said, the error occurs nevertheless.
>>
>>     Thank you Philippe!
>>
>>     Cheers,
>>     Sebastian
>>
>>
>>     philippe haas schrieb:
>>     > Hi Sebastian,
>>     >
>>     > just try lo call your file with a path like
>>     > http//www.your_domain.com/your_file.owl
>>     >
>>     > Philippe
>>     >
>>     > Le dimanche 02 avril 2006 à 14:53 +0200, Sebastian Leinhos a
>>     écrit :
>>     >
>>     >> Hello,
>>     >>
>>     >> I have an ontology on my local system and I am trying to
>> create an
>>     >> OWLModel from this file. Using this code
>>     >>
>>     >> String uri = new String(" file:///D:/DA/ontology.owl");
>>     >> OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);
>>     >>
>>     >> I get an exception which says:
>>     >>
>>     >> [DefaultURIResolver] Warning: Could not resolve
>>     >> file:///D:/DA/ontology.owl:
>>     com.hp.hpl.jena.shared.WrappedIOException:
>>     >> rethrew: java.io.FileNotFoundException :
>>     >>
>>    
>> D:\Programme\Protege_3.1\unibwm\plugins\edu.stanford.smi.protegex.owl\ont-policy.rdf
>>
>>     >> (System cannot find path)
>>     >>
>>     >> What am I doing wrong? I tried it by uploading my file to my
>>     webspace,
>>     >> but the same error occured.
>>     >>
>>     >> Thanks and a nice sunday to everyone,
>>     >>
>>     >> Sebastian Leinhos
>>     >>
>>    
>> -------------------------------------------------------------------------
>>
>>
>>     >> To unsubscribe go to
>>     http://protege.stanford.edu/community/subscribe.html
>>     >>
>>     >>
>>     >>
>>     >
>>     >
>>    
>> -------------------------------------------------------------------------
>>
>>
>>     > To unsubscribe go to
>>     http://protege.stanford.edu/community/subscribe.html
>>     >
>>     >
>>     >
>>    
>> -------------------------------------------------------------------------
>>
>>
>>     To unsubscribe go to
>>     http://protege.stanford.edu/community/subscribe.html
>>
>>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>

--

Nick Drummond

http://www.cs.man.ac.uk/~drummond/ <http://www.cs.man.ac.uk/%7Edrummond/>
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html