Hey Andy, thank you very much for clarification!
For anybody else, trying this out, with my examples, I made a small mistake. In the `data.ttl`-file a “/“ is missing in: `prefix : <http://example.org>`. If you add the slash and the triple as Andy explained, everything works. All the best Steffen > On 3. Feb 2021, at 11:09, Andy Seaborne <a...@apache.org> wrote: > > Hi Steffen, > > The implementation in Jena at the moment is wrong in that it will not match > unless there is the base triple. If you have been following the discussions, > the SPARQL* is PG-mode. > > This will change to be compliant with where the RDF-star work is currently > going. > > If you add > > :john foaf:name "John Smith" . > > to the data you should be good. > > If you use the development builds, it also has annotation syntax using {|..|} > but caution that is not the decided syntax yet and quite likely to change. > For Turtle* with annotation syntax, use file extension .ttljcc (there are 2 > turtle parsers, only the JavaCC based on, which supports experimental work) > has annotation syntax. SPARQL does have it. > > Andy > > NB: "RDF star" - there is work in-progress to change of name of the community > group work to "RDF star" and refer to Olaf Hartig's original work as RDF*. > This is motivated to make the work searchable because, well, "*"! > > See also: > https://issues.apache.org/jira/browse/JENA-1952 > > > On 03/02/2021 07:22, Steffen Rörtgen wrote: >> Hello there, >> I just wanted to try out some RDF* and SPARQL* examples with arq and did not >> get the expected result. >> Actually I get no result at all. >> I tried with the examples listed here: >> https://jena.apache.org/documentation/rdfstar/ >> My data.ttl file contains >> ```turtle >> @prefix dct: <http://purl.org/dc/terms/> . >> @prefix foaf: <http://xmlns.com/foaf/0.1/> . >> @prefix : <http://example.org/> . >> << :john foaf:name "John Smith" >> dct:source <http://example/directory> . >> ``` >> My query.rq file contains: >> ```sparql >> prefix dct: <http://purl.org/dc/terms/> >> prefix foaf: <http://xmlns.com/foaf/0.1/> >> prefix : <http://example.org> >> SELECT ?name { <<:john foaf:name ?name >> dct:source >> <http://example/directory> } >> ``` >> I query with the following command: `arq —query=query.rq —data=data.ttl >> --results=json` >> My result looks like this: >> ```json >> { "head": { >> "vars": [ "name" ] >> } , >> "results": { >> "bindings": [ >> ] >> } >> } >> ``` >> A simple s-p-o query returns this, which made me feel like RDF* is generally >> supported by arq: >> ```json >> { "head": { >> "vars": [ "s" , "p" , "o" ] >> } , >> "results": { >> "bindings": [ >> { >> "s": { >> "type": "triple" , >> "value": { >> "subject": { "type": "uri" , "value": "http://example.org/john" >> } , >> "property": { "type": "uri" , "value": >> "http://xmlns.com/foaf/0.1/name" } , >> "object": { "type": "literal" , "value": "John Smith" } >> } >> } , >> "p": { "type": "uri" , "value": "http://purl.org/dc/terms/source" } , >> "o": { "type": "uri" , "value": "http://example/directory" } >> } >> ] >> } >> } >> ``` >> So I guess my SPARQL* query approach is somehow wrong, but I just can’t >> figure out. >> Do you have an idea? >> Thank you! >> Steffen
smime.p7s
Description: S/MIME cryptographic signature