communication with protege!

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

communication with protege!

Raj M Verma
hi list,

Is it possible to have a communication between an external application and Protege while we are running Protege (with an Owl ontology)? What is the best possible way for communicating with Protege-Owl ontology from an external application? Consider the following situation...

I pass a SPARQL query in Protege(Pizza ontology) to get the subconcepts of the 'Pizza' concept... (btw, I don't know the syntax of this query, can some one tell me the syntax of the query to get all the subconcepts of a particular concept in owl ontology?) so the result will be displayed in the SPARQL panel on the right... All this is done in Protege till now...

Now, can I invoke this SPARQL query from an external (java based) application and get the answer back to it?? Suppose that I'm working with another application and Protege (with Pizza ontology) is running parallely... I want to have the information of all the subconcepts of the concept 'Pizza' in my other application, so somehow I want to communicate with Protege and get this information... (something similar to think that pizza ontology acts as a backend database for my frontend application) My question is, what is the best way to do it?

Thanq,
Raj.
Reply | Threaded
Open this post in threaded view
|

Re: communication with protege!

Nick Drummond
Raj,

First, I would recommend asking the reasoner for the subclasses of a
concept, rather than sparql - you'll also get back any inferred subclasses.
Second, there is currently no special interface to "hook up" an existing
java application to Protege - everyone else has done this by using the
ProtegeOWL API directly (by using it in their external application or by
writing a plugin) - loading and then querying an ontology for the things
you want to ask is then very easy. Until a proper server version of
Protege is available (possible given that Stanford's CBio project is
looking into this) anything else would be a messy hack - eg you could
implement something to query the reasoner using the model sent to it by
Protege - but then you might as well use the ProtegeOWL API to write the
query mechanism.

Nick

Raj M Verma wrote:

> hi list,
>
> Is it possible to have a communication between an external application
> and Protege while we are running Protege (with an Owl ontology)? What
> is the best possible way for communicating with Protege-Owl ontology
> from an external application? Consider the following situation...
>
> I pass a SPARQL query in Protege(Pizza ontology) to get the
> subconcepts of the 'Pizza' concept... (btw, I don't know the syntax of
> this query, can some one tell me the syntax of the query to get all
> the subconcepts of a particular concept in owl ontology?) so the
> result will be displayed in the SPARQL panel on the right... All this
> is done in Protege till now...
>
> Now, can I invoke this SPARQL query from an external (java based)
> application and get the answer back to it?? Suppose that I'm working
> with another application and Protege (with Pizza ontology) is running
> parallely... I want to have the information of all the subconcepts of
> the concept 'Pizza' in my other application, so somehow I want to
> communicate with Protege and get this information... (something
> similar to think that pizza ontology acts as a backend database for my
> frontend application) My question is, what is the best way to do it?
>
> Thanq,
> Raj.


--

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

Reply | Threaded
Open this post in threaded view
|

Re: communication with protege!

onto
Hi Nick

What is the api to hook up an existing java application
to Protege to load the current ontology into the
application?

Thanks

--- Young

Nick Drummond wrote
Raj,

First, I would recommend asking the reasoner for the subclasses of a
concept, rather than sparql - you'll also get back any inferred subclasses.
Second, there is currently no special interface to "hook up" an existing
java application to Protege - everyone else has done this by using the
ProtegeOWL API directly (by using it in their external application or by
writing a plugin) - loading and then querying an ontology for the things
you want to ask is then very easy. Until a proper server version of
Protege is available (possible given that Stanford's CBio project is
looking into this) anything else would be a messy hack - eg you could
implement something to query the reasoner using the model sent to it by
Protege - but then you might as well use the ProtegeOWL API to write the
query mechanism.

Nick

Raj M Verma wrote:

> hi list,
>
> Is it possible to have a communication between an external application
> and Protege while we are running Protege (with an Owl ontology)? What
> is the best possible way for communicating with Protege-Owl ontology
> from an external application? Consider the following situation...
>
> I pass a SPARQL query in Protege(Pizza ontology) to get the
> subconcepts of the 'Pizza' concept... (btw, I don't know the syntax of
> this query, can some one tell me the syntax of the query to get all
> the subconcepts of a particular concept in owl ontology?) so the
> result will be displayed in the SPARQL panel on the right... All this
> is done in Protege till now...
>
> Now, can I invoke this SPARQL query from an external (java based)
> application and get the answer back to it?? Suppose that I'm working
> with another application and Protege (with Pizza ontology) is running
> parallely... I want to have the information of all the subconcepts of
> the concept 'Pizza' in my other application, so somehow I want to
> communicate with Protege and get this information... (something
> similar to think that pizza ontology acts as a backend database for my
> frontend application) My question is, what is the best way to do it?
>
> Thanq,
> Raj.


--

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
Reply | Threaded
Open this post in threaded view
|

Re: communication with protege!

Nick Drummond
Young,

As I said, there isn't one. You would have add code to your app to load
Protege models [1].

Nick

[1] http://protege.stanford.edu/plugins/owl/api/index.html

onto wrote:

>Hi Nick
>
>What is the api to hook up an existing java application
>to Protege to load the current ontology into the
>application?
>
>Thanks
>
>--- Young
>
>
>Nick Drummond wrote:
>  
>
>>Raj,
>>
>>First, I would recommend asking the reasoner for the subclasses of a
>>concept, rather than sparql - you'll also get back any inferred
>>subclasses.
>>Second, there is currently no special interface to "hook up" an existing
>>java application to Protege - everyone else has done this by using the
>>ProtegeOWL API directly (by using it in their external application or by
>>writing a plugin) - loading and then querying an ontology for the things
>>you want to ask is then very easy. Until a proper server version of
>>Protege is available (possible given that Stanford's CBio project is
>>looking into this) anything else would be a messy hack - eg you could
>>implement something to query the reasoner using the model sent to it by
>>Protege - but then you might as well use the ProtegeOWL API to write the
>>query mechanism.
>>
>>Nick
>>
>>Raj M Verma wrote:
>>
>>    
>>
>>>hi list,
>>>
>>>Is it possible to have a communication between an external application
>>>and Protege while we are running Protege (with an Owl ontology)? What
>>>is the best possible way for communicating with Protege-Owl ontology
>>>from an external application? Consider the following situation...
>>>
>>>I pass a SPARQL query in Protege(Pizza ontology) to get the
>>>subconcepts of the 'Pizza' concept... (btw, I don't know the syntax of
>>>this query, can some one tell me the syntax of the query to get all
>>>the subconcepts of a particular concept in owl ontology?) so the
>>>result will be displayed in the SPARQL panel on the right... All this
>>>is done in Protege till now...
>>>
>>>Now, can I invoke this SPARQL query from an external (java based)
>>>application and get the answer back to it?? Suppose that I'm working
>>>with another application and Protege (with Pizza ontology) is running
>>>parallely... I want to have the information of all the subconcepts of
>>>the concept 'Pizza' in my other application, so somehow I want to
>>>communicate with Protege and get this information... (something
>>>similar to think that pizza ontology acts as a backend database for my
>>>frontend application) My question is, what is the best way to do it?
>>>
>>>Thanq,
>>>Raj.
>>>      
>>>
>>--
>>
>>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
>>
>>
>>
>>    
>>
>
>--
>View this message in context: http://www.nabble.com/communication-with-protege%21-t1241131.html#a3379403
>Sent from the Protege - OWL forum at Nabble.com.
>
>-------------------------------------------------------------------------
>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

Reply | Threaded
Open this post in threaded view
|

Re: communication with protege!

Massimo Coletti
In reply to this post by Raj M Verma
Raj,

I had a similar problem, which I solved with few lines of code, calling
the OWL API, you can look at the source code here:
http://www.mcoletti.net/dev/iskb/sparqlres.html

Cheers,

Massimo Coletti

Raj M Verma ha scritto:

> hi list,
>
> Is it possible to have a communication between an external application
> and Protege while we are running Protege (with an Owl ontology)? What
> is the best possible way for communicating with Protege-Owl ontology
> from an external application? Consider the following situation...
>
> I pass a SPARQL query in Protege(Pizza ontology) to get the
> subconcepts of the 'Pizza' concept... (btw, I don't know the syntax of
> this query, can some one tell me the syntax of the query to get all
> the subconcepts of a particular concept in owl ontology?) so the
> result will be displayed in the SPARQL panel on the right... All this
> is done in Protege till now...
>
> Now, can I invoke this SPARQL query from an external (java based)
> application and get the answer back to it?? Suppose that I'm working
> with another application and Protege (with Pizza ontology) is running
> parallely... I want to have the information of all the subconcepts of
> the concept 'Pizza' in my other application, so somehow I want to
> communicate with Protege and get this information... (something
> similar to think that pizza ontology acts as a backend database for my
> frontend application) My question is, what is the best way to do it?
>
> Thanq,
> Raj.

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

Reply | Threaded
Open this post in threaded view
|

Re: communication with protege!

Raj M Verma
Thanq Nick,

As you've suggested, I want to ask the reasoner for the subconcepts of a concept, rather than through SPARQL so that I can get the inferred subconcepts as well... but the question is, how do we ask this question to the reasoner? is there a special syntax or way to ask special questions to the reasoner? through Protege or from other source?? b'cos the reasoner can only do the classification and consistency tests and answer Yes/No whether a concept is satisfiable or not etc... but, I don't know whether it is possible to send some special queries to the reasoners to get the specialized answers based on the inferred knowledge... Can some one point me whether there is this possibility...

Massimo,

Thanx for the pointer... I'll have a look at it...

Cheers,
Raj.
Reply | Threaded
Open this post in threaded view
|

Re: communication with protege!

Nick Drummond
Raj,

Yes, you can ask the reasoner for the inferred super/subclasses.
Have a look at the reasoner API docs [1].

Cheers

Nick

[1] http://protege.stanford.edu/plugins/owl/api/ReasonerAPIExamples.html


Raj M Verma wrote:

> Thanq Nick,
>
> As you've suggested, I want to ask the reasoner for the subconcepts of
> a concept, rather than through SPARQL so that I can get the inferred
> subconcepts as well... but the question is, how do we ask this
> question to the reasoner? is there a special syntax or way to ask
> special questions to the reasoner? through Protege or from other
> source?? b'cos the reasoner can only do the classification and
> consistency tests and answer Yes/No whether a concept is satisfiable
> or not etc... but, I don't know whether it is possible to send some
> special queries to the reasoners to get the specialized answers based
> on the inferred knowledge... Can some one point me whether there is
> this possibility...
>
> Massimo,
>
> Thanx for the pointer... I'll have a look at it...
>
> Cheers,
> Raj.


--

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

Reply | Threaded
Open this post in threaded view
|

Re: communication with protege!

Nick Drummond
In reply to this post by Massimo Coletti
Massimo,

Excellent - you should post a link to this on the protege wiki. Probably
a few people would be interested

Nick

Massimo Coletti wrote:

> Raj,
>
> I had a similar problem, which I solved with few lines of code,
> calling the OWL API, you can look at the source code here:
> http://www.mcoletti.net/dev/iskb/sparqlres.html
>
> Cheers,
>
> Massimo Coletti
>
> Raj M Verma ha scritto:
>
>> hi list,
>>
>> Is it possible to have a communication between an external
>> application and Protege while we are running Protege (with an Owl
>> ontology)? What is the best possible way for communicating with
>> Protege-Owl ontology from an external application? Consider the
>> following situation...
>>
>> I pass a SPARQL query in Protege(Pizza ontology) to get the
>> subconcepts of the 'Pizza' concept... (btw, I don't know the syntax
>> of this query, can some one tell me the syntax of the query to get
>> all the subconcepts of a particular concept in owl ontology?) so the
>> result will be displayed in the SPARQL panel on the right... All this
>> is done in Protege till now...
>>
>> Now, can I invoke this SPARQL query from an external (java based)
>> application and get the answer back to it?? Suppose that I'm working
>> with another application and Protege (with Pizza ontology) is running
>> parallely... I want to have the information of all the subconcepts of
>> the concept 'Pizza' in my other application, so somehow I want to
>> communicate with Protege and get this information... (something
>> similar to think that pizza ontology acts as a backend database for
>> my frontend application) My question is, what is the best way to do it?
>>
>> Thanq,
>> Raj.
>
>
> -------------------------------------------------------------------------
> 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

Reply | Threaded
Open this post in threaded view
|

Re: communication with protege!

Massimo Coletti
Nick,

I will follow your suggestion; just give me few days to make the code a
little bit less "alpha" :-)

Ciao

Massimo

Nick Drummond ha scritto:
> Massimo,
>
> Excellent - you should post a link to this on the protege wiki.
> Probably a few people would be interested
>
> Nick
>

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