SPIN-logging.spin.ttl
8.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# baseURI: http://www.reportinghub.no/system/spin/logging
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/system/schema/logging
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> .
@prefix loggingspin: <http://www.reportinghub.no/system/spin/logging#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://spinrdf.org/arg#endDateTime>
rdf:type rdf:Property ;
rdfs:subPropertyOf sp:arg .
<http://spinrdf.org/arg#reportEventType>
rdf:type rdf:Property ;
rdfs:subPropertyOf sp:arg .
<http://spinrdf.org/arg#startDateTime>
rdf:type rdf:Property ;
rdfs:subPropertyOf sp:arg .
<http://www.reportinghub.no/system/spin/logging>
rdf:type owl:Ontology ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/system/schema/logging> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
loggingspin:Overview
rdf:type spin:SelectTemplate ;
rdfs:label "Overview"^^xsd:string ;
rdfs:subClassOf spin:SelectTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:limit "1000"^^xsd:long ;
sp:orderBy ([ rdf:type sp:Desc ;
sp:expression
[ sp:varName "created"^^xsd:string
]
]) ;
sp:resultVariables ([ sp:varName "event"^^xsd:string
] [ sp:varName "created"^^xsd:string
] [ sp:varName "type"^^xsd:string
] [ sp:varName "initiatedBy"^^xsd:string
] [ sp:varName "onBehalfOf"^^xsd:string
] [ sp:varName "outcome"^^xsd:string
] [ sp:varName "comment"^^xsd:string
]) ;
sp:where ([ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object
[ sp:varName "created"^^xsd:string
] ;
sp:predicate <http://purl.org/dc/terms/created> ;
sp:subject
[ sp:varName "event"^^xsd:string
]
] [ sp:object
[ sp:varName "initiatedBy"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/system/schema/logging#initiatedBy> ;
sp:subject
[ sp:varName "event"^^xsd:string
]
] [ sp:object
[ sp:varName "onBehalfOf"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/system/schema/logging#onBehalfOf> ;
sp:subject
[ sp:varName "event"^^xsd:string
]
] [ sp:object
[ sp:varName "outcome"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/system/schema/logging#outcome> ;
sp:subject
[ sp:varName "event"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "comment"^^xsd:string
] ;
sp:predicate rdfs:comment ;
sp:subject
[ sp:varName "event"^^xsd:string
]
])
] [ sp:object
[ sp:varName "type"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "event"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/graph/logging>
])
] .
loggingspin:processingTimeByDateEventType
rdf:type spin:SelectTemplate ;
rdfs:subClassOf spin:SelectTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "time"^^xsd:string
] [ sp:varName "createTime"^^xsd:string
]) ;
sp:where ([ sp:object
[ sp:varName "reportEventType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "reportEvent"^^xsd:string
]
] [ sp:object
[ sp:varName "time"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/system/schema/logging#processingTime> ;
sp:subject
[ sp:varName "reportEvent"^^xsd:string
]
] [ sp:object
[ sp:varName "createTime"^^xsd:string
] ;
sp:predicate <http://purl.org/dc/terms/created> ;
sp:subject
[ sp:varName "reportEvent"^^xsd:string
]
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:and ;
sp:arg1 [ rdf:type sp:ge ;
sp:arg1 [ sp:varName "createTime"^^xsd:string
] ;
sp:arg2 [ sp:varName "startDateTime"^^xsd:string
]
] ;
sp:arg2 [ rdf:type sp:le ;
sp:arg1 [ sp:varName "createTime"^^xsd:string
] ;
sp:arg2 [ sp:varName "endDateTime"^^xsd:string
]
]
]
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The endDateTime for which the processing time is to be extracted."^^xsd:string ;
spl:predicate <http://spinrdf.org/arg#endDateTime> ;
spl:valueType xsd:dateTime
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The start dateTime for the which the processing time is to be extracted."^^xsd:string ;
spl:predicate <http://spinrdf.org/arg#startDateTime> ;
spl:valueType xsd:dateTime
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The reportEventType for which the processingTime is to be extracted."^^xsd:string ;
spl:predicate <http://spinrdf.org/arg#reportEventType> ;
spl:valueType rdfs:Resource
] ;
spin:returnType xsd:integer .