Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] sparql query using datatype properties

babar shahzad babarathotmail at yahoo.com
Thu Mar 26 02:18:27 PDT 2009



yeah,
thank you for nice explanation. 



Babar Shahzad Chaudary, 
+358408532112         
Deptt of Information Processing
Science,
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: Tuesday, March 24, 2009 7:12:24 PM
Subject: Re: [protege-owl] sparql query using datatype properties

Try:

SELECT ?name
WHERE {
   ?person rdf:type :Human ;
             :hasName ?name .
}

ie you have ?name in the ?person spot, which would mean that the same  
thing would have to be in both spots, ie a :Human has the same :name  
as the URI that identifies the Individual :)  Not likely!

--J

On 24 Mar 2009, at 12:51 PM, babar shahzad wrote:

>
> Given this example earlier:
>
> PREFIX : <http://yournamespace.com/goes/here/>
>
> SELECT ?serial_number
> WHERE {
>   :DELL1234 :hasSerialNumber ?serial_number .
> }
>
> Note that :Computer isn't needed here, since you are working with a
> specific individual, if you wanted the serial numbers of all  
> Computers:
>
> PREFIX : <http://yournamespace.com/goes/here/>
> PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>
> SELECT ?serial_number
> WHERE {
>   ?computer rdf:type :Computer ;
>            :hasSerialNumber ?serial_number .
> }
>
>
> when I test Individual case, it works, but the 2nd that supposed to  
> select all instances doesn't. Message appears ''no matches found".
> Human
> ->Male (individuals)(hasName)
> ->Female (individuals)(hasName)
>
> Screen shot is attached.
>
> thanks for any kind of help
>
>
>
> Babar Shahzad Chaudary,
> +358408532112
> Deptt of Information Processing
> Science,
> 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: Thursday, January 15, 2009 5:50:35 PM
> Subject: Re: [protege-owl] sparql query using datatype properties
>
>
> On 15 Jan 2009, at 10:23 AM, Mudunuri, Vekata Rajashekar Varma wrote:
>
>> Hi,
>>
>> Is it possible to query the data type properties using sparql  
>> queries?
>> If so, can you provide a simple example!
>>
>> Suppose there is a concept Computer, and an individual DELL1234,  
>> and a
>> datatype property 'hasSerialNumber' with the value XYZ123
>
> PREFIX : <http://yournamespace.com/goes/here/>
>
> SELECT ?serial_number
> WHERE {
>   :DELL1234 :hasSerialNumber ?serial_number .
> }
>
> Note that :Computer isn't needed here, since you are working with a
> specific individual, if you wanted the serial numbers of all  
> Computers:
>
> PREFIX : <http://yournamespace.com/goes/here/>
> PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>
> SELECT ?serial_number
> WHERE {
>   ?computer rdf:type :Computer ;
>            :hasSerialNumber ?serial_number .
> }
>
>> Now I want to query for the value of the serial number of DELL1234...
>> can we achieve that using sparql? Can SWRL manage this as well?
>
> SWRL isn't a query language, it's a way of declaring particular
> semantic inferences that go beyond those defined in RDF/RDFS/OWL.  eg
> you could express the statement that "all Computers with a serial
> number starting with XYZ are produced by Dell", which could result in
> a set of statements like
>
> :DELL1234 rdf:type :DellComputer .
>
> being added to your model.
>
> Now I'm sure that SQWRL could help, it is a query language :)
>
> --J
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
>
>
>
> <SPARQL - err.JPG>_______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

_______________________________________________
protege-owl mailing list
protege-owl at lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

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



      



More information about the protege-owl mailing list