Skip to content

Commit

Permalink
13-hierarchy: Initial draft of hierarchical collections
Browse files Browse the repository at this point in the history
- Describes latest proposal agreed to in the SWG on 2024-05-16 in ( fixes #11 and #298 )
- TODO: Still need to add OpenAPI definitions
- 11-sorting, 12-filtering, 14-schemas: set up requirement class tables
  • Loading branch information
jerstlouis committed May 17, 2024
1 parent 0f8619a commit 3fdd146
Show file tree
Hide file tree
Showing 15 changed files with 437 additions and 5 deletions.
2 changes: 1 addition & 1 deletion collections/clause_11_sortable_collections.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
== Requirements Class "Sortable Collections"
:sectnums:

// TODO: include::requirements/requirements_class_sortable_collections.adoc[]
include::requirements/requirements_class_sorting.adoc[]
2 changes: 1 addition & 1 deletion collections/clause_12_filterable_collections.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
== Requirements Class "Filtering Collections with CQL2"
:sectnums:

// TODO: include::requirements/requirements_class_filterable_collections.adoc[]
include::requirements/requirements_class_filtering.adoc[]
357 changes: 356 additions & 1 deletion collections/clause_13_hierarchical_collections.adoc

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions collections/clause_14_schemas.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
== Requirements Class "Schemas"
:sectnums:

// TODO: include::requirements/requirements_class_schemas.adoc[]

include::requirements/requirements_class_schemas.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[per_hierarchy_collection_children]]
[width="90%",cols="2,6a"]
|===
^|*Permission {counter:per-id}* |*/per/hierarchy/parent_default_html*
^|A |For representations not intended primarily for consumption by machines, such as an HTML representation, an implementation MAY include clickable links to the immediate children collections to facilitate browsing through the hierarchy.
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[per_hierarchy_parent_default_html]]
[width="90%",cols="2,6a"]
|===
^|*Permission {counter:per-id}* |*/per/hierarchy/parent_default_html*
^|A |For representations not intended primarily for consumption by machines, such as an HTML representation, an implementation MAY assume a default value of `none` for the `parent` query parameter, so as to present the collections in a hierarchical manner and avoid an unnecessarily large response when a large number of collections are available.
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[rec_hierarchy_parent-convention]]
[width="90%",cols="2,6a"]
|===
^|*Recommendation {counter:rec-id}* |*/rec/hierarchy/parent-convention*
^|A |The identifiers for children collections SHOULD follow the pattern `{parentCollectionId}{separator}{distinctivePart}`. For example, the collection with identifier `can:qc:mtl` whose parent collection has the identifier `can:qc` follows this pattern.
^|B |The same single separator character (for example, a colon `:`) SHOULD be used for all collections throughout a Web API deployment.
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[req_hierarchy_ancestor-parameter]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/hierarchy/ancestor-parameter*
^|A |The implementation SHALL support an `ancestor` parameter for listing collections at the resource `/collections` whose string value represents a specified ancestor collection identifier.
^|B |The response for listing collections when this parameter is used SHALL only include collections whose immediate parent, or any ancestor from that parent up to the root of the hierarchy, corresponds to the specified collection identifier.
|===
8 changes: 8 additions & 0 deletions collections/requirements/hierarchy/REQ_parent_parameter.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[req_hierarchy_parent-parameter]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/hierarchy/parent-parameter*
^|A |The implementation SHALL support a `parent` query parameter for listing collections at the resource `/collections` whose string value represents a specified parent collection identifier.
^|B |The response for listing collections when this parameter is used SHALL only include collections whose immediate parent corresponds to the specified collection identifier.
^|C |When the special value of `none` is used for the `parent` parameter, only top-level collections without a parent SHALL be returned.
|===
8 changes: 8 additions & 0 deletions collections/requirements/hierarchy/REQ_parent_property.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[req_hierarchy_parent-property]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/hierarchy/parent-property*
^|A |For collections organized into a hierarchy which are not top-level collections, the collection object response for both listing collections (`/collections`) and for individual collection description (`/collections/{collectionId}`) SHALL include a `parent` property set to the collection identifier of the parent collection.
^|B |The `parent` property in collection objects for top-level collections SHALL be omitted or set to a null value.
^|C |Collection identifiers SHALL NOT use the reserved value of `none`.
|===
10 changes: 10 additions & 0 deletions collections/requirements/requirements_class_filtering.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[[rc_filtering]]
[cols="1,4",width="90%"]
|===
2+|*Requirements Class*
2+|http://www.opengis.net/spec/ogcapi-common-2/1.0/req/filtering
|Target type |Web API
|Dependency |<<rc_collections,Collections Requirements Class>>
|Dependency |https://www.opengis.net/spec/ogcapi-records-1/1.0/req/local-resources-catalog/filtering
|Dependency |https://www.opengis.net/spec/cql2/1.0/req/basic-cql2
|===
8 changes: 8 additions & 0 deletions collections/requirements/requirements_class_hierarchy.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[rc_hierarchy]]
[cols="1,4",width="90%"]
|===
2+|*Requirements Class*
2+|http://www.opengis.net/spec/ogcapi-common-2/1.0/req/hierarchy
|Target type |Web API
|Dependency |<<rc_collections,Collections Requirements Class>>
|===
8 changes: 8 additions & 0 deletions collections/requirements/requirements_class_schemas.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[rc_schemas]]
[cols="1,4",width="90%"]
|===
2+|*Requirements Class*
2+|http://www.opengis.net/spec/ogcapi-common-2/1.0/req/schemas
|Target type |Web API
|Dependency |<<rc_collections,Collections Requirements Class>>
|===
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
|Target type |Web API
|Dependency |<<rc_collections,Collections Requirements Class>>
|Dependency |<<rfc3339,RFC 3339 (Date and Time on the Internet: Timestamps)>>
|Dependency |https://www.opengis.net/spec/ogcapi-records-1/1.0/req/local-resources-catalog/query-parameters
|===
9 changes: 9 additions & 0 deletions collections/requirements/requirements_class_sorting.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[[rc_sorting]]
[cols="1,4",width="90%"]
|===
2+|*Requirements Class*
2+|http://www.opengis.net/spec/ogcapi-common-2/1.0/req/sorting
|Target type |Web API
|Dependency |<<rc_collections,Collections Requirements Class>>
|Dependency |https://www.opengis.net/spec/ogcapi-records-1/1.0/req/local-resources-catalog/sorting
|===

0 comments on commit 3fdd146

Please sign in to comment.