You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by afs <gi...@git.apache.org> on 2017/11/07 20:46:34 UTC

[GitHub] jena issue #299: Turtle Star

Github user afs commented on the issue:

    https://github.com/apache/jena/pull/299
  
    Sorry for the delay getting round to this - Jena had a release which
    takes time.  It would be interesting to see some support for RDF*.
    
    Comments in two areas : the parser and about RDF*.
    
    **Turtle parser**
    
    The Turtle parser in jena-core only exists for legacy and support some
    tests. It isn't the normal Turtle parser, and isn't spec compliant.
    
    Parsing happens in RIOT org.apache.jena.riot.lang.LangTurtle. It is a
    custom (hand written parser) with its own tokenizer for speed.
    
    If you are interested, we can add the tokens for RDF*, it takes some care
    because this is the same tokenizer as used for N-Triples and so
    speed-critical. We may need o split of an N-Triples/N-quads tokenizer
    but that wouldn't be such a bad thing anyway.
    
    There is an example of plumbing in a new language in [EXRIOT5.java](https://github.com/apache/jena/blob/master/jena-arq/src-examples/arq/examples/riot/ExRIOT_5.java).
    
    **RDF\* and RDF**
    
    RDF* has the notion of a triple id: each triple has a unique id which makes it different to reification. An RDF* grah can be written in RDF and the result and back in again by using exactly one for a
    triple and the process can be reversed.  This equates to the triple id of RDF* with information in the
    strict RDF graph.  It's not a general RDF graph.
    
    It is not possible to RDF-merge to such graphs - that would end up with two bnode-reificiations and statements in one graph about the triple will not RDF*-merge with the statements in the other graph (which is the whole point of RDF reification).
    
    Merging needs to respect the additional RDF* data model.
    Example:
    ```
    << :s :p :o >> :addedBy "Alice" .
    << :s :p :o >> :addedBy "Bob" .
    ```
    My understanding of RDF* is that this is one triple `td = :s :p :o` with two
    triples with the same subject. `td :addedBy "Alice" . td :addedBy "Bob" .`.
    
    **SPARQL**
    
    The `<< >>` syntax has a long history - it was first used in early SPARQL discussions but never made it to the final stages. It may only existed on the mailing list; teh WG decided not to have reification syntax.  However, there are some remains in the SPARQL grammar in ARQ.
    
    
    



---