Hi Alex,
You can use SPARQL 1.1 *property paths* for getting all descendants of a
node. Examples should be findable online, for example in the W3C
documents on SPARQL 1.1.
Regards,
Markus
On 07/04/14 12:37, Alex Muir wrote:
Hi,
I've recently set up jena and imported an rdf file which is exported
from Semantic Media Wiki. I've been reading through SPARQL tutorials
and searching online but I haven't come across much in the way of
example queries that are used to return for example in this case a
subject and subjects of it's children or even more complex a subject
and all it's descendant subjects which thus far I feel from what I've
read is not possible. Is that the case?
Can you point me to any resources that would help me understand how to
build such queries?
Here is a snippet of the rdf input.
Multiple property:ChildElement can exist within each subject.
<swivt:Subject
rdf:about="http://elt.kode1100.com/wiki/index.php/Special:URIResolver/ELT-3ALevel.doors">
<rdf:type rdf:resource="&wiki;Category-3AElements"/>
<rdfs:label>ELT:Level.doors</rdfs:label>
<swivt:page
rdf:resource="http://elt.kode1100.com/wiki/index.php/ELT:Level.doors"/>
<rdfs:isDefinedBy
rdf:resource="http://elt.kode1100.com/wiki/index.php/Special:ExportRDF/ELT:Level.doors"/>
<swivt:wikiNamespace
rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">4</swivt:wikiNamespace>
<property:ChildElement rdf:resource="&wiki;ELT-3AQuestion.doors"/
Regards
--
Markus Kroetzsch
Faculty of Computer Science
Technische Universität Dresden
+49 351 463 38486
http://korrekt.org/