- From: Holger Knublauch <holger@topquadrant.com>
- Date: Tue, 16 Dec 2014 09:06:22 +1000
- To: public-data-shapes-wg@w3.org
On 12/16/2014 3:09, Arthur Ryman wrote: > In SPIN a shape program consists of an OWL ontology with additional > properties that use SPARQL. Again, there is a close connection between > class and shape. (Substitute "OWL" with "RDF Schema" above). And global (static) constraints may exist. > In OSLC Resource Shapes, a shape program consists of a set of related RDF > :ResourceShape resources. To clarify: with "related" you mean via oslc:valueShape, or how else? With valueShape you could only cover connected subgraphs, not arbitrary graphs. > A shape resource lists a set of properties, so > it has a parallel structure to a class definition. Yes that's what I mean. > In summary, since it is useful to think about data in terms of classes and > their properties (the OO view), it follows that a shape language is going > to have some similarities with a class language. However, RDF is not > restricted to an OO view of data. Therefore, in a general purpose shape > language, shapes should be able express characteristics of arbitrary > graphs, not just those that come from OO applications. I would like to see how that generalization plays out in practice. It is IMHO perfectly valid to treat a class as a collection of constraints. Then, you can test whether a given resource fulfills all those constraints, *even if the resource itself does not have a matching rdf:type*. In the latest SPIN iteration (inspired by this WG group), this checking can be done via a SPARQL function FILTER spin:violatesConstraints(?resource, ?shape) where the second argument is basically a class definition, quite possibly an anonymous class. As long as the shape is connected (e.g. via oslc:valueShape) then the function above serves as entry point to constraint evaluation. Some applications may decide to simply call the function above using their own entry point. By default, SPIN uses the rdf:type triples as this entry point, but there may be any other properties too. Holger
Received on Monday, 15 December 2014 23:09:25 UTC