-
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
14 changed files
with
672 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"cube-link": patch | ||
--- | ||
|
||
Visualize validation profile (closes #114) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
PREFIX meta: <https://cube.link/meta/> | ||
PREFIX sh: <http://www.w3.org/ns/shacl#> | ||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
PREFIX dcterms: <http://purl.org/dc/terms/> | ||
PREFIX schema: <http://schema.org/> | ||
PREFIX dcat: <http://www.w3.org/ns/dcat#> | ||
PREFIX cube: <https://cube.link/> | ||
PREFIX ex: <http://example.org/> | ||
|
||
ex:Cube | ||
a cube:Cube, dcat:Dataset ; | ||
cube:observationSet <observationSet> ; | ||
cube:observationConstraint <observationConstraint> ; | ||
schema:name "Example cube" ; | ||
schema:publisher <publisher> ; | ||
schema:creator <creator> ; | ||
schema:contributor <contributor> ; | ||
dcterms:identifier "cube-1234" ; | ||
schema:workExample <https://ld.admin.ch/application/visualize> ; | ||
schema:creativeWorkStatus <https://ld.admin.ch/vocabulary/CreativeWorkStatus/Published> ; | ||
dcterms:creator ex:John-Doe ; | ||
schema:dateCreated "2020-10-10"^^xsd:date ; | ||
schema:dateModified "2020-10-10"^^xsd:date ; | ||
schema:datePublished "2020-11-11"^^xsd:date ; | ||
schema:contactPoint | ||
[ | ||
schema:name "John Doe" ; | ||
schema:email "[email protected]" ; | ||
] ; | ||
. | ||
|
||
<observationSet> cube:observation <observation> . | ||
|
||
<observation> a cube:Observation ; | ||
cube:observedBy <observer> ; | ||
<dimension1> 4.9 . | ||
|
||
<observationConstraint> a cube:Constraint ; | ||
sh:closed true ; | ||
sh:property | ||
[ | ||
schema:name "Value" ; | ||
sh:path <dimension1> ; | ||
sh:datatype rdf:langString ; | ||
], | ||
[ | ||
sh:path rdf:type ; | ||
sh:nodeKind sh:IRI | ||
], | ||
[ | ||
sh:path cube:observedBy ; | ||
sh:nodeKind sh:IRI | ||
] ; | ||
. |
63 changes: 63 additions & 0 deletions
63
test/profile-visualize/invalid-datatype-langstring.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,63 @@ | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix cube: <https://cube.link/> . | ||
|
||
_:report a sh:ValidationReport ; | ||
sh:result [ | ||
rdf:type sh:ValidationResult ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:NodeConstraintComponent ; | ||
sh:sourceShape [ | ||
sh:path cube:observationConstraint ; | ||
sh:maxCount 1 ; | ||
sh:minCount 1 ; | ||
sh:node <https://cube.link/shape/profile-opendataswiss-lindas#ObservationConstraintShape> ; | ||
] ; | ||
sh:focusNode <http://example.org/Cube> ; | ||
sh:value <observationConstraint> ; | ||
sh:resultMessage "Value does not have shape <https://cube.link/shape/profile-opendataswiss-lindas#ObservationConstraintShape>" ; | ||
sh:detail [ | ||
rdf:type sh:ValidationResult ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; | ||
sh:sourceShape [ | ||
sh:nodeKind sh:IRI ; | ||
] ; | ||
sh:focusNode _:b1 ; | ||
sh:value _:b1 ; | ||
sh:resultMessage "Value does not have node kind <http://www.w3.org/ns/shacl#IRI>" ; | ||
], [ | ||
rdf:type sh:ValidationResult ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:OrConstraintComponent ; | ||
sh:sourceShape _:b393 ; | ||
sh:focusNode <observationConstraint> ; | ||
sh:value _:b2 ; | ||
sh:resultMessage "Observation constraint must have exactly one datatype. It cannot be rdf:langString" ; | ||
sh:resultPath sh:property ; | ||
] ; | ||
sh:resultPath cube:observationConstraint ; | ||
], [ | ||
rdf:type sh:ValidationResult ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:OrConstraintComponent ; | ||
sh:sourceShape _:b393 ; | ||
sh:focusNode <observationConstraint> ; | ||
sh:value _:b2 ; | ||
sh:resultMessage "Observation constraint must have exactly one datatype. It cannot be rdf:langString" ; | ||
sh:resultPath sh:property ; | ||
] ; | ||
sh:conforms false . | ||
|
||
_:b393 sh:path sh:property ; | ||
sh:or ( | ||
[ | ||
sh:node <https://cube.link/shape/profile-opendataswiss-lindas#ObservationConstraintDatatypeProperty> ; | ||
] | ||
[ | ||
sh:node <https://cube.link/shape/profile-opendataswiss-lindas#ObservationConstraintCoreProperty> ; | ||
] | ||
) ; | ||
sh:message "Observation constraint must have exactly one datatype. It cannot be rdf:langString" . |
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,55 @@ | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
PREFIX meta: <https://cube.link/meta/> | ||
PREFIX sh: <http://www.w3.org/ns/shacl#> | ||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
PREFIX dcterms: <http://purl.org/dc/terms/> | ||
PREFIX schema: <http://schema.org/> | ||
PREFIX dcat: <http://www.w3.org/ns/dcat#> | ||
PREFIX cube: <https://cube.link/> | ||
PREFIX ex: <http://example.org/> | ||
|
||
ex:Cube | ||
a cube:Cube, dcat:Dataset ; | ||
cube:observationSet <observationSet> ; | ||
cube:observationConstraint <observationConstraint> ; | ||
schema:name "Example cube" ; | ||
schema:publisher <publisher> ; | ||
schema:creator <creator> ; | ||
schema:contributor <contributor> ; | ||
dcterms:identifier "cube-1234" ; | ||
schema:workExample <https://ld.admin.ch/application/visualize> ; | ||
# schema:creativeWorkStatus <https://ld.admin.ch/vocabulary/CreativeWorkStatus/Draft> ; | ||
dcterms:creator ex:John-Doe ; | ||
schema:dateCreated "2020-10-10"^^xsd:date ; | ||
schema:dateModified "2020-10-10"^^xsd:date ; | ||
schema:datePublished "2020-11-11"^^xsd:date ; | ||
schema:contactPoint | ||
[ | ||
schema:name "John Doe" ; | ||
schema:email "[email protected]" ; | ||
] ; | ||
. | ||
|
||
<observationSet> cube:observation <observation> . | ||
|
||
<observation> a cube:Observation ; | ||
cube:observedBy <observer> ; | ||
<dimension1> 4.9 . | ||
|
||
<observationConstraint> a cube:Constraint ; | ||
sh:closed true ; | ||
sh:property | ||
[ | ||
schema:name "Value" ; | ||
sh:path <dimension1> ; | ||
sh:datatype xsd:decimal ; | ||
], | ||
[ | ||
sh:path rdf:type ; | ||
sh:nodeKind sh:IRI | ||
], | ||
[ | ||
sh:path cube:observedBy ; | ||
sh:nodeKind sh:IRI | ||
] ; | ||
. |
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 @@ | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix cube: <https://cube.link/> . | ||
|
||
_:report a sh:ValidationReport ; | ||
sh:result [ | ||
rdf:type sh:ValidationResult ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:MinCountConstraintComponent ; | ||
sh:sourceShape [ | ||
sh:path schema:creativeWorkStatus ; | ||
sh:in ( | ||
<https://ld.admin.ch/vocabulary/CreativeWorkStatus/Published> | ||
<https://ld.admin.ch/vocabulary/CreativeWorkStatus/Draft> | ||
) ; | ||
sh:minCount 1 ; | ||
] ; | ||
sh:focusNode <http://example.org/Cube> ; | ||
sh:resultPath schema:creativeWorkStatus ; | ||
sh:resultMessage "Less 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
PREFIX time: <http://www.w3.org/2006/time#> | ||
PREFIX qudt: <http://qudt.org/schema/qudt/> | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
PREFIX meta: <https://cube.link/meta/> | ||
PREFIX sh: <http://www.w3.org/ns/shacl#> | ||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
PREFIX dcterms: <http://purl.org/dc/terms/> | ||
PREFIX schema: <http://schema.org/> | ||
PREFIX dcat: <http://www.w3.org/ns/dcat#> | ||
PREFIX cube: <https://cube.link/> | ||
PREFIX ex: <http://example.org/> | ||
|
||
ex:Cube | ||
a cube:Cube, dcat:Dataset ; | ||
cube:observationSet <observationSet> ; | ||
cube:observationConstraint <observationConstraint> ; | ||
schema:name "Example cube" ; | ||
schema:publisher <publisher> ; | ||
schema:creator <creator> ; | ||
schema:contributor <contributor> ; | ||
dcterms:identifier "cube-1234" ; | ||
schema:workExample <https://ld.admin.ch/application/visualize> ; | ||
schema:creativeWorkStatus <https://ld.admin.ch/vocabulary/CreativeWorkStatus/Published> ; | ||
dcterms:creator ex:John-Doe ; | ||
schema:dateCreated "2020-10-10"^^xsd:date ; | ||
schema:dateModified "2020-10-10"^^xsd:date ; | ||
schema:datePublished "2020-11-11"^^xsd:date ; | ||
schema:contactPoint | ||
[ | ||
schema:name "John Doe" ; | ||
schema:email "[email protected]" ; | ||
] ; | ||
. | ||
|
||
<observationSet> cube:observation <observation> . | ||
|
||
<observation> a cube:Observation ; | ||
cube:observedBy <observer> ; | ||
<y> "2000"^^xsd:gYear ; | ||
. | ||
|
||
<observationConstraint> a cube:Constraint ; | ||
sh:closed true ; | ||
sh:property | ||
[ | ||
# no datatype, no time:unitType | ||
schema:name "Year" ; | ||
sh:path <y> ; | ||
sh:nodeKind sh:Literal ; | ||
meta:dataKind | ||
[ | ||
a time:GeneralDateTimeDescription ; | ||
] ; | ||
], | ||
[ | ||
sh:path rdf:type ; | ||
sh:nodeKind sh:IRI | ||
], | ||
[ | ||
sh:path cube:observedBy ; | ||
sh:nodeKind sh:IRI | ||
] ; | ||
. |
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,17 @@ | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix cube: <https://cube.link/> . | ||
|
||
_:report a sh:ValidationReport ; | ||
sh:result [ | ||
rdf:type sh:ValidationResult ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:OrConstraintComponent ; | ||
sh:sourceShape <https://cube.link/shape/profile-opendataswiss-lindas#TemporalDimensionConstraint> ; | ||
sh:focusNode _:b3 ; | ||
sh:value _:b3 ; | ||
sh:resultMessage "Temporal dimension must be one of XSD datatypes: gYear, gYearMonth, date, dateTime, or have time:unitType" ; | ||
] ; | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
PREFIX meta: <https://cube.link/meta/> | ||
PREFIX sh: <http://www.w3.org/ns/shacl#> | ||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
PREFIX dcterms: <http://purl.org/dc/terms/> | ||
PREFIX schema: <http://schema.org/> | ||
PREFIX dcat: <http://www.w3.org/ns/dcat#> | ||
PREFIX cube: <https://cube.link/> | ||
PREFIX ex: <http://example.org/> | ||
|
||
ex:Cube | ||
a cube:Cube, dcat:Dataset ; | ||
cube:observationSet <observationSet> ; | ||
cube:observationConstraint <observationConstraint> ; | ||
schema:name "Example cube" ; | ||
schema:publisher <publisher> ; | ||
schema:creator <creator> ; | ||
schema:contributor <contributor> ; | ||
dcterms:identifier "cube-1234" ; | ||
schema:workExample <https://ld.admin.ch/application/visualize> ; | ||
schema:creativeWorkStatus <https://ld.admin.ch/vocabulary/CreativeWorkStatus/Draft> ; | ||
dcterms:creator ex:John-Doe ; | ||
schema:dateCreated "2020-10-10"^^xsd:date ; | ||
schema:dateModified "2020-10-10"^^xsd:date ; | ||
schema:datePublished "2020-11-11"^^xsd:date ; | ||
schema:contactPoint | ||
[ | ||
schema:name "John Doe" ; | ||
schema:email "[email protected]" ; | ||
] ; | ||
. | ||
|
||
<observationSet> cube:observation <observation> . | ||
|
||
<observation> a cube:Observation ; | ||
cube:observedBy <observer> ; | ||
<dimension1> 4.9 . | ||
|
||
<observationConstraint> a cube:Constraint ; | ||
sh:closed true ; | ||
sh:property | ||
[ | ||
schema:name "Value" ; | ||
sh:path <dimension1> ; | ||
sh:datatype xsd:decimal ; | ||
], | ||
[ | ||
sh:path rdf:type ; | ||
sh:nodeKind sh:IRI | ||
], | ||
[ | ||
sh:path cube:observedBy ; | ||
sh:nodeKind sh:IRI | ||
] ; | ||
. |
Oops, something went wrong.