Warning:
This wiki has been archived and is now read-only.
Core Shape Definition
From RDF Data Shapes Working Group
The goal of this page is to select the way Shapes are defined in regard to scoped, unscoped (classes / ShEx-like) & global constraints . Class names are of course subject to change and votes are in [-1,1]
LDOM
as defined in ldom primer
# scoped ex:MyClass a rdfs:Class ; rdfs:subClassOf rdfs:Resource ; :property [...] .
# unscoped (not clear on ldom and based on Erik's fork, might be wrong) ex:MyShape a :Shape :property [ ... ] .
# global ex:MyConstraint a :GlobalConstraint ;
votes: DK -0.1 (for scoped)
- comments DK: I would prefer a common way to define shapes. I see some minor problems with defining constraints directly to classes: 1) shapes are coupled with the classes, 2) if defined elsewhere one needs to redefine "
a rdfs:Class
" or dereferencing needs to be performed to check if it is a class indeed, 3) we have multiplerdfs:domain
s for all the defined properties, both rdfs:class and :Shape. I also see the declaration ofrdfs:subClassOf rdfs:Resource ;
redundant and maybe confusing for users.
Resource Shapes like 1
Uses one base class for both
# scoped ex:MyShape a :Shape :class ex:MyClass ; :property [ ... ] .
# unscoped ex:MyShape a :Shape :property [ ... ] .
# global ex:MyConstraint a :GlobalConstraint ;
votes: DK +0.3
- comments DK: it might be confusing for users to separate scoped/unscoped constraints and one might skip ex:class by mistake.
Resource Shapes like 2
Differentiates classes
#background definition :AbstractShape a rdfs:Class . #cannot be instantiated as direct constraint/shape :ClassShape rdfs:subClassOf :AbstractShape . :ResourceShape rdfs:subClassOf :AbstractShape .
# scoped ex:MyShape a :ClassShape :class ex:MyClass ; :property [ ... ] .
# unscoped ex:MyShape a :ResourceShape :property [ ... ] .
# global ex:MyConstraint a :GlobalConstraint ;
votes: DK +1