- From: Jim Amsden <jamsden@us.ibm.com>
- Date: Mon, 11 Apr 2016 14:02:07 -0400
- To: public-data-shapes-wg <public-data-shapes-wg@w3.org>
- Message-Id: <201604111802.u3BI2Okr009591@d03av01.boulder.ibm.com>
re: ISSUE-78: Abstract Classes: There is no use case or requirement for
SHACL to support abstract classes, but the issue provides reasonable
motivation and the votes on the issue are >0.
The current spec contains the following paragraph in section 2.1.2.1
Implicit Class Scopes:
Classes may be declared to be abstract by setting their property
sh:abstract to true. Abstract classes SHOULD not be instantiated directly,
i.e. every instance of an abstract class SHOULD also have an rdf:type
triple to a non-abstract subclass of the abstract class.
where "Classes" references sh:ShapeClass. The concept of abstract class
could instead be expressed as a node constraint. This would allow a class
to be abstract or concrete in different situations based on the domain
needs.
Proposal:
Remove the paragraph about abstract classes from section 2.1.2.1.
Add sh:abstract to the table in section 3 and indicate that it is a
sh:NodeConstraint.
Add section 3.10 Abstract Class Constraint
Classes may be constrained to be abstract by creating a node constraint
with class scope, and including the sh:isAbstract property set to true.
Abstract classes SHOULD not be instantiated directly. Every instance of an
abstract class SHOULD also have an rdf:type triple to a non-abstract
subclass of the abstract class.
#Example abstract class constraint:
ex:AnAbstractClassConstraint
a sh:Shape ;
sh:scopeNode ex:AnAbstractClass ;
sh:isAbstract true .
#Example graph data
ex:AnAbstractClass
a rdfs:Class ;
dcterms:title "Example of an abstract class constraint." .
Jim Amsden, Senior Technical Staff Member
OSLC and Linked Lifecycle Data
919-525-6575
Received on Monday, 11 April 2016 18:03:00 UTC