On Feb 10, 2012, at 3:18 PM, Andy Seaborne wrote: > On 10/02/12 22:13, Stephan Zednik wrote: >> >> On Feb 10, 2012, at 2:30 PM, Andy Seaborne wrote: >> >>> On 10/02/12 21:16, Stephan Zednik wrote: >>>> I am using the ARQ property >>>> extension<http://jena.hpl.hp.com/ARQ/list#member> in a DESCRIBE query to >>>> ensure I describe all members of a rdf list. >>>> >>>> DESCRIBE<http://example.com/#foo> ?b WHERE {<http://example.com/#foo> >>>> ex:myList [ list:member ?b ] } >>>> >>>> I now get my graph with<http://example.com/#foo> and all list members >>>> described, but the actual list:member statements are not in the result >>>> graph. >>>> >>>> The XSL I am using to generate a representation of the resulting RDF/XML >>>> would be much simplified if the resulting graph contained the list:member >>>> statements. >>>> >>>> Is there a way I can update the SPARQL query such that the resulting graph >>>> retains the list:member statements? Perhaps by including utilizing >>>> CONSTRUCT (which I have little experience using). >>>> >>>> Thanks, >>>> --Stephan >>>> >>>> Note: I cross posted this question at >>>> http://answers.semanticweb.com/questions/14415/including-backward-chained-entailments-in-a-query-describe-result-graph >>> >>> And reply put there. >>> >>> Summary: >>> >>> Either use SPARQL Update >> >> For a temporary graph I am generating a representation of in a MVC view? >> Its not going to get persisted back at this point in my system, so I have no >> reason for SPARQL Update, that is why I was hoping to use CONSTRUCT. >> >> I currently have a processor that forward-chain updates the in-memory graph >> before the graph hits my view, but I am hoping to simplify my codebase if I >> can get the same functionality from the SPARQL query itself. >> >>> or include the list in the answers. >> >> DESCRIBE<http://example.com/#foo> ?list ?b WHERE {<http://example.com/#foo> >> ex:myList ?list . ?list list:member ?b } >> >> Didn't work. > > What did you get? > > ==DATA: > @prefix : <http://example/> . > > :x :list ( 1 2 3 4 ) . > == query > DESCRIBE ?list { ?x <http://example/list> ?list . } > > == results: > @prefix : <http://example/> . > > > [] <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> 1 . > [] <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b1 . > _:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> 2 . > _:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b2 . > _:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> 3 . > _:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b3 . > _:b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> 4 . > _:b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> () . > > Andy
I got the rdfs:first and rdfs:rest statements, what I did not get were the list:member statements. What I want is the actual statements with list:member to be included in the generated graph, so the results of describing the list would include [] <http://jena.hpl.hp.com/ARQ/list#member> 1 . [] <http://jena.hpl.hp.com/ARQ/list#member> 2 . [] <http://jena.hpl.hp.com/ARQ/list#member> 3 . [] <http://jena.hpl.hp.com/ARQ/list#member> 4 . --Stephan > >> >> --Stephan >> >>> >>> Andy >>> >> > >
