@@ -32,29 +32,33 @@ five-safes-crate:PersonAgentHasAffiliation
3232 ] .
3333
3434
35- # All schema:Organization instances: @id SHOULD be a PID permalink (ROR / ISNI / Wikidata)
36- five-safes-crate:OrganizationIdIsPIDPermalink
35+ five-safes-crate:PersonAgentOfCreateAction_AffiliationPermalinkCheck
3736 a sh:NodeShape ;
38- sh:name " Organizations value restriction " ;
39- sh:description " An Organization `@id` should be a PID permalink (ROR, ISNI, or Wikidata) ." ;
37+ sh:name " Person (agent of CreateAction) → affiliation Organization PID check " ;
38+ sh:description " For Persons who are agents of a CreateAction, validate that any affiliation Organization has a PID permalink @id ." ;
4039
41- # Target the CLASS node; values are all subjects with rdf:type schema:Organization
42- sh:targetNode schema:Organization ;
40+ # Target: Persons that are objects of schema:agent where the subject is a CreateAction
41+ sh:target [
42+ a sh:SPARQLTarget ;
43+ sh:prefixes ro-crate:sparqlPrefixes ;
44+ sh:select """
45+ SELECT ?this WHERE {
46+ ?this a schema:Person .
47+ ?action a schema:CreateAction ;
48+ schema:agent ?this .
49+ }
50+ """ ;
51+ ] ;
4352
53+ # If the Person has an affiliation, validate the affiliation node's IRI
4454 sh:property [
4555 a sh:PropertyShape ;
46- sh:name " Organization URI value" ;
47- sh:description " Check that the Organization entity URI (@id) is a PID permalink." ;
48-
49- # From the class node, walk inverse rdf:type to all instances
50- sh:path [ sh:inversePath rdf:type ] ;
51-
52- # Require at least one instance (prevents empty graphs from 'passing')
53- sh:minCount 1 ;
54-
55- # Regex over the string form of the instance IRI
56+ sh:name " affiliation Organization PID permalink" ;
57+ sh:path schema:affiliation ;
58+ # Optional typing requirement (keep or drop as you prefer)
59+ sh:class schema:Organization ;
60+ sh:nodeKind sh:IRI ;
5661 sh:pattern " ^(?:https://(?:ror\\.org/0[0-9a-hjkmnp-tv-z]{6}[0-9]{2}|isni\\.org/isni/\\d{15}[\\dX]|(?:www\\.)?wikidata\\.org/entity/Q\\d+))$" ;
5762 sh:flags " i" ;
58-
59- sh:message " Organization @id SHOULD be a PID permalink (ROR/ISNI/Wikidata)." ;
60- ] .
63+ sh:message " Affiliation Organization @id SHOULD be a PID permalink (ROR/ISNI/Wikidata)." ;
64+ ] .
0 commit comments