Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite of the spec #111

Merged
merged 29 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
cddd453
Bundle TREE spec again into spec.bs - without imports
pietercolpaert Apr 24, 2024
723dd1f
Fix specs
pietercolpaert Jun 5, 2024
1a528e7
Shape templates to topologies
pietercolpaert Jun 5, 2024
dbdbd66
abstract fix
pietercolpaert Jun 5, 2024
0e29b2c
DCAT to discovery
pietercolpaert Jun 5, 2024
934a743
Link from the main spec
pietercolpaert Jun 5, 2024
65004f2
Merge branch 'master' into split-discovery
pietercolpaert Jun 19, 2024
201b0c3
Work in progress: search tree proposal
pietercolpaert Jun 19, 2024
281159e
Rework spec to client-centric and remove fallbacks
pietercolpaert Sep 1, 2024
6497c7e
Fix LDES reference
pietercolpaert Sep 1, 2024
e6f558e
Pruning branches
pietercolpaert Sep 1, 2024
75a8881
Imports to drafts
pietercolpaert Sep 1, 2024
4d6ecf8
Compatibilities to draft
pietercolpaert Sep 1, 2024
90bdac8
Remove SearchTree from the main spec
pietercolpaert Sep 2, 2024
8d0c021
Traversal proofreading
pietercolpaert Sep 12, 2024
edba408
clear out time and substring relation
pietercolpaert Sep 19, 2024
534c750
Completeness in subtree text
pietercolpaert Sep 26, 2024
830aff5
Discovery spec in first draft
pietercolpaert Oct 1, 2024
72efd88
Fixed typo
pietercolpaert Oct 1, 2024
e63f552
Writing a better abstract
pietercolpaert Oct 2, 2024
ff6586e
Fixed typos and left-hand right-hand explanation
pietercolpaert Oct 2, 2024
6271267
Link concept of Nodes, Search Tree and Collection in definitions
pietercolpaert Oct 2, 2024
0414da4
Image should be in spec to make it version controlled (bergos)
pietercolpaert Oct 7, 2024
7ee0d18
Consistent `a` prefix in overview
pietercolpaert Oct 7, 2024
c8f0b58
Typo in discovery
pietercolpaert Oct 7, 2024
076b3b1
Fixed feedback by xdxxxdx
pietercolpaert Oct 7, 2024
5a5cc0f
Processed comment @julianrojas87
pietercolpaert Oct 7, 2024
acd1c31
Abstract
pietercolpaert Oct 8, 2024
011d2a7
Remove examples for now
pietercolpaert Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Build-ShapeTopologies-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

# if your doc isn’t in the root folder,
# or Bikeshed otherwise can’t find it:
SOURCE: shape-topologies.bs
SOURCE: 02-shape-topologies.bs

# output filename defaults to your input
# with .html extension instead,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Build-TREE-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

# if your doc isn’t in the root folder,
# or Bikeshed otherwise can’t find it:
SOURCE: spec.bs
SOURCE: 01-tree-specification.bs

# output filename defaults to your input
# with .html extension instead,
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/Build-discovery-spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build TREE discovery spec
on:
workflow_dispatch: {}
pull_request: {}
push:
branches: [master]
jobs:
main:
name: Build, Validate and Deploy
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: w3c/spec-prod@v2
with:
TOOLCHAIN: bikeshed

# Modify as appropriate
GH_PAGES_BRANCH: gh-pages

# if your doc isn’t in the root folder,
# or Bikeshed otherwise can’t find it:
SOURCE: 03-discovery-specification.bs

# output filename defaults to your input
# with .html extension instead,
# but if you want to customize it:
DESTINATION: discovery.html
334 changes: 334 additions & 0 deletions 01-tree-specification.bs

Large diffs are not rendered by default.

File renamed without changes.
124 changes: 124 additions & 0 deletions 03-discovery-specification.bs
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<pre class='metadata'>
Title: TREE Discovery and Context Information
Shortname: TREEDiscovery
Level: 1
Status: w3c/CG-DRAFT
Markup Shorthands: markdown yes
Group: TREE hypermedia community group
URL: https://w3id.org/tree/specification/discovery
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 specification defines how a client selects a specific dataset and search tree, as well as extracts relevant context information.
</pre>

# Definitions # {#overview}

A `tree:Collection` is a subclass of `dcat:Dataset` ([[!vocab-dcat-3]]).
The specialization being that this particular dataset is a collection of _members_.

A `tree:SearchTree` is a subClassOf `dcat:Distribution`.
The specialization being that it uses the main TREE specification to publish a search tree.

A node from which all other nodes can be found is a `tree:RootNode`.

Note: The `tree:SearchTree` and the `tree:RootNode` MAY be identified by the same IRI when no disambiguation is needed.

A TREE client MUST be provided with a URL to start from, which we call the _entrypoint_.

# Initializing a client with a url # {#starting-from}

The goal of the client is to understand what `tree:Collection` it is using, and to find a `tree:RootNode` to start the traversal phase from.
This discovery specification extends the initialization step in the TREE specification, for the cases in which multiple options are possible.

The client MUST dereference the URL, which will result in a set of quads. The client now MUST first perform the init step from the main specification.
If that did not return any result, then the client MUST check whether the URL before redirects (`E`) has been used in one of the following discovery patterns described in the subsections:
1. `E` is a `tree:Collection`: then the client needs to [select the right search tree](#tree-search-trees)
2. `E` is a `dcat:Dataset`: then the client needs to [select the right distribution or dataservice from a catalog](#dcat-dataset)
3. `E` is a `ldes:EventStream`: then the client MAY take into account [LDES specific properties](#ldes)
4. `E` is a `dcat:Distribution`: then the client needs to [process it accordingly](#dcat-distribution)
5. `E` is a `dcat:DataService`: then the client needs to [process it accordingly](#dcat-dataservice)
6. `E` is a catalog or is not explicitly mentioned: then it needs to select a dataset based on [shape information](#tree-collection-shapes) and [DCAT Catalog information](#dcat-catalog)

## Selecting a collection via shapes ## {#tree-collection-shapes}

When multiple collections are found by a client, it can choose to prune the collections based on the `tree:shape` property.
The `tree:shape` property will refer to a first `sh:NodeShape`.
The collection MAY be pruned in case there is no overlap with the properties the client needs.

Issue: Will we document the precise algorithm to use? Should we extend shapes with cardinality approximations as well?

## Selecting a collection via a catalog ## {#dcat-catalog}

A DCAT Catalog is an overview of datasets, data services and distributions.
As TREE clients first need to select a dataset, and then a search tree to use, it aligns with how DCAT-AP works.
DCAT discovery extends upon the previous section in which a collection or dataset can be selected based on the `tree:shape` property.

For now, we will assume the DCAT information is available in subject pages.

Issue: Do we need more text on how to handle different types of DCAT interfaces?

The dataset descriptions can be used for filtering the datasets available in a catalog to a list of datasets that can be useful for the client.
Such properties may include the spatial extent, the time extent, or how it is possibly a part of another `dcat:Dataset`.

Issue: How precise do we need to be in this specification?

When the `dcat:Dataset` is a `tree:Collection`, the DCAT catalog is going to contain a `dct:type` property with `https://w3id.org/tree#Collection` or `https://w3id.org/ldes#EventStream` as the object.

## Choosing from multiple SearchTrees with TREE ## {#tree-search-trees}

Issue: This is yet to be done

## Selecting a search tree via a DCAT dataset ## {#dcat-dataset}

The are two ways in which you can find a search tree from a dataset: via the distributions and via the data services. Both need to be tested.
Selecting a distribution or data service when multiple are available needs to be done based on [the search tree description](tree-search-trees).
If nothing is available, all need to be tested by processing them as exemplifie din the next subsections.

### Selecting a search tree via DCAT Distribution ### {#dcat-distribution}

`E dcat:distribution ?D . ?D dcat:downloadURL ?N .` then ?N is a rootnode of E.

Issue: This is yet to be done

### Selecting a search tree from a DCAT data service ### {#dcat-dataservice}

* `?DS dcat:servesDataset E ; dcat:endpointURL ?U` or `E dcat:endpointURL ?U`, then the algorithm MUST repeat the algorithm with `?U` as the entrypoint.

Issue: This is yet to be done

## Linked Data Event Streams ## {#ldes}

In case the client is not made for query answering, but only for setting up a replication and synchronization system, then there is a special type that can be used to indicate the search tree is made for this purpose: the `ldes:EventSource`.
Clients that want to prioritize taking a _full_ copy MAY give full priority to this server hint.

<div class="example">
```turtle
E a ldes:EventSource ;
tree:rootNode|dcat:downloadURL </node1> .
```
</div>

# Extracting content information # {#context}

Issue: This is yet to be done

Context information enables a client to understand who the creator of a certain dataset is, when it was last changed, what other datasets it was derived from, etc.

## DCAT and dcterms ## {#context-dcat}

Issue: This is yet to be done

## Provenance ## {#context-prov}

Issue: This is yet to be done

## Linked Data Event Streams ## {#context-ldes}

Issue: This is yet to be done

LDES (https://w3id.org/ldes/specification) is a way to evolve search trees in a consistent way. It defines every member as immutable, and a collection as append-only.
Therefore, one can make sure to only process each member once.
Extra terms are added, such as the concept of an EventStream, retention policies and a timestampPath.
1 change: 1 addition & 0 deletions TREE-overview.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions specs/6-compatibility.md → drafts/5-compatibilities.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Compatibility # {#compatibility}

## DCAT ## {#dcat}

[[!VOCAB-DCAT-2]] is the standard for Open Data Portals by W3C. In order to find TREE compliant datasets in data portals, there SHOULD be a <code>dcat:endpointDescription</code> from the <code>dcat:DataService</code> to the entrypoint where the <code>tree:Collection</code>s and the <code>tree:ViewDescription</code>s are listed. Furthermore, there SHOULD be a <code>dct:conformsTo</code> this URI: <code>https://w3id.org/tree/specification</code>.

## Hydra ## {#hydra}

A <code>tree:Collection</code> is compatible with the [Hydra Collections specification](https://www.hydra-cg.com/spec/latest/core/#collections). However, instead of <code>hydra:view</code>, we use <code>tree:view</code> and do not link to a <code>hydra:PartialCollectionView</code> but to a <code>tree:Node</code>.
Expand Down
File renamed without changes.
82 changes: 0 additions & 82 deletions examples/eventstreams/README.md

This file was deleted.

58 changes: 0 additions & 58 deletions examples/geospatially-ordered-public-transport/first.ttl

This file was deleted.

42 changes: 0 additions & 42 deletions examples/geospatially-ordered-public-transport/second.ttl

This file was deleted.

12 changes: 0 additions & 12 deletions examples/geospatially-ordered-public-transport/stops.ttl

This file was deleted.

Loading
Loading