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 2021/07/19 07:06:01 UTC

RDF* multiple edges

In RDF*, would these two be considered different edges or one single edge?

:alice :lives :NYC {| :from 2000; :to 2002 |}
:alice :lives :NYC {| :from 2010; :to 2020 |}

Re: RDF* multiple edges

Posted by Andy Seaborne <an...@apache.org>.
Yes to what Lorenz says especially about the way you have to do correct 
modelling to avoid saying the wrong things.

:alice :lives :NYC {| :isValid [ :from 2000; :to 2002 ] |}
:alice :lives :NYC {| :isValid [ :from 2010; :to 2020 ] |}



It's "RDF-star"

RDF* is reserved for the original work by Olaf et al where the <<>> 
triple is also and always asserted.

News flash:

And "embedded triple" == "quoted triple"

 >> :alice :lives :NYC {| :from 2000; :to 2002 |}
 >> :alice :lives :NYC {| :from 2010; :to 2020 |}

Annotation syntax is compound.

Run it through the parser and see the triples.

     Andy

Previously:

https://lists.apache.org/thread.html/r961d45b0404ae7572ea02ba5417b07cdddd7308cfdb0d0a9b829eabb%40%3Cusers.jena.apache.org%3E

https://lists.apache.org/thread.html/r6699df184306a9079bd24e6a0a80537b430e995d9a3d3de1a9d2438d%40%3Cusers.jena.apache.org%3E


On 19/07/2021 09:15, Lorenz Buehmann wrote:
>  From my understanding RDF does not contain "edges", but only contain 
> triples and we should stick to the term of "embedded triples" instead of 
> edges for RDF Star
> 
> I'm pretty sure this section will tackle your issue meaning you need 
> additional nodes to model different occurrences of the same "edge": 
> https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#occurrences
> 
> To cite:
> 
>> According to the definitions above, an RDF-star triple 
>> <https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#dfn-triple> 
>> is an abstract entity whose identity is entirely defined by its 
>> subject, predicate, and object. Conversely, given three RDF-star terms 
>> <https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#dfn-rdf-star-terms> 
>> s, p, and o, there is exactly and only one RDF-star triple 
>> <https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#dfn-triple> 
>> with subject s, predicate p, and object o. This unique triple (s, p, 
>> o) can be embedded 
>> <https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#dfn-embedded> 
>> as the subject or object of multiple other triples, but must be 
>> assumed to represent the /same thing/ everywhere it occurs, just like 
>> the same IRI <https://www.w3.org/TR/rdf11-concepts/#dfn-iri> p is 
>> assumed to represent the same thing everywhere it occurs.
> 
> 
> Maybe this also answers your question:
> 
> :alice :lives :NYC {| :from 2000; :to 2002 |}
> 
> is equivalent to
> 
> :alice :lives :NYC .
> << :alice :lives :NYC >> :from 2000 ;
>                                          :to 2002 .
> 
> and indeed then
> 
> :alice :lives :NYC {| :from 2010; :to 2020 |}
> 
> is same as adding
> 
> :alice :lives :NYC .
> << :alice :lives :NYC >> :from 2010 ;
>                                          :to 2020 .
> 
> so in the end you would have
> 
> :alice :lives :NYC .
> << :alice :lives :NYC >> :from 2000 ;
>                                          :to 2002 ;
>                                          :from 2010 ;
>                                          :to 2020 .
> 
> And this is not what you want, thus, you need some additional nodes and 
> triples.
> 
> But probably Andy or others know better than me. I'm still learning.
> 
> On 19.07.21 09:06, Laura Morales wrote:
>> In RDF*, would these two be considered different edges or one single 
>> edge?
>>
>> :alice :lives :NYC {| :from 2000; :to 2002 |}
>> :alice :lives :NYC {| :from 2010; :to 2020 |}
> 

Re: RDF* multiple edges

Posted by Lorenz Buehmann <bu...@informatik.uni-leipzig.de>.
 From my understanding RDF does not contain "edges", but only contain 
triples and we should stick to the term of "embedded triples" instead of 
edges for RDF Star

I'm pretty sure this section will tackle your issue meaning you need 
additional nodes to model different occurrences of the same "edge": 
https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#occurrences

To cite:

> According to the definitions above, an RDF-star triple 
> <https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#dfn-triple> 
> is an abstract entity whose identity is entirely defined by its 
> subject, predicate, and object. Conversely, given three RDF-star terms 
> <https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#dfn-rdf-star-terms> 
> s, p, and o, there is exactly and only one RDF-star triple 
> <https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#dfn-triple> 
> with subject s, predicate p, and object o. This unique triple (s, p, 
> o) can be embedded 
> <https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#dfn-embedded> 
> as the subject or object of multiple other triples, but must be 
> assumed to represent the /same thing/ everywhere it occurs, just like 
> the same IRI <https://www.w3.org/TR/rdf11-concepts/#dfn-iri> p is 
> assumed to represent the same thing everywhere it occurs.


Maybe this also answers your question:

:alice :lives :NYC {| :from 2000; :to 2002 |}

is equivalent to

:alice :lives :NYC .
<< :alice :lives :NYC >> :from 2000 ;
                                         :to 2002 .

and indeed then

:alice :lives :NYC {| :from 2010; :to 2020 |}

is same as adding

:alice :lives :NYC .
<< :alice :lives :NYC >> :from 2010 ;
                                         :to 2020 .

so in the end you would have

:alice :lives :NYC .
<< :alice :lives :NYC >> :from 2000 ;
                                         :to 2002 ;
                                         :from 2010 ;
                                         :to 2020 .

And this is not what you want, thus, you need some additional nodes and 
triples.

But probably Andy or others know better than me. I'm still learning.

On 19.07.21 09:06, Laura Morales wrote:
> In RDF*, would these two be considered different edges or one single edge?
>
> :alice :lives :NYC {| :from 2000; :to 2002 |}
> :alice :lives :NYC {| :from 2010; :to 2020 |}