You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Laura Morales <la...@mail.com> on 2020/12/19 20:14:46 UTC

Turtle* same term twice

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?

Re: Turtle* same term twice

Posted by Lorenz Buehmann <bu...@informatik.uni-leipzig.de>.
On 21.12.20 12:21, Andy Seaborne wrote:
>
>
> 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 might have been unclear - that was exactly my point: it does not add
the triple itself but "talks" about the other triple, i.e. <:a :b :c> in
G is false.

People have to be aware of this fact and should use the new annotation
syntax in case the want to add both the fact and the annotation about it
in one step - this should heavily be mentioned in the final specs. But
I'm sure you guys are already aware of this fact.

>
>> 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

Re: Turtle* same term twice

Posted by Andy Seaborne <an...@apache.org>.
It has to work in SPARQL as well. That reduced the possible characters.
Together with visually pairing star and finish (it can nest, so start !=
finish), a two char token is the choice.

If the grammar bans nesting, then a lot of the grammar had to be duplicated
for with annotation and without because the inside of {||} is general.

    Andy

On Mon, 21 Dec 2020, 18:28 Laura Morales, <la...@mail.com> wrote:

> Everything is clear, thank you. But can I just say, that {| |} is so ugly.
> Since the spec is still WIP, is there any chance that it could be changed
> to something else? A 1-character symbol maybe?
>
>
>
>
> > Sent: Monday, December 21, 2020 at 1:00 PM
> > From: "Andy Seaborne" <an...@apache.org>
> > To: users@jena.apache.org
> > Subject: Re: Turtle* same term twice
> >
> >
> >
> > On 21/12/2020 11:34, Laura Morales wrote:
> > > 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
> >
> > Yes - it is the new annotation syntax for RDF*
> >
> > See the link in previous email to the RDF-start community test cases.
> >
> > >
> > > - 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
> >
> > No, it will not create the triple ":a :b :c"
> >
> >      << :a :b :c >> :d :e .
> >
> > is one triple.
> >
> > subject = << :a :b :c >>
> > predicate = :d
> > object = :e
> >
> > Simply write:
> >
> > :a :b :c .
> > << :a :b :c >> :d :e .
> >
> > or use
> >
> > :a :b :c {| :d :e |}
> >
> > (the latter is not in 3.17.0)
> >
> > This is different to the original paper. This is the same as RDF-star
> > community specs at the moment.
> >
> > Annotation syntax arose to make it convenient to assert and annotate at
> > the same time.
> >
> > Always asserting ":a :b :c" when <<>> is used is limiting;
> >
> > << :a :b :c >> :withdrawn "2020-12-31" .
> >
> > is impossible because :a :b :c would still be there. i.e. you can't talk
> > about a triple without it being "true" - true means
> > graph contains (:a :b :c)
> >
> > Some of the use cases :
> > https://w3c.github.io/rdf-star/UCR/rdf-star-ucr.html
> >
> >      Andy
>

Re: Turtle* same term twice

Posted by Laura Morales <la...@mail.com>.
Everything is clear, thank you. But can I just say, that {| |} is so ugly. Since the spec is still WIP, is there any chance that it could be changed to something else? A 1-character symbol maybe?




> Sent: Monday, December 21, 2020 at 1:00 PM
> From: "Andy Seaborne" <an...@apache.org>
> To: users@jena.apache.org
> Subject: Re: Turtle* same term twice
>
>
>
> On 21/12/2020 11:34, Laura Morales wrote:
> > 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
>
> Yes - it is the new annotation syntax for RDF*
>
> See the link in previous email to the RDF-start community test cases.
>
> >
> > - 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
>
> No, it will not create the triple ":a :b :c"
>
>      << :a :b :c >> :d :e .
>
> is one triple.
>
> subject = << :a :b :c >>
> predicate = :d
> object = :e
>
> Simply write:
>
> :a :b :c .
> << :a :b :c >> :d :e .
>
> or use
>
> :a :b :c {| :d :e |}
>
> (the latter is not in 3.17.0)
>
> This is different to the original paper. This is the same as RDF-star
> community specs at the moment.
>
> Annotation syntax arose to make it convenient to assert and annotate at
> the same time.
>
> Always asserting ":a :b :c" when <<>> is used is limiting;
>
> << :a :b :c >> :withdrawn "2020-12-31" .
>
> is impossible because :a :b :c would still be there. i.e. you can't talk
> about a triple without it being "true" - true means
> graph contains (:a :b :c)
>
> Some of the use cases :
> https://w3c.github.io/rdf-star/UCR/rdf-star-ucr.html
>
>      Andy

Re: Turtle* same term twice

Posted by Andy Seaborne <an...@apache.org>.

On 21/12/2020 11:34, Laura Morales wrote:
> 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

Yes - it is the new annotation syntax for RDF*

See the link in previous email to the RDF-start community test cases.

> 
> - 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

No, it will not create the triple ":a :b :c"

     << :a :b :c >> :d :e .

is one triple.

subject = << :a :b :c >>
predicate = :d
object = :e

Simply write:

:a :b :c .
<< :a :b :c >> :d :e .

or use

:a :b :c {| :d :e |}

(the latter is not in 3.17.0)

This is different to the original paper. This is the same as RDF-star 
community specs at the moment.

Annotation syntax arose to make it convenient to assert and annotate at 
the same time.

Always asserting ":a :b :c" when <<>> is used is limiting;

<< :a :b :c >> :withdrawn "2020-12-31" .

is impossible because :a :b :c would still be there. i.e. you can't talk 
about a triple without it being "true" - true means
graph contains (:a :b :c)

Some of the use cases :
https://w3c.github.io/rdf-star/UCR/rdf-star-ucr.html

     Andy

> 
> Otherwise great explanation as always, thank you Andy.
> 
> 
> 
> 
>> Sent: Monday, December 21, 2020 at 12:21 PM
>> From: "Andy Seaborne" <an...@apache.org>
>> To: users@jena.apache.org
>> 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
>>

Re: Turtle* same term twice

Posted by Laura Morales <la...@mail.com>.
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" <an...@apache.org>
> To: users@jena.apache.org
> 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
>

Re: Turtle* same term twice

Posted by Andy Seaborne <an...@apache.org>.

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

Re: Turtle* same term twice

Posted by Lorenz Buehmann <bu...@informatik.uni-leipzig.de>.
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. I'm also
wondering how triple stores will handle this if the triple itself
doesn't exist - 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? 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.

>
> 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

Re: Turtle* same term twice

Posted by Andy Seaborne <an...@apache.org>.

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.

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

Re: Turtle* same term twice

Posted by Lorenz Buehmann <bu...@informatik.uni-leipzig.de>.
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