Datasets:
Upload shapes/modip-shapes.ttl with huggingface_hub
Browse files- shapes/modip-shapes.ttl +51 -0
shapes/modip-shapes.ttl
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SHACL shapes for the MoDiP CIDOC-CRM graph.
|
| 2 |
+
# These enforce the invariants the transformation guarantees. Validation is run
|
| 3 |
+
# by src/validate.py with pyshacl; a clean run is a release gate.
|
| 4 |
+
@prefix sh: <http://www.w3.org/ns/shacl#> .
|
| 5 |
+
@prefix crm: <http://www.cidoc-crm.org/cidoc-crm/> .
|
| 6 |
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
| 7 |
+
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
| 8 |
+
@prefix dct: <http://purl.org/dc/terms/> .
|
| 9 |
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
| 10 |
+
|
| 11 |
+
# Every object must be a titled, identified, rights-bearing E22 whose materials
|
| 12 |
+
# are resolved concepts (crm:E57_Material), not free-text strings.
|
| 13 |
+
<https://ontology.tesseract.academy/modip/shapes/ObjectShape>
|
| 14 |
+
a sh:NodeShape ;
|
| 15 |
+
sh:targetClass crm:E22_Human-Made_Object ;
|
| 16 |
+
sh:property [ sh:path rdfs:label ; sh:minCount 1 ; sh:severity sh:Warning ;
|
| 17 |
+
sh:message "object should have a label/title" ] ;
|
| 18 |
+
sh:property [ sh:path crm:P1_is_identified_by ; sh:minCount 1 ;
|
| 19 |
+
sh:message "object must carry an identifier (accession number)" ] ;
|
| 20 |
+
sh:property [ sh:path dct:rightsHolder ; sh:minCount 1 ;
|
| 21 |
+
sh:message "object must record a rights holder" ] ;
|
| 22 |
+
sh:property [ sh:path crm:P45_consists_of ; sh:nodeKind sh:IRI ;
|
| 23 |
+
sh:class skos:Concept ;
|
| 24 |
+
sh:message "material must be a resolved SKOS/E57 concept, not a literal" ] .
|
| 25 |
+
|
| 26 |
+
# Identifiers must carry symbolic content.
|
| 27 |
+
<https://ontology.tesseract.academy/modip/shapes/IdentifierShape>
|
| 28 |
+
a sh:NodeShape ;
|
| 29 |
+
sh:targetClass crm:E42_Identifier ;
|
| 30 |
+
sh:property [ sh:path crm:P190_has_symbolic_content ; sh:minCount 1 ;
|
| 31 |
+
sh:datatype xsd:string ;
|
| 32 |
+
sh:message "identifier must have symbolic content" ] .
|
| 33 |
+
|
| 34 |
+
# Parsed dimensions must have a numeric value and a unit.
|
| 35 |
+
<https://ontology.tesseract.academy/modip/shapes/DimensionShape>
|
| 36 |
+
a sh:NodeShape ;
|
| 37 |
+
sh:targetClass crm:E54_Dimension ;
|
| 38 |
+
sh:xone (
|
| 39 |
+
[ sh:property [ sh:path crm:P90_has_value ; sh:minCount 1 ; sh:datatype xsd:decimal ] ;
|
| 40 |
+
sh:property [ sh:path crm:P91_has_unit ; sh:minCount 1 ] ]
|
| 41 |
+
[ sh:property [ sh:path rdfs:label ; sh:minCount 1 ] ]
|
| 42 |
+
) ;
|
| 43 |
+
sh:message "dimension must be either (value+unit) or an unparsed label" .
|
| 44 |
+
|
| 45 |
+
# Production events must be linked from an object and be well-formed.
|
| 46 |
+
<https://ontology.tesseract.academy/modip/shapes/ProductionShape>
|
| 47 |
+
a sh:NodeShape ;
|
| 48 |
+
sh:targetClass crm:E12_Production ;
|
| 49 |
+
sh:property [ sh:path [ sh:inversePath crm:P108i_was_produced_by ] ;
|
| 50 |
+
sh:minCount 1 ;
|
| 51 |
+
sh:message "production event must be attached to an object" ] .
|