Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sparcl construct query #431

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cypress/e2e/workbench.components.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Feature: LDES Workbench Components

@test-031 @nifi
Scenario Outline: 031: all NiFi components work as expected
Scenario: 031: all NiFi components work as expected
Given environment variable 'LOCALHOST' is defined as the hostname
And context 'tests/031.nifi-workbench-components' is started
And the graph database is available and configured
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/workbench.converting.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ Feature: LDES Workbench Conversions
Then the root fragment contains a correct NGSI-LD observation version

@nifi
Examples:
Examples:
| workbench |
| NIFI |

@ldio
Examples:
Examples:
| workbench |
| LDIO |

Expand All @@ -50,12 +50,12 @@ Feature: LDES Workbench Conversions
Then the root fragment contains a correct OSLO observation version

@test-015 @nifi
Examples:
Examples:
| workbench | test-number | test-name |
| NIFI | 015 | nifi-workbench-ngsi-v2-to-oslo |

@test-016 @nifi @ldio
Examples:
Examples:
| workbench | test-number | test-name |
| NIFI & LDIO | 016 | mixed-workbench-ngsi-v2-to-oslo |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Given('the members are stored in database {string}', (database: string) => {
});

Given('environment variable {string} is defined as the hostname', (variable: string) => {
cy.exec('echo "$(hostname)"').then(result => {
cy.exec('echo ldes-server').then(result => {
setAdditionalEnvironmentSetting(variable, result.stdout);
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@
"version": "1.9.0-SNAPSHOT"
},
"properties": {
"SPARQL_CONSTRUCT_QUERY": "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX sosa: <http://www.w3.org/ns/sosa/>\nPREFIX ngsiLdDC: <https://uri.etsi.org/ngsi-ld/default-context/>\nPREFIX ngsiLd: <https://uri.etsi.org/ngsi-ld/>\nCONSTRUCT {\n ?wqo rdf:type <http://www.w3.org/ns/sosa/ObservationCollection> .\n ?wqo <http://def.isotc211.org/iso19156/2011/SamplingFeature#SF_SamplingFeatureCollection.member> ?conductivity .\n ?wqo <http://def.isotc211.org/iso19156/2011/SamplingFeature#SF_SamplingFeatureCollection.member> ?temperature .\n ?wqo <http://def.isotc211.org/iso19156/2011/SamplingFeature#SF_SamplingFeatureCollection.member> ?batteryLevel .\n ?wqo <http://def.isotc211.org/iso19156/2011/SamplingFeature#SF_SamplingFeatureCollection.member> ?location .\n ?wqo sosa:phenomenonTime ?dateObserved .\n ?batteryLevel <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.observedProperty> <https://data.vmm.be/concept/sensor/batterijniveau> .\n ?batteryLevel <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.phenomenonTime> ?batteryLevelPhenomenonTime .\n ?batteryLevel rdf:type <http://def.isotc211.org/iso19156/2011/Measurement#OM_Measurement> .\n ?batteryLevel <http://www.w3.org/ns/sosa/madeBySensor> ?madeBySensor .\n ?batteryLevel <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.result> [\n <http://def.isotc211.org/iso19103/2005/UnitsOfMeasure#Measure.value> [\n <https://schema.org/value> ?batteryLevelValue\n ]\n ] .\n ?conductivity <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.observedProperty> <https://data.vmm.be/concept/waterkwaliteitparameter/conductiviteit> .\n ?conductivity <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.phenomenonTime> ?conductivityPhenomenonTime .\n ?conductivity rdf:type <http://def.isotc211.org/iso19156/2011/Measurement#OM_Measurement> .\n ?conductivity <http://www.w3.org/ns/sosa/madeBySensor> ?madeBySensor .\n ?conductivity <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.result> [\n <http://def.isotc211.org/iso19103/2005/UnitsOfMeasure#Measure.value> [\n <https://schema.org/value> ?conductivityValue\n ]\n ] .\n ?depth <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.observedProperty> <https://data.vmm.be/concept/observatieparameter/hydrostatische-druk> .\n ?depth <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.phenomenonTime> ?depthPhenomenonTime .\n ?depth rdf:type <http://def.isotc211.org/iso19156/2011/Measurement#OM_Measurement> .\n ?depth <http://www.w3.org/ns/sosa/madeBySensor> ?madeBySensor .\n ?depth <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.result> [\n <http://def.isotc211.org/iso19103/2005/UnitsOfMeasure#Measure.value> [\n <https://schema.org/value> ?depthValue\n ]\n ] .\n ?temperature <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.observedProperty> <https://data.vmm.be/concept/waterkwaliteitparameter/temperatuur> .\n ?temperature <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.phenomenonTime> ?temperaturePhenomenonTime .\n ?temperature rdf:type <http://def.isotc211.org/iso19156/2011/Measurement#OM_Measurement> .\n ?temperature <http://www.w3.org/ns/sosa/madeBySensor> ?madeBySensor .\n ?temperature <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.result> [\n <http://def.isotc211.org/iso19103/2005/UnitsOfMeasure#Measure.value> [\n <https://schema.org/value> ?temperatureValue\n ]\n ] .\n ?location rdf:type <https://def.isotc211.org/iso19156/2011/SpatialSamplingFeature#SF_SpatialSamplingFeature> .\n ?location rdf:asWkt ?locationWkt\n} WHERE {\n ?wqo rdf:type <https://uri.etsi.org/ngsi-ld/default-context/WaterQualityObserved> .\n ?wqo ngsiLdDC:dateObserved [\n ngsiLd:hasValue ?dateObserved\n ] .\n ?wqo ngsiLdDC:refDevice ?refDevice .\n ?refDevice <https://uri.etsi.org/ngsi-ld/hasObject> ?madeBySensor .\n OPTIONAL {\n ?wqo ngsiLdDC:batteryLevel ?batteryLevel .\n ?batteryLevel <https://uri.etsi.org/ngsi-ld/observedAt> ?batteryLevelPhenomenonTime .\n ?batteryLevel <https://uri.etsi.org/ngsi-ld/hasValue> ?batteryLevelValue .\n }\n OPTIONAL {\n ?wqo ngsiLdDC:conductivity ?conductivity .\n ?conductivity <https://uri.etsi.org/ngsi-ld/observedAt> ?conductivityPhenomenonTime .\n ?conductivity <https://uri.etsi.org/ngsi-ld/hasValue> ?conductivityValue .\n }\n OPTIONAL {\n ?wqo ngsiLdDC:depth ?depth .\n ?depth <https://uri.etsi.org/ngsi-ld/observedAt> ?depthPhenomenonTime .\n ?depth <https://uri.etsi.org/ngsi-ld/hasValue> ?depthValue .\n }\n OPTIONAL {\n ?wqo ngsiLdDC:temperature ?temperature .\n ?temperature <https://uri.etsi.org/ngsi-ld/observedAt> ?temperaturePhenomenonTime .\n ?temperature <https://uri.etsi.org/ngsi-ld/hasValue> ?temperatureValue .\n }\n OPTIONAL {\n ?wqo ngsiLd:location ?location .\n ?location ngsiLdDC:asWkt ?locationWkt .\n }\n}\n",
"SPARQL_CONSTRUCT_QUERY": "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX sosa: <http://www.w3.org/ns/sosa/>\nPREFIX ngsiLdDC: <https://uri.etsi.org/ngsi-ld/default-context/>\nPREFIX ngsiLd: <https://uri.etsi.org/ngsi-ld/>\nCONSTRUCT {\n ?wqo rdf:type <http://www.w3.org/ns/sosa/ObservationCollection> .\n ?wqo <http://def.isotc211.org/iso19156/2011/SamplingFeature#SF_SamplingFeatureCollection.member> ?conductivity .\n ?wqo <http://def.isotc211.org/iso19156/2011/SamplingFeature#SF_SamplingFeatureCollection.member> ?temperature .\n ?wqo <http://def.isotc211.org/iso19156/2011/SamplingFeature#SF_SamplingFeatureCollection.member> ?batteryLevel .\n ?wqo <http://def.isotc211.org/iso19156/2011/SamplingFeature#SF_SamplingFeatureCollection.member> ?depth .\n ?wqo <http://def.isotc211.org/iso19156/2011/SamplingFeature#SF_SamplingFeatureCollection.member> ?location .\n ?wqo sosa:phenomenonTime ?dateObserved .\n ?batteryLevel <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.observedProperty> <https://data.vmm.be/concept/sensor/batterijniveau> .\n ?batteryLevel <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.phenomenonTime> ?batteryLevelPhenomenonTime .\n ?batteryLevel rdf:type <http://def.isotc211.org/iso19156/2011/Measurement#OM_Measurement> .\n ?batteryLevel <http://www.w3.org/ns/sosa/madeBySensor> ?madeBySensor .\n ?batteryLevel <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.result> [\n ?scopedItem [\n <https://schema.org/value> ?batteryLevelValue\n ]\n ] .\n ?conductivity <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.observedProperty> <https://data.vmm.be/concept/waterkwaliteitparameter/conductiviteit> .\n ?conductivity <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.phenomenonTime> ?conductivityPhenomenonTime .\n ?conductivity rdf:type <http://def.isotc211.org/iso19156/2011/Measurement#OM_Measurement> .\n ?conductivity <http://www.w3.org/ns/sosa/madeBySensor> ?madeBySensor .\n ?conductivity <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.result> [\n ?conductivityValuePredicate [\n <https://schema.org/value> ?conductivityValue\n ]\n ] .\n ?depth <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.observedProperty> <https://data.vmm.be/concept/observatieparameter/hydrostatische-druk> .\n ?depth <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.phenomenonTime> ?depthPhenomenonTime .\n ?depth rdf:type <http://def.isotc211.org/iso19156/2011/Measurement#OM_Measurement> .\n ?depth <http://www.w3.org/ns/sosa/madeBySensor> ?madeBySensor .\n ?depth <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.result> [\n ?depthValuePredicate [\n <https://schema.org/value> ?depthValue\n ]\n ] .\n ?temperature <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.observedProperty> <https://data.vmm.be/concept/waterkwaliteitparameter/temperatuur> .\n ?temperature <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.phenomenonTime> ?temperaturePhenomenonTime .\n ?temperature rdf:type <http://def.isotc211.org/iso19156/2011/Measurement#OM_Measurement> .\n ?temperature <http://www.w3.org/ns/sosa/madeBySensor> ?madeBySensor .\n ?temperature <http://def.isotc211.org/iso19156/2011/Observation#OM_Observation.result> [\n ?temperatureValuePredicate [\n <https://schema.org/value> ?temperatureValue\n ]\n ] .\n ?location rdf:type <https://def.isotc211.org/iso19156/2011/SpatialSamplingFeature#SF_SpatialSamplingFeature> .\n ?location rdf:asWkt ?locationWkt\n} WHERE {\n ?wqo rdf:type <https://uri.etsi.org/ngsi-ld/default-context/WaterQualityObserved> .\n ?wqo ngsiLdDC:dateObserved [\n ngsiLd:hasValue ?dateObserved\n ] .\n ?wqo ngsiLdDC:refDevice ?refDevice .\n ?refDevice <https://uri.etsi.org/ngsi-ld/hasObject> ?madeBySensor .\n OPTIONAL {\n ?wqo ngsiLdDC:batteryLevel ?batteryLevel .\n ?batteryLevel <https://uri.etsi.org/ngsi-ld/observedAt> ?batteryLevelPhenomenonTime .\n ?batteryLevel <https://uri.etsi.org/ngsi-ld/hasValue> ?batteryLevelValue .\n bind(<http://def.isotc211.org/iso19103/2005/UnitsOfMeasure#Measure.value> as ?batteryValuePredicate) .\n }\n \n OPTIONAL {\n ?wqo ngsiLdDC:conductivity ?conductivity .\n ?conductivity <https://uri.etsi.org/ngsi-ld/observedAt> ?conductivityPhenomenonTime .\n ?conductivity <https://uri.etsi.org/ngsi-ld/hasValue> ?conductivityValue .\n bind(<http://def.isotc211.org/iso19103/2005/UnitsOfMeasure#Measure.value> as ?conductivityValuePredicate) .\n }\n OPTIONAL {\n ?wqo ngsiLdDC:depth ?depth .\n ?depth <https://uri.etsi.org/ngsi-ld/observedAt> ?depthPhenomenonTime .\n ?depth <https://uri.etsi.org/ngsi-ld/hasValue> ?depthValue .\n bind(<http://def.isotc211.org/iso19103/2005/UnitsOfMeasure#Measure.value> as ?depthValuePredicate) .\n }\n OPTIONAL {\n ?wqo ngsiLdDC:temperature ?temperature .\n ?temperature <https://uri.etsi.org/ngsi-ld/observedAt> ?temperaturePhenomenonTime .\n ?temperature <https://uri.etsi.org/ngsi-ld/hasValue> ?temperatureValue .\n bind(<http://def.isotc211.org/iso19103/2005/UnitsOfMeasure#Measure.value> as ?temperatureValuePredicate) .\n }\n OPTIONAL {\n ?wqo ngsiLd:location ?location .\n ?location ngsiLdDC:asWkt ?locationWkt .\n }\n}",
"INCLUDE_ORIGINAL": "false",
"DATA_SOURCE_FORMAT": "application/ld+json"
},
Expand Down
Loading
Loading