Pardon, a couple of things that are not completely clear to me:
- is :a :b :c {| :d "object" |} a valid Turtle syntax? I've never seen it
before
- if I load this with Fuseki/Jena << :a :b :c >> :d :e . will Jena
automatically create the :a :c :c triple? This is important for me to know, or
if there is a switch to enable this behavior
Otherwise great explanation as always, thank you Andy.
> Sent: Monday, December 21, 2020 at 12:21 PM
> From: "Andy Seaborne" <[email protected]>
> To: [email protected]
> Subject: Re: Turtle* same term twice
>
>
>
> On 21/12/2020 07:47, Lorenz Buehmann wrote:
> >
> > On 20.12.20 17:19, Andy Seaborne wrote:
> >>
> >>
> >> On 20/12/2020 09:20, Lorenz Buehmann wrote:
> >>>
> >>> On 19.12.20 21:14, Laura Morales wrote:
> >>>> Is this
> >>>>
> >>>> << :a :b :c >> :d ; :e .
> >>>>
> >>>> the equivalent of this?
> >>>>
> >>>> << :a :b :c >> :d .
> >>>> << :a :b :c >> :e .
> >>>>
> >>>> Will Fuseki/Jena store them and treat them the same exact way?
> >>> https://w3c.github.io/rdf-star/rdf-star-cg-spec.html#turtle-star-grammar
> >>
> >> Yes - there is no changes to Turtle except to add <<>> as a new kind
> >> of RDF term. For syntax, the new annotation syntax (in issue 9) is
> >> likely to happen and is a way to write <<>> and assert the triple in
> >> one form.
> >
> > Yep - something that I think might be confusing for people start using
> > RDF* might be the fact that
> >
> > << :a :b :c >> :d .
> >
> > is just an annotation but doesn't add the triple itself.
>
> << :a :b :c >> :d "object" .
>
> is a triple. It is a triple about another ":a :b :c" These <<>> things
> behave like literals in the sense that their representation tells you
> everything you need to know about them.
>
> The subject is the (new) RDF term << :a :b :c >>.
>
> > I'm also
> > wondering how triple stores will handle this if the triple itself
> > doesn't exist
>
> << :a :b :c >> is a new kind of Node in Jena (Node_Triple).
>
> > - will it simply be dropped after parsing the whole
> > document is done? Given that the triple could occur after the annotation
> > in a stream, this needs some more effort for triple stores, right?
>
> Not in Jena the <<>> is a new RDF Term (node) and is a first-class
> object in the system. It does not need triple ":a :b :c" to exist.
>
> Annotations are not stored directly with the triple they annotate. There
> is an indirection through the <<>> term.
>
> > Also,
> > what happens if a SPARQL INSERT does add just the annotation? I guess
> > nothing, or will the annotation be kept nevertheless - I don't think so?
> >
> > On the other hand, the annotation syntax will add both, the triple and
> > the annotation in a step - this is nice.
>
> For our readers: this is annotation syntax:
>
> :a :b :c {| :d "object" |}
>
> it is syntax for two triples:
>
> :a :b :c .
> << :a :b :c >> :d "object" .
>
> Modelling in the data is used for complex use cases -
> Here is a larger example where we have two separate sources for a triple:
>
> PREFIX : <http://example/>
> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
>
> :s :p :o {| :source [ :graph <http://host1/> ;
> :date "2020-01-20"^^xsd:date
> ] ;
> :source [ :graph <http://host2/> ;
> :date "2020-12-31"^^xsd:date
> ]
> |} .
>
> It is:
>
> @prefix : <http://example/> .
> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
>
> :s :p :o .
>
> << :s :p :o >>
> :source [ :date "2020-12-31"^^xsd:date ;
> :graph <http://host2/>
> ] .
> << :s :p :o >>
> :source [ :date "2020-01-20"^^xsd:date ;
> :graph <http://host1/>
> ] .
>
> or (same triples)
>
> << :s :p :o >>
> :source [ :date "2020-12-31"^^xsd:date ;
> :graph <http://host2/>
> ] ;
> :source [ :date "2020-01-20"^^xsd:date ;
> :graph <http://host1/>
> ] .
>
> Like every use of "1"^^xsd:integer or <http://example/> is the same RDF
> term (and unliek the []-syntax) , every use of <<:s :p :o>> is the same
> term.
>
> Andy
>
> >
> >>
> >> Everything else is left untouched.
> >>
> >> ";" and "," are just syntactic sugar in Turtle.
> >>
> >> How the triples are written makes no difference - a graph is a set of
> >> triples.
> >>
> >> Syntax test suite:
> >>
> >> https://w3c.github.io/rdf-star/tests/turtle/syntax/manifest.html
> >>
> >> Andy
>