Sparql in Protege 3.4.1 or Protege 4.0

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

Sparql in Protege 3.4.1 or Protege 4.0

elMateo
Hello,

I'm doing some SparQL queries with Protegee 3.4.1., and I have some
problems with instances of subclass. I have the next querie
SELECT ?y
WHERE {?y rdf:type :classB .}

where I have a classA  that is a subclass of a classB, and classA has
an instance 'c' . Protege only return to me instances of  classB, not
the instance 'c'.

Someone could tell me how I can to do a query to get all instances of
a class that belongs to a inferred Graph ??


Thanks!!
_______________________________________________
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: Sparql in Protege 3.4.1 or Protege 4.0

Thomas Russ

On Nov 17, 2009, at 6:03 AM, elMateo wrote:

> Hello,
>
> I'm doing some SparQL queries with Protegee 3.4.1., and I have some
> problems with instances of subclass. I have the next querie
> SELECT ?y
> WHERE {?y rdf:type :classB .}
>
> where I have a classA  that is a subclass of a classB, and classA has
> an instance 'c' . Protege only return to me instances of  classB, not
> the instance 'c'.
>
> Someone could tell me how I can to do a query to get all instances of
> a class that belongs to a inferred Graph ??

That is the problem with using SPARQL to query OWL knowledge bases.

SPARQL operates on the RDF triple representation and doesn't have any  
understanding of the meaning of OWL constructs.  So it can't do any  
inference, even one as simple as the inter-relation between subclassof  
and type.

So, for what you want, you are using the wrong tool.

Perhaps your best bet would be to either use the Query Tab, or use  
SQWRL for your queries.  Or else write Java code that interacts with  
Pellet or another one of the OWL-DL reasoners.



_______________________________________________
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: Sparql in Protege 3.4.1 or Protege 4.0

Graham Matthews
Hi

Just to clarify something ...

As far as I understand SPARQL it could be used for querying an inferred graph -- basic graph pattern matching does not have to be constrained to literal triple matching, it can perform reasoning -- no?

The implementation of SPARQL in Protege 3.4.1 is clearly not doing that, but its an implementation issue, not a limitation of SPARQL.

Just testing if I have my understanding of things correct ....?

graham

On Nov 17, 2009, at 9:01 AM, Thomas Russ wrote:


On Nov 17, 2009, at 6:03 AM, elMateo wrote:

Hello,

I'm doing some SparQL queries with Protegee 3.4.1., and I have some
problems with instances of subclass. I have the next querie
SELECT ?y
WHERE {?y rdf:type :classB .}

where I have a classA  that is a subclass of a classB, and classA has
an instance 'c' . Protege only return to me instances of  classB, not
the instance 'c'.

Someone could tell me how I can to do a query to get all instances of
a class that belongs to a inferred Graph ??

That is the problem with using SPARQL to query OWL knowledge bases.

SPARQL operates on the RDF triple representation and doesn't have any understanding of the meaning of OWL constructs.  So it can't do any inference, even one as simple as the inter-relation between subclassof and type.

So, for what you want, you are using the wrong tool.

Perhaps your best bet would be to either use the Query Tab, or use SQWRL for your queries.  Or else write Java code that interacts with Pellet or another one of the OWL-DL reasoners.



_______________________________________________
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: Sparql in Protege 3.4.1 or Protege 4.0

elMateo
In reply to this post by Thomas Russ
Hello Thomas, thanks for your response.

I write the queries in SPARQL only to show the power of an ontology. I did not want to complicate in principle with Jena. I want something quick to show some results from my ontology.

Is this possible to do with Protege or I need another tool??

Thanks!!!

Jesus.

On Tue, Nov 17, 2009 at 6:01 PM, Thomas Russ <[hidden email]> wrote:

On Nov 17, 2009, at 6:03 AM, elMateo wrote:

Hello,

I'm doing some SparQL queries with Protegee 3.4.1., and I have some
problems with instances of subclass. I have the next querie
SELECT ?y
WHERE {?y rdf:type :classB .}

where I have a classA  that is a subclass of a classB, and classA has
an instance 'c' . Protege only return to me instances of  classB, not
the instance 'c'.

Someone could tell me how I can to do a query to get all instances of
a class that belongs to a inferred Graph ??

That is the problem with using SPARQL to query OWL knowledge bases.

SPARQL operates on the RDF triple representation and doesn't have any understanding of the meaning of OWL constructs.  So it can't do any inference, even one as simple as the inter-relation between subclassof and type.

So, for what you want, you are using the wrong tool.

Perhaps your best bet would be to either use the Query Tab, or use SQWRL for your queries.  Or else write Java code that interacts with Pellet or another one of the OWL-DL reasoners.



_______________________________________________
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: Sparql in Protege 3.4.1 or Protege 4.0

elMateo
In reply to this post by Graham Matthews
Hello Graham,  thanks for your response.

I think that this is correct, it isn't a limitation of SPARQL.

Do you know any tool to do this??


Thanks!!

Jesus

I write the queries in SPARQL only to show the power of an ontology.
I did not want to complicate in principle with Jena
. I want something quick to show some results from my ontology.

Is this possible to do with Protege or I need another tool??

Thanks!!!

Jesus.


On Tue, Nov 17, 2009 at 6:18 PM, Graham Matthews <[hidden email]> wrote:
Hi

Just to clarify something ...

As far as I understand SPARQL it could be used for querying an inferred graph -- basic graph pattern matching does not have to be constrained to literal triple matching, it can perform reasoning -- no?

The implementation of SPARQL in Protege 3.4.1 is clearly not doing that, but its an implementation issue, not a limitation of SPARQL.

Just testing if I have my understanding of things correct ....?

graham

On Nov 17, 2009, at 9:01 AM, Thomas Russ wrote:


On Nov 17, 2009, at 6:03 AM, elMateo wrote:

Hello,

I'm doing some SparQL queries with Protegee 3.4.1., and I have some
problems with instances of subclass. I have the next querie
SELECT ?y
WHERE {?y rdf:type :classB .}

where I have a classA  that is a subclass of a classB, and classA has
an instance 'c' . Protege only return to me instances of  classB, not
the instance 'c'.

Someone could tell me how I can to do a query to get all instances of
a class that belongs to a inferred Graph ??

That is the problem with using SPARQL to query OWL knowledge bases.

SPARQL operates on the RDF triple representation and doesn't have any understanding of the meaning of OWL constructs.  So it can't do any inference, even one as simple as the inter-relation between subclassof and type.

So, for what you want, you are using the wrong tool.

Perhaps your best bet would be to either use the Query Tab, or use SQWRL for your queries.  Or else write Java code that interacts with Pellet or another one of the OWL-DL reasoners.



_______________________________________________
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



_______________________________________________
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: Sparql in Protege 3.4.1 or Protege 4.0

Olivier Dameron
In reply to this post by elMateo
On Wed, 18 Nov 2009 08:37:49 +0100, elMateo <[hidden email]>
wrote:

> Is this possible to do with Protege or I need another tool??

Sesame and Virtuoso will do this for you, if you do not want to go the
jena way

cheers
olivier
_______________________________________________
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: Sparql in Protege 3.4.1 or Protege 4.0

elMateo
Hello Oliver, thanks for help me.

Could you give me urls for this tools? I'm looking for these and can't find...

Regards, Jesus

On Wed, Nov 18, 2009 at 1:47 PM, Olivier Dameron <[hidden email]> wrote:
On Wed, 18 Nov 2009 08:37:49 +0100, elMateo <[hidden email]>
wrote:

> Is this possible to do with Protege or I need another tool??

Sesame and Virtuoso will do this for you, if you do not want to go the
jena way

cheers
olivier
_______________________________________________
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: Sparql in Protege 3.4.1 or Protege 4.0

Timothy Redmond
In reply to this post by elMateo

>
> > I write the queries in SPARQL only to show the power of an ontology.
> > I did not want to complicate in principle with Jena. I want
> > something quick to show some results from my ontology.
> >
> > Is this possible to do with Protege or I need another tool??

I may have missed some context but Protege 3.4.1 has a SPARQL query tab.
Click the Reasoning menu and then click "Open SPARQL Query Panel".

-Timothy


On Wed, 2009-11-18 at 08:37 +0100, elMateo wrote:

> Hello Thomas, thanks for your response.
>
> I write the queries in SPARQL only to show the power of an ontology. I
> did not want to complicate in principle with Jena. I want something
> quick to show some results from my ontology.
>
> Is this possible to do with Protege or I need another tool??
>
> Thanks!!!
>
> Jesus.
>
> On Tue, Nov 17, 2009 at 6:01 PM, Thomas Russ <[hidden email]> wrote:
>        
>        
>         On Nov 17, 2009, at 6:03 AM, elMateo wrote:
>        
>                 Hello,
>                
>                 I'm doing some SparQL queries with Protegee 3.4.1.,
>                 and I have some
>                 problems with instances of subclass. I have the next
>                 querie
>                 SELECT ?y
>                 WHERE {?y rdf:type :classB .}
>                
>                 where I have a classA  that is a subclass of a classB,
>                 and classA has
>                 an instance 'c' . Protege only return to me instances
>                 of  classB, not
>                 the instance 'c'.
>                
>                 Someone could tell me how I can to do a query to get
>                 all instances of
>                 a class that belongs to a inferred Graph ??
>        
>        
>         That is the problem with using SPARQL to query OWL knowledge
>         bases.
>        
>         SPARQL operates on the RDF triple representation and doesn't
>         have any understanding of the meaning of OWL constructs.  So
>         it can't do any inference, even one as simple as the
>         inter-relation between subclassof and type.
>        
>         So, for what you want, you are using the wrong tool.
>        
>         Perhaps your best bet would be to either use the Query Tab, or
>         use SQWRL for your queries.  Or else write Java code that
>         interacts with Pellet or another one of the OWL-DL reasoners.
>        
>        
>        
>         _______________________________________________
>         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

_______________________________________________
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: Sparql in Protege 3.4.1 or Protege 4.0

Martin O'Connor
In reply to this post by Graham Matthews
Graham Matthews wrote:

> As far as I understand SPARQL it could be used for querying an
> inferred graph -- basic graph pattern matching does not have to be
> constrained to literal triple matching, it can perform reasoning -- no?

Some SPARQL implementations support queering on inferred triples, though
this will be very much implementation specific.

As Thomas mentioned, SPARQL is designed to work with RDF and is painful
to use for anything but the simplest OWL ontology.

Martin

>
>
> On Nov 17, 2009, at 9:01 AM, Thomas Russ wrote:
>
>>
>> On Nov 17, 2009, at 6:03 AM, elMateo wrote:
>>
>>> Hello,
>>
>>>
>>> I'm doing some SparQL queries with Protegee 3.4.1., and I have some
>>
>>> problems with instances of subclass. I have the next querie
>>
>>> SELECT ?y
>>
>>> WHERE {?y rdf:type :classB .}
>>
>>>
>>> where I have a classA  that is a subclass of a classB, and classA has
>>
>>> an instance 'c' . Protege only return to me instances of  classB, not
>>
>>> the instance 'c'.
>>
>>>
>>> Someone could tell me how I can to do a query to get all instances of
>>
>>> a class that belongs to a inferred Graph ??
>>
>>
>> That is the problem with using SPARQL to query OWL knowledge bases.
>>
>> SPARQL operates on the RDF triple representation and doesn't have any
>> understanding of the meaning of OWL constructs.  So it can't do any
>> inference, even one as simple as the inter-relation between
>> subclassof and type.
>>
>> So, for what you want, you are using the wrong tool.
>>
>> Perhaps your best bet would be to either use the Query Tab, or use
>> SQWRL for your queries.  Or else write Java code that interacts with
>> Pellet or another one of the OWL-DL reasoners.
>>
>>
>>
>> _______________________________________________
>> protege-owl mailing list
>> [hidden email] <mailto:[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
>  
>

_______________________________________________
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: Sparql in Protege 3.4.1 or Protege 4.0

Olivier Dameron
In reply to this post by elMateo
On Wed, 18 Nov 2009 15:23:25 +0100, elMateo <[hidden email]>
wrote:

> Could you give me urls for this tools? I'm looking for these and can't
> find...

When asked about "sesame rdf" and "virtuoso rdf", my friend google
suggested
http://www.openrdf.org/
http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/
They are not the only ones, though

cheers
olivier
_______________________________________________
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: Sparql in Protege 3.4.1 or Protege 4.0

elMateo
Thanks!!

Yesterday I found but I was not sure were these.

Greetings


On Thu, Nov 19, 2009 at 8:52 AM, Olivier Dameron <[hidden email]> wrote:
On Wed, 18 Nov 2009 15:23:25 +0100, elMateo <[hidden email]>
wrote:

> Could you give me urls for this tools? I'm looking for these and can't
> find...

When asked about "sesame rdf" and "virtuoso rdf", my friend google
suggested
http://www.openrdf.org/
http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/
They are not the only ones, though

cheers
olivier
_______________________________________________
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