Re: shapes-ISSUE-46 (RDF lists): Support for RDF Collections? [Requirements]

"RDF Collections support" is probably a bit vague, so we'd need to drill 
down on specific things. As long as SHACL supports SPARQL, of course 
people can define all kinds of constraints on graph patterns, including 
constraints that traverse rdf:Lists. And with SHACL templates these 
SPARQL snippets can be turned into high-level languages, so in principle 
we don't need to do anything as long as the generic features are 
present. I had outlined a solution to that for the rdf:List Stresstest [1].

But specifically, I can confirm that it is a common requirement to be 
able to use rdf:Lists, yet to also specify the type of each member. So 
one idea would be to add two core properties sh:memberType and 
sh:memberDatatype that can be used only if sh:valueType=rdf:List. Example:

ex:ExampleShape
     sh:property [
         sh:predicate ex:cruiseItinerary ;
         sh:valueType rdf:List ;
         sh:memberType ex:Port ;
     ] .

Or an alternative syntax:

ex:ExampleShape
     sh:property [
         a sh:ListPropertyConstraint ;
         sh:predicate ex:cruiseItinerary ;
         sh:memberType ex:Port ;
     ] .

Yet another alternative design would be to allow subclasses of rdf:List 
that carry a restriction on the member type, similar to how generics 
work in Java (e.g. List<Person>).

Does anyone have other Collection-related feature requests for the 
high-level language?

Thanks,
Holger

[1] https://www.w3.org/2014/data-shapes/wiki/Rdf:List_Stresstest


On 4/22/2015 14:31, RDF Data Shapes Working Group Issue Tracker wrote:
> shapes-ISSUE-46 (RDF lists): Support for RDF Collections? [Requirements]
>
> http://www.w3.org/2014/data-shapes/track/issues/46
>
> Raised by: Karen Coyle
> On product: Requirements
>
> There are two approved use cases that require the functionality of RDF Collections:
>
> UC26: rdf:Lists and ordered data
> http://w3c.github.io/data-shapes/data-shapes-ucr/#uc26-rdf-lists-and-ordered-data
>
> UC42: Constraining RDF Graphs to provide better mapping to JSON
> http://w3c.github.io/data-shapes/data-shapes-ucr/#uc42-constraining-rdf-graphs-to-provide-better-mapping-to-json
>
> There does not appear to be a requirement that specifies this support. Is RDF Collections support included in SHACL?
>
>
>

Received on Wednesday, 22 April 2015 05:15:06 UTC