Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile SHACL shape #84

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions shapes/profile-shape.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX solid: <http://www.w3.org/ns/solid/terms#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
PREFIX schema: <http://schema.org/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX : <#>

:ProfileShape a sh:NodeShape;
dct:title "Profile shape";
sh:property
[
sh:datatype xsd:string;
sh:name "his/hers/theirs...";
Copy link

@jeswr jeswr Apr 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A large amount of the sh:names seem better suited to sh:descriptions

Suggested change
sh:name "his/hers/theirs...";
sh:name "Preferred Relative Pronoun";
sh:description "his/hers/theirs...";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, these are not and should not be referred to as the person's "preferred" pronouns; rather, they are simply the person's pronouns.

sh:path solid:preferredRelativePronoun ],
[
sh:datatype xsd:string;
sh:name "him/her/them...";
sh:path solid:preferredObjectPronoun ],
[
sh:datatype xsd:string;
sh:name "he/she/they...";
sh:path solid:preferredSubjectPronoun ],
Comment on lines +15 to +27
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest making this all part of a sh:group to assist form tools.

My personal opinion is that we should most shapes for client-client standards in Solid should be required to add these non-validating characteristics so that it is easier for apps to generate nice looking forms for users to supplement and/or fix data that is required for their application from a generic form editor.

[
sh:name "Involvement with Organization";
sh:node [
a sh:NodeShape;
sh:property [
sh:datatype xsd:string;
sh:name "Describe your role";
sh:path schema:description ],
[
sh:name "Organization"@en,
"Organization"@fr;
sh:path org:organization ],
Comment on lines +37 to +39
Copy link

@jeswr jeswr Apr 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps set the sh:nodeKind as sh:blankNodeOrIRI

[
sh:datatype xsd:string;
sh:name "Occupation"@en;
sh:or ( [ sh:path org:role ] [ sh:path vcard:role ] ) ],
[
sh:datatype xsd:string;
sh:path vcard:role ] ];
sh:path [sh:inversePath org:member ] ],
[
sh:name "Skills";
sh:node [
a sh:NodeShape;
sh:property [
sh:name "skill";
sh:path solid:publicId ] ];
sh:path schema:skills ],
[
sh:name "Languages";
sh:path schema:knowsLanguage;
sh:property [
sh:node [
a sh:NodeShape;
sh:property [
sh:node [
a sh:NodeShape;
sh:property [
sh:name "Language";
sh:path solid:publicId ] ];
sh:path (
[
sh:zeroOrMorePath rdf:rest ]
rdf:first ) ] ];
sh:path schema:knowsLanguage;
sh:targetClass schema:Text, schema:Language, rdf:Collection ] ],
[
sh:datatype xsd:string;
sh:name "Short name for chats, etc."@en,
"surnom"@fr;
sh:path foaf:nick ],
[
sh:min 1;
sh:or (
[
sh:name "Set type";
sh:path rdf:type;
sh:targetValue schema:Person
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean sh:hasValue?

]
[
sh:name "Set type";
sh:path rdf:type;
sh:targetValue foaf:Person ]
[
sh:name "Set type";
sh:path rdf:type;
sh:targetValue vcard:Individual
])],
Comment on lines +79 to +95
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be able to just be

sh:path rdf:type;
sh:qualifiedMinCount 1 ;
sh:qualifiedValueShape [ sh:in ( schema:Person foaf:Person vcard:Individual  ) ]

[
sh:name "Friends";
sh:path foaf:knows;
sh:class foaf:Person ];

sh:property [
sh:name "Mugshots";
sh:path vcard:hasPhoto;
sh:class dct:Image;
];
sh:targetClass schema:Person,
vcard:Individual,
foaf:Person .