|
i ve created an ontology which provides information about all the tourist spots in TamilNadu using protege 4.2 beta and in that i ve created a class named 'destination' and the subclasses to that class are 'city','hill stations' and 'temple towns'...The RDF/XML data is
under the subclass 'city' i ve added members namely 'Chennai','Madurai','Coimbatore'...i need to know how to write queries to retrieve the members from the subclass 'city' |
|
A query to retrieve instances from a class
I suggest you try and adapt this to fit your needs, and also that you look up a SPARQL tutorial to get a feeling for how it works, so that you can start experimenting on your own with more complex queries, if needed. Edit I think you need to start at the beginning and work your way through a good SPARQL tutorial first. There's some excellent suggestions for tutorials here and here . Or get a copy of the excellent book 'Learning SPARQL'. still am confused that what does ex:X mean whether the combination of class:subclass or prefix of OWL:class or prefix of OWL:subclass @nivi, I think you need to start at the beginning and work your way through a good SPARQL tutorial first. I've added some suggestions to the answer for you to check out. i tried for those tutorials and i solved d query and got results....thanks a lot... |


"can any explain" -- no -- insufficient information to provide a useful answer.
Please give a complete, minimal example of what you have tried.
"its not working" and "not providing results" don't tell us anything.
sir, i ve created an ontology for tourism application which provides information regarding all the sight seeing places in tamilnadu.... i ve created a class named "hillstations" in that ooty,kodaikanal are added as "members"..now my question is if i want to retrieve those hillstations name alone.. how the query ve to be written sir..
nivi, if you'd like to receive help, please add to your question an example of the data that you've created (if you can show it in Turtle or in RDF/XML that would be great), an example of the query you've tried to write, and the results you're hoping to get back from the query.
"complete, minimal example" means (1) data+query (2) reduced to something that asks the question without a lot of other stuff. What have you tried? What happened? What did you want to happen?