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

On Feb 6, 2014, at 9:21 AM, Judson Lester <nyarly@gmail.com> wrote:

> The more I work with Lists, the more I think that if the concrete formats supported at least a named head, they'd be much more useful. This is an excellent example of that. Perhaps there's another meaning of "conformant" that you intend? I've never been able to find the BNode requirement (as opposed to the proper list one) in the RDF specs. 

Formally speaking, a list (RDF Collection) is describe with just vocabulary terms (i.e., rdf:first/rdf:rest/rdf:nil), and can be used with either an IRI or BNode. Any graph using this is certainly consistent, however such use of a list is not "conformant", in the sense that there is no shorthand representation for lists using anything other than BNodes. Of course, the first member could use an IRI, and the tail of the list could be conformant, but this is typically not what people expect from serializations. Using the vocabulary, you could also have nodes with more than one rdf:first or rdf:rest, or describe cycles, but these are not useful concepts for serializations.

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.

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.

Gregg

> Judson
> 
> 
> On Tue, Feb 4, 2014 at 11:26 AM, Gregg Kellogg <gregg@greggkellogg.net> wrote:
> On Feb 4, 2014, at 10:59 AM, Kingsley Idehen <kidehen@openlinksw.com> wrote:
> 
> > On 2/4/14 1:26 PM, Markus Lanthaler wrote:
> >> This is a general problem of RDF. AFAICT, there's no way general way to
> >> solve this issue for sets. If you would use a list, you could at least use
> >> the list's head node (which generally is a blank node). Remember our
> >> discussions in the JSON-LD group?
> >>
> >> Both Schema.org with its ItemList and Hydra with its Collection take a
> >> rather pragmatic approach. We could of course go ahead and define a
> >> Collection's semantics so that
> >
> > I assume you've looked at RDF Schema vocabulary which does describe RDF Collections [1] and Containers [2].
> 
> I believe Markus' was referring to RDF Collections when he said "list". Of course, a big problem with collections is the navigation cost in RDF, and you can't really chain lists together, presuming that they're conformant BNode-type lists. You also can't refer to such a list, as it also must start with a BNode (to be conformant, not from a vocabulary perspective).
> 
> Containers don't work well for a remote list of values, as they use a separate statement for each value, and you can't refer to an external container holding such values.
> 
> Another vocabulary to consider is the Ordered List Ontology [3].
> 
> Gregg
> 
> > [1] http://www.w3.org/TR/rdf-schema/#ch_collectionvocab
> > [2] http://www.w3.org/TR/rdf-schema/#ch_containervocab .
> [3] http://smiy.sourceforge.net/olo/spec/orderedlistontology.html
> > --
> >
> > Regards,
> >
> > Kingsley Idehen
> > Founder & CEO
> > OpenLink Software
> > Company Web: http://www.openlinksw.com
> > Personal Weblog: http://www.openlinksw.com/blog/~kidehen
> > Twitter Profile: https://twitter.com/kidehen
> > Google+ Profile: https://plus.google.com/+KingsleyIdehen/about
> > LinkedIn Profile: http://www.linkedin.com/in/kidehen
> >
> >
> >
> >
> >
> 
> 
> 

Received on Thursday, 6 February 2014 18:34:55 UTC