[protege-owl] Creating an OWL ontology in my computer and accessing it

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

[protege-owl] Creating an OWL ontology in my computer and accessing it

Avichai Giat

In case I am creating an ontology in my machine and I want to access it
from an application.
 what is the string that I need to write in the following lines ??

String uri = "what should I write HERE";
OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);

and is there anything I should do in the protege-OWL so it works (defining
a namespace ? etc.)

Avichai

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Creating an OWL ontology in my computer and accessing it

Olivier Dameron
On Mon, 20 Nov 2006 18:48:53 +0200, Avichai Giat <[hidden email]>
wrote:

> String uri = "what should I write HERE";
> OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);
>
> and is there anything I should do in the protege-OWL so it works
> (defining a namespace ? etc.)

file:///a/classical/unix-like/path/to/a/file.owl
or
file://C:/whatever/windows/file.owl

you can also use the protege repositories to store the association
between an URI and the corresponding local file.
A last solution (probably not the best, though) could be to setup a web
server on your machine.
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Creating an OWL ontology in my computer and accessing it

Leonardo Jacques da Silva
In reply to this post by Avichai Giat
Hi,

I've never used the Protege-owl API, but I think  it's similar to JENA API.

1- Publish you ontology on the web.

2- Using Jena API , do this: the variable "uri" should receive the ontology's url, for example String uri = http://www.mydomain/myontology.owl

3- Load the ontology using the method read(); for example: owlModel.read(uri);


I have an file.ppt that shows some examples using JENA API, if you want I can send it your email.

 

On 11/20/06, Avichai Giat <[hidden email]> wrote:

In case I am creating an ontology in my machine and I want to access it
from an application.
what is the string that I need to write in the following lines ??

String uri = "what should I write HERE";
OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);

and is there anything I should do in the protege-OWL so it works (defining
a namespace ? etc.)

Avichai

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03



--
Leonardo Jacques
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Creating an OWL ontology in my computer and accessing it

Marisa Santos Amaro
Hi  Leonardo:
 
I´d apreciated if you can send me the .ppt too.
 
Thanks.
Marisa.
 


 

 
On 11/20/06, Avichai Giat <[hidden email] > wrote:

In case I am creating an ontology in my machine and I want to access it
from an application.
what is the string that I need to write in the following lines ??

String uri = "what should I write HERE";
OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);

and is there anything I should do in the protege-OWL so it works (defining
a namespace ? etc.)

Avichai

_______________________________________________
protege-owl mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="https://mailman.stanford.edu/mailman/listinfo/protege-owl" target="_blank">https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://protege.stanford.edu/doc/faq.html#01a.03" target="_blank">http://protege.stanford.edu/doc/faq.html#01a.03





On 11/20/06, Leonardo Jacques <[hidden email]> wrote:
Hi,

I've never used the Protege-owl API, but I think  it's similar to JENA API.

1- Publish you ontology on the web.

2- Using Jena API , do this: the variable "uri" should receive the ontology's url, for example String uri = <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.mydomain/myontology.owl" target="_blank"> http://www.mydomain/myontology.owl

3- Load the ontology using the method read(); for example: owlModel.read(uri);


I have an file.ppt that shows some examples using JENA API, if you want I can send it your email.


 

On 11/20/06, Avichai Giat <[hidden email] > wrote:

In case I am creating an ontology in my machine and I want to access it
from an application.
what is the string that I need to write in the following lines ??

String uri = "what should I write HERE";
OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);

and is there anything I should do in the protege-OWL so it works (defining
a namespace ? etc.)

Avichai

_______________________________________________
protege-owl mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="https://mailman.stanford.edu/mailman/listinfo/protege-owl" target="_blank">https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://protege.stanford.edu/doc/faq.html#01a.03" target="_blank">http://protege.stanford.edu/doc/faq.html#01a.03



--
Leonardo Jacques
_______________________________________________
protege-owl mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="https://mailman.stanford.edu/mailman/listinfo/protege-owl" target="_blank">https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://protege.stanford.edu/doc/faq.html#01a.03" target="_blank">http://protege.stanford.edu/doc/faq.html#01a.03





--
      Marisa de Oliveira Santos Amaro
             Capitão-de-Fragata ( T )
     Superintendente de Infra-estrutura e
   Serviços de Tecnologia da Informação
Diretoria de Finanças da Marinha - DFM

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Creating an OWL ontology in my computer and accessing it

Avichai Giat
In reply to this post by Olivier Dameron
I have tried using the first solution in giving the String URI the full
path to the local *.owl file
and I got an exception that
Could not resolve file://D:/FullPath/file.owl


does anyone have an idea ??

Avichai Giat



                                                                           
             Olivier Dameron                                              
             <olivier.dameron@                                            
             univ-rennes1.fr>                                           To
             Sent by:                  User support for the Protege-OWL    
             protege-owl-bounc         editor                              
             [hidden email]         <[hidden email]>    
             .edu                                                       cc
                                                                           
                                                                   Subject
             20/11/2006 19:04          Re: [protege-owl] Creating an OWL  
                                       ontology in my computer and        
                                       accessing it                        
             Please respond to                                            
             User support for                                              
              the Protege-OWL                                              
                  editor                                                  
                                                                           
                                                                           




On Mon, 20 Nov 2006 18:48:53 +0200, Avichai Giat <[hidden email]>
wrote:

> String uri = "what should I write HERE";
> OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);
>
> and is there anything I should do in the protege-OWL so it works
> (defining a namespace ? etc.)

file:///a/classical/unix-like/path/to/a/file.owl
or
file://C:/whatever/windows/file.owl

you can also use the protege repositories to store the association
between an URI and the corresponding local file.
A last solution (probably not the best, though) could be to setup a web
server on your machine.
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing:
http://protege.stanford.edu/doc/faq.html#01a.03


_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Creating an OWL ontology in my computer andaccessing it

Ramnath, Vasudha

I think there should be an extra / after file:

"file:///D:/Fullpath/file.owl"

Vasudha

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Avichai
Giat
Sent: Wednesday, November 22, 2006 5:22 PM
To: User support for the Protege-OWL editor
Subject: Re: [protege-owl] Creating an OWL ontology in my computer
andaccessing it

I have tried using the first solution in giving the String URI the full
path to the local *.owl file
and I got an exception that
Could not resolve file://D:/FullPath/file.owl


does anyone have an idea ??

Avichai Giat



 

             Olivier Dameron

             <olivier.dameron@

             univ-rennes1.fr>
To
             Sent by:                  User support for the Protege-OWL

             protege-owl-bounc         editor

             [hidden email]         <[hidden email]>

             .edu
cc
 

 
Subject
             20/11/2006 19:04          Re: [protege-owl] Creating an OWL

                                       ontology in my computer and

                                       accessing it

             Please respond to

             User support for

              the Protege-OWL

                  editor

 

 





On Mon, 20 Nov 2006 18:48:53 +0200, Avichai Giat <[hidden email]>
wrote:

> String uri = "what should I write HERE";
> OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);
>
> and is there anything I should do in the protege-OWL so it works
> (defining a namespace ? etc.)

file:///a/classical/unix-like/path/to/a/file.owl
or
file://C:/whatever/windows/file.owl

you can also use the protege repositories to store the association
between an URI and the corresponding local file.
A last solution (probably not the best, though) could be to setup a web
server on your machine.
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing:
http://protege.stanford.edu/doc/faq.html#01a.03


_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing:
http://protege.stanford.edu/doc/faq.html#01a.03 

------------ Institute For Infocomm Research - Disclaimer -------------
This email is confidential and may be privileged.  If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you.
--------------------------------------------------------
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Creating an OWL ontology in my computer and accessing it

Balachandar-2
In reply to this post by Avichai Giat



can i have a look at your code segment


Bala

Bye from,
Balson


_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Creating an OWL ontology in my computer and accessing it

François-Paul Servant
In reply to this post by Avichai Giat
Avichai Giat a écrit :
> In case I am creating an ontology in my machine and I want to access it
> from an application.
>  what is the string that I need to write in the following lines ??
>
> String uri = "what should I write HERE";

I have not used the Protege API, but the Jena one, and I guess you would have to
use something like:
file:///C:/path/to/dir/theontfile.owl on windows
file:///Users/username/path/to/dir/theontfile.owl on mac (adapt to other unix)

Note the 3 "/" after the "file:" protocol.

(Of course, if you can access your owl file though http, just use its http url,
for instance http://127.0.0.1/..../theontfile.owl)

Hope this helps

fps

> OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);
>
> and is there anything I should do in the protege-OWL so it works (defining
> a namespace ? etc.)
>
> Avichai
>
> _______________________________________________
> protege-owl mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>


-- Disclaimer ------------------------------------
Ce message ainsi que les eventuelles pieces jointes constituent une correspondance privee et confidentielle a l'attention exclusive du destinataire designe ci-dessus. Si vous n'etes pas le destinataire du present message ou une personne susceptible de pouvoir le lui delivrer, il vous est signifie que toute divulgation, distribution ou copie de cette transmission est strictement interdite. Si vous avez recu ce message par erreur, nous vous remercions d'en informer l'expediteur par telephone ou de lui retourner le present message, puis d'effacer immediatement ce message de votre systeme.
***
This e-mail and any attachments is a confidential correspondence intended only for use of the individual or entity named above. If you are not the intended recipient or the agent responsible for delivering the message to the intended recipient, you are hereby notified that any disclosure, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by phone or by replying this message, and then delete this message from your system.
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Creating an OWL ontology in my computer and accessing it

Marisa Santos Amaro
 
Hello:
I´m getting similar problem with  this method.
Using  Protege.OWL.createJenaOWLModel( )  for empty ontologies, my code works fine, but if I try to load an existing ontology, I got an compilation error "Unhandled exception".
The code ...
String uri = <a href="file:///C:/Program Files/Protege_3.2_beta/TestProtege/camera24.owl">file:///C:/Program Files/Protege_3.2_beta/TestProtege/camera24.owl ;
OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);
 
... returns  the following output:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Unhandled exception type Exception
at mystudy.Example1.main(Example1.java:19)

In order to handle an exception, I tried to code a " throws " declaration, but it also didn´t work fine:

   OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri) throws (uri,String "xx"); 

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Syntax error on token "throws", ; expected
Syntax error on token "(", Type expecte
Syntax error on token ",", delete this token
Syntax error, insert ";" to complete LocalVariableDeclarationStatement
 
Any suggestion ?
 
Cheers,
Marisa.
 

 


 
On 11/28/06, François-Paul Servant <[hidden email]> wrote:
Avichai Giat a écrit :
> In case I am creating an ontology in my machine and I want to access it
> from an application.
>  what is the string that I need to write in the following lines ??
>
> String uri = "what should I write HERE";

I have not used the Protege API, but the Jena one, and I guess you would have to
use something like:
file:///C:/path/to/dir/theontfile.owl on windows
file:///Users/username/path/to/dir/theontfile.owl on mac (adapt to other unix)

Note the 3 "/" after the "file:" protocol.

(Of course, if you can access your owl file though http, just use its http url,
for instance <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://127.0.0.1/..../theontfile.owl" target="_blank"> http://127.0.0.1/..../theontfile.owl)

Hope this helps

fps

> OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);
>
> and is there anything I should do in the protege-OWL so it works (defining
> a namespace ? etc.)
>
> Avichai
>
> _______________________________________________
> protege-owl mailing list
> [hidden email]
> <a onclick="return top.js.OpenExtLink(window,event,this)" href="https://mailman.stanford.edu/mailman/listinfo/protege-owl" target="_blank">https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://protege.stanford.edu/doc/faq.html#01a.03" target="_blank">http://protege.stanford.edu/doc/faq.html#01a.03
>


-- Disclaimer ------------------------------------
Ce message ainsi que les eventuelles pieces jointes constituent une correspondance privee et confidentielle a l'attention exclusive du destinataire designe ci-dessus. Si vous n'etes pas le destinataire du present message ou une personne susceptible de pouvoir le lui delivrer, il vous est signifie que toute divulgation, distribution ou copie de cette transmission est strictement interdite. Si vous avez recu ce message par erreur, nous vous remercions d'en informer l'expediteur par telephone ou de lui retourner le present message, puis d'effacer immediatement ce message de votre systeme.
***
This e-mail and any attachments is a confidential correspondence intended only for use of the individual or entity named above. If you are not the intended recipient or the agent responsible for delivering the message to the intended recipient, you are hereby notified that any disclosure, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by phone or by replying this message, and then delete this message from your system.
_______________________________________________
protege-owl mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="https://mailman.stanford.edu/mailman/listinfo/protege-owl" target="_blank">https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://protege.stanford.edu/doc/faq.html#01a.03" target="_blank">http://protege.stanford.edu/doc/faq.html#01a.03



--
      Marisa de Oliveira Santos Amaro
             Capitão-de-Fragata ( T )
     Superintendente de Infra-estrutura e
   Serviços de Tecnologia da Informação
Diretoria de Finanças da Marinha - DFM

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03