An RDF stream produces data that indicates where a person is at a given time. The
timestamp predicate p used in this example is the PROV
- `prov:generatedAtTime. In this example the named graphs
+ `prov:generatedAtTime. In this example the named graph pairs
(:g1,:g2, etc.) contain the streaming data contents (for
brevity the contents are represented by the dots ...).
:g1 {...}{:g1,prov:generatedAtTime,t1}
@@ -414,7 +413,7 @@ RDF Stream
:g4 {...} {:g4, prov:generatedAtTime, t4}
...
- We can expand the content of each named graph, which is a set of triples:
+ We can expand the content of the graph component of each named graph pair, which is a set of triples:
:g1 {:axel :isIn :RedRoom. :darko :isIn :RedRoom}
{:g1, prov:generatedAtTime, "2015-06-18T12:00:00Z"^^xsd:dateTime}
@@ -434,14 +433,14 @@ RDF Stream
Isomorphism
Two RDF timestamped graphs TSG1 and TSG2 are isomorphic if and only if there is
- a bijection M between the nodes, triples, graphs and named graphs in TSG1 and those in
+ a bijection M between the nodes, triples, graphs and named graph pairs in TSG1 and those in
TSG2 such that:
M maps blank nodes to blank nodes;
M is the identity map on literals and IRIs;
For every triple <s p o>, M(<s, p, o>)= <M(s), M(p), M(o)>;
For every graph G={t1, ..., tn}, M(G)={M(t1), ..., M(tn)};
- For every named graph NG=<n, G>, M(NG)=<M(n), M(G)>;
- M(NG1)=NG2, M(DG1)=DG2, and M(TST1)=TST2, where NG1 is the named graph of TSG1, DG1
+ For every named graph pair NG=<n, G>, M(NG)=<M(n), M(G)>;
+ M(NG1)=NG2, M(DG1)=DG2, and M(TST1)=TST2, where NG1 is the named graph pair of TSG1, DG1
is the default graph of TSG1, TST1 is the timestamp triple of TSG1, and similarly for
TSG2.
@@ -474,16 +473,16 @@ Isomorphism
Two RDF streams S1 and S2 are B-isomorphic if and only if there is a bijection M
- between the nodes, triples, graphs, named graphs, and timestamped graphs that occur in S1 and those
- that occur in S2 such that:
+ between the nodes, triples, graphs, named graph pairs, and timestamped graphs in S1 and those
+ in S2 such that:
M maps blank nodes to blank nodes;
M is the identity map on literals and IRIs;
For every triple <s p o>, M(<s, p, o>)= <M(s), M(p), M(o)>;
For every graph G={t1, ..., tn}, M(G)={M(t1), ..., M(tn)};
- For every named graph NG=<n, G>, M(NG)=<M(n), M(G)>;
- For every timestamped graph TSG where NG is the named graph and DG is the default
+ For every named graph pair NG=<n, G>, M(NG)=<M(n), M(G)>;
+ For every timestamped graph TSG where NG is the named graph pair and DG is the default
graph containing the timestamp triple TST, M(TSG) is a timestamped graph TSG2, with
- named graph M(NG), default graph M(DG) and timestamp triple M(TST).;
+ named graph pair M(NG), default graph M(DG) and timestamp triple M(TST).;
For every i ≥ 1, M(S1(i))=S2(i), where S1(i) is the i-th element of S1 and S2(i)
is the i-the element of S2.
@@ -843,7 +842,7 @@ Beyond time instants: intervals & more
following way: Given p1 and p2 representing start and end time predicates, then
(g,p1,t1) and (g,p2,t2) denote that g is defined in an interval
[t1,t2]. As an example:
- :g_1, :startsAt, "2015-06-18T12:00:00"^^xsd:dateTime
+ :g_1, :startsAt, "2015-06-18T12:00:00"^^xsd:dateTime
:g_1, :endsAt, "2015-06-18T13:00:00"^^xsd:dateTime
Or even:
@@ -858,14 +857,14 @@ Semantics
Dataset. In particular, the designation of a particular triple in the default graph as the
timestamp triple has no effect on its semantics.
The semantics of timestamped graphs, and consequently of RDF streams, is based on the
- semantics formalized in [[RDF11-Datasets]] in the case that each named graph defines its own
+ semantics formalized in [[RDF11-Datasets]] in the case that each named graph pair defines its own
context.
The following terms are used in the sense of [[RDF11-MT]]: entailment regime,
E-interpretation, blank node, universe, named graph pair, RDF graph, E-entails, default
graph .
An RSP interpretation
I with respect to an entailment regime E is an E-interpretation
- extended to named graphs, timestamped graphs, RDF datasets, and RDF streams as follows:
+ extended to named graph pairs, timestamped graphs, RDF datasets, and RDF streams as follows:
given a mapping A from blank nodes to the universe IR and a
named graph pair ng = <n, G>, [I+A](ng) is
true if and only if [I+A](n) is an RDF graph that E-entails
@@ -891,13 +890,13 @@ Semantics
We say that an RSP interpretation I E-satisfies a graph, named graph
pair, timestamped graph, dataset, or stream X (or satisfies A
w.r.t the E-entailment regime) when I(X) is true.
- Following standard terminology, we say that a graph, named graph, timestamped graph,
- dataset, or stream X RSP-E-entails a graph, named graph, timestamped graph,
+
Following standard terminology, we say that a graph, named graph pair, timestamped graph,
+ dataset, or stream X RSP-E-entails a graph, named graph pair, timestamped graph,
dataset, or stream Y if and only if for every RSP interpretation I
with respect to E-entailment, I E-satisfies Y whenever
I E-satisfies X.
The "RSP" prefix in "RSP-E-entails" may be dropped when neither antecedent nor
- consequent is an RDF dataset or named graph, as in that case there is no possibility of
+ consequent is an RDF dataset or named graph pair, as in that case there is no possibility of
alternate dataset semantics.
It should be straightforward to prove that isomorphic RDF streams simply
entail each other, and hence are logically equivalent under simple entailment. This should
diff --git a/Example_RDF_Streams/BGN_Location_TempC_Minute_Paris.json b/Example_RDF_Streams/BGN_Location_TempC_Minute_Paris.json
deleted file mode 100644
index cc8279e..0000000
--- a/Example_RDF_Streams/BGN_Location_TempC_Minute_Paris.json
+++ /dev/null
@@ -1,115 +0,0 @@
-{
- "@context": {
- "@vocab": "http://www.example.org/data-vocabulary#",
- "observedAt": {
- "@id": "http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#observationSamplingTime",
- "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
- },
- "hasTemp": {
- "@id": "http://example.org/property-vocabulary#hasPointTempC",
- "@type": "http://www.w3.org/2001/XMLSchema#decimal"
- }
- },
- "@graph": [
- {
- "@id": "_:1",
- "observedAt": "2015-01-01T01:00:00",
- "@graph": [
- {
- "@id": "Paris",
- "hasTemp": "8.2"
- }
- ]
- },
- {
- "@id": "_:2",
- "observedAt": "2015-01-01T01:01:00",
- "@graph": [
- {
- "@id": "Paris",
- "hasTemp": "8.3"
- }
- ]
- },
- {
- "@id": "_:3",
- "observedAt": "2015-01-01T01:02:00",
- "@graph": [
- {
- "@id": "Paris",
- "hasTemp": "8.4"
- }
- ]
- },
- {
- "@id": "_:4",
- "observedAt": "2015-01-01T01:03:00",
- "@graph": [
- {
- "@id": "Paris",
- "hasTemp": "8.5"
- }
- ]
- },
- {
- "@id": "_:5",
- "observedAt": "2015-01-01T01:04:00",
- "@graph": [
- {
- "@id": "Paris",
- "hasTemp": "8.6"
- }
- ]
- },
- {
- "@id": "_:6",
- "observedAt": "2015-01-01T01:05:00",
- "@graph": [
- {
- "@id": "Paris",
- "hasTemp": "8.7"
- }
- ]
- },
- {
- "@id": "_:7",
- "observedAt": "2015-01-01T01:06:00",
- "@graph": [
- {
- "@id": "Paris",
- "hasTemp": "8.8"
- }
- ]
- },
- {
- "@id": "_:8",
- "observedAt": "2015-01-01T01:07:00",
- "@graph": [
- {
- "@id": "Paris",
- "hasTemp": "8.9"
- }
- ]
- },
- {
- "@id": "_:9",
- "observedAt": "2015-01-01T01:08:00",
- "@graph": [
- {
- "@id": "Paris",
- "hasTemp": "9.0"
- }
- ]
- },
- {
- "@id": "_:10",
- "observedAt": "2015-01-01T01:10:00",
- "@graph": [
- {
- "@id": "Paris",
- "hasTemp": "9.1"
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/Example_RDF_Streams/README.md b/Example_RDF_Streams/README.md
index bd66497..6ca1d62 100644
--- a/Example_RDF_Streams/README.md
+++ b/Example_RDF_Streams/README.md
@@ -1,12 +1,17 @@
+* Examples in the trig directory are the most current. The json-ld examples are legacy.
* Examples starting with "BGN" are RDF Stream examples that have bnode graph names.
* Examples starting with "RGN" are RDF Stream examples that have IRI graph names.
-* Examples entitled "..._Location_TempC_Minute_(some city name).json" are RDF stream examples with
+* Examples entitled "..._Location_TempC_Minute_(some city name).*" are RDF stream examples with
data about temperature observations at a single location, given by the city name.
* Examples with "Merged" in the name are the result of the merger of other RDF streams, where the
merging operation requires renaming of blank nodes when necessary to keep them distinct.
-E.g., "RGN_Location_TempC_Minute_Merged.json" is the result of merging "RGN_Location_TempC_Minute_Berlin.json", "RGN_Location_TempC_Minute_Madrid.json",
-and "RGN_Location_TempC_Minute_Paris.json"
+E.g., "RGN_Location_TempC_Minute_Merged.*" is the result of merging "RGN_Location_TempC_Minute_Berlin.*", "RGN_Location_TempC_Minute_Madrid.*",
+and "RGN_Location_TempC_Minute_Paris.*"
* Examples with "Union" in the name are the result of the union of other RDF streams, where the streams are allowed
to share blank nodes (i.e. they are on the same "surface").
* Examples with suffix "_b", "_c", ... are alternate serializations of the same RDF stream as the example without the suffix.
* Examples with "rank" in the name are not JSON-LD, but are an extended description that includes an integer "rank". This value corresponds to the number of timestamped graphs in the stream that are less than or equal to the given timestamped graph (including itself).
+* Examples starting with HRA are a mockup of heart rate sensor readings in a
+ Discrete Timeseries with blank node named graphs.
+* Examples named HRA_full have timestamps corresponding to the generated time, and the observation is contained in the named graph.
+* Examples named HRA_empty have timestamps corresponding to the effective time, and the observation is contained in the default graph.
diff --git a/Example_RDF_Streams/BGN_Location_TempC_Minute_Berlin.json b/Example_RDF_Streams/json-ld/BGN_Location_TempC_Minute_Berlin.json
similarity index 100%
rename from Example_RDF_Streams/BGN_Location_TempC_Minute_Berlin.json
rename to Example_RDF_Streams/json-ld/BGN_Location_TempC_Minute_Berlin.json
diff --git a/Example_RDF_Streams/BGN_Location_TempC_Minute_Madrid.json b/Example_RDF_Streams/json-ld/BGN_Location_TempC_Minute_Madrid.json
similarity index 100%
rename from Example_RDF_Streams/BGN_Location_TempC_Minute_Madrid.json
rename to Example_RDF_Streams/json-ld/BGN_Location_TempC_Minute_Madrid.json
diff --git a/Example_RDF_Streams/BGN_Location_TempC_Minute_Merged.json b/Example_RDF_Streams/json-ld/BGN_Location_TempC_Minute_Merged.json
similarity index 100%
rename from Example_RDF_Streams/BGN_Location_TempC_Minute_Merged.json
rename to Example_RDF_Streams/json-ld/BGN_Location_TempC_Minute_Merged.json
diff --git a/Example_RDF_Streams/BGN_Location_TempC_Minute_Unioned.json b/Example_RDF_Streams/json-ld/BGN_Location_TempC_Minute_Unioned.json
similarity index 100%
rename from Example_RDF_Streams/BGN_Location_TempC_Minute_Unioned.json
rename to Example_RDF_Streams/json-ld/BGN_Location_TempC_Minute_Unioned.json
diff --git a/Example_RDF_Streams/Location_Schedule_Harris.json b/Example_RDF_Streams/json-ld/Location_Schedule_Harris.json
similarity index 100%
rename from Example_RDF_Streams/Location_Schedule_Harris.json
rename to Example_RDF_Streams/json-ld/Location_Schedule_Harris.json
diff --git a/Example_RDF_Streams/Location_Schedule_Harris_1023.json b/Example_RDF_Streams/json-ld/Location_Schedule_Harris_1023.json
similarity index 100%
rename from Example_RDF_Streams/Location_Schedule_Harris_1023.json
rename to Example_RDF_Streams/json-ld/Location_Schedule_Harris_1023.json
diff --git a/Example_RDF_Streams/Location_Schedule_Harris_1024.json b/Example_RDF_Streams/json-ld/Location_Schedule_Harris_1024.json
similarity index 100%
rename from Example_RDF_Streams/Location_Schedule_Harris_1024.json
rename to Example_RDF_Streams/json-ld/Location_Schedule_Harris_1024.json
diff --git a/Example_RDF_Streams/Location_Schedule_Harris_w_rank.json b/Example_RDF_Streams/json-ld/Location_Schedule_Harris_w_rank.json
similarity index 100%
rename from Example_RDF_Streams/Location_Schedule_Harris_w_rank.json
rename to Example_RDF_Streams/json-ld/Location_Schedule_Harris_w_rank.json
diff --git a/Example_RDF_Streams/Location_Subject.json b/Example_RDF_Streams/json-ld/Location_Subject.json
similarity index 100%
rename from Example_RDF_Streams/Location_Subject.json
rename to Example_RDF_Streams/json-ld/Location_Subject.json
diff --git a/Example_RDF_Streams/RGN_Location_TempC_Minute_Berlin.json b/Example_RDF_Streams/json-ld/RGN_Location_TempC_Minute_Berlin.json
similarity index 100%
rename from Example_RDF_Streams/RGN_Location_TempC_Minute_Berlin.json
rename to Example_RDF_Streams/json-ld/RGN_Location_TempC_Minute_Berlin.json
diff --git a/Example_RDF_Streams/RGN_Location_TempC_Minute_Madrid.json b/Example_RDF_Streams/json-ld/RGN_Location_TempC_Minute_Madrid.json
similarity index 100%
rename from Example_RDF_Streams/RGN_Location_TempC_Minute_Madrid.json
rename to Example_RDF_Streams/json-ld/RGN_Location_TempC_Minute_Madrid.json
diff --git a/Example_RDF_Streams/RGN_Location_TempC_Minute_Merged.json b/Example_RDF_Streams/json-ld/RGN_Location_TempC_Minute_Merged.json
similarity index 100%
rename from Example_RDF_Streams/RGN_Location_TempC_Minute_Merged.json
rename to Example_RDF_Streams/json-ld/RGN_Location_TempC_Minute_Merged.json
diff --git a/Example_RDF_Streams/RGN_Location_TempC_Minute_Merged_b.json b/Example_RDF_Streams/json-ld/RGN_Location_TempC_Minute_Merged_b.json
similarity index 100%
rename from Example_RDF_Streams/RGN_Location_TempC_Minute_Merged_b.json
rename to Example_RDF_Streams/json-ld/RGN_Location_TempC_Minute_Merged_b.json
diff --git a/Example_RDF_Streams/RGN_Location_TempC_Minute_Merged_w_rank.json b/Example_RDF_Streams/json-ld/RGN_Location_TempC_Minute_Merged_w_rank.json
similarity index 100%
rename from Example_RDF_Streams/RGN_Location_TempC_Minute_Merged_w_rank.json
rename to Example_RDF_Streams/json-ld/RGN_Location_TempC_Minute_Merged_w_rank.json
diff --git a/Example_RDF_Streams/RGN_Location_TempC_Minute_Paris.json b/Example_RDF_Streams/json-ld/RGN_Location_TempC_Minute_Paris.json
similarity index 100%
rename from Example_RDF_Streams/RGN_Location_TempC_Minute_Paris.json
rename to Example_RDF_Streams/json-ld/RGN_Location_TempC_Minute_Paris.json
diff --git a/Example_RDF_Streams/trig/BGN_Location_TempC_Minute_Berlin.trig b/Example_RDF_Streams/trig/BGN_Location_TempC_Minute_Berlin.trig
new file mode 100644
index 0000000..97f69cf
--- /dev/null
+++ b/Example_RDF_Streams/trig/BGN_Location_TempC_Minute_Berlin.trig
@@ -0,0 +1,52 @@
+{
+ @prefix prov: .
+ @prefix dbp: .
+ @prefix loc: .
+ @prefix xsd: .
+
+ _:b0 prov:generatedAtTime "2015-01-01T01:00:00Z"^^xsd:dateTimeStamp .
+ _:b0 {
+ dbp:Berlin loc:hasPointTempC "12.5"^^xsd:decimal .
+ }
+
+ _:b1 prov:generatedAtTime "2015-01-01T01:01:00Z"^^xsd:dateTimeStamp .
+ _:b1 {
+ dbp:Berlin loc:hasPointTempC "12.5"^^xsd:decimal .
+ }
+
+ _:b2 prov:generatedAtTime "2015-01-01T01:02:00Z"^^xsd:dateTimeStamp .
+ _:b2 {
+ dbp:Berlin loc:hasPointTempC "12.0"^^xsd:decimal .
+ }
+
+ _:b3 prov:generatedAtTime "2015-01-01T01:03:00Z"^^xsd:dateTimeStamp .
+ _:b3 {
+ dbp:Berlin loc:hasPointTempC "11.5"^^xsd:decimal .
+ }
+
+ _:b4 prov:generatedAtTime "2015-01-01T01:04:00Z"^^xsd:dateTimeStamp .
+ _:b4 {
+ dbp:Berlin loc:hasPointTempC "11.0"^^xsd:decimal .
+ }
+
+ _:b5 prov:generatedAtTime "2015-01-01T01:05:00Z"^^xsd:dateTimeStamp .
+ _:b5 {
+ dbp:Berlin loc:hasPointTempC "10.5"^^xsd:decimal .
+ }
+
+ _:b6 prov:generatedAtTime "2015-01-01T01:06:00Z"^^xsd:dateTimeStamp .
+ _:b6 {
+ dbp:Berlin loc:hasPointTempC "10.0"^^xsd:decimal .
+ }
+
+ _:b7 prov:generatedAtTime "2015-01-01T01:08:00Z"^^xsd:dateTimeStamp .
+ _:b7 {
+ dbp:Berlin loc:hasPointTempC "9.0"^^xsd:decimal .
+ }
+
+ _:b8 prov:generatedAtTime "2015-01-01T01:10:00Z"^^xsd:dateTimeStamp .
+ _:b8 {
+ dbp:Berlin loc:hasPointTempC "8.5"^^xsd:decimal .
+ }
+}
+
diff --git a/Example_RDF_Streams/trig/HRA_empty.trig b/Example_RDF_Streams/trig/HRA_empty.trig
new file mode 100644
index 0000000..1cafde1
--- /dev/null
+++ b/Example_RDF_Streams/trig/HRA_empty.trig
@@ -0,0 +1,45 @@
+@prefix fhir: .
+@prefix lr: .
+@prefix obs: .
+@prefix prov: .
+@prefix sct: .
+
+{ _:b1
+ obs:effectiveDateTime "2015-01-01T12:00:00Z"^^ ;
+ a fhir:Observation ;
+ obs:code sct:36407505 ;
+ obs:device lr:sensor1234 ;
+ obs:subject lr:patientA ;
+ obs:valueQuantity _:b2 ;
+ lr:stream lr:streamHRA_empty .
+
+
+ _:b2 lr:unit "bpm"^^ ;
+ lr:value "50"^^.
+}
+
+{ _:b4
+ obs:effectiveDateTime "2015-01-01T12:01:00Z"^^ ;
+ a fhir:Observation ;
+ obs:code sct:36407505 ;
+ obs:device lr:sensor1234 ;
+ obs:subject lr:patientA ;
+ obs:valueQuantity _:b5 ;
+ lr:stream lr:streamHRA_empty .
+
+ _:b5 lr:unit "bpm"^^ ;
+ lr:value "53"^^ .
+}
+
+{ _:b7
+ obs:effectiveDateTime "2015-01-01T12:02:00Z"^^ ;
+ a fhir:Observation ;
+ obs:code sct:36407505 ;
+ obs:device lr:sensor1234 ;
+ obs:subject lr:patientA ;
+ obs:valueQuantity _:b8 ;
+ lr:stream lr:streamHRA_empty .
+
+ _:b8 lr:unit "bpm"^^ ;
+ lr:value "48"^^ .
+}
\ No newline at end of file
diff --git a/Example_RDF_Streams/trig/HRA_full.trig b/Example_RDF_Streams/trig/HRA_full.trig
new file mode 100644
index 0000000..be4dd16
--- /dev/null
+++ b/Example_RDF_Streams/trig/HRA_full.trig
@@ -0,0 +1,50 @@
+@prefix fhir: .
+@prefix lr: .
+@prefix obs: .
+@prefix prov: .
+@prefix sct: .
+
+_:b0
+ prov:generatedAtTime "2015-01-01T12:00:33Z"^^ ;
+ lr:stream lr:streamHRA_full .
+_:b0 {
+I _:b1 a fhir:Observation ;
+ obs:code sct:36407505 ;
+ obs:device lr:sensor1234 ;
+ obs:effectiveDateTime "2015-01-01T12:00:00Z"^^ ;
+ obs:subject lr:patientA ;
+ obs:valueQuantity _:b2 .
+
+ _:b2 lr:unit "bpm"^^ ;
+ lr:value "50"^^ .
+}
+
+_:b3
+ prov:generatedAtTime "2015-01-01T12:01:45Z"^^ ;
+ lr:stream lr:streamHRA_full .
+_:b3 {
+ _:b4 a fhir:Observation ;
+ obs:code sct:36407505 ;
+ obs:device lr:sensor1234 ;
+ obs:effectiveDateTime "2015-01-01T12:01:00Z"^^ ;
+ obs:subject lr:patientA ;
+ obs:valueQuantity _:b5 .
+
+ _:b5 lr:unit "bpm"^^ ;
+ lr:value "53"^^ .
+}
+
+_:b6
+ prov:generatedAtTime "2015-01-01T12:02:54Z"^^ ;
+ lr:stream lr:streamHRA_full .
+_:b6 {
+ _:b7 a fhir:Observation ;
+ obs:code sct:36407505 ;
+ obs:device lr:sensor1234 ;
+ obs:effectiveDateTime "2015-01-01T12:02:00Z"^^ ;
+ obs:subject lr:patientA ;
+ obs:valueQuantity _:b8 .
+
+ _:b8 lr:unit "bpm"^^ ;
+ lr:value "48"^^ .
+}
\ No newline at end of file