Skip to content

Commit 7a013c4

Browse files
Merge pull request #5 from KNowledgeOnWebScale/pietercolpaert-patch-1
Update spec.bs
2 parents 4262262 + 72959d2 commit 7a013c4

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

spec.bs

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Warning: Not Ready
44
Shortname: RDF-TS-Snippets
55
Level: none
66
Status: LD
7-
Repository: KNowledgeOnWebScale/rdf-ts-snippets-spec
7+
Repository: KNowledgeOnWebScale/rdf-timeseriessnippets
88
URL: https://knowledgeonwebscale.github.io/rdf-timeseriessnippets/
99
Editor: Dylan Van Assche, https://dylanvanassche.be/#me
1010
Editor: Pieter Colpaert, https://pietercolpaert.be
@@ -97,30 +97,23 @@ A <dfn>Data Point</dfn> is a single point of a [=Time Series=] containing an ISO
9797

9898
Each [=Snippet=] SHOULD have the following properties:
9999

100-
- `tss:points`: a `cdt:List` of data points where each data point is a `cdt:Map`.
101-
- `tss:from`: starting timestamp (including) of the period covered by `tss:points`.
102-
- `tss:until`: until this timestamp (excluding) of the period covered by `tss:points`.
103-
- `tss:about`: an entity description which provides the data points in `tss:points`.
104-
- `tss:pointType`: the RDF type of the data points in `tss:points`.
105-
- `tss:timePath`: the term to use for expanding the `time` property in `tss:points`.
106-
- `tss:valuePath`: the term to use for expanding the `value` property in `tss:points`.
100+
- `tss:points`: a `cdt:List` of data points where each data point is a `cdt:Map` with a `time` key using `xsd:dateTime` value, with a `value` key for which the value is annotated with a datatype, and optionally an `id` key for which the value is an IRI for the current data point.
101+
- `tss:from`: starting timestamp (including) of the period covered by `tss:points` using an `xsd:dateTime`.
102+
- `tss:until`: until this timestamp (excluding) of the period covered by `tss:points` using an `xsd:dateTime`.
103+
- `tss:about`: contains statements about a blank node. The statements can be asserted on top of all data points in `tss:points` when expanding the Snippet.
104+
- `tss:pointType`: the RDF type of all data points in `tss:points`.
105+
- `tss:timePath`: the path to use for expanding the `time` property in `tss:points`.
106+
- `tss:valuePath`: the path to use for expanding the `value` property in `tss:points`.
107107

108108
Issue: Discuss whether these properties are required or optional. E.g., a publisher might decide to do a lossy conversion for their goal, and not include valuePath, pointType and timePath. However, we can still analyze and visualize the data without that information.
109109

110-
## Paths ## {#paths}
111-
112-
A [=Snippet=] has multiple path descriptions to define the mapping between CDT and RDF.
113-
A path defines which RDF term must be used for each [=Data Point=] properties.
114-
115110
## Data Points ## {#points}
116111

117112
`tss:points` MUST have a `cdt:List` as datatype. Each [=Data Point=] itself MUST be a `cdt:Map` consisting
118113
of 2 required properties and 1 optional property:
119-
- `time`: the timestamp of the data point.
114+
- `time`: the timestamp of the data point using an `xsd:dateTime`.
120115
- `value`: the value of the data point with corresponding datatype.
121-
- `id`: the data point identifier, optionally (must be a named node).
122-
123-
All properties of datapoints are expandable to RDF, the RDF terms to use are defined through the path descriptions of a Snippet.
116+
- `id`: the data point identifier is optionally. When set, this MUST be a named node.
124117

125118
<div class="example" id="ex_points">
126119
```turtle
@@ -132,3 +125,17 @@ All properties of datapoints are expandable to RDF, the RDF terms to use are def
132125
]
133126
```
134127
</div>
128+
129+
## Expanding data points ## {#expanding}
130+
131+
When `tss:timePath` and `tss:valuePath` are set (mind this is not required), a [=Snippet=] can be expanded to a verbose RDF representation, for example using its original vocabulary.
132+
The properties `tss:about` and `tss:pointType` will influence that process.
133+
134+
For each [=Data Point=], it can be mapped as follows:
135+
1. When the `id` is set and it is a valid IRI, set this id as the subject. If it is not, create a new blank node and set this as the subject.
136+
2. When `tss:pointType` is set, create a triple stating this id is of `rdf:type` the object of the pointType triple.
137+
3. Create a triple for the time based on the `tss:timePath`. For unknown intermediary named nodes, a blank node is to be created.
138+
4. Similarly, create a triple for the value based on the `tss:valuePath`.
139+
5. Now apply the `tss:about` blank node entity to this point.
140+
141+
Issue: Discuss whether a SHACL Path makes sense to use as the intermediary steps will be mapped to blank nodes. Probably we could simplify here and make this a `tss:timeProperty` instead?

0 commit comments

Comments
 (0)