Kathrin Dentler (kathrin.dentler@triply.cc),
Thomas de Groot (thomas.de.groot@triply.cc),
Wouter Beek (wouter@triply.cc)
Kathrin Dentler
(kathrin.dentler@triply.cc)
Kathrin Dentler
(kathrin.dentler@triply.cc)
def:surface
a owl:DatatypeProperty;
dct:source law:someArticle;
rdfs:domain def:PlaceOfResidence;
rdfs:range xsd:positiveInteger;
rdfs:seeAlso "https://link.to.online.definition"^^xsd:anyURI;
skos:definition "The surface of a place of residency that is qualified as living space. Recorded in square meters (m²)."@en;
skos:prefLabel "has surface"@en.
shape:oppervlakte
sh:datatype xsd:positiveInteger;
sh:description "A natural number between 1 and 999,999."@en;
sh:maxCount 1;
sh:minCount 1;
sh:path bag:oppervlakte;
sh:pattern "[0-9]{1,6}".
Thomas de Groot
(thomas.de.groot@triply.cc)
git clone git@github.com:RWS-NL/dis-ld.git
cd dis-ld
cp .ratt .ratt-private
yarn
yarn build
Go to: me/tokens to create a write token.
Edit your .ratt-private and paste in your token.
app.use(
mw.validateShacl("shapes.trig", {
reportLocation: `SHACL-report-kernGIS.ttl.gz`
})
);
And executing the ETL now applies SHACL validation.
yarn exec ratt ./lib/meridian/etl.js
Wouter Beek
(wouter.beek@triply.cc)
shape:status
sh:class def:Status;
sh:path def:status.
id:someRoad def:status status:used.
shape:status
sh:class def:Status;
sh:path def:status.
id:someRoad def:status status:used.
status:used a def:Status. # ← needed to pass streaming validation
shape:City
sh:property
[ sh:datatype xsd:string;
sh:path shape:name ];
sh:targetClass sdo:City.
shape:City
sh:property
[ sh:datatype xsd:string;
sh:path shape:name;
sh:pattern "[A-Za-z]{1,80}" ];
sh:targetClass sdo:City.
shape:City
sh:property
[ sh:datatype xsd:string;
sh:path shape:name;
sh:pattern "\\p{S}{1,80}" ];
sh:targetClass sdo:City.
Just right 😺! A reasonable number of display characters.
See XML Schema Datatypes for (much) more information.
shape:label
sh:languageIn ( "en" "nl" );
sh:maxCount 2;
sh:minCount 2;
sh:path skos:prefLabel.
city:theHague
skos:prefLabel
"Den Haag"@nl,
"'s-Gravenhage"@nl.
shape:label
sh:languageIn ( "en" "nl" );
sh:maxCount 2;
sh:minCount 2;
sh:path skos:prefLabel;
sh:uniqueLang true. # ← this expresses what we want
city:theHague
skos:altLabel "'s-Gravenhage"@nl;
skos:prefLabel
"The Hague"@en,
"Den Haag"@nl.
def:Status
owl:oneOf
( status:used
…
statis:unused ).
shape:status
sh:in
( status:used
…
statis:unused );
sh:path def:status.
def:Status
owl:oneOf
( status:used
…
statis:unused ).
shape:status
sh:class def:Status;
sh:path def:status.
construct {
?nodeShape sh:in ?valueList.
} where {
?nodeShape sh:class ?class.
?class owl:oneOf ?valueList.
}
def:Building rdfs:subClassOf shape:Feature.
def:Road rdfs:subClassOf shape:Feature.
shape:Building
sh:property
shape:geometry, # reuse potential
shape:address;
sh:targetClass def:Building.
shape:Road
sh:property
shape:geometry, # reuse potential
shape:surfaceType;
sh:targetClass def:Road.
def:Building rdfs:subClassOf shape:Feature.
def:Road rdfs:subClassOf shape:Feature.
shape:Feature
sh:property shape:geometry; # reuse
sh:tagetClass geo:Feature.
shape:Building
sh:property shape:address;
sh:targetClass def:Building.
shape:Road
sh:property shape:surfaceType;
sh:targetClass def:Road.
Kathrin Dentler (kathrin.dentler@triply.cc),
Thomas de Groot (thomas.de.groot@triply.cc),
Wouter Beek (wouter@triply.cc)