Search Mailing List Archives
[protege-owl] retreiving Individuals using SPARQL
babarathotmail at yahoo.com
Fri Mar 27 02:57:24 PDT 2009
thanX a lot.
Sorry, I did not figure out when asking you that I am using '?var1 rdf:type ?var2' phenomenon. Actually I was intentionally thinking that I am using one you pointed now but was not figuring that actually I was not.
thanks a lot once again.
Babar Shahzad Chaudary,
Deptt of Information Processing
University of Oulu, Finland.
----- Original Message ----
From: James Howison <james at howison.name>
To: User support for the Protege-OWL editor <protege-owl at lists.stanford.edu>
Sent: Friday, March 27, 2009 5:00:28 AM
Subject: Re: [protege-owl] retreiving Individuals using SPARQL
On 26 Mar 2009, at 1:52 PM, Thomas Russ wrote:
> On Mar 26, 2009, at 3:25 AM, babar shahzad wrote:
>> Hi J;
>> I tried your query & results are awesome. It fetches everything it
>> finds in ontology, does not have any effect on result set whether I
>> make Male, Female, OR Human as object.
>> Screen shot is attached.
> That's because you keep using a variable instead of a constant.
> It doesn't matter what a variable is named, it will still match
You've given this pattern:
?var1 rdf:type ?var2 .
(?male and ?Male are different)
So its returning matches for all triples where rdf:type is the middle
component. You need to use a constant, eg :Human, in the third
?var1 rdf:type :Human .
Have you looked at your ontology in Turtle, N3 or N-Triple format? If
not then you should do that, because then you'll see the triples that
you are matching against. Think of the variables as wildcards.
protege-owl mailing list
protege-owl at lists.stanford.edu
Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
More information about the protege-owl