Re: SPARQL and Object Property

jayadianti herlina <[email protected]>
Newsgroups gmane.comp.misc.ontology.protege.general
Message-ID <CAL9qwgcPND+z99_v_LzxEjmVZWpVDsRdPso=6dN9Q26qGgV4VQ@mail.gmail.com>
Dear Mr Brice

I am sorry for the delay answer
I should say thank you to you
all is work now...
thank you very much for your help.

Warm Regards
Lina

On Tue, Jun 5, 2012 at 9:25 AM, Brice Sommacal <[email protected]>wrote:

> Hello Lina,
>
> If you want to make a filter on a datatype property, you need to make a
> reference on it in your sparql query before filtering.
> in your last example, ?FOOD is not referencing a string value, but rather
> a resource.
>
> For example,
>
> SELECT ?People ?Food
>         WHERE { ?People :hasdailymenu ?Food.
> ?Food :name ?value.
>                        FILTER(?value ='CHICKEN')
>    }
>
> BR,
>
>
> BRice
>
> 2012/6/4 jayadianti herlina <[email protected]>
>
>> Dear Mr Brice
>>
>> Thank you very much Brice
>> Its work thank you,..now I want to make a filter for that, like Filter in
>> *"Dataproperty"*
>> but now in *"Objectpeoperty"* can you give me a suggestion to do that. I
>> have no problem in DataProperty
>> I want to make a filter for instance in other classes..but the result is
>> lexical error.
>> as an example. I can't write..
>> FILTER (?Food="CHICKEN") --> lexical error.
>>
>> Thank you
>> Regards
>> Lina
>>
>>
>> On Mon, Jun 4, 2012 at 1:35 PM, Brice Sommacal <[email protected]>wrote:
>>
>>> Hello,
>>>
>>> owl:onProperty is used to make restriction.
>>> If you want to retrieve all people and food which are "connected" with
>>> the predicat :hasDailyMenu, you should request like the following:
>>>
>>> SELECT ?People ?Food
>>>         WHERE { ?People :hasdailymenu ?Food.
>>>                                  }
>>>
>>> Regards ,
>>>
>>>
>>> Brice
>>>
>>> 2012/6/1 jayadianti herlina <[email protected]>
>>>
>>>> Hi expert
>>>>
>>>> I need your help.
>>>> I have a problem in connection between classes and object properties.
>>>> I create 2 classes "People" and "Food"
>>>> and an object property "hasdailymenu".
>>>> its work perfectly in DL but I still have a difficulties in SPARQL.
>>>>
>>>> PREFIX rdf: <http://www.semanticweb.org/CO.owl#>
>>>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>>>> PREFIX owl: <http://www.w3.org/2002/07/owl#>
>>>> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
>>>> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>>>> SELECT ?People ?Food
>>>>         WHERE { ?People owl:onProperty :hasdailymenu.
>>>>                                  ....}
>>>>
>>>> help me.
>>>>
>>>> Sincerely
>>>> Lina
>>>>
>>>>
>>>> _______________________________________________
>>>> protege-discussion mailing list
>>>> [email protected]
>>>> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>>>>
>>>> Instructions for unsubscribing:
>>>> http://protege.stanford.edu/doc/faq.html#01a.03
>>>>
>>>>
>>>
>>> _______________________________________________
>>> protege-discussion mailing list
>>> [email protected]
>>> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>>>
>>> Instructions for unsubscribing:
>>> http://protege.stanford.edu/doc/faq.html#01a.03
>>>
>>>
>>
>> _______________________________________________
>> protege-discussion mailing list
>> [email protected]
>> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>>
>> Instructions for unsubscribing:
>> http://protege.stanford.edu/doc/faq.html#01a.03
>>
>>
>
> _______________________________________________
> protege-discussion mailing list
> [email protected]
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing:
> http://protege.stanford.edu/doc/faq.html#01a.03
>
>

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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.