W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > June 2007

Re: how to get the properties of a class?

From: Pat Hayes <phayes@ihmc.us>
Date: Tue, 12 Jun 2007 14:56:28 -0500
Message-Id: <p06230907c294a9edc55f@[]>
To: Szekely Zolta <zoltagroup@yahoo.com>
Cc: public-rdf-dawg-comments@w3.org

>Hi! Am am new to RDF. I created an ontology in 
>Protege and I have to use it. We are working on 
>a web interface in .NET with SPARQL. I wonder 
>how one can get the list of the properteie (own 
>and inherited) of a class?

Um... in OWL-DL, classes don't have properties. 
Do you mean, the properties of the elements of a 

>I have written something like this: SELECT 
>DISTINCT ?a WHERE {?a rdf:type 
>owl:DatatypeProperty. ?x owl:Class :MyClass}

As written, that uses owl:Class as a property 
(the middle item of an RDF triple), but it isn't 
a property (it's a class). So there can't be any 
triples matching the second line of your query, 
which is probably why you don't get any results.

It is also rather odd to have the query variable 
?x in the second triple which does not occur 
anywhere else. Did you intend this to be ?a ??

Im not sure what it is you intend to be asking, 
to tell you the truth. Can you phrase your 
intended query in English?

Pat Hayes

>It does not return anything. I also tried to use 
>filters with regex, but that did not work 
>either. Thanks, Székely-Sipos Sándor Zolta 
>Boardwalk for $500? In 2007? Ha! Play Monopoly 
>Here and Now (it's updated for today's economy) 
>at Yahoo! Games. 

IHMC		(850)434 8903 or (650)494 3973   home
40 South Alcaniz St.	(850)202 4416   office
Pensacola			(850)202 4440   fax
FL 32502			(850)291 0667    cell
phayesAT-SIGNihmc.us       http://www.ihmc.us/users/phayes
Received on Tuesday, 12 June 2007 19:56:45 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:08 UTC