diff --git a/.github/workflows/Build-ShapeTemplates-spec.yml b/.github/workflows/Build-ShapeTopologies-spec.yml similarity index 84% rename from .github/workflows/Build-ShapeTemplates-spec.yml rename to .github/workflows/Build-ShapeTopologies-spec.yml index de31926..d78d0b7 100644 --- a/.github/workflows/Build-ShapeTemplates-spec.yml +++ b/.github/workflows/Build-ShapeTopologies-spec.yml @@ -1,4 +1,4 @@ -name: Build Shape Templates +name: Build Shape Topologies spec on: workflow_dispatch: {} pull_request: {} @@ -21,9 +21,9 @@ jobs: # if your doc isn’t in the root folder, # or Bikeshed otherwise can’t find it: - SOURCE: shape-templates.bs + SOURCE: shape-topologies.bs # output filename defaults to your input # with .html extension instead, # but if you want to customize it: - DESTINATION: shape-templates.html + DESTINATION: shape-topologies.html diff --git a/shape-templates.bs b/shape-topologies.bs similarity index 82% rename from shape-templates.bs rename to shape-topologies.bs index 6f888d7..5e29c66 100644 --- a/shape-templates.bs +++ b/shape-topologies.bs @@ -1,19 +1,19 @@
-Title: The Shape Templates algorithm -Shortname: ShapeTemplates +Title: The Shape Topologies algorithm +Shortname: ShapeTopologies Level: 1 Status: w3c/CG-DRAFT Markup Shorthands: markdown yes Group: TREE hypermedia community group -URL: https://w3id.org/tree/specification/shape-templates +URL: https://w3id.org/tree/specification/shape-topologies Repository: https://github.com/treecg/specification Mailing List: public-treecg@w3.org Mailing List Archives: https://lists.w3.org/Archives/Public/public-treecg/ Editor: Pieter Colpaert, https://pietercolpaert.be Abstract: This algorithm defines what quads are part of an entity description. - It uses the concepts of Concise Bounded Descriptions, adds well-defined support for named graphs, and introduces the concept of a shape template. - A shape template is a structure of an entity description that follows similar design principles as SHACL Node Shapes. + It uses the concepts of Concise Bounded Descriptions, adds well-defined support for named graphs, and introduces the concept of a shape topology. + A shape topology is a structure of an entity description that follows similar design principles as SHACL Node Shapes. The algorithm returns the quads that match, and also provides hooks for the client to fetch more quads elsewhere (i.e. by dereferencing the subject).@@ -21,22 +21,22 @@ Abstract: Input: * The subject IRI `M`. This is the first focus node. - * An optional [shape template](#shape-template-extraction) and a Term for the shape to start from `S` + * An optional [shape topology](#shape-topology-extraction) and a Term for the shape to start from `S` * A list of other subject IRIs to ignore, because we do not want to include quads from other entity descriptions. Process: - 1. When a shape template was set, execute the shape template extraction algorithm, yet exclude all quads that have another member (from the current context) set as their named graph - 2. If no shape template was set, extract all quads with subject the focus node, and recursively include its blank nodes (see also [[!CBD]]) + 1. When a shape topology was set, execute the shape topology extraction algorithm, yet exclude all quads that have another member (from the current context) set as their named graph + 2. If no shape topology was set, extract all quads with subject the focus node, and recursively include its blank nodes (see also [[!CBD]]) 3. Extract all quads with the graph name matching the focus node 4. When no quads were extracted from steps 1-3, a client MUST fetch more information about the focus node (i.e. by dereferencing it) and re-execute 1-3. -## Shape Template extraction ## {#shape-template-extraction} +## Shape Topology extraction ## {#shape-topology-extraction} -The Shape Template is a structure that looks as follows: +The Shape Topology is a structure that looks as follows:
tree:Collection
, a SHACL shape MAY be provided with the tree:shape
property.
-In that case, the SHACL shape MUST be processed towards a Shape Template as follows:
+In that case, the SHACL shape MUST be processed towards a Shape topology as follows:
1. Checks if the shape is deactivated (:S sh:deactivated true
), if it is, don’t continue
2. Check if the shape is closed (:S sh:closed true
), set the closed boolean to true.
3. All sh:property
elements with an sh:node
link are added to the shape’s NodeLinks array
4. Add all properties with sh:minCount
> 0 to the Required Paths array, and all others to the optional paths.
5. Processes the [conditionals](https://www.w3.org/TR/shacl/#core-components-logical) sh:xone
, sh:or
and sh:and
(but doesn’t process sh:not
):
- - sh:and
: all properties on that shape template MUST be merged with the current shape template
+ - sh:and
: all properties on that shape topology MUST be merged with the current shape topology
- sh:xone
and sh:or
: in both cases, at least one item must match at least one quad for all required paths. If not, it will do an HTTP request to the current namednode.