sdg:hasConstraint
sdg:hasConstraint is how a definition document contributes a conformance constraint to the registry. The value is a blank-node sh:NodeShape authored inline in the definition's Version graph: sh:targetClass names the class of documents the constraint governs (required), sh:closed optionally closes the target's predicate surface, and each sh:property shape constrains one predicate path (sh:path, with optional sh:minCount, sh:maxCount, sh:datatype, sh:class, sh:nodeKind).
The registry walks the sdg:hasConstraint edge through the blank-node chain into its discovery graph, and the core publish hook re-runs every owner's constraints against a document whenever a submission touches it. Keeping the SHACL surface behind this edge — rather than on the definition subject itself — keeps the definition's own closed-shape check from colliding with the constraint vocabulary.
Usage
- Domain: definition documents — TypeDefinition, MetadataDefinition, and friends. Range: a blank-node
sh:NodeShape. - The constraint NodeShape is deliberately non-closed: user-authored constraints may carry predicates beyond the enumerated surface (for example
sh:severityorrdfs:comment) without tripping conformance. - Example in this corpus: the rdfs:label MetadataDefinition registers the constraint that admits
rdfs:labelon every Document.