You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Andy Seaborne <an...@epimorphics.com> on 2012/12/22 20:40:16 UTC
Reading triples, getting quads / reading quads, getting triples
(quads means a dataset).
There is a debate in RDF-WG about what happens when a client wants
triples and the source is quads (a dataset) and the other way round -
the client wants quads, but gets triples. This is is most pronounced in
JSON-LD, while formally is dataset syntax, has no graph equivalent, so
it is likely that graphs will be published for JSON using a dataset format.
So, if the app reads into dataset ... but the target is a triples format
should RIOT:
QT1 - read into default graph
QT2 - create a graph with the name of the target are put the triples there
QT3 - error (= provide machinery for the app to choose but have no default)
If the app reads into a model ... and the target is quads:
TQ1 - read just the default graph of the dataset (the asserted triples,
in some people's view)
TQ2 - project the quads into the output graph (union of all named graphs
and default graph).
TQ3 - error
These all seem to make some sense at some times, and there are possibly
other designs. I'm currently leaning toward QT1 (read into dft graph)
and TQ1 (read only the dft graph).
Andy
Re: Reading triples, getting quads / reading quads, getting triples
Posted by Andy Seaborne <an...@apache.org>.
On 23/12/12 02:04, Al Baker wrote:
> Definitely not QT3 and TQ3 - should do 1 or 2 and make them symmetrical. I
> like QT1 and TQ1, with perhaps an optional parameter somewhere that can
> specify the named graph for quads.
>
> The default graph approach also aligns with other assumptions in Jena that
> don't force you into naming graphs but rather assume the default graph.
>
> Al
Implemented:
QT1
TQ1 with a warning (once per parse run) that NG quads are being ignored.
The other forms are all doable with the right implementation of
StreamRDF, the new parser output interface.
Andy
>
> On Sat, Dec 22, 2012 at 2:40 PM, Andy Seaborne <
> andy.seaborne@epimorphics.com> wrote:
>
>> (quads means a dataset).
>>
>> There is a debate in RDF-WG about what happens when a client wants triples
>> and the source is quads (a dataset) and the other way round - the client
>> wants quads, but gets triples. This is is most pronounced in JSON-LD,
>> while formally is dataset syntax, has no graph equivalent, so it is likely
>> that graphs will be published for JSON using a dataset format.
>>
>> So, if the app reads into dataset ... but the target is a triples format
>> should RIOT:
>>
>> QT1 - read into default graph
>> QT2 - create a graph with the name of the target are put the triples there
>> QT3 - error (= provide machinery for the app to choose but have no default)
>>
>> If the app reads into a model ... and the target is quads:
>>
>> TQ1 - read just the default graph of the dataset (the asserted triples, in
>> some people's view)
>> TQ2 - project the quads into the output graph (union of all named graphs
>> and default graph).
>> TQ3 - error
>>
>> These all seem to make some sense at some times, and there are possibly
>> other designs. I'm currently leaning toward QT1 (read into dft graph) and
>> TQ1 (read only the dft graph).
>>
>> Andy
>>
>
Re: Reading triples, getting quads / reading quads, getting triples
Posted by Al Baker <aj...@gmail.com>.
Definitely not QT3 and TQ3 - should do 1 or 2 and make them symmetrical. I
like QT1 and TQ1, with perhaps an optional parameter somewhere that can
specify the named graph for quads.
The default graph approach also aligns with other assumptions in Jena that
don't force you into naming graphs but rather assume the default graph.
Al
On Sat, Dec 22, 2012 at 2:40 PM, Andy Seaborne <
andy.seaborne@epimorphics.com> wrote:
> (quads means a dataset).
>
> There is a debate in RDF-WG about what happens when a client wants triples
> and the source is quads (a dataset) and the other way round - the client
> wants quads, but gets triples. This is is most pronounced in JSON-LD,
> while formally is dataset syntax, has no graph equivalent, so it is likely
> that graphs will be published for JSON using a dataset format.
>
> So, if the app reads into dataset ... but the target is a triples format
> should RIOT:
>
> QT1 - read into default graph
> QT2 - create a graph with the name of the target are put the triples there
> QT3 - error (= provide machinery for the app to choose but have no default)
>
> If the app reads into a model ... and the target is quads:
>
> TQ1 - read just the default graph of the dataset (the asserted triples, in
> some people's view)
> TQ2 - project the quads into the output graph (union of all named graphs
> and default graph).
> TQ3 - error
>
> These all seem to make some sense at some times, and there are possibly
> other designs. I'm currently leaning toward QT1 (read into dft graph) and
> TQ1 (read only the dft graph).
>
> Andy
>