On Feb 10, 2012, at 4:43 PM, Andy Seaborne wrote: > >>>> 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 . > > Well, they don't exist in the data. The default DESCRIBE behaviour is to > look only in the data. > > You can make them appear (by calculation) if you query the results model > using list:member. > > You can put them there with an update (which is a CONSTRUCT that changes the > target data) but you need that extra step. There isn't a a way to both > CONSTRUCT and DESCRIBE in the same query (well, there is - you could add your > own DESCRIBE handler and it can do anything, but that starts to get very > Jena-specific).
ok, I guess I shall leave the current system in place were my code does a quick update to the in-memory model before it is rendered for view. Thanks, --Stephan > > > Andy >
