-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sh:in ConstraintComponent to Flink and SQLite SHACL to SQL transl…
…ation sh:in feature restricts values to a set of allowed values. This is used for instance for state values (when people do not do it the preferred way and manage state by IRIs) e.g. the SHACL sh:in ("ON" "OFF") restricts a Literal only to the values "ON" or "OFF". In addition, unit tests and kms tests have been extended. Epic: #427 User Story: #454 Task: #455 Signed-off-by: marcel <[email protected]>
- Loading branch information
Showing
15 changed files
with
274 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
semantic-model/shacl2flink/tests/sql-tests/kms-constraints/test1/model10.jsonld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[ | ||
{ | ||
"@context": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld", | ||
"id": "urn:plasmacutter:1", | ||
"type": "https://industry-fusion.com/types/v0.9/plasmacutter", | ||
"https://industry-fusion.com/types/v0.9/state": { | ||
"type": "Property", | ||
"value": { | ||
"@id": "https://industry-fusion.com/types/v0.9/state_OFF" | ||
} | ||
}, | ||
"https://industry-fusion.com/types/v0.9/stringState": { | ||
"type": "Property", | ||
"value": "T\"ST" | ||
}, | ||
"https://industry-fusion.com/types/v0.9/hasWorkpiece": { | ||
"type": "Relationship", | ||
"https://uri.etsi.org/ngsi-ld/hasObject": "urn:workpiece:1" | ||
}, | ||
"https://industry-fusion.com/types/v0.9/hasFilter": { | ||
"type": "Relationship", | ||
"object": "urn:filter:1" | ||
} | ||
}, | ||
{ | ||
"@context": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld", | ||
"id": "urn:filter:1", | ||
"type": "https://industry-fusion.com/types/v0.9/filter", | ||
"https://industry-fusion.com/types/v0.9/state": { | ||
"type": "Property", | ||
"value": { | ||
"@id": "https://industry-fusion.com/types/v0.9/state_PREPARING" | ||
} | ||
}, | ||
"https://industry-fusion.com/types/v0.9/stringState": { | ||
"type": "Property", | ||
"value": "t1,t2" | ||
}, | ||
"https://industry-fusion.com/types/v0.9/strength": { | ||
"type": "Property", | ||
"value": 0.5 | ||
}, | ||
"https://industry-fusion.com/types/v0.9/hasCartridge": { | ||
"type": "Relationship", | ||
"https://uri.etsi.org/ngsi-ld/hasObject": "urn:filterCartridge:1" | ||
} | ||
} | ||
] |
24 changes: 24 additions & 0 deletions
24
semantic-model/shacl2flink/tests/sql-tests/kms-constraints/test1/model10.jsonld_result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'urn:filter:1','ClassConstraintComponent(https://industry-fusion.com/types/v0.9/hasCartridge[0])','warning' | ||
'urn:filter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/hasCartridge)','ok' | ||
'urn:filter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/state)','ok' | ||
'urn:filter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/stringState)','ok' | ||
'urn:filter:1','DatatypeConstraintComponent(https://industry-fusion.com/types/v0.9/state[0])','ok' | ||
'urn:filter:1','InConstraintComponent(https://industry-fusion.com/types/v0.9/stringState[0])','ok' | ||
'urn:filter:1','MaxInclusiveConstraintComponent(https://industry-fusion.com/types/v0.9/strength[0])','ok' | ||
'urn:filter:1','MinInclusiveConstraintComponent(https://industry-fusion.com/types/v0.9/strength[0])','ok' | ||
'urn:filter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/hasCartridge)','warning' | ||
'urn:filter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/state[0])','ok' | ||
'urn:filter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/strength[0])','ok' | ||
'urn:filter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/stringState[0])','ok' | ||
'urn:plasmacutter:1','ClassConstraintComponent(https://industry-fusion.com/types/v0.9/hasFilter[0])','ok' | ||
'urn:plasmacutter:1','ClassConstraintComponent(https://industry-fusion.com/types/v0.9/hasWorkpiece[0])','warning' | ||
'urn:plasmacutter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/hasFilter)','ok' | ||
'urn:plasmacutter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/hasWorkpiece)','ok' | ||
'urn:plasmacutter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/state)','ok' | ||
'urn:plasmacutter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/stringState)','ok' | ||
'urn:plasmacutter:1','DatatypeConstraintComponent(https://industry-fusion.com/types/v0.9/state[0])','ok' | ||
'urn:plasmacutter:1','InConstraintComponent(https://industry-fusion.com/types/v0.9/stringState[0])','warning' | ||
'urn:plasmacutter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/hasFilter)','ok' | ||
'urn:plasmacutter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/hasWorkpiece)','warning' | ||
'urn:plasmacutter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/state[0])','ok' | ||
'urn:plasmacutter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/stringState[0])','ok' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
semantic-model/shacl2flink/tests/sql-tests/kms-constraints/test1/model3.jsonld_result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
'urn:filter:1','ClassConstraintComponent(https://industry-fusion.com/types/v0.9/hasCartridge[0])','warning' | ||
'urn:filter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/hasCartridge)','ok' | ||
'urn:filter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/state)','ok' | ||
'urn:filter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/stringState)','ok' | ||
'urn:filter:1','DatatypeConstraintComponent(https://industry-fusion.com/types/v0.9/state[0])','ok' | ||
'urn:filter:1','InConstraintComponent(https://industry-fusion.com/types/v0.9/stringState[0])','ok' | ||
'urn:filter:1','MaxInclusiveConstraintComponent(https://industry-fusion.com/types/v0.9/strength[0])','ok' | ||
'urn:filter:1','MinInclusiveConstraintComponent(https://industry-fusion.com/types/v0.9/strength[0])','ok' | ||
'urn:filter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/hasCartridge)','ok' | ||
'urn:filter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/state[0])','ok' | ||
'urn:filter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/strength[0])','ok' | ||
'urn:filter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/stringState[0])','ok' | ||
'urn:plasmacutter:1','ClassConstraintComponent(https://industry-fusion.com/types/v0.9/hasFilter[0])','ok' | ||
'urn:plasmacutter:1','ClassConstraintComponent(https://industry-fusion.com/types/v0.9/hasWorkpiece[0])','warning' | ||
'urn:plasmacutter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/hasFilter)','ok' | ||
'urn:plasmacutter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/hasWorkpiece)','ok' | ||
'urn:plasmacutter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/state)','ok' | ||
'urn:plasmacutter:1','CountConstraintComponent(https://industry-fusion.com/types/v0.9/stringState)','ok' | ||
'urn:plasmacutter:1','DatatypeConstraintComponent(https://industry-fusion.com/types/v0.9/state[0])','ok' | ||
'urn:plasmacutter:1','InConstraintComponent(https://industry-fusion.com/types/v0.9/stringState[0])','ok' | ||
'urn:plasmacutter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/hasFilter)','ok' | ||
'urn:plasmacutter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/hasWorkpiece)','ok' | ||
'urn:plasmacutter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/state[0])','ok' | ||
'urn:plasmacutter:1','NodeKindConstraintComponent(https://industry-fusion.com/types/v0.9/stringState[0])','ok' |
6 changes: 6 additions & 0 deletions
6
semantic-model/shacl2flink/tests/sql-tests/kms-constraints/test1/model4.jsonld_result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.