RE: Reconciling hydra rest semantics for collections with typical RDF entity relationships

On Thursday, February 06, 2014 8:37 PM, Judson Lester wrote:
> On Thu, Feb 6, 2014 at 10:34 AM, Gregg Kellogg wrote:
> > The _Conformant List_ is one which can be serialized without having
> > individual nodes named, and where there is precicely one member of
> > rdf:first/rdf:rest and no other properties. This allows things like (1
> > 2 3) and {"@list": [1, 2, 3]}. RDF/XML further restrictions that list
> > values only be literals, and not bnodes or IRIs.
>
> I think then I understand you correctly: "conformant list" is
> identical with "list that obeys the expectations of various
> serializations." If that's the case, then extending those
> serializations would expand the limits of conformance, right? As a
> constructive example, something like (1 2
> 3):<http://example.com/list_of_numbers> might serialize a list where
> the first node was an IRI, right? Or {"@list": [1, 2, 3], @head:
> "http://example.com/list_of_numbers"} ? (Proposing those extensions
> would be a topic for elsewhere, obviously.)

Right. The fundamental problem however is that lists are not part of RDF's data model. They are kind of an afterthought that was solved (as almost everything else) by a vocabulary.

In JSON-LD the most obvious solution would be to just allow @id to be used with @list, something like

  {
    "@id": "http://example.com/list_of_numbers",
    "@list": [ 1, 2, 3 ]
  }

You would still have the problem with sets though.


> > Breaking with this is certainly possible, but then the serialization
> > convenience of using a list must be offset with the complexity of
> > dealing with the "linked" part of a list. Other data structures, such
> > as a schema:ItemList, hydra:Collection or olo:OrderedList (see
> > http://smiy.sourceforge.net/olo/spec/orderedlistontology.html) become
> > more convenient and are computationally simpler.
> 
> Yeah, I'm increasingly enamored with olo - but it doesn't serialize
> into a simple list either :/

Nope.. no syntax has syntactic shortcuts for OLO.



--
Markus Lanthaler
@markuslanthaler

Received on Friday, 7 February 2014 12:11:07 UTC