-
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.
refactor: use SPARQL to adjust valid query so that it becomes invalid
- Loading branch information
Showing
5 changed files
with
235 additions
and
77 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,10 @@ | ||
PREFIX dcterms: <http://purl.org/dc/terms/> | ||
|
||
CONSTRUCT { | ||
?s ?p ?o | ||
} WHERE { | ||
?s ?p ?o . | ||
MINUS { | ||
?s dcterms:identifier ?o . | ||
} | ||
} |
This file was deleted.
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,178 @@ | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
PREFIX dcat: <http://www.w3.org/ns/dcat#> | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
PREFIX schema: <http://schema.org/> | ||
PREFIX dcterms: <http://purl.org/dc/terms/> | ||
PREFIX sh: <http://www.w3.org/ns/shacl#> | ||
prefix code: <https://cube.link/code#> | ||
prefix dcat-theme: <http://dcat-ap.ch/vocabulary/themes/> | ||
prefix cube: <https://cube.link/> | ||
prefix frequency: <http://publications.europa.eu/resource/authority/frequency/> | ||
prefix : <https://cube.link/> | ||
|
||
[ | ||
code:imports <./standalone-cube-constraint> | ||
] . | ||
|
||
<CubeShape> | ||
a sh:NodeShape ; | ||
sh:targetClass cube:Cube ; | ||
sh:property | ||
[ | ||
sh:path rdf:type ; | ||
sh:hasValue dcat:Dataset ; | ||
], | ||
[ | ||
sh:path dcterms:creator ; | ||
sh:equals schema:creator ; | ||
], | ||
[ | ||
sh:path dcterms:publisher ; | ||
sh:equals schema:publisher ; | ||
], | ||
[ | ||
sh:path dcat:contactPoint ; | ||
sh:equals schema:contactPoint ; | ||
], | ||
[ | ||
sh:path dcterms:identifier ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:datatype xsd:string ; | ||
], | ||
[ | ||
sh:path schema:workExample ; | ||
sh:hasValue <https://ld.admin.ch/application/opendataswiss> ; | ||
], | ||
[ | ||
sh:path schema:creativeWorkStatus ; | ||
sh:hasValue <https://ld.admin.ch/vocabulary/CreativeWorkStatus/Published> ; | ||
], | ||
[ | ||
sh:path dcterms:title ; | ||
sh:minCount 1 ; | ||
sh:languageIn ( "de" "fr" "it" "en" ) ; | ||
sh:uniqueLang true ; | ||
], | ||
[ | ||
sh:path dcterms:description ; | ||
sh:minCount 1 ; | ||
sh:languageIn ( "de" "fr" "it" "en" ) ; | ||
sh:uniqueLang true ; | ||
], | ||
[ | ||
sh:path dcat:contactPoint ; | ||
sh:minCount 1 ; | ||
# TODO: validate vcard structure | ||
], | ||
[ | ||
sh:path dcat:distribution ; | ||
# TODO: validate structure | ||
], | ||
[ | ||
sh:path dcat:issued ; | ||
sh:maxCount 1 ; | ||
sh:datatype xsd:dateTime ; | ||
], | ||
[ | ||
sh:path dcat:modified ; | ||
sh:maxCount 1 ; | ||
sh:datatype xsd:dateTime ; | ||
], | ||
[ | ||
sh:path dcat:theme ; | ||
sh:in | ||
( | ||
dcat-theme:work | ||
dcat-theme:construction | ||
dcat-theme:population | ||
dcat-theme:education | ||
dcat-theme:energy | ||
dcat-theme:finances | ||
dcat-theme:geography | ||
dcat-theme:legislation | ||
dcat-theme:health | ||
dcat-theme:trade | ||
dcat-theme:industry | ||
dcat-theme:crime | ||
dcat-theme:culture | ||
dcat-theme:agriculture | ||
dcat-theme:mobility | ||
dcat-theme:politics | ||
dcat-theme:prices | ||
dcat-theme:territory | ||
dcat-theme:social-security | ||
dcat-theme:statistical-basis | ||
dcat-theme:tourism | ||
dcat-theme:administration | ||
dcat-theme:national-economy | ||
) ; | ||
], | ||
[ | ||
sh:path dcat:landingPage ; | ||
#sh:maxCount 1 ; | ||
sh:nodeKind sh:IRI ; | ||
], | ||
[ | ||
sh:path dcterms:relation ; | ||
sh:nodeKind sh:IRI ; | ||
], | ||
[ | ||
sh:path rdfs:seeAlso ; | ||
sh:nodeKind sh:IRI ; | ||
], | ||
[ | ||
sh:path dcterms:spatial ; | ||
# TODO | ||
], | ||
[ | ||
sh:path dcterms:coverage ; | ||
# TODO | ||
], | ||
[ | ||
sh:path dcterms:temporal ; | ||
# TODO | ||
], | ||
[ | ||
sh:path dcat:keyword ; | ||
sh:languageIn ( "de" "fr" "it" "en" ) ; | ||
], | ||
[ | ||
sh:path dcat:accrualPeriodicity ; | ||
sh:maxCount 1 ; | ||
sh:in | ||
( | ||
frequency:ANNUAL_2 | ||
frequency:ANNUAL_3 | ||
frequency:BIENNIAL | ||
frequency:BIMONTHLY | ||
frequency:BIWEEKLY | ||
frequency:CONT | ||
frequency:DAILY | ||
frequency:DAILY_2 | ||
frequency:IRREG | ||
frequency:MONTHLY | ||
frequency:MONTHLY_2 | ||
frequency:MONTHLY_3 | ||
frequency:NEVER | ||
frequency:OP_DATPRO | ||
frequency:QUARTERLY | ||
frequency:TRIENNIAL | ||
frequency:UNKNOWN | ||
frequency:UPDATE_CONT | ||
frequency:WEEKLY_2 | ||
frequency:WEEKLY_3 | ||
frequency:QUINQUENNIAL | ||
frequency:DECENNIAL | ||
frequency:HOURLY | ||
frequency:QUADRENNIAL | ||
frequency:BIHOURLY | ||
frequency:TRIHOURLY | ||
frequency:BIDECENNIAL | ||
frequency:TRIDECENNIAL | ||
frequency:OTHER | ||
frequency:WEEKLY | ||
frequency:ANNUAL | ||
) ; | ||
] . |
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