├── README.md
├── Example_RDF_Streams
├── RGN_Location_TempC_Minute_Berlin.json
├── RGN_Location_TempC_Minute_Madrid.json
├── RGN_Location_TempC_Minute_Paris.json
├── Location_Subject.json
├── Location_Schedule_Harris_1024.json
├── README.md
├── RGN_Location_TempC_Minute_Merged.json
├── RGN_Location_TempC_Minute_Merged_b.json
├── RGN_Location_TempC_Minute_Merged_w_rank.json
├── Location_Schedule_Harris_1023.json
├── Location_Schedule_Harris.json
├── Location_Schedule_Harris_w_rank.json
├── BGN_Location_TempC_Minute_Berlin.json
├── BGN_Location_TempC_Minute_Madrid.json
├── BGN_Location_TempC_Minute_Paris.json
├── json-ld
│ └── BGN_Location_TempC_Minute_Paris.json
├── BGN_Location_TempC_Minute_Unioned.json
└── BGN_Location_TempC_Minute_Merged.json
├── DEBS Challenge 2015 data.md
├── srbench
└── queries.md
├── Example_of_RSP-QL_query.md
├── TimeVocab.owl
├── LICENSE
├── Semantics.md
├── RSP-QL Sample Queries.md
├── Serialization.md
└── Abstract Syntax and Semantics Document
└── index.html
/README.md:
--------------------------------------------------------------------------------
1 | RSP-QL
2 | ======
3 |
4 | Home of RSP-QL syntax and semantics discussion of the W3C Community Group on RDF Stream Processing [1].
5 |
6 | [1] https://www.w3.org/community/rsp/
7 |
--------------------------------------------------------------------------------
/Example_RDF_Streams/RGN_Location_TempC_Minute_Berlin.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "observedAt": {
5 | "@id": "http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#observationSamplingTime",
6 | "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
7 | },
8 | "hasTemp": {
9 | "@id": "http://example.org/property-vocabulary#hasPointTempC",
10 | "@type": "http://www.w3.org/2001/XMLSchema#decimal"
11 | },
12 | "source": {"@id": "http://example.org/data-sources/"}
13 | },
14 | "@graph": [
15 | {
16 | "@id": "source:Berlin_1",
17 | "observedAt": "2015-01-01T01:01:00"
18 | },
19 | {
20 | "@id": "source:Berlin_2",
21 | "observedAt": "2015-01-01T01:02:00"
22 | },
23 | {
24 | "@id": "source:Berlin_3",
25 | "observedAt": "2015-01-01T01:03:00"
26 | }
27 | ]
28 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/RGN_Location_TempC_Minute_Madrid.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "observedAt": {
5 | "@id": "http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#observationSamplingTime",
6 | "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
7 | },
8 | "hasTemp": {
9 | "@id": "http://example.org/property-vocabulary#hasPointTempC",
10 | "@type": "http://www.w3.org/2001/XMLSchema#decimal"
11 | },
12 | "source": {"@id": "http://example.org/data-sources/"}
13 | },
14 | "@graph": [
15 | {
16 | "@id": "source:Madrid_1",
17 | "observedAt": "2015-01-01T01:01:00"
18 | },
19 | {
20 | "@id": "source:Madrid_2",
21 | "observedAt": "2015-01-01T01:02:00"
22 | },
23 | {
24 | "@id": "source:Madrid_3",
25 | "observedAt": "2015-01-01T01:03:00"
26 | }
27 | ]
28 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/RGN_Location_TempC_Minute_Paris.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "observedAt": {
5 | "@id": "http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#observationSamplingTime",
6 | "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
7 | },
8 | "hasTemp": {
9 | "@id": "http://example.org/property-vocabulary#hasPointTempC",
10 | "@type": "http://www.w3.org/2001/XMLSchema#decimal"
11 | },
12 | "source": {"@id": "http://example.org/data-sources/"}
13 | },
14 | "@graph": [
15 | {
16 | "@id": "source:Paris_1",
17 | "observedAt": "2015-01-01T01:01:00"
18 | },
19 | {
20 | "@id": "source:Paris_2",
21 | "observedAt": "2015-01-01T01:02:00"
22 | },
23 | {
24 | "@id": "source:Paris_3",
25 | "observedAt": "2015-01-01T01:03:00"
26 | }
27 | ]
28 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/Location_Subject.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "observedAt": {
5 | "@id": "http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#observationSamplingTime",
6 | "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
7 | },
8 | "hasLocation": {
9 | "@id": "http://example.org/property-vocabulary#hasLocation",
10 | }
11 | },
12 | "@graph": [
13 | {
14 | "@id": "_:1",
15 | "observedAt": "2015-01-01T01:00:00",
16 | "@graph": [
17 | {
18 | "@id": "_:Subject_A",
19 | "hasLocation": "X"
20 | }
21 | ]
22 | },
23 | {
24 | "@id": "_:2",
25 | "observedAt": "2015-01-01T01:01:00",
26 | "@graph": [
27 | {
28 | "@id": "_:Subject_A",
29 | "hasLocation": "X"
30 | },
31 | {
32 | "@id": "_:Subject_B",
33 | "hasLocation": "Y"
34 | }
35 | ]
36 | },
37 | {
38 | "@id": "_:3",
39 | "observedAt": "2015-01-01T01:02:00",
40 | "@graph": [
41 | {
42 | "@id": "_:Subject_B",
43 | "hasLocation": "X"
44 | }
45 | ]
46 | }
47 | ]
48 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/Location_Schedule_Harris_1024.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "time": "http://www.w3.org/2006/time#",
5 | "class": "http://www.example.org/class#",
6 | "room": "http://www.example.org/room#",
7 | "scheduledDuring": {
8 | "@id": "http://www.example.org/property-vocabulary#scheduledDuring",
9 | "@type": "time:Interval"
10 | },
11 | "hasLocation": {
12 | "@id": "http://www.example.org/property-vocabulary#hasLocation",
13 | }
14 | },
15 | "@graph": [
16 | {
17 | "@id": "_:1",
18 | "scheduledDuring": [
19 | {"time:hasBeginning": "2015-02-05T09:00:00",
20 | "time:durationDescriptionDataType": "P2H"
21 | }
22 | ],
23 | "@graph": [
24 | {
25 | "@id": "class:Mathematics_402",
26 | "hasLocation": "room:Harris_1024"
27 | }
28 | ]
29 | },
30 | {
31 | "@id": "_:2",
32 | "scheduledDuring": [
33 | {"time:hasBeginning": "2015-02-05T11:00:00",
34 | "time:durationDescriptionDataType": "P4H"
35 | }
36 | ],
37 | "@graph": [
38 | {
39 | "@id": "class:FineArt_208",
40 | "hasLocation": "room:Harris_1024"
41 | }
42 | ]
43 | }
44 | ]
45 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/README.md:
--------------------------------------------------------------------------------
1 | * Examples starting with "BGN" are RDF Stream examples that have bnode graph names.
2 | * Examples starting with "RGN" are RDF Stream examples that have IRI graph names.
3 | * Examples entitled "..._Location_TempC_Minute_(some city name).json" are RDF stream examples with
4 | data about temperature observations at a single location, given by the city name.
5 | * Examples with "Merged" in the name are the result of the merger of other RDF streams, where the
6 | merging operation requires renaming of blank nodes when necessary to keep them distinct.
7 | 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",
8 | and "RGN_Location_TempC_Minute_Paris.json"
9 | * Examples with "Union" in the name are the result of the union of other RDF streams, where the streams are allowed
10 | to share blank nodes (i.e. they are on the same "surface").
11 | * Examples with suffix "_b", "_c", ... are alternate serializations of the same RDF stream as the example without the suffix.
12 | * 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).
13 |
--------------------------------------------------------------------------------
/Example_RDF_Streams/RGN_Location_TempC_Minute_Merged.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "observedAt": {
5 | "@id": "http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#observationSamplingTime",
6 | "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
7 | },
8 | "hasTemp": {
9 | "@id": "http://example.org/property-vocabulary#hasPointTempC",
10 | "@type": "http://www.w3.org/2001/XMLSchema#decimal"
11 | },
12 | "source": {"@id": "http://example.org/data-sources/"}
13 | },
14 | "@graph": [
15 | {
16 | "@id": "source:Berlin_1",
17 | "observedAt": "2015-01-01T01:01:00"
18 | },
19 | {
20 | "@id": "source:Madrid_1",
21 | "observedAt": "2015-01-01T01:01:00"
22 | },
23 | {
24 | "@id": "source:Paris_1",
25 | "observedAt": "2015-01-01T01:01:00"
26 | },
27 | {
28 | "@id": "source:Berlin_2",
29 | "observedAt": "2015-01-01T01:02:00"
30 | },
31 | {
32 | "@id": "source:Madrid_2",
33 | "observedAt": "2015-01-01T01:02:00"
34 | },
35 | {
36 | "@id": "source:Paris_2",
37 | "observedAt": "2015-01-01T01:02:00"
38 | },
39 | {
40 | "@id": "source:Berlin_3",
41 | "observedAt": "2015-01-01T01:03:00"
42 | },
43 | {
44 | "@id": "source:Madrid_3",
45 | "observedAt": "2015-01-01T01:03:00"
46 | },
47 | {
48 | "@id": "source:Paris_3",
49 | "observedAt": "2015-01-01T01:03:00"
50 | }
51 | ]
52 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/RGN_Location_TempC_Minute_Merged_b.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "observedAt": {
5 | "@id": "http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#observationSamplingTime",
6 | "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
7 | },
8 | "hasTemp": {
9 | "@id": "http://example.org/property-vocabulary#hasPointTempC",
10 | "@type": "http://www.w3.org/2001/XMLSchema#decimal"
11 | },
12 | "source": {"@id": "http://example.org/data-sources/"}
13 | },
14 | "@graph": [
15 | {
16 | "@id": "source:Madrid_1",
17 | "observedAt": "2015-01-01T01:01:00"
18 | },
19 | {
20 | "@id": "source:Berlin_1",
21 | "observedAt": "2015-01-01T01:01:00"
22 | },
23 | {
24 | "@id": "source:Paris_1",
25 | "observedAt": "2015-01-01T01:01:00"
26 | },
27 | {
28 | "@id": "source:Paris_2",
29 | "observedAt": "2015-01-01T01:02:00"
30 | },
31 | {
32 | "@id": "source:Berlin_2",
33 | "observedAt": "2015-01-01T01:02:00"
34 | },
35 | {
36 | "@id": "source:Madrid_2",
37 | "observedAt": "2015-01-01T01:02:00"
38 | },
39 | {
40 | "@id": "source:Berlin_3",
41 | "observedAt": "2015-01-01T01:03:00"
42 | },
43 | {
44 | "@id": "source:Madrid_3",
45 | "observedAt": "2015-01-01T01:03:00"
46 | },
47 | {
48 | "@id": "source:Paris_3",
49 | "observedAt": "2015-01-01T01:03:00"
50 | }
51 | ]
52 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/RGN_Location_TempC_Minute_Merged_w_rank.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "observedAt": {
5 | "@id": "http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#observationSamplingTime",
6 | "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
7 | },
8 | "hasTemp": {
9 | "@id": "http://example.org/property-vocabulary#hasPointTempC",
10 | "@type": "http://www.w3.org/2001/XMLSchema#decimal"
11 | },
12 | "source": {"@id": "http://example.org/data-sources/"}
13 | },
14 | "@graph": [
15 | [3, {
16 | "@id": "source:Berlin_1",
17 | "observedAt": "2015-01-01T01:01:00"
18 | }],
19 | [3, {
20 | "@id": "source:Madrid_1",
21 | "observedAt": "2015-01-01T01:01:00"
22 | }],
23 | [3, {
24 | "@id": "source:Paris_1",
25 | "observedAt": "2015-01-01T01:01:00"
26 | }],
27 | [6, {
28 | "@id": "source:Berlin_2",
29 | "observedAt": "2015-01-01T01:02:00"
30 | }],
31 | [6, {
32 | "@id": "source:Madrid_2",
33 | "observedAt": "2015-01-01T01:02:00"
34 | }],
35 | [6, {
36 | "@id": "source:Paris_2",
37 | "observedAt": "2015-01-01T01:02:00"
38 | }],
39 | [9, {
40 | "@id": "source:Berlin_3",
41 | "observedAt": "2015-01-01T01:03:00"
42 | }],
43 | [9, {
44 | "@id": "source:Madrid_3",
45 | "observedAt": "2015-01-01T01:03:00"
46 | }],
47 | [9, {
48 | "@id": "source:Paris_3",
49 | "observedAt": "2015-01-01T01:03:00"
50 | }]
51 | ]
52 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/Location_Schedule_Harris_1023.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "time": "http://www.w3.org/2006/time#",
5 | "class": "http://www.example.org/class#",
6 | "room": "http://www.example.org/room#",
7 | "scheduledDuring": {
8 | "@id": "http://www.example.org/property-vocabulary#scheduledDuring",
9 | "@type": "time:Interval"
10 | },
11 | "hasLocation": {
12 | "@id": "http://www.example.org/property-vocabulary#hasLocation",
13 | }
14 | },
15 | "@graph": [
16 | {
17 | "@id": "_:1",
18 | "scheduledDuring": [
19 | {"time:hasBeginning": "2015-02-05T10:00:00",
20 | "time:durationDescriptionDataType": "P1H"
21 | }
22 | ],
23 | "@graph": [
24 | {
25 | "@id": "class:Physics_101",
26 | "hasLocation": "room:Harris_1023"
27 | }
28 | ]
29 | },
30 | {
31 | "@id": "_:2",
32 | "scheduledDuring": [
33 | {"time:hasBeginning": "2015-02-05T11:00:00",
34 | "time:durationDescriptionDataType": "P2H"
35 | }
36 | ],
37 | "@graph": [
38 | {
39 | "@id": "class:English_305",
40 | "hasLocation": "room:Harris_1023"
41 | }
42 | ]
43 | },
44 | {
45 | "@id": "_:3",
46 | "scheduledDuring": [
47 | {"time:hasBeginning": "2015-02-05T13:00:00",
48 | "time:durationDescriptionDataType": "P2H"
49 | }
50 | ],
51 | "@graph": [
52 | {
53 | "@id": "class:ComputerScience_503",
54 | "hasLocation": "room:Harris_1023"
55 | }
56 | ]
57 | }
58 | ]
59 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/Location_Schedule_Harris.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "time": "http://www.w3.org/2006/time#",
5 | "class": "http://www.example.org/class#",
6 | "room": "http://www.example.org/room#",
7 | "scheduledDuring": {
8 | "@id": "http://www.example.org/property-vocabulary#scheduledDuring",
9 | "@type": "time:Interval"
10 | },
11 | "hasLocation": {"@id": "http://www.example.org/property-vocabulary#hasLocation"}
12 | },
13 | "@graph": [
14 | {
15 | "@id": "_:1",
16 | "scheduledDuring": [{
17 | "time:hasBeginning": "2015-02-05T09:00:00",
18 | "time:durationDescriptionDataType": "P2H"
19 | }],
20 | "@graph": [{
21 | "@id": "class:Mathematics_402",
22 | "hasLocation": "room:Harris_1024"
23 | }]
24 | },
25 | {
26 | "@id": "_:2",
27 | "scheduledDuring": [{
28 | "time:hasBeginning": "2015-02-05T10:00:00",
29 | "time:durationDescriptionDataType": "P1H"
30 | }],
31 | "@graph": [{
32 | "@id": "class:Physics_101",
33 | "hasLocation": "room:Harris_1023"
34 | }]
35 | },
36 | {
37 | "@id": "_:3",
38 | "scheduledDuring": [{
39 | "time:hasBeginning": "2015-02-05T11:00:00",
40 | "time:durationDescriptionDataType": "P4H"
41 | }],
42 | "@graph": [{
43 | "@id": "class:FineArt_208",
44 | "hasLocation": "room:Harris_1024"
45 | }]
46 | },
47 | {
48 | "@id": "_:4",
49 | "scheduledDuring": [{
50 | "time:hasBeginning": "2015-02-05T11:00:00",
51 | "time:durationDescriptionDataType": "P2H"
52 | }],
53 | "@graph": [{
54 | "@id": "class:English_305",
55 | "hasLocation": "room:Harris_1023"
56 | }]
57 | },
58 | {
59 | "@id": "_:5",
60 | "scheduledDuring": [{
61 | "time:hasBeginning": "2015-02-05T13:00:00",
62 | "time:durationDescriptionDataType": "P2H"
63 | }],
64 | "@graph": [{
65 | "@id": "class:ComputerScience_503",
66 | "hasLocation": "room:Harris_1023"
67 | }]
68 | }
69 | ]
70 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/Location_Schedule_Harris_w_rank.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "time": "http://www.w3.org/2006/time#",
5 | "class": "http://www.example.org/class#",
6 | "room": "http://www.example.org/room#",
7 | "scheduledDuring": {
8 | "@id": "http://www.example.org/property-vocabulary#scheduledDuring",
9 | "@type": "time:Interval"
10 | },
11 | "hasLocation": {"@id": "http://www.example.org/property-vocabulary#hasLocation"}
12 | },
13 | "@graph": [
14 | [1,{
15 | "@id": "_:1",
16 | "scheduledDuring": [{
17 | "time:hasBeginning": "2015-02-05T09:00:00",
18 | "time:durationDescriptionDataType": "P2H"
19 | }],
20 | "@graph": [{
21 | "@id": "class:Mathematics_402",
22 | "hasLocation": "room:Harris_1024"
23 | }]
24 | }],
25 | [1,{
26 | "@id": "_:2",
27 | "scheduledDuring": [{
28 | "time:hasBeginning": "2015-02-05T10:00:00",
29 | "time:durationDescriptionDataType": "P1H"
30 | }],
31 | "@graph": [{
32 | "@id": "class:Physics_101",
33 | "hasLocation": "room:Harris_1023"
34 | }]
35 | }],
36 | [3,{
37 | "@id": "_:3",
38 | "scheduledDuring": [{
39 | "time:hasBeginning": "2015-02-05T11:00:00",
40 | "time:durationDescriptionDataType": "P4H"
41 | }],
42 | "@graph": [{
43 | "@id": "class:FineArt_208",
44 | "hasLocation": "room:Harris_1024"
45 | }]
46 | }],
47 | [3,{
48 | "@id": "_:4",
49 | "scheduledDuring": [{
50 | "time:hasBeginning": "2015-02-05T11:00:00",
51 | "time:durationDescriptionDataType": "P2H"
52 | }],
53 | "@graph": [{
54 | "@id": "class:English_305",
55 | "hasLocation": "room:Harris_1023"
56 | }]
57 | }],
58 | [4,{
59 | "@id": "_:5",
60 | "scheduledDuring": [{
61 | "time:hasBeginning": "2015-02-05T13:00:00",
62 | "time:durationDescriptionDataType": "P2H"
63 | }],
64 | "@graph": [{
65 | "@id": "class:ComputerScience_503",
66 | "hasLocation": "room:Harris_1023"
67 | }]
68 | }]
69 | ]
70 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/BGN_Location_TempC_Minute_Berlin.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "observedAt": {
5 | "@id": "http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#observationSamplingTime",
6 | "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
7 | },
8 | "hasTemp": {
9 | "@id": "http://example.org/property-vocabulary#hasPointTempC",
10 | "@type": "http://www.w3.org/2001/XMLSchema#decimal"
11 | }
12 | },
13 | "@graph": [
14 | {
15 | "@id": "_:1",
16 | "observedAt": "2015-01-01T01:00:00",
17 | "@graph": [
18 | {
19 | "@id": "Berlin",
20 | "hasTemp": "12.5"
21 | }
22 | ]
23 | },
24 | {
25 | "@id": "_:2",
26 | "observedAt": "2015-01-01T01:01:00",
27 | "@graph": [
28 | {
29 | "@id": "Berlin",
30 | "hasTemp": "12.5"
31 | }
32 | ]
33 | },
34 | {
35 | "@id": "_:3",
36 | "observedAt": "2015-01-01T01:02:00",
37 | "@graph": [
38 | {
39 | "@id": "Berlin",
40 | "hasTemp": "12.0"
41 | }
42 | ]
43 | },
44 | {
45 | "@id": "_:4",
46 | "observedAt": "2015-01-01T01:03:00",
47 | "@graph": [
48 | {
49 | "@id": "Berlin",
50 | "hasTemp": "11.5"
51 | }
52 | ]
53 | },
54 | {
55 | "@id": "_:5",
56 | "observedAt": "2015-01-01T01:04:00",
57 | "@graph": [
58 | {
59 | "@id": "Berlin",
60 | "hasTemp": "11.0"
61 | }
62 | ]
63 | },
64 | {
65 | "@id": "_:6",
66 | "observedAt": "2015-01-01T01:05:00",
67 | "@graph": [
68 | {
69 | "@id": "Berlin",
70 | "hasTemp": "10.5"
71 | }
72 | ]
73 | },
74 | {
75 | "@id": "_:7",
76 | "observedAt": "2015-01-01T01:06:00",
77 | "@graph": [
78 | {
79 | "@id": "Berlin",
80 | "hasTemp": "10.0"
81 | }
82 | ]
83 | },
84 | {
85 | "@id": "_:9",
86 | "observedAt": "2015-01-01T01:08:00",
87 | "@graph": [
88 | {
89 | "@id": "Berlin",
90 | "hasTemp": "9.0"
91 | }
92 | ]
93 | },
94 | {
95 | "@id": "_:10",
96 | "observedAt": "2015-01-01T01:10:00",
97 | "@graph": [
98 | {
99 | "@id": "Berlin",
100 | "hasTemp": "8.5"
101 | }
102 | ]
103 | }
104 | ]
105 | }
--------------------------------------------------------------------------------
/DEBS Challenge 2015 data.md:
--------------------------------------------------------------------------------
1 | DEBS 2015 Grand Challenge example data: http://www.debs2015.org/call-grand-challenge.html
2 | ======
3 |
4 | Data source : http://chriswhong.com/open-data/foil_nyc_taxi/
5 |
6 |
7 | ##Data
8 |
9 | Provided data consists of reports of taxi trips including starting point, drop-off point, corresponding timestamps, and information related to the payment. Data are reported at the end of the trip, i.e., upon arrive in the order of the drop-off timestamps.
10 | The specific attributes are listed below:
11 |
12 | * medallion an md5sum of the identifier of the taxi - vehicle bound
13 | * hack_license an md5sum of the identifier for the taxi license
14 | * pickup_datetime time when the passenger(s) were picked up
15 | * dropoff_datetime time when the passenger(s) were dropped off
16 | * trip_time_in_secs duration of the trip
17 | * trip_distance trip distance in miles
18 | * pickup_longitude longitude coordinate of the pickup location
19 | * pickup_latitude latitude coordinate of the pickup location
20 | * dropoff_longitude longitude coordinate of the drop-off location
21 | * dropoff_latitude latitude coordinate of the drop-off location
22 | * payment_type the payment method - credit card or cash
23 | * fare_amount fare amount in dollars
24 | * surcharge surcharge in dollars
25 | * mta_tax tax in dollars
26 | * tip_amount tip in dollars
27 | * tolls_amount bridge and tunnel tolls in dollars
28 | * total_amount total paid amount in dollars
29 |
30 | Following are the two lines from the data file:
31 |
32 | ```
33 | 07290D3599E7A0D62097A346EFCC1FB5,E7750A37CAB07D0DFF0AF7E3573AC141,2013-01-01 00:00:00,2013-01-01 00:02:00,120,0.44,-73.956528,40.716976,-73.962440,40.715008,CSH,3.50,0.50,0.50,0.00,0.00,4.50
34 | 22D70BF00EEB0ADC83BA8177BB861991,3FF2709163DE7036FCAA4E5A3324E4BF,2013-01-01 00:02:00,2013-01-01 00:02:00,0,0.00,0.000000,0.000000,0.000000,0.000000,CSH,27.00,0.00,0.50,0.00,0.00,27.50
35 | ```
36 |
37 |
38 |
39 | ### Query 1: Frequent Routes
40 |
41 | Find the top 10 most frequent routes during the last 30 minutes. A route is represented by a starting grid cell and an ending grid cell. All routes completed within the last 30 minutes are considered for the query.
42 |
43 | ### Query 2: Profitable Areas
44 |
45 | Identify areas that are currently most profitable for taxi drivers. The profitability of an area is determined by dividing the area profit by the number of empty taxis in that area within the last 15 minutes. The profit that originates from an area is computed by calculating the median fare + tip for trips that started in the area and ended within the last 15 minutes. The number of empty taxis in an area is the sum of taxis that had a drop-off location in that area less than 30 minutes ago and had no following pickup yet.
46 |
47 |
--------------------------------------------------------------------------------
/Example_RDF_Streams/BGN_Location_TempC_Minute_Madrid.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "observedAt": {
5 | "@id": "http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#observationSamplingTime",
6 | "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
7 | },
8 | "hasTemp": {
9 | "@id": "http://example.org/property-vocabulary#hasPointTempC",
10 | "@type": "http://www.w3.org/2001/XMLSchema#decimal"
11 | }
12 | },
13 | "@graph": [
14 | {
15 | "@id": "_:1",
16 | "observedAt": "2015-01-01T01:00:00",
17 | "@graph": [
18 | {
19 | "@id": "Madrid",
20 | "hasTemp": "8"
21 | }
22 | ]
23 | },
24 | {
25 | "@id": "_:2",
26 | "observedAt": "2015-01-01T01:01:00",
27 | "@graph": [
28 | {
29 | "@id": "Madrid",
30 | "hasTemp": "9"
31 | }
32 | ]
33 | },
34 | {
35 | "@id": "_:3",
36 | "observedAt": "2015-01-01T01:02:00",
37 | "@graph": [
38 | {
39 | "@id": "Madrid",
40 | "hasTemp": "9"
41 | }
42 | ]
43 | },
44 | {
45 | "@id": "_:4",
46 | "observedAt": "2015-01-01T01:03:00",
47 | "@graph": [
48 | {
49 | "@id": "Madrid",
50 | "hasTemp": "9"
51 | }
52 | ]
53 | },
54 | {
55 | "@id": "_:5",
56 | "observedAt": "2015-01-01T01:04:00",
57 | "@graph": [
58 | {
59 | "@id": "Madrid",
60 | "hasTemp": "9"
61 | }
62 | ]
63 | },
64 | {
65 | "@id": "_:6",
66 | "observedAt": "2015-01-01T01:05:00",
67 | "@graph": [
68 | {
69 | "@id": "Madrid",
70 | "hasTemp": "9"
71 | }
72 | ]
73 | },
74 | {
75 | "@id": "_:7",
76 | "observedAt": "2015-01-01T01:06:00",
77 | "@graph": [
78 | {
79 | "@id": "Madrid",
80 | "hasTemp": "9"
81 | }
82 | ]
83 | },
84 | {
85 | "@id": "_:8",
86 | "observedAt": "2015-01-01T01:07:00",
87 | "@graph": [
88 | {
89 | "@id": "Madrid",
90 | "hasTemp": "9"
91 | }
92 | ]
93 | },
94 | {
95 | "@id": "_:9",
96 | "observedAt": "2015-01-01T01:08:00",
97 | "@graph": [
98 | {
99 | "@id": "Madrid",
100 | "hasTemp": "9"
101 | }
102 | ]
103 | },
104 | {
105 | "@id": "_:10",
106 | "observedAt": "2015-01-01T01:10:00",
107 | "@graph": [
108 | {
109 | "@id": "Madrid",
110 | "hasTemp": "9"
111 | }
112 | ]
113 | }
114 | ]
115 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/BGN_Location_TempC_Minute_Paris.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "observedAt": {
5 | "@id": "http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#observationSamplingTime",
6 | "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
7 | },
8 | "hasTemp": {
9 | "@id": "http://example.org/property-vocabulary#hasPointTempC",
10 | "@type": "http://www.w3.org/2001/XMLSchema#decimal"
11 | }
12 | },
13 | "@graph": [
14 | {
15 | "@id": "_:1",
16 | "observedAt": "2015-01-01T01:00:00",
17 | "@graph": [
18 | {
19 | "@id": "Paris",
20 | "hasTemp": "8.2"
21 | }
22 | ]
23 | },
24 | {
25 | "@id": "_:2",
26 | "observedAt": "2015-01-01T01:01:00",
27 | "@graph": [
28 | {
29 | "@id": "Paris",
30 | "hasTemp": "8.3"
31 | }
32 | ]
33 | },
34 | {
35 | "@id": "_:3",
36 | "observedAt": "2015-01-01T01:02:00",
37 | "@graph": [
38 | {
39 | "@id": "Paris",
40 | "hasTemp": "8.4"
41 | }
42 | ]
43 | },
44 | {
45 | "@id": "_:4",
46 | "observedAt": "2015-01-01T01:03:00",
47 | "@graph": [
48 | {
49 | "@id": "Paris",
50 | "hasTemp": "8.5"
51 | }
52 | ]
53 | },
54 | {
55 | "@id": "_:5",
56 | "observedAt": "2015-01-01T01:04:00",
57 | "@graph": [
58 | {
59 | "@id": "Paris",
60 | "hasTemp": "8.6"
61 | }
62 | ]
63 | },
64 | {
65 | "@id": "_:6",
66 | "observedAt": "2015-01-01T01:05:00",
67 | "@graph": [
68 | {
69 | "@id": "Paris",
70 | "hasTemp": "8.7"
71 | }
72 | ]
73 | },
74 | {
75 | "@id": "_:7",
76 | "observedAt": "2015-01-01T01:06:00",
77 | "@graph": [
78 | {
79 | "@id": "Paris",
80 | "hasTemp": "8.8"
81 | }
82 | ]
83 | },
84 | {
85 | "@id": "_:8",
86 | "observedAt": "2015-01-01T01:07:00",
87 | "@graph": [
88 | {
89 | "@id": "Paris",
90 | "hasTemp": "8.9"
91 | }
92 | ]
93 | },
94 | {
95 | "@id": "_:9",
96 | "observedAt": "2015-01-01T01:08:00",
97 | "@graph": [
98 | {
99 | "@id": "Paris",
100 | "hasTemp": "9.0"
101 | }
102 | ]
103 | },
104 | {
105 | "@id": "_:10",
106 | "observedAt": "2015-01-01T01:10:00",
107 | "@graph": [
108 | {
109 | "@id": "Paris",
110 | "hasTemp": "9.1"
111 | }
112 | ]
113 | }
114 | ]
115 | }
--------------------------------------------------------------------------------
/Example_RDF_Streams/json-ld/BGN_Location_TempC_Minute_Paris.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": {
3 | "@vocab": "http://www.example.org/data-vocabulary#",
4 | "observedAt": {
5 | "@id": "http://www.w3.org/2005/Incubator/ssn/ssnx/ssn#observationSamplingTime",
6 | "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
7 | },
8 | "hasTemp": {
9 | "@id": "http://example.org/property-vocabulary#hasPointTempC",
10 | "@type": "http://www.w3.org/2001/XMLSchema#decimal"
11 | }
12 | },
13 | "@graph": [
14 | {
15 | "@id": "_:1",
16 | "observedAt": "2015-01-01T01:00:00",
17 | "@graph": [
18 | {
19 | "@id": "Paris",
20 | "hasTemp": "8.2"
21 | }
22 | ]
23 | },
24 | {
25 | "@id": "_:2",
26 | "observedAt": "2015-01-01T01:01:00",
27 | "@graph": [
28 | {
29 | "@id": "Paris",
30 | "hasTemp": "8.3"
31 | }
32 | ]
33 | },
34 | {
35 | "@id": "_:3",
36 | "observedAt": "2015-01-01T01:02:00",
37 | "@graph": [
38 | {
39 | "@id": "Paris",
40 | "hasTemp": "8.4"
41 | }
42 | ]
43 | },
44 | {
45 | "@id": "_:4",
46 | "observedAt": "2015-01-01T01:03:00",
47 | "@graph": [
48 | {
49 | "@id": "Paris",
50 | "hasTemp": "8.5"
51 | }
52 | ]
53 | },
54 | {
55 | "@id": "_:5",
56 | "observedAt": "2015-01-01T01:04:00",
57 | "@graph": [
58 | {
59 | "@id": "Paris",
60 | "hasTemp": "8.6"
61 | }
62 | ]
63 | },
64 | {
65 | "@id": "_:6",
66 | "observedAt": "2015-01-01T01:05:00",
67 | "@graph": [
68 | {
69 | "@id": "Paris",
70 | "hasTemp": "8.7"
71 | }
72 | ]
73 | },
74 | {
75 | "@id": "_:7",
76 | "observedAt": "2015-01-01T01:06:00",
77 | "@graph": [
78 | {
79 | "@id": "Paris",
80 | "hasTemp": "8.8"
81 | }
82 | ]
83 | },
84 | {
85 | "@id": "_:8",
86 | "observedAt": "2015-01-01T01:07:00",
87 | "@graph": [
88 | {
89 | "@id": "Paris",
90 | "hasTemp": "8.9"
91 | }
92 | ]
93 | },
94 | {
95 | "@id": "_:9",
96 | "observedAt": "2015-01-01T01:08:00",
97 | "@graph": [
98 | {
99 | "@id": "Paris",
100 | "hasTemp": "9.0"
101 | }
102 | ]
103 | },
104 | {
105 | "@id": "_:10",
106 | "observedAt": "2015-01-01T01:10:00",
107 | "@graph": [
108 | {
109 | "@id": "Paris",
110 | "hasTemp": "9.1"
111 | }
112 | ]
113 | }
114 | ]
115 | }
--------------------------------------------------------------------------------
/srbench/queries.md:
--------------------------------------------------------------------------------
1 | Srbench queries
2 | ===============
3 |
4 | Taken from [http://www.w3.org/wiki/SRBench]
5 |
6 | ##Q1. Get the rainfall observed once in an hour.
7 |
8 | PREFIX om-owl: The specification is intended for discussion within the RDF Stream Processing Community
157 | Group. Its content does not yet represent the consensus of the Community Group. This specification is incomplete. The metamodel for the abstract syntax of RDF streams is defined in the namespace Let Tall denote the class of all temporal entities. This specification is
205 | neutral regarding the formal specification of temporal entities. We provide an identifier, The following material needs attention from an individual who has
210 | reviewed the literature regarding temporal ontologies, including but not limited to
211 | http://www.omg.org/spec/DTV/1.0/ http://www.ihmc.us/users/phayes/docs/timeCatalog.pdf
212 | http://protege.cim3.net/cgi-bin/wiki.pl?SWRLTemporalOntology
213 | http://dl.acm.org/citation.cfm?id=1741341
214 | http://stl.mie.utoronto.ca/publications/psl-chapter.pdf
215 | There is more detail in https://github.com/streamreasoning/RSP-QL/issues/25 An instant is an instantaneous point of time on underlying axis and is isomorphic to
217 | numbers. Henceforth a time interval is the interval between two instants. A
218 | semi-infinite time interval is an interval where one instant is set to infinite.
219 | Furthermore if both instants are set to infinite, we call the interval bi-infinite. As a
220 | consequence a temporal entity is an entity associated with an instant or a time
221 | interval[Dyreson94,Allen83]. Add a out of scope section Add Stream Profiles and Hierarchies, e.g., combined_time, timepoints,
224 | periods, approximate_point, interval_meeting, owltime_instants and owltime_interval An RSP timestamp predicate The usual mathematical requirements of a partial order MUST be satisfied by an instance of
241 | Further, an instance of In
256 | particular, if every time instant within the closure of temporal entity The above definition regarding natural order of time depends on the
262 | concept of time instant as the primitive of temporal entities that is universal amoung
263 | temporal ontologies and has a particular chronological order associated with them.
264 | However, not all temporal
265 | ontologies have time instants as their primitives, e.g., OMG.
266 | Further, branching temporal ontologies have a different set of time primitives than linear ones.
267 | So this needs to be fixed.
268 | A timestamped graph is defined as an RDF Dataset under the RDF Dataset semantics
274 | that "each named graph defines its own context" (see ) and
277 | where a particular triple in the default graph has been designated as the timestamp
278 | triple, with the following constraints: There may be multiple triples in the default graph, including multiple
289 | triples using timestamp predicates, but exactly one triple must be designated as the
290 | timestamp triple. The objects of any triples that use a timestamp predicate but are not the
291 | timestamp triple of the timestamped graph are not called timestamps. Due to the assertion of the timestamp triple, the context referred to in
293 | "each named graph defines its own context" has a temporal aspect to it. Other aspects of
294 | this context may be asserted by additional triples in the default graph of the timestamped
295 | graph. Such triples are not required to have timestamp predicates, and thus may be about
296 | non-temporal aspects of the context, e.g., the authority or the sensor device. That is, we
297 | require the context to have a temporal aspect to it, but the context is not limited to
298 | temporal aspects. Thus, it would be misleading to call it a "temporal context". The part of the definition above that points to RDF Dataset semantics
300 | really belongs in the semantics section, not in this definition, which should be purely
301 | syntax. We need additional informative text that gives the motivation for these
302 | definitions. This definition does not permit the timestamp to be omitted, which is one
304 | of the data structures that is considered to be in-scope by the requirements document. A sequence of RDF graphs (or named graphs, or RDF datasets) MAY be physically received
306 | by an RSP engine, which MAY then create an RDF stream from it by adding timestamps, e.g.
307 | indicating the time of arrival. The original sequence is not itself an RDF stream. This definition allows the timestamp to be an IRI or blanknode. Additional
309 | information about the timestamp may be provided in the default graph (e.g., through
310 | properties in the OWL Time Ontology), but this is not required by the definition of
311 | timestamped graph. A literal-timestamped graph is a timestamped graph whose timestamp
313 | Merge and union of RDF streams with non-literal-timestamped graphs may not
315 | be defined. See . The timestamp predicate The format in the examples of this document follows TriG, although does not imply any specific serialization or formatting; it simply
321 | shows the data structured according to the RDF stream model. When the default graph of a
322 | timestamped graph contains only one triple, this must be the timestamp triple, so there is
323 | no need of an additional format to designate it. In examples of timestamped graphs having
324 | more than one triple in the default graph, the first triple of the default graph to occur
325 | in the serialization is assumed to be the timestamp triple. Prefixes (e.g.
326 | A non-normative subsection should be created to hold all the information
329 | about the formatting of examples, and there the expansion of all prefixes that are used in
330 | examples can be defined. According to the semantics defined in , the
348 | assertion of the named graph pair means that the graph denoted by Given any two timestamped graphs, The relation An RDF stream
396 | If a timestamp predicate occurs in the timestamp triple of an element of an RDF stream, we say
403 | it is a timestamp predicate of the stream. Time-boundedness properties on RDF streams behave better if it is required
405 | that the set of temporal entities for each timestamp predicate is pairwise bounded. I.e.,
406 | for each pair of temporal entities in the set, there is a temporal entity in the set that is
407 | an upper bound of both, as well as a temporal entity in the set that is a lower bound of
408 | both. This property is not satisfied by branching temporal structures, but could be a
409 | requirement of some profile. The comparability between any pair of elements of an RDF stream must (or should?) be
411 | completely determined from the default graphs of those elements, or elements that precede at least one of them.
412 | Otherwise the ordering could
413 | be revealed by a subsequent element, inducing retroactively an ordering requirement on
414 | a previous pair of stream elements. On the following we may refer to RDF stream simply as stream. There can be multiple graphs with the same timestamp in the stream. It has been pointed out that this statement might be problematic, as graphs
441 | could no longer be used for punctuation purposes. Comparatively, we have not found a
442 | constraint on this in similar models e.g., CQL: there could be zero, one, or multiple
443 | elements with the same timestamp in a stream. Two RDF timestamped graphs TSG1 and TSG2 are isomorphic if and only if there is
448 | a bijection M between the nodes, triples, graphs and named graphs in TSG1 and those in
449 | TSG2 such that: wι of type ι takes as input a stream `S`, a predicate `p`, a time instant `t`, called the reference time point, and a vector of window parameters `x` for type ι and returns a substream `S'` of `S` that contains only timestamped graphs associated with `p` and timestamps valid at `t` according ι and `x`.
101 |
102 | The most common types of windows in practice are time-based and count-based. We associate them with the window functions wτ, w#, respectively. They take a fixed size ranging back in time from a reference time point `t`. These functions work as follows.
103 |
104 | #### Time-based window functions
105 |
106 | `x = (l,d)`, where `l ∈ N ∪ {∞}` and `d ∈ N`. The function wτ(S,p,t,x) returns the substream of S that contains all timestamped graphs associated with predicate `p` of the last `l` time units relative to a pivot time point `t'` derived from `t` and the step size `d` (Todo: MD: a figure to illustrate). We use `l = ∞` to take all previous timestamped graphs.
107 |
108 | Formally:
109 |
110 | wτ(S,p,t,(l,d)) = {((n,g),p,t1)∈ S ∣ t'-l < t1 ≤ t'},
111 |
112 | where t'= ⌊t/d⌋ \cdot d
113 |
114 | #### Count-based window functions
115 |
116 | `x = (l)`, where `l ∈ N`. The function w#(S,p,t,x) selects a substream S1 of `S` based on the time instant `t'` satisfying that:
117 | * for every t' < t'' ≤ t, there are fewer than `l` timestamped graphs associated with predicate `p` in `S` from `t''` to `t`,
118 | * there are at least `l` timestamped graphs associated with predicate `p` in `S` from `t'` to `t`.
119 |
120 | Elements from S1 are those ((ni,gi),p,ti) from `S` having ti ≥ t'. In case there are more than `l` timestamped graphs associated with predicate `p` in `S` from `t'` to `t`, only timestamped graphs at `t'` are removed at random.
121 |
122 | Formally:
123 |
124 | w#(S,p,t,(l)) = {((n,g),p,t'') ∈ S ∣ t' < t'' ≤ t} ∪ X(S|p[t',t'], l - #S|p[t'+1,t]),
125 |
126 | where
127 |
128 | * S|p[t1,t2] = {((n,g),p,t'') ∈ S ∣ t1 ≤ t'' ≤ t2},
129 | * #S|p[t1,t2] is the number of elements of this set,
130 | * `t'` satisfies that #S|p[t',t] ≥ l and #S|p[t'+1,t] < l
131 |
132 |
133 | ## RSP-QL Definition
134 |
135 | An *RSP-QL query* `Q` is a tuple `Q = (SE,SDS,QF)` where `SE` is an RSP-QL algebraic expression,
136 | `SDS` is an RSP-QL dataset and `QF` is the Query Form
137 |
138 | ### RSP-QL Dataset
139 | An *RSP-QL dataset* `SDS` is defined as the set of: a default graph `G_0`, n named graphs `G_i` and m named
140 | time-varying graphs obtained by the application of time-based sliding windows over `p` streams:
141 | ```
142 | SDS ={G0,
143 | (u1,G1), . . . , (un,Gn),
144 | (w1,W1(S1)), . . . , (wj ,Wj(S1)),
145 | (wj+1,Wj+1(S2)), . . . , (wk,Wk(S2)),
146 | . . .
147 | (wl,Wl(Sp)), . . . , (wm,Wm(Sp))}
148 | ```
149 |
150 | Notice that different windows can be applied to the same stream `Si` in the same SDS.
151 |
152 |
153 | #### Time-varying graphs
154 | A *time-varying graph* `G` is a function that relates time instants `t ∈ T` to RDF graphs:
155 |
156 | ```
157 | G : T → {g | g is an RDF graph}
158 | ```
159 |
160 | An *instantaneous RDF graph* `G(t)` is the RDF graph identified by the time-varying graph `G` at the given time instant `t`.
161 |
162 | ## RSP-QL Continuous Evaluation
163 |
164 | We extend the definition of SPARQL evaluation semantics to take into account the time dimension: we add a third parameter, evaluation time t, in the eval function signature.
165 |
166 | Given an RSP-QL dataset SDS, an algebraic expression SE and an evaluation time instant t, we define
167 |
168 | eval(SDS(G), SE, t)
169 |
170 | as the evaluation of SE at time t with respect to the RSP-QL dataset SDS having active timevarying graph G.
171 | This new concept requires a revision of the definitions of the existing SPARQL evaluation of algebraic operators.
172 |
173 | ## References:
174 | * EP-SPARQL: a unified language for event processing and stream reasoning.
175 | Anicic, D., Fodor, P., Rudolph, S., & Stojanovic, N. In WWW (p. 635-644). ACM. 2011.
176 | * C-SPARQL: a Continuous Query Language for RDF Data Streams.
177 | Barbieri, D. F., Braga, D., Ceri, S., Della Valle, E., & Grossniklaus, M. Int. J. Semantic Computing, 4(1), 3-25. 2010.
178 | * Enabling query technologies for the semantic sensor web.
179 | Calbimonte, J.-P., Jeung, H., Corcho, Ó., & Aberer, K. Int. J. Semantic Web Inf. Syst., 8(1), 43-63. 2012.
180 | * RSP-QL Semantics: a Unifying Query Model to Explain Heterogeneity of RDF Stream Processing Systems.
181 | D. Dell’Aglio, E. Della Valle, J.-P. Calbimonte, O. Corcho. Int. J. Semantic Web Inf. Syst, 10(4). (in press). 2015.
182 | * A Native and Adaptive Approach for Unified Processing of Linked Streams and Linked Data.
183 | Phuoc, D. L., Dao-Tran, M., Parreira, J. X., & Hauswirth, M.In ISWC (Vol. 7031, p. 370-388). Springer. 2011.
184 | * LARS: A Logic-based Framework for Analyzing Reasoning over Streams.
185 | Beck, H., Dao-Tran, M., Eiter, T., Fink, M. In AAAI. 2015.
186 | * RDF 1.1: On Semantics of RDF Datasets. Zimmerman, Antoine, ed.. 2014. http://www.w3.org/TR/2014/NOTE-rdf11-datasets-20140225.
187 |
188 | > this example could be integrated to the main text body
189 | > ### Beyond time instants: intervals & more
190 | > Usign the previously described model, intervals can be specified for a graph in the 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:
191 | > ````
192 | :g_1, :startsAt, "2015-06-18T12:00:00"^^xsd:dateTime
193 | :g_1, :endsAt, "2015-06-18T13:00:00"^^xsd:dateTime
194 | ```
195 | > Or even:
196 | ```
197 | :g_2 :validBetween
198 | [:startsAt "2015-06-18T12:00:00"^^xsd:dateTime;
199 | :endsAt "2015-06-18T13:00:00"^^xsd:dateTime]
200 | ```
201 |
202 |
--------------------------------------------------------------------------------
/RSP-QL Sample Queries.md:
--------------------------------------------------------------------------------
1 | #RSP-QL Example Queries
2 |
3 | This query set is based on the data of the DEBS challenge 2015 (see [DEBS Challenge 2015 data] (https://github.com/streamreasoning/RSP-QL/blob/master/DEBS%20Challenge%202015%20data.md ) )
4 |
5 | ## Data
6 |
7 | We have not agreed on a simple schema and structure of the streams (how many streams, and the contents of each one. For each contributing query please explain your data assumptions.
8 |
9 | ## Queries
10 |
11 | ### Query 1
12 |
13 | (added by jpc)
14 |
15 | This query simply shows the use of a sliding window in RSP-QL. It intends to get the number of taxi rides that exceeded 2 miles in the last hour.
16 |
17 | This is a simple example of the structure of a portion of the data as an RDF stream. The stream (http://debs2015.org/streams/trips) outputs a graph per ride when the user is dropped off. E.g. :
18 |
19 | ```
20 | @prefix debs: Introduction
163 |
164 | RSP Data model
168 | Namespaces and Prefixes
170 | http://www.w3.org/ns/rsp#
171 | and we use the prefix rsp for this namespace. Additional prefixes used in this document are the following:
172 |
175 |
198 |
177 |
178 | prefix namespace IRI definition
179 |
180 | rsp http://www.w3.org/ns/rsp#The RSP rnamespace
181 |
182 | rdf http://www.w3.org/1999/02/22-rdf-syntax-ns#The RDF namespace [[!RDF-SCHEMA]]
183 |
184 | rdfs http://www.w3.org/2000/01/rdf-schema#The RDFS namespace [[!RDF-SCHEMA]]
185 |
186 | xsd http://www.w3.org/2000/10/XMLSchema#XML Schema Namespace [[!XMLSCHEMA11-2]]
187 |
188 | owl http://www.w3.org/2002/07/owl#The OWL namespace [[!OWL2-OVERVIEW]]
189 |
190 | owl-time http://www.w3.org/2006/time#The OWL-TIME namespace [[OWL-TIME]]
192 |
193 | prov
191 | http://www.w3.org/ns/prov#The PROV namespace [[!PROV-DM]]
195 |
196 | dul
194 | http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#The DOLCE+DnS Ultralet namespace (http://lov.okfn.org/dataset/lov/vocabs/dul) [[DUL]]
197 | (others) (various) All other namespace prefixes are used in examples only.
In particular, IRIs starting with "http://example.com" represent
some application-dependent IRI [[!IRI]]Temporal Entities and Timestamp Predicates
202 | Class of Temporal Entities
204 | rsp:TemporalEntity, for the rdfs:Class of all
207 | temporal entities.Instants and Intervals
209 | Timestamp Predicates
234 | P is an rdf:Property with range rsp:TemporalEntity that is
235 | associated, through the rdf:Property rsp:hasTimePlenum, with a unique partially-ordered set (poset) of
236 | temporal entities TP ⊆ Tall, called the time plenum of the predicate.
237 | The time plenum is associated, through the rdf:Property rsp:hasPartialOrder,
238 | with a unique partial order ≤P that is in the class
239 | rsp:ChronologicalPartialOrder.rsp:ChronologicalPartialOrder. In particular, for all instances X, Y, Z
242 | of the time plenum, the following properties hold:
243 |
245 |
254 | X ≤P XX ≤P Y and Y ≤P X implies X =
249 | YX ≤P Y and Y ≤P Z implies X ≤P
252 | Z. rsp:ChronologicalPartialOrder MUST respect the natural order of time.X
257 | is earlier than every time instant within the closure of temporal entity Y,
258 | then X ≤P Y (where closure of a time instant t is defined as
259 | the degenerate interval [t, t], and closure of an interval is defined in
260 | the usual way) Timestamped Graphs
273 |
280 |
288 | <n, G> in the RDF Dataset (where
281 | G is an RDF graph, and n is an IRI or blank node).<n, p, t>, where n is
284 | defined in the previous item, and p is a timestamp predicate that captures
285 | the relationship between the temporal entity t, called the timestamp, and
286 | the graph G.t is an rdfs:Literal.p may be drawn from a community
317 | agreed vocabulary (Issue
318 | 10). The timestamp predicate may also be user-defined. prov:, dul:) are used for readability; their expansions are defined in
327 | Table 1.:g entails
349 | the two triples :axel :isIn :RedRoom and :darko :isIn :RedRoom,
350 | under whatever entailment regime is being considered. It does not assert those triples
351 | directly, nor does it assert that these triples are actually in that graph. Further, it
352 | does not rule out additional entailments of :g. These details are best
353 | explained in the semantics section itself, although it would probably be helpful to have
354 | some informative explanation near the beginning to avoid confusion. TSG1 and TSG2, we say that
376 | TSG2
377 | covers
378 | TSG1 (denoted TSG1 ≲ TSG2) if and only if TSG1
379 | and TSG2 have the same timestamp predicate P and the timestamps,
380 | t1 and t2 resp., satisfy t1 ≤P t2,
381 | where ≤P is the temporal partial order associated with the time plenum
382 | of the timestamp predicate P. ≲ between timestamped graphs is a preorder (a
384 | reflexive, transitive binary relation). It is not a partial order because it doesn't have
385 | the antisymmetry property (a≲ b and b≲ a implies a
386 | = b.) RDF Stream
395 | S consists of a sequence of timestamped graphs, called its elements, such that
397 | elements sharing the same
398 | timestamp predicate are ordered by the partial order associated with this timestamp predicate.
399 | I.e., if a stream S contains elements S(i) and S(j)
400 | with i < j and S(i) covers S(j), then the
401 | timestamps of S(i) and S(j) are equal. Isomorphism
447 |
450 |
459 |
The definition of timestamped graphs allows blank nodes to be used as graph 461 | names, as well as within triples.
462 |463 |470 |:_1 {...} {:_1, prov:generatedAtTime, t1} 464 |465 | 466 |:_2 {...} {:_2, prov:generatedAtTime, t1} 467 |468 | 469 |
Two RDF streams are S-isomorphic if and only if they have the same set of 471 | elements.
472 |473 |487 |474 | :g1 {...} {:g1, prov:generatedAtTime, t1} 475 | :g2 {...} {:g2, prov:generatedAtTime, t2} 476 | :g3 {...} {:g3, prov:generatedAtTime, t2} 477 | :g4 {...} {:g4, prov:generatedAtTime, t3} 478 |479 | 480 |481 | :g1 {...} {:g1, prov:generatedAtTime, t1} 482 | :g3 {...} {:g3, prov:generatedAtTime, t2} 483 | :g2 {...} {:g2, prov:generatedAtTime, t2} 484 | :g4 {...} {:g4, prov:generatedAtTime, t3} 485 |486 |
Two RDF streams S1 and S2 are B-isomorphic if and only if there is a bijection M 488 | between the nodes, triples, graphs, named graphs, and timestamped graphs that occur in S1 and those 489 | that occur in S2 such that:
An RDF stream is viewed as being on a single "RDF surface"(see [[BLOGIC]]), 503 | so that blank nodes may be shared between any graphs in the stream. For this reason, 504 | B-isomorphism is defined in terms of a single mapping M for the entire RDF stream rather 505 | than, say, separate mappings for each timestamped graph.
506 |Two RDF streams are isomorphic if there exists an RDF stream that is both 507 | B-isomorphic to one stream and S-isomorphic to the other stream.
508 |RDF streams that are S-isomorphic are isomorphic.
509 |RDF streams that are B-isomorphic are isomorphic.
510 |Isomorphic RDF streams MUST have the same semantics. The semantics of RDF streams is 511 | affected by the result of applying window functions () as 512 | well as by entailment. Therefore, isomorphic RDF streams SHALL be indistinguishable, up to 513 | isomorphism, with respect to entailment (in any entailment regime), as well as with 514 | respect to the application of window functions.
515 | 516 |A substream
519 | S' of an RDF stream S is an RDF stream that is isomorphic to a
520 | subsequence of S.
There are several specializations of the substream relation which are useful 522 | in practice. These include the filter relation, where stream elements are 523 | selected based on satisfaction of some criterion, and the window relation, where 524 | a temporally contiguous portion of the stream is selected.
525 |A window
526 | S' of an RDF stream S is a substream of S such that
527 | if S'(i) and S'(j) are two elements of S' and
528 | S'(i) ≲ S'(j) (i.e., S'(j) covers S'(i)), and
529 | further if S'(i) ≲ S(k) ≲ S'(j) for some element S(k) of
530 | S, then S(k) is an element of S'.
Informally, a window is a temporally-contiguous selection from the original 532 | stream, without gaps.
533 |In order to combine two RDF streams into one, without loss or gratuitous introduction of 538 | entailments, we define two relations, RDF stream merge and RDF stream 539 | union. These relations are inspired by the concepts of similar name for RDF graphs 540 | defined in [[RDF11-Concepts]].
541 |
542 | RDF stream union is a trinary relation on RDF streams. Let S1,
543 | S2, and S3 be RDF streams. We say S3 is an RDF
544 | stream union of S1 and S2 if and only if the set of
545 | elements of S3 is equal to the union of the sets of elements of S1
546 | with S2.
Union is the appropriate relation to consider when combining streams that are 548 | allowed to share blank nodes. Informally, they would be on the same RDF surface.
549 | 563 |
564 | RDF stream merge is a trinary relation on RDF streams. Let S1,
565 | S2, and S3 be RDF streams. We say S3 is an RDF
566 | stream merge of S1 and S2 if and only if there exist
567 | streams S4, S5, and S6, with S4
568 | isomorphic to S1, S5 isomorphic to S2,
569 | S6 isomorphic to S3, such that S4 and
570 | S5 have no blank nodes in common, and S6 is the union of
571 | S4 with S5.
Merge is the appropriate relation to consider when joining streams that are 573 | considered to not share blank nodes. Informally, they would be on different RDF surfaces.
574 | 588 |Given any three RDF streams, the determination of their satisfaction of the 589 | union or merge relation is a purely syntactic computation. That is, it is not necessary to 590 | consider entailments of the RDF streams or to be concerned with the values of literals.
591 | 615 |The continuous operation of union or merge of two semi-infinite streams may 616 | not be computable, even when the operation is defined. This is because it may not be 617 | possible to know when an element of one stream might be received that needs to occur before 618 | the latest elements of the other stream. Computability of these continuous operations may be 619 | possible when additional information is available about the streams to be combined, e.g., the 620 | set of timestamp predicates used by each stream and the maximum latency of transmission. 621 | Within some RDF stream profiles, the union and merge operations may be continuously computable 622 | due to the profile constraints. 623 |
624 |This section may be expanded with more subclasses if a need is identified.
628 |A time-bounded-above RDF stream is an RDF Stream where for every timestamp 630 | predicate of the stream, there is a temporal entity in its range that bounds 631 | from above (is greater than or equal to) all timestamps of that predicate in the stream.
632 |A time-bounded-below RDF stream is an RDF Stream where for every timestamp 633 | predicate of the stream, there is a temporal entity in its range that bounds 634 | from below (is less than or equal to) all timestamps of that predicate in the stream.
635 |A time-bounded RDF stream is an RDF Stream that is time-bounded above and 636 | time-bounded below.
637 | Consider the class of timestamp predicates whose associated poset of
638 | temporal entities is pairwise bounded, i.e., has the property that every pair of
639 | temporal entities is bounded, i.e., there exists a temporal entity in the poset that is
640 | greater or equal to both of them and another temporal entity that is less or equal to both
641 | of them. This is a fairly natural property to expect for partial orders on time plenums with "linear topology" (e.g.
642 | [[OWL-TIME]]). However it does not hold in the case of branching time plenums (see http://www.ihmc.us/users/phayes/docs/timeCatalog.pdf), because there are incomparable
645 | branches (called paths), which may be considered, e.g., as different worlds (in the sense of
646 | Kripke frames), scenarios (planning usecase), or concurrent processes (process modelling).
647 | It would be a useful property if the class of time-bounded RDF streams were closed under
648 | stream merger and union, and this property would hold, under the current definition, in the
649 | case of pairwise-bounded time plenums, because we could find bounds for the temporal entities
650 | of each timestamp predicate by taking an upper bound of the pair of upper bounds from the
651 | two streams, and similarly for the lower bounds. However, the closure property does not hold
652 | in the case of a branching temporal topology under the above definition of time-bounded. To
653 | achieve the closure property, we would have to allow a number of "upper bounds" for each
654 | timestamp predicate, rather than requiring just one. For example,
Given two
655 | sets, A and B, of entities in a partial order, we say that A bounds B from above iff there
656 | is no element of B that is greater than any element of A, and for every element of B there
657 | is some element of A that is greater than or equal to it.
A
658 | time-bounded-above RDF stream is an RDF Stream where for every timestamp
659 | predicate of the stream, there is a set of temporal entities in its range that
660 | bounds from above all timestamps of that predicate in the stream.
The class of time-bounded RDF streams using timestamp predicates with 662 | pairwise-bounded time plenums is closed under stream merger and union.
663 |A temporal-count-bounded RDF stream is an RDF stream where for each timestamp 665 | predicate of the stream, there are a finite number of temporal entities in the 666 | stream that are timestamps for that predicate.
667 |The qualifier "temporal" has been added to this term to emphasize that it is 668 | temporal entities that are being counted, not timestamped graphs.
669 |Given an RDF stream whose set of timestamp predicates with pairwise-bounded 670 | temporal entities, then if the stream is temporal-count-bounded it is also time-bounded, 671 | since the upper bound for each timestamp predicate can be taken as an upper bound of the 672 | (finite) set of its timestamps, and similarly for the lower bound. If the definition of 673 | "time-bounded" was changed as in the earlier Editor's Note, then every 674 | temporal-count-bounded RDF stream would be time-bounded.
675 |Every temporal-count-bounded RDF stream using only timestamp predicates with 676 | pairwise-bounded time plenums is time-bounded.
677 |The class of temporal-count-bounded RDF streams is closed under stream merger 678 | and union, since the sets of temporal entities for each timestamp predicate in the resulting 679 | stream are the union of the corresponding (finite) sets in the original streams, and so are 680 | finite.
681 |682 |683 |
A finite RDF stream is an RDF stream of finite length, i.e., with a finite number 685 | of elements in it.
686 |Clearly, every finite RDF stream is temporal-count-bounded.
687 |Every finite RDF stream using only pairwise-bounded time plenums is 688 | time-bounded. However, this is not the case for branching time plenums.
689 |Clearly, the class of finite RDF streams is closed under stream merger and 690 | union.
691 |692 |693 |
694 |695 |
A window function is a partial function from RDF streams to their windows that
699 | preserves isomorphism. That is, if w is a window function, with isomorphic
700 | streams S1 and S2 in its domain, then w(S1) is
701 | isomorphic to w(S2).
A general window function is a window function that is a total function on RDF 703 | streams.
704 |The term "window operator" is reserved for later use to return a sequence of 705 | windows.
706 |The most common types of window functions in practice are time-based and count-based.
707 |Because the time plenum for each timestamp predicate is partially ordered, we may define a 710 | temporal interval of a timestamp predicate to be an interval, in the usual 711 | sense for partial orders, within its time plenum.
712 |Recall that intervals need not be bounded and need not be closed, and are 713 | specified in terms of two, one or zero inequality conditions based on the partial order or 714 | its induced strict order.
715 |A general time-based window function
716 | w is a general window function specified by a finite set
717 | wP of timestamp predicates together with temporal intervals
718 | wJ(P) of each timestamp predicate P in
719 | wP, such that for every stream S, an element
720 | S(i) of S is an element of w(S) if and only if the
721 | timestamp predicate P of S(i) is in P and the
722 | timestamp t of S(i) is contained in
723 | wJ(P).
A time-based window function is the restriction of a general time-based window 725 | function to a subset of RDF streams.
726 |The substream resulting from the application of a time-based window function 727 | is time-bounded.
728 |A general temporal-count-based window function
732 | w is a general window function specified by a finite set
733 | wP of timestamp predicates together with semi-infinite temporal
734 | intervals wJ(P) of each timestamp predicate P in
735 | wP with endpoints wT(P), and positive
736 | integers wN(P), for each timestamp predicate P in
737 | wP such that for every stream S, an element
738 | S(i) of S is an element of w(S) if and only if the
739 | timestamp predicate P of S(i) is in P and
t is the timestamp of S(i),T(S, P, w) is the set of temporal entities that are timestamps for
742 | elements of S with timestamp predicate P, belong to
743 | wJ(P), and belong to the closed interval between
744 | t and wT(P), andT(S, P, w) is less than or equal to
746 | wN(P)A temporal-count-based window function is the restriction of a general 751 | temporal-count-based window function to a subset of RDF streams.
752 | 759 |The substream resulting from the application of a temporal-count-based 760 | window function is temporal-count-bounded.
761 |Due to the potential for stream elements with incomparable or duplicate 762 | timestamps, the number of elements in the substream having a particular timestamp 763 | predicate is not guaranteed to be equal to the depth specified for the predicate by the 764 | temporal-count-based window.
765 |Temporal-count-based window functions with future-facing orientation on 766 | timestamp predicates whose time plenum is not totally-ordered are not computable, because in 767 | general it is not possible to know, at any point in the reception of the stream, whether 768 | there are further elements of the stream that would be selected by the 769 | temporal-count-based window function.
770 |Applications that require a substream with an exact number N of elements for
771 | a specified timestamp predicate might apply a temporal-count-based window function with
772 | N for the count of temporal entities, and then randomly discard extra
773 | elements, according to some criterion, e.g., extreme elements (maximal or minimal,
774 | depending on the orientation of the counting). However, this extra step causes the process
775 | to be nondeterministic, and hence does not correspond to a function. If elements are
776 | discarded in a nonrandom fashion, e.g., based on their order in the stream sequence, then
777 | this would be a function, but would not preserve isomorphism, and so would not be a window
778 | function. The issue of obtaining a window function that returns an exact number of
779 | elements (for a particular predicate) is handled in the next section, where we define the
780 | concept of window relation, and use it to define an element-count-based window relation.
781 | When restricted to certain kinds of RDF streams, element-count-based window relations are
782 | functional so element-count-based window functions can be defined on such subsets. This
783 | and similar considerations, of importance to implementations, motivate the RDF Stream profiles as subsets of RDF streams.
A window relation is a binary relation on RDF streams (a relation having an
789 | extension which is a set of pairs of RDF streams) such that the second element in the pair
790 | is a window of the first element and preserves isomorphism. That is, if <S1,
791 | S2> is a member of the extension of a window relation W, and
792 | S3 and S4 are isomorphic to S1 and
793 | S2, resp., then <S3, S4> is also a member of the
794 | extension of W.
A length-based window relation
796 | W is a window relation specified by a set of streams
797 | WS, a finite set WP of timestamp
798 | predicates together with the following parameters for each timestamp predicate
799 | p in WP:
WJ(P) of timestamp
801 | predicate P (the interval of P);WT(P) which is the finite endpoint of
803 | WJ(P) (the temporal reference of P);WN(P) (the length for
805 | P)S be an RDF stream in WS with window
808 | S'. Define T(S, P, W) to be the set of temporal entities that
809 | are timestamps for elements of S with timestamp predicate P and
810 | belong to WJ(P), and T(S', P) to be the set of
811 | temporal entities that are timestamps for elements of S' with timestamp
812 | predicate P. The pair <S, S'> is a member of the extension
813 | of W if and only if the cardinality of T(S', P) is equal to the
814 | minimum of WN(P) and the cardinality of the set T(S, P,
815 | W) and for each element S'(i) of S'
816 | P of S'(i) is in
818 | WP, andt of S'(i) is in
820 | WJ(P).A length-based window function
824 | W on domain WS is a length-based window relation
825 | where any member <S, S'> of its extension are such that S
826 | is in WS and W defines a total function on
827 | WS.
The names "element-count-bounded window relation" and "element-count-bounded window function" 829 | have been proposed, as a replacement of "length-bounded ...". This nomenclature depends on the adoption of 830 | "element" as the term for the individual timestamped graphs in a stream.
831 |851 |866 |this example could be integrated to the main text body
852 |Beyond time instants: intervals & more
853 |Usign the previously described model, intervals can be specified for a graph in the 854 | following way: Given p1 and p2 representing start and end time predicates, then 855 |
857 |(g,p1,t1)and(g,p2,t2)denote that g is defined in an interval 856 | [t1,t2]. As an example:860 |:g_1, :startsAt, "2015-06-18T12:00:00"^^xsd:dateTime 858 | :g_1, :endsAt, "2015-06-18T13:00:00"^^xsd:dateTime 859 |Or even:
861 |865 |:g_2 :validBetween 862 | [:startsAt "2015-06-18T12:00:00"^^xsd:dateTime; 863 | :endsAt "2015-06-18T13:00:00"^^xsd:dateTime] 864 |
The semantics of a timestamped graph is defined in terms of its semantics as an RDF 869 | Dataset. In particular, the designation of a particular triple in the default graph as the 870 | timestamp triple has no effect on its semantics.
871 |The semantics of timestamped graphs, and consequently of RDF streams, is based on the 872 | semantics formalized in [[RDF11-Datasets]] in the case that each named graph defines its own 873 | context.
874 |The following terms are used in the sense of [[RDF11-MT]]: entailment regime, 875 | E-interpretation, blank node, universe, named graph pair, RDF graph, E-entails, default 876 | graph.
877 | An RSP interpretation
878 | I with respect to an entailment regime E is an E-interpretation
879 | extended to named graphs, timestamped graphs, RDF datasets, and RDF streams as follows:
A from blank nodes to the universe IR and a
881 | named graph pair ng = <n, G>, [I+A](ng) is
882 | true if and only if [I+A](n) is an RDF graph that E-entails
883 | G;TSG = < ng, DG>, where
885 | DG is the default graph and ng is the named graph pair of
886 | TSG,and a mapping A from blank nodes to the universe
887 | IR, [I+A](TSG) is true if and only if [I+A](DG)
888 | is true and [I+A](ng) is true;I(TSG) true if and only if there exisits a mapping A from
890 | blank nodes to the universe IR such that [I+A](TSG) is true.D = < DG, NG>, where DG
892 | is the default graph and NG is the set of named graph pairs of
893 | D, I(D) is true if there exists a mapping A
894 | from blank nodes to the universe IR such that [I+A](DG) is
895 | true and [I+A](ng) is true for every ng in
896 | NG;I(D) is false otherwise.S, I(S) is true if and only if if there exists a
899 | mapping A from blank nodes to the universe IR such that for
900 | every element S(i) of S, i ≥ 1,
901 | [I+A](S(i)) is true.I E-satisfies a graph, named graph
903 | pair, timestamped graph, dataset, or stream X (or satisfies A
904 | w.r.t the E-entailment regime) when I(X) is true.
905 | Following standard terminology, we say that a graph, named graph, timestamped graph,
906 | dataset, or stream X RSP-E-entails a graph, named graph, timestamped graph,
907 | dataset, or stream Y if and only if for every RSP interpretation I
908 | with respect to E-entailment, I E-satisfies Y whenever
909 | I E-satisfies X.
The "RSP" prefix in "RSP-E-entails" may be dropped when neither antecedent nor 911 | consequent is an RDF dataset or named graph, as in that case there is no possibility of 912 | alternate dataset semantics.
913 |It should be straightforward to prove that isomorphic RDF streams simply 914 | entail each other, and hence are logically equivalent under simple entailment. This should 915 | also hold for other standard entailment regimes, and perhaps should be required for all RSP 916 | entailment regimes.
917 | The notion of RSP-E-entailment is defined here so that it may be used to
918 | support the definition of query semantics under various entailment regimes in the [[RSP-QL
919 | Queries]] document, including simple entailment. A choice was made regarding the semantics
920 | of named graph pairs (i.e., [I+A](ng) is true if and only if
921 | [I+A](n) is an RDF graph that E-entails G) that affects the
922 | semantics of timestamped graphs, datasets, and streams. It remains to be seen if this choice
923 | supports query semantics in a manner that meets the needs of the RSP-QL community. In
924 | particular, it imposes constraints on the denotation of the name of a named graph pair which
925 | may be inconsistent with the domain of a predicate that might be considered for use as a
926 | timestamp predicate (e.g., SSN predicate ssn:observationSamplingTime).
It is possible to restrict the abstract syntax for a class of RDF streams. This is often 931 | done in order to facilitate the efficient implementation of certain operations and queries 932 | or to promote more efficient representation. Each such restriction constitutes an RDF 933 | stream profile.
934 |The profiles defined in this document fall into two categories: time-series profiles and 935 | linked-list profiles. Within each category there is a least-restrictive profile and a number 936 | of subprofiles which apply additional restrictions to it.
937 |This section describes four profiles which are defined through restrictions on the 940 | default graphs of the stream's timestamped graph elements or on the relation between 941 | timestamp values:
The RDF Stream Time-Series profile is designed to support high-volume, low-latency 950 | window operations and queries that depend on full knowledge of timestamps.
951 |This motivational paragraph needs some work - the above is a place 952 | holder.
953 |An RDF time series is an RDF stream that satisfies the following 954 | properties:
955 |If some property (e.g., in the RSP-QL namespace) is defined as a
967 | subproperty of prov:generatedAtTime, then this can be substituted in Example 4, which will then serve as an example of a
969 | time series. Alternatively, the definition could be changed so that the only requirement
970 | is that the timestamps that occur in the stream belong to xsd:dateTime.
The set of RDF time series is closed under RDF stream merge and union on 972 | time series that use the same timestamp predicate.
973 |An "RDF distinct time series" is an RDF time series such that no two elements in the 977 | time series have the same timestamp.
978 | 981 |An RDF distinct time series has a unique sequential order - it is 982 | S-isomorphic only to itself.
983 |The merge or union of RDF distinct time series is always defined but is 984 | not necessarily an RDF distinct time series, even if the operation is restricted to time 985 | series that use the same timestamp predicate, due to the possibility of duplication of 986 | timestamp. However, the merge or union of RDF distinct time series that use the same 987 | timestamp predicate is always an RDF time series.
988 |The restriction of element-count-based window relations 989 | to distinct time series results in functional 990 | relations. This enables the definition of element-count-based window functions for distinct time series. 991 | Further, the element-count-based window functions are always computable. However, the 992 | time-based window functions are not necessarily computable unless there is a finite 993 | precision to the timestamps, as can be seen from the Zeno's paradox example @@@(this 994 | example hasn't been written up yet, but is mentioned elsewhere).
995 |There is going to be a lot more to talk about for RDF time series 996 | relative to queries, but in this document we don't have those definitions.
997 |The restriction of timestamps in the regular time series profile allows 1006 | the timestamp to be represented concisely as an integer, provided the spacing is 1007 | provided elsewhere, e.g., in metadata.
1008 |@@@motivate this profile
1016 |