|
| 1 | +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . |
| 2 | +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. |
| 3 | +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . |
| 4 | +@prefix skos: <http://www.w3.org/2004/02/skos/core#> . |
| 5 | +@prefix qudt: <http://qudt.org/schema/qudt/> . |
| 6 | +@prefix unit: <http://qudt.org/vocab/unit/> . |
| 7 | +@prefix foaf: <http://xmlns.com/foaf/0.1/> . |
| 8 | +@prefix schema: <http://schema.org/> . |
| 9 | +@prefix gs1: <https://gs1.org/voc/> . |
| 10 | +@prefix prov: <http://www.w3.org/ns/prov#> . |
| 11 | +@prefix rel: <http://id.loc.gov/vocabulary/relators/> . |
| 12 | +@prefix sosa-env: <http://www.w3.org/ns/sosa/system-environment-properties#> . |
| 13 | +@prefix dcterms: <http://purl.org/dc/terms/> . |
| 14 | +@prefix geosparql: <http://www.opengis.net/ont/geosparql#> . |
| 15 | +@prefix org: <http://www.w3.org/ns/org#> . |
| 16 | +@prefix beer: <https://rdf.ag/o/beer#> . |
| 17 | +@prefix owl: <http://www.w3.org/2002/07/owl#> . |
| 18 | +@prefix sosa: <http://www.w3.org/ns/sosa/> . |
| 19 | +@prefix ex: <http://example.org/> . |
| 20 | +@prefix sensor: <https://example.org/sensor/> . |
| 21 | +@base <http://example.org/data/> . |
| 22 | +# This example represents a specific InkBird IBS-TH2 sensor that is performing |
| 23 | +# measurements in multiple locations where the results are owned by different |
| 24 | +# entities. In the scenario used here a local brewery makes use of the sensor to track the |
| 25 | +# temperature of their beer as it is packaged, stored, shipped and displayed for sale. |
| 26 | + |
| 27 | +<acmeBreweryCo> a org:Organization, beer:Brewery ; |
| 28 | + foaf:name "Acme Brewery Co." . |
| 29 | + |
| 30 | +<acmeBrewerCooler> a ex:Cooler . |
| 31 | + |
| 32 | +<alice> a foaf:Person, prov:Agent ; |
| 33 | + foaf:name "Alice" . |
| 34 | + |
| 35 | +<acmeDelivery> a org:Organization ; |
| 36 | + foaf:name "Acme Delivery Co." . |
| 37 | + |
| 38 | +<acmeTruck> a ex:RefrigeratedTruck . |
| 39 | + |
| 40 | +<acmeSupermarket> a <org:Organization> ; |
| 41 | + foaf:name "Acme Supermarket Co." . |
| 42 | + |
| 43 | +<acmeSupermarketCooler> a <ex:Cooler> . |
| 44 | + |
| 45 | +# A six pack as packaged and sold by Acme Brewery Co. |
| 46 | + |
| 47 | +<acmePorterSixPack> a beer:Porter, gs1:Product, schema:Product ; |
| 48 | + skos:definition "A six pack of Acme Porter."@en . |
| 49 | + |
| 50 | +# A specific (instance) six pack of Acme Porter Beers |
| 51 | +# We use GS1-style lot and serial numbers as part of the |
| 52 | +# identifier to highlight that the carton is a physical instance. |
| 53 | + |
| 54 | +<10/PO202402/21/0001/acmePorterSixPack> a schema:IndividualProduct; |
| 55 | + rdfs:subClassOf <acmePorterSixPack>; |
| 56 | + gs1:packaging <0001/ProductPackaging>; |
| 57 | + gs1:hasBatchLotNumber "PO202402" ; |
| 58 | + gs1:hasSerialNumber "0001" . |
| 59 | + |
| 60 | +# A sample of air within the six pack |
| 61 | +<10/PO202402/21/0001/acmePorterSixPackAirSample> a sosa:Sample ; |
| 62 | + rdfs:label "Air within the six pack"@en ; |
| 63 | + sosa:isSampleOf <10/PO202402/21/0001/acmePorterSixPack> . |
| 64 | + |
| 65 | +# A (virtual) sample of the beer from the six pack, implicitly assumes that the |
| 66 | +# sample is representative from all bottles. |
| 67 | +<10/PO202402/21/0001/acmePorterSixPackBeerSample> a sosa:FeatureOfInterest, sosa:Sample, beer:Porter ; |
| 68 | + rdfs:label "A (virtual) sample of beer within the six pack"@en ; |
| 69 | + sosa:isSampleOf <10/PO202402/21/0001/acmePorterSixPack> . |
| 70 | + |
| 71 | +<0001/ProductPackaging> a gs1:PackagingDetails, sosa:FeatureOfInterest ; |
| 72 | + rdfs:label "An instance of a beer carton used to package a six pack."@en . |
| 73 | + |
| 74 | +# We define this as the beer temperature, but ontologically it is a |
| 75 | +# generic definition for the temperature of the sample. |
| 76 | +<10/PO202402/21/0001/BeerTemperature> a sosa:Property ; |
| 77 | + qudt:hasUnit unit:DEG_C ; |
| 78 | + sosa:isPropertyOf <10/PO202402/21/0001/acmePorterSixPackBeerSample> ; |
| 79 | + rdfs:label "Biertemperatur"@de, "Beer Temperature"@en, "Température de la bière"@fr ; |
| 80 | + skos:definition "Temperature of Beer."@en . |
| 81 | + |
| 82 | +# Alice packages the Beer. |
| 83 | + |
| 84 | +<12345/someTH2> a sensor:IBS-TH2-Plus, schema:IndividualProduct ; |
| 85 | + rel:own <acmeBreweryCo> ; # Sensor may be returned. |
| 86 | + rdfs:label "InkBird Sensor that Alice bought to track beer storage."@en ; |
| 87 | + sosa:hasSubSystem <12345/HumiditySensor>, <12345/TemperatureSensor> ; |
| 88 | + gs1:hasSerialNumber "12345" ; |
| 89 | + ex:deviceAddress "12:34:56:12:34:56" . |
| 90 | + |
| 91 | +<00001/packingSixPack> a prov:Activity, sosa:Deployment ; |
| 92 | + rdfs:comment "When Alice packaged Porter bottles into the box, she added an InkBird logger to check that the beer wasn't getting too warm in transit or storage." ; |
| 93 | + prov:wasAssociatedWith <alice> ; |
| 94 | + prov:used <12345/someTH2> ; |
| 95 | + prov:used <0001/ProductPackaging> ; |
| 96 | + prov:startedAtTime "2024-02-20T01:35:00Z"^^xsd:dateTime; |
| 97 | + prov:endedAtTime "2024-02-20T01:40:00Z"^^xsd:dateTime; |
| 98 | + prov:atLocation <acmeBreweryCo> ; |
| 99 | + prov:generated <10/PO202402/21/0001/acmePorterSixPack> . |
| 100 | + |
| 101 | +# These definitions look redundant; but they represent the specific, physical instantiation of the sensors. |
| 102 | + |
| 103 | +<12345/HumiditySensor> a sensor:IBS-TH2-Plus-H ; |
| 104 | + rdf:comment "This is the instance of the humidity sensor instance."@en . |
| 105 | + |
| 106 | +<12345/TemperatureSensor> a sensor:IBS-TH2-Plus-T ; |
| 107 | + rdf:comment "This is the instance of the temperature sensor instance."@en . |
| 108 | +# |
| 109 | +# Sensor activates and records temperature while in the brewery cooler. |
| 110 | + |
| 111 | +<1a/observation> a sosa:Observation ; |
| 112 | + rel:own <acmeBreweryCo> ; |
| 113 | + sosa:observedProperty sosa-env:AmbientTemperature ; |
| 114 | + sosa:hasUltimateFeatureOfInterest <10/PO202402/21/0001/acmePorterSixPackBeerSample> ; |
| 115 | + sosa:madeBySensor <12345/TemperatureSensor> ; |
| 116 | + sosa:hasFeatureOfInterest <10/PO202402/21/0001/acmePorterSixPackAirSample> ; |
| 117 | + sosa:resultTime "2024-02-20T01:35:45Z"^^xsd:dateTime ; |
| 118 | + sosa:hasResult [ |
| 119 | + a qudt:QuantityValue ; |
| 120 | + qudt:hasUnit unit:DEG_C ; |
| 121 | + qudt:value 12.0 ; |
| 122 | + ] ; |
| 123 | +. |
| 124 | +<1b/observation> rdf:type sosa:Observation ; |
| 125 | + rel:own <acmeBreweryCo> ; |
| 126 | + sosa:observedProperty sosa-env:AmbientHumidity; |
| 127 | + sosa:hasUltimateFeatureOfInterest <0001/ProductPackaging>; |
| 128 | + sosa:madeBySensor <12345/HumiditySensor> ; |
| 129 | + sosa:hasFeatureOfInterest <10/PO202402/21/0001/acmePorterSixPackAirSample> ; |
| 130 | + sosa:resultTime "2024-02-20T01:35:45Z"^^xsd:dateTime ; |
| 131 | + sosa:hasResult [ |
| 132 | + a qudt:QuantityValue ; |
| 133 | + qudt:hasUnit unit:PERCENT ; |
| 134 | + qudt:value 60 ; |
| 135 | + ] ; |
| 136 | +. |
| 137 | +<breweryObserver> a prov:Activity ; |
| 138 | + rdfs:comment "Brewery operating system logging process." ; |
| 139 | + prov:atLocation <acmeBreweryCo> ; |
| 140 | + prov:generated <1a/observation> ; |
| 141 | + prov:generated <1b/observation> ; |
| 142 | + prov:wasStartedBy <alice> . # She turned it on last time. |
| 143 | + |
| 144 | +# |
| 145 | +# Product is loaded on the truck |
| 146 | +# |
| 147 | + |
| 148 | + |
| 149 | +<67a/observation> a sosa:Observation, prov:Entity ; |
| 150 | + rel:own <acmeBreweryCo> ; |
| 151 | + rel:own <acmeDelivery> ; |
| 152 | + sosa:observedProperty <10/PO202402/21/0001/BeerTemperature> ; |
| 153 | + sosa:hasUltimateFeatureOfInterest <10/PO202402/21/0001/acmePorterSixPackBeerSample> ; |
| 154 | + sosa:madeBySensor <12345/TemperatureSensor> ; |
| 155 | + sosa:hasFeatureOfInterest <10/PO202402/21/0001/acmePorterSixPackAirSample> ; |
| 156 | + sosa:resultTime "2024-02-22T04:15:05Z"^^xsd:dateTime ; |
| 157 | + sosa:hasResult [ |
| 158 | + a qudt:QuantityValue ; |
| 159 | + qudt:hasUnit unit:DEG_C ; |
| 160 | + qudt:value 19.0 ; |
| 161 | + ] ; |
| 162 | +. |
| 163 | +<67b/observation> rdf:type sosa:Observation,prov:Entity ; |
| 164 | + rel:own <acmeBreweryCo> ; |
| 165 | + rel:own <acmeDelivery> ; |
| 166 | + sosa:observedProperty ex:airRelativeHumidity ; |
| 167 | + sosa:hasUltimateFeatureOfInterest <0001/ProductPackaging>; |
| 168 | + sosa:madeBySensor <12345/HumiditySensor> ; |
| 169 | + sosa:hasFeatureOfInterest <10/PO202402/21/0001/acmePorterSixPackAirSample> ; |
| 170 | + sosa:resultTime "2024-02-22T04:15:05Z"^^xsd:dateTime ; |
| 171 | + sosa:hasResult [ |
| 172 | + a qudt:QuantityValue ; |
| 173 | + qudt:hasUnit unit:PERCENT ; |
| 174 | + qudt:value 74 ; |
| 175 | + ] ; |
| 176 | +. |
| 177 | +<123/TruckObserver> a prov:Activity ; |
| 178 | + rdfs:comment "Truck onboard monitoring system" ; |
| 179 | + prov:used <acmeTruck> ; |
| 180 | + prov:generated <67a/observation> ; |
| 181 | + prov:generated <67b/observation> ; |
| 182 | + prov:startedAtTime "2024-02-22T04:15:05Z"^^xsd:dateTime ; |
| 183 | + prov:endedAtTime "2024-02-22T05:55:38Z"^^xsd:dateTime ; |
| 184 | + prov:wasStartedBy <driver> ; |
| 185 | + prov:atLocation <gpsLocation> . |
| 186 | + |
| 187 | +# This is the output from the truck's GPS receiver. We only get coordinates |
| 188 | +# from it. |
| 189 | + |
| 190 | +<gpsLocation> a prov:Location, geosparql:Geometry; |
| 191 | + geosparql:asWKT "POINT(-79.35553 43.66372)"^^geosparql:wktLiteral . |
| 192 | + |
| 193 | +# |
| 194 | +# Product is now in display cooler at supermarket. Ownership of product has |
| 195 | +# changed and observation data is now only being recorded / owned by supermarket. |
| 196 | +# |
| 197 | + |
| 198 | +<98a/observation> rdf:type sosa:Observation,prov:Entity ; |
| 199 | + rel:own <acmeSupermarket> ; |
| 200 | + sosa:observedProperty <10/PO202402/21/0001/BeerTemperature> ; |
| 201 | + sosa:hasUltimateFeatureOfInterest <10/PO202402/21/0001/acmePorterSixPackBeerSample> ; |
| 202 | + sosa:madeBySensor <12345/TemperatureSensor> ; |
| 203 | + sosa:hasFeatureOfInterest <10/PO202402/21/0001/acmePorterSixPackAirSample> ; |
| 204 | + sosa:resultTime "2024-02-22T06:00:13Z"^^xsd:dateTime ; |
| 205 | + sosa:hasResult [ |
| 206 | + a qudt:QuantityValue ; |
| 207 | + qudt:hasUnit unit:DEG_C ; |
| 208 | + qudt:value 12 ; |
| 209 | + ] ; |
| 210 | +. |
| 211 | +<98b/observation> rdf:type sosa:Observation,prov:Entity ; |
| 212 | + rel:own <acmeSupermarket> ; |
| 213 | + sosa:observedProperty ex:airRelativeHumidity ; |
| 214 | + sosa:hasUltimateFeatureOfInterest <0001/ProductPackaging> ; |
| 215 | + sosa:madeBySensor <12345/HumiditySensor> ; |
| 216 | + sosa:hasFeatureOfInterest <10/PO202402/21/0001/acmePorterSixPackAirSample> ; |
| 217 | + sosa:resultTime "2024-02-22T06:00:13Z"^^xsd:dateTime ; |
| 218 | + sosa:hasResult [ |
| 219 | + a qudt:QuantityValue ; |
| 220 | + qudt:hasUnit unit:PERCENT ; |
| 221 | + qudt:value 55 ; |
| 222 | + ] ; |
| 223 | +. |
| 224 | +<CoolerMonitoringProcess> a prov:Activity ; |
| 225 | + rdfs:comment "Smart cooler monitoring system" ; |
| 226 | + prov:startedAtTime "2024-02-22T06:00:13Z"^^xsd:dateTime ; |
| 227 | + prov:atLocation <acmeSupermarketCooler> ; |
| 228 | + prov:generated <98a/observation> ; |
| 229 | + prov:generated <98b/observation> ; |
| 230 | + prov:wasStartedBy <acmeSupermarket> . |
0 commit comments