You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -97,30 +97,23 @@ A <dfn>Data Point</dfn> is a single point of a [=Time Series=] containing an ISO
97
97
98
98
Each [=Snippet=] SHOULD have the following properties:
99
99
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`.
107
107
108
108
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.
109
109
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
-
115
110
## Data Points ## {#points}
116
111
117
112
`tss:points` MUST have a `cdt:List` as datatype. Each [=Data Point=] itself MUST be a `cdt:Map` consisting
118
113
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`.
120
115
- `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.
124
117
125
118
<div class="example" id="ex_points">
126
119
```turtle
@@ -132,3 +125,17 @@ All properties of datapoints are expandable to RDF, the RDF terms to use are def
132
125
]
133
126
```
134
127
</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