-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
163 additions
and
36 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
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
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
92 changes: 92 additions & 0 deletions
92
test/standalone-constraint-constraint/invalid.annotation-tooManyValues.ttl
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,92 @@ | ||
PREFIX ex: <http://example.org/> | ||
PREFIX dcterms: <http://purl.org/dc/terms/> | ||
@prefix relation: <https://cube.link/relation/> . | ||
@prefix meta: <https://cube.link/meta/> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix cube: <https://cube.link/> . | ||
@prefix observation: <https://environment.ld.admin.ch/foen/nfi/observation/max_min_undefined> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix schema: <http://schema.org/> . | ||
@base <https://example.org/> . | ||
|
||
<cube> a cube:Cube ; | ||
cube:observationConstraint <shape> ; | ||
cube:observationSet <observationSet> . | ||
|
||
<observationSet> cube:observation <observationA> . | ||
|
||
<observationA> a cube:Observation ; | ||
cube:observedBy <observer> ; | ||
<measure> 4.9 ; | ||
<year> <https://ld.admin.ch/time/year/2020> ; | ||
. | ||
|
||
<shape> a cube:Constraint ; | ||
sh:targetClass cube:Observation ; | ||
sh:closed true ; | ||
sh:property | ||
[ | ||
sh:path rdf:type ; | ||
sh:nodeKind sh:IRI ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 | ||
] ; | ||
sh:property | ||
[ | ||
sh:path cube:observedBy ; ; | ||
sh:nodeKind sh:IRI ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 | ||
] ; | ||
sh:property | ||
[ | ||
a cube:MeasureDimension ; | ||
sh:datatype xsd:decimal ; | ||
sh:path <measure> ; | ||
schema:name "measure" ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
meta:annotation | ||
[ | ||
a meta:Limit ; | ||
schema:name "Target 2020+" ; | ||
schema:minValue 10 ; | ||
schema:minValue 20 ; | ||
meta:annotationContext | ||
[ | ||
sh:path <year> ; | ||
sh:minInclusive <https://ld.admin.ch/time/year/2020> ; | ||
] ; | ||
], | ||
[ | ||
a meta:Limit ; | ||
schema:name "Target 2025+" ; | ||
schema:maxValue 10 ; | ||
schema:maxValue 20 ; | ||
meta:annotationContext | ||
[ | ||
sh:path <year> ; | ||
sh:minInclusive <https://ld.admin.ch/time/year/2025> ; | ||
] ; | ||
] ; | ||
] ; | ||
sh:property | ||
[ | ||
a cube:KeyDimension ; | ||
sh:path <year> ; | ||
schema:name "year" ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:nodeKind sh:IRI ; | ||
] ; | ||
sh:property | ||
[ | ||
a cube:KeyDimension ; | ||
sh:path <station> ; | ||
schema:name "station" ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:nodeKind sh:IRI ; | ||
] ; | ||
. |
32 changes: 32 additions & 0 deletions
32
test/standalone-constraint-constraint/invalid.annotation-tooManyValues.ttl.approved.txt
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,32 @@ | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix cube: <https://cube.link/> . | ||
|
||
_:report a sh:ValidationReport ; | ||
sh:result [ | ||
rdf:type sh:ValidationResult ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; | ||
sh:sourceShape [ | ||
sh:path schema:minValue ; | ||
sh:maxCount 1 ; | ||
] ; | ||
sh:focusNode _:b4 ; | ||
sh:resultPath schema:minValue ; | ||
sh:resultMessage "More than 1 values" ; | ||
], [ | ||
rdf:type sh:ValidationResult ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; | ||
sh:sourceShape [ | ||
sh:path schema:maxValue ; | ||
sh:maxCount 1 ; | ||
] ; | ||
sh:focusNode _:b6 ; | ||
sh:resultPath schema:maxValue ; | ||
sh:resultMessage "More than 1 values" ; | ||
] ; | ||
sh:conforms false . |
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