added a sping select template to retrieve processing time for report events.
Showing
1 changed file
with
79 additions
and
0 deletions
| ... | @@ -12,6 +12,18 @@ | ... | @@ -12,6 +12,18 @@ |
| 12 | @prefix spl: <http://spinrdf.org/spl#> . | 12 | @prefix spl: <http://spinrdf.org/spl#> . |
| 13 | @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | 13 | @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . |
| 14 | 14 | ||
| 15 | +<http://spinrdf.org/arg#endDateTime> | ||
| 16 | + rdf:type rdf:Property ; | ||
| 17 | + rdfs:subPropertyOf sp:arg . | ||
| 18 | + | ||
| 19 | +<http://spinrdf.org/arg#reportEventType> | ||
| 20 | + rdf:type rdf:Property ; | ||
| 21 | + rdfs:subPropertyOf sp:arg . | ||
| 22 | + | ||
| 23 | +<http://spinrdf.org/arg#startDateTime> | ||
| 24 | + rdf:type rdf:Property ; | ||
| 25 | + rdfs:subPropertyOf sp:arg . | ||
| 26 | + | ||
| 15 | <http://www.reportinghub.no/system/spin/logging> | 27 | <http://www.reportinghub.no/system/spin/logging> |
| 16 | rdf:type owl:Ontology ; | 28 | rdf:type owl:Ontology ; |
| 17 | owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/system/schema/logging> ; | 29 | owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/system/schema/logging> ; |
| ... | @@ -86,3 +98,70 @@ loggingspin:Overview | ... | @@ -86,3 +98,70 @@ loggingspin:Overview |
| 86 | sp:graphNameNode <http://www.reportinghub.no/graph/logging> | 98 | sp:graphNameNode <http://www.reportinghub.no/graph/logging> |
| 87 | ]) | 99 | ]) |
| 88 | ] . | 100 | ] . |
| 101 | + | ||
| 102 | +loggingspin:processingTimeByDateEventType | ||
| 103 | + rdf:type spin:SelectTemplate ; | ||
| 104 | + rdfs:subClassOf spin:SelectTemplates ; | ||
| 105 | + spin:body | ||
| 106 | + [ rdf:type sp:Select ; | ||
| 107 | + sp:resultVariables ([ sp:varName "time"^^xsd:string | ||
| 108 | + ] [ sp:varName "createTime"^^xsd:string | ||
| 109 | + ]) ; | ||
| 110 | + sp:where ([ sp:object | ||
| 111 | + [ sp:varName "reportEventType"^^xsd:string | ||
| 112 | + ] ; | ||
| 113 | + sp:predicate rdf:type ; | ||
| 114 | + sp:subject | ||
| 115 | + [ sp:varName "reportEvent"^^xsd:string | ||
| 116 | + ] | ||
| 117 | + ] [ sp:object | ||
| 118 | + [ sp:varName "time"^^xsd:string | ||
| 119 | + ] ; | ||
| 120 | + sp:predicate <http://www.reportinghub.no/system/schema/logging#processingTime> ; | ||
| 121 | + sp:subject | ||
| 122 | + [ sp:varName "reportEvent"^^xsd:string | ||
| 123 | + ] | ||
| 124 | + ] [ sp:object | ||
| 125 | + [ sp:varName "createTime"^^xsd:string | ||
| 126 | + ] ; | ||
| 127 | + sp:predicate <http://purl.org/dc/terms/created> ; | ||
| 128 | + sp:subject | ||
| 129 | + [ sp:varName "reportEvent"^^xsd:string | ||
| 130 | + ] | ||
| 131 | + ] [ rdf:type sp:Filter ; | ||
| 132 | + sp:expression | ||
| 133 | + [ rdf:type sp:and ; | ||
| 134 | + sp:arg1 [ rdf:type sp:ge ; | ||
| 135 | + sp:arg1 [ sp:varName "createTime"^^xsd:string | ||
| 136 | + ] ; | ||
| 137 | + sp:arg2 [ sp:varName "startDateTime"^^xsd:string | ||
| 138 | + ] | ||
| 139 | + ] ; | ||
| 140 | + sp:arg2 [ rdf:type sp:le ; | ||
| 141 | + sp:arg1 [ sp:varName "createTime"^^xsd:string | ||
| 142 | + ] ; | ||
| 143 | + sp:arg2 [ sp:varName "endDateTime"^^xsd:string | ||
| 144 | + ] | ||
| 145 | + ] | ||
| 146 | + ] | ||
| 147 | + ]) | ||
| 148 | + ] ; | ||
| 149 | + spin:constraint | ||
| 150 | + [ rdf:type spl:Argument ; | ||
| 151 | + rdfs:comment "The endDateTime for which the processing time is to be extracted."^^xsd:string ; | ||
| 152 | + spl:predicate <http://spinrdf.org/arg#endDateTime> ; | ||
| 153 | + spl:valueType xsd:dateTime | ||
| 154 | + ] ; | ||
| 155 | + spin:constraint | ||
| 156 | + [ rdf:type spl:Argument ; | ||
| 157 | + rdfs:comment "The start dateTime for the which the processing time is to be extracted."^^xsd:string ; | ||
| 158 | + spl:predicate <http://spinrdf.org/arg#startDateTime> ; | ||
| 159 | + spl:valueType xsd:dateTime | ||
| 160 | + ] ; | ||
| 161 | + spin:constraint | ||
| 162 | + [ rdf:type spl:Argument ; | ||
| 163 | + rdfs:comment "The reportEventType for which the processingTime is to be extracted."^^xsd:string ; | ||
| 164 | + spl:predicate <http://spinrdf.org/arg#reportEventType> ; | ||
| 165 | + spl:valueType rdfs:Resource | ||
| 166 | + ] ; | ||
| 167 | + spin:returnType xsd:integer . | ... | ... |
-
Please register or login to post a comment