From 16783bdbd5686e24817190f4bbb2296c65ae9f2e Mon Sep 17 00:00:00 2001 From: Virginia Balseiro Date: Tue, 17 Jan 2023 15:41:06 +0100 Subject: [PATCH 1/3] WIP: profile SHACL shape --- shapes/profile-shape.ttl | 107 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 shapes/profile-shape.ttl diff --git a/shapes/profile-shape.ttl b/shapes/profile-shape.ttl new file mode 100644 index 0000000..46c6377 --- /dev/null +++ b/shapes/profile-shape.ttl @@ -0,0 +1,107 @@ +PREFIX sh: +PREFIX dct: +PREFIX rdf: +PREFIX rdfs: +PREFIX solid: +PREFIX xsd: +PREFIX org: +PREFIX vcard: +PREFIX schema: +PREFIX foaf: +PREFIX : <#> + +:ProfileShape a sh:NodeShape; + dct:title "Profile shape"; + :property + [ + :datatype xsd:string; + :name "his/hers/theirs..."; + :path solid:preferredRelativePronoun ], + [ + :datatype xsd:string; + :name "him/her/them..."; + :path solid:preferredObjectPronoun ], + [ + :datatype xsd:string; + :name "he/she/they..."; + :path solid:preferredSubjectPronoun ], + [ + :name "Involvement with Organization"; + :node [ + a sh:NodeShape; + :property [ + :datatype xsd:string; + :name "Describe your role"; + :path schema:description ], + [ + :name "Organization"@en, + "Organization"@fr; + :path org:organization ], + [ + :name "occupation"; + :path org:role ], + [ + :datatype xsd:string; + :path vcard:role ] ]; + :path [:inversePath org:member ] ], + [ + :name "Skills"; + :node [ + a sh:NodeShape; + :property [ + :name "skill"; + :path solid:publicId ] ]; + :path schema:skills ], + [ + :name "Languages"; + :path schema:knowsLanguage; + :property [ + :node [ + a sh:NodeShape; + :property [ + :node [ + a sh:NodeShape; + :property [ + :name "Language"; + :path solid:publicId ] ]; + :path ( + [ + :zeroOrMorePath rdf:rest ] + rdf:first ) ] ]; + :path schema:knowsLanguage; + :targetClass rdf:Collection ] ], + [ + :datatype xsd:string; + :name "Short name for chats, etc."@en, + "surnom"@fr; + :path foaf:nick ], + [ + :min 1; + sh:or ( +[ + :name "Set type"; + :path rdf:type; + :targetValue schema:Person +] +[ + :name "Set type"; + :path rdf:type; + :targetValue foaf:Person ] +[ + :name "Set type"; + :path rdf:type; + :targetValue vcard:Individual +])], + [ + :name "Friends"; + :path foaf:knows; + :targetClass foaf:Person ]; + + sh:property [ + sh:name "Mugshots"; + sh:path vcard:hasPhoto; + sh:targetClass dct:Image; + ]; + sh:targetClass schema:Person, + vcard:Individual, + foaf:Person . From 86e28d50035f60e64e3750484ee38116b7c096ea Mon Sep 17 00:00:00 2001 From: Virginia Balseiro Date: Tue, 24 Jan 2023 08:31:15 +0100 Subject: [PATCH 2/3] Implement suggestions from review --- shapes/profile-shape.ttl | 121 ++++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 60 deletions(-) diff --git a/shapes/profile-shape.ttl b/shapes/profile-shape.ttl index 46c6377..44c3fbb 100644 --- a/shapes/profile-shape.ttl +++ b/shapes/profile-shape.ttl @@ -12,95 +12,96 @@ PREFIX : <#> :ProfileShape a sh:NodeShape; dct:title "Profile shape"; - :property + sh:property [ - :datatype xsd:string; - :name "his/hers/theirs..."; - :path solid:preferredRelativePronoun ], + sh:datatype xsd:string; + sh:name "his/hers/theirs..."; + sh:path solid:preferredRelativePronoun ], [ - :datatype xsd:string; - :name "him/her/them..."; - :path solid:preferredObjectPronoun ], + sh:datatype xsd:string; + sh:name "him/her/them..."; + sh:path solid:preferredObjectPronoun ], [ - :datatype xsd:string; - :name "he/she/they..."; - :path solid:preferredSubjectPronoun ], + sh:datatype xsd:string; + sh:name "he/she/they..."; + sh:path solid:preferredSubjectPronoun ], [ - :name "Involvement with Organization"; - :node [ + sh:name "Involvement with Organization"; + sh:node [ a sh:NodeShape; - :property [ - :datatype xsd:string; - :name "Describe your role"; - :path schema:description ], + sh:property [ + sh:datatype xsd:string; + sh:name "Describe your role"; + sh:path schema:description ], [ - :name "Organization"@en, + sh:name "Organization"@en, "Organization"@fr; - :path org:organization ], - [ - :name "occupation"; - :path org:role ], + sh:path org:organization ], +[ + sh:datatype xsd:string; + sh:name "Occupation"@en; + sh:or ( [ sh:path org:role ] [ sh:path vcard:role ] ) ], [ - :datatype xsd:string; - :path vcard:role ] ]; - :path [:inversePath org:member ] ], + sh:datatype xsd:string; + sh:path vcard:role ] ]; + sh:path [sh:inversePath org:member ] ], [ - :name "Skills"; - :node [ + sh:name "Skills"; + sh:node [ a sh:NodeShape; - :property [ - :name "skill"; - :path solid:publicId ] ]; - :path schema:skills ], + sh:property [ + sh:name "skill"; + sh:path solid:publicId ] ]; + sh:path schema:skills ], [ - :name "Languages"; - :path schema:knowsLanguage; - :property [ - :node [ + sh:name "Languages"; + sh:path schema:knowsLanguage; + sh:property [ + sh:node [ a sh:NodeShape; - :property [ - :node [ + sh:property [ + sh:node [ a sh:NodeShape; - :property [ - :name "Language"; - :path solid:publicId ] ]; - :path ( + sh:property [ + sh:name "Language"; + sh:path solid:publicId ] ]; + sh:path ( [ - :zeroOrMorePath rdf:rest ] + sh:zeroOrMorePath rdf:rest ] rdf:first ) ] ]; - :path schema:knowsLanguage; - :targetClass rdf:Collection ] ], + sh:path schema:knowsLanguage; + sh:targetClass schema:Text, schema:Language ] ], [ - :datatype xsd:string; - :name "Short name for chats, etc."@en, + sh:datatype xsd:string; + sh:name "Short name for chats, etc."@en, "surnom"@fr; - :path foaf:nick ], + sh:path foaf:nick ], [ - :min 1; + sh:min 1; sh:or ( [ - :name "Set type"; - :path rdf:type; - :targetValue schema:Person + sh:name "Set type"; + sh:path rdf:type; + sh:targetValue schema:Person ] [ - :name "Set type"; - :path rdf:type; - :targetValue foaf:Person ] + sh:name "Set type"; + sh:path rdf:type; + sh:targetValue foaf:Person ] [ - :name "Set type"; - :path rdf:type; - :targetValue vcard:Individual + sh:name "Set type"; + sh:path rdf:type; + sh:targetValue vcard:Individual ])], [ - :name "Friends"; - :path foaf:knows; - :targetClass foaf:Person ]; + sh:name "Friends"; + sh:path foaf:knows; + sh:class foaf:Person ]; sh:property [ sh:name "Mugshots"; sh:path vcard:hasPhoto; - sh:targetClass dct:Image; + sh:class dct:Image; ]; sh:targetClass schema:Person, vcard:Individual, From 91411232a713e3dc4984129cf8b16b1529196b02 Mon Sep 17 00:00:00 2001 From: Virginia Balseiro Date: Fri, 31 Mar 2023 14:23:57 +0200 Subject: [PATCH 3/3] reintroduce Collection as a possible targetClass for schema:knowsLanguage --- shapes/profile-shape.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shapes/profile-shape.ttl b/shapes/profile-shape.ttl index 44c3fbb..e5577b5 100644 --- a/shapes/profile-shape.ttl +++ b/shapes/profile-shape.ttl @@ -70,7 +70,7 @@ PREFIX : <#> sh:zeroOrMorePath rdf:rest ] rdf:first ) ] ]; sh:path schema:knowsLanguage; - sh:targetClass schema:Text, schema:Language ] ], + sh:targetClass schema:Text, schema:Language, rdf:Collection ] ], [ sh:datatype xsd:string; sh:name "Short name for chats, etc."@en,