shapes-ISSUE-78 (sh:abstract): Should SHACL support marking classes as abstract [SHACL Spec]

shapes-ISSUE-78 (sh:abstract): Should SHACL support marking classes as abstract [SHACL Spec]

http://www.w3.org/2014/data-shapes/track/issues/78

Raised by: Holger Knublauch
On product: SHACL Spec

The current Turtle file uses a property sh:abstract to mark certain classes as "abstract" similar to how object-oriented systems work. By marking a class as sh:abstract=true, tools such as data entry editors can make sure that users do not directly instantiate an abstract class. The flag also signals the intention of the modeler.

There are plenty of examples of such abstract classes in the SHACL spec (see Turtle file), and there is also a large body of use cases in TopQuadrant's customer scenarios where such a flag has proven to be useful. TQ had introduced various home-baked alternatives including spin:abstract for that purpose, but we would prefer this to be a standard feature.

PROPOSAL: SHACL should include a boolean property sh:abstract that can be set true for classes (if approved then possibly limited to sh:ShapeClass). The validation constraint for abstract classes is that any instance of an abstract class must also have at least one rdf:type for a non-abstract (transitive) subclass of that class.

Note that the condition above will work regardless of whether RDFS inferencing is activated.

Received on Tuesday, 4 August 2015 23:05:47 UTC