- From: Bob Ferris <zazi@smiy.org>
- Date: Sun, 30 Oct 2011 13:15:49 +0100
- To: public-rdf-comments@w3.org
Hi, On 20 Oct 2011, at 14:39, Sandro Hawke wrote: > Can you think of any way we could merge Seq and List? Have > well-formed sequences and well-formed lists both mappable to native > lists? That would work fine, except for round-tripping.... I would propose to utilise the Ordered List Ontology [1], which allows to model ordered lists (sequences) in a "well-formed" way (primarily; via indices) as well as to describe this structure in a linked list way (secondarily; via previous/next relations). Both variants are easily queryable and do not pre-label items as, e.g., a rdf:List. Please have a look at the simple music playlist example [1] in the OLO specification documentation. The size of a list is explicitly specified via the value of the olo:length property. The position of a slot is explicitly specified via the value of the olo:index property. Example queries: 1. Query by index (absolute/"sequence style"): PREFIX olo: <http://purl.org/ontology/olo/core#> SELECT ?item WHERE { ?orderedlist a olo:OrderedList ; olo:slot ?slot . ?slot olo:index 1 ; olo:item ?item . } 2. Query by linkage (relative/"linked list style"): PREFIX olo: <http://purl.org/ontology/olo/core#> PREFIX ex: <http://example.org/> SELECT ?nextItem WHERE { ?orderedlist a olo:OrderedList ; olo:slot ?slot . ?slot olo:item ex:SexMachine ; olo:next ?nextSlot . ?nextSlot olo:item ?nextItem . } Of course, I can imagine that some syntactic sugar (as it is the case, e.g., with lists in Turtle) could enhance the usage of this ordered list model as well ;) Cheers, Bo PS: One could also specify this model, e.g., to represent playlists that only consist of media objects, see [3] PPS: See also [4] :) [1] http://purl.org/ontology/olo/core# [2] http://smiy.sourceforge.net/olo/spec/orderedlistontology.html#sec-example [3] http://purl.org/ontology/pbo/core#Playlist [4] http://lists.w3.org/Archives/Public/public-rdf-comments/2011Apr/0001.html
Received on Sunday, 30 October 2011 12:16:54 UTC