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

fix: allow for labels in timespans #42

Merged
Merged
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
82 changes: 52 additions & 30 deletions html/shacl/shacl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,13 @@ pfpsh:crm_PC144_joined_with a sh:NodeShape ;
pfpsh:crm_E52_Time-Span a sh:NodeShape ;
sh:nodeKind sh:IRI ;
sh:targetClass crm:E52_Time-Span ;
sh:property [
sh:path rdfs:label ;
sh:nodeKind sh:Literal ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "When using a literal time description, exactly one rdfs:label is required." ;
] ;
sh:xone (
[
sh:property [
Expand All @@ -312,41 +319,56 @@ pfpsh:crm_E52_Time-Span a sh:NodeShape ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "If using P82_at_some_time_within, exactly one date value (either year or full date) is required." ;
]
]
[
sh:property [
sh:path crm:P82a_begin_of_the_begin ;
sh:or (
[ sh:datatype xsd:gYear ]
[ sh:datatype xsd:date ]
[ sh:datatype xsd:gYearMonth ]
) ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "When using begin/end properties, P82a_begin_of_the_begin must have exactly one date value." ;
] ;
sh:property [
sh:path crm:P82b_end_of_the_end ;
sh:not [
sh:or (
[ sh:datatype xsd:gYear ]
[ sh:datatype xsd:date ]
[ sh:datatype xsd:gYearMonth ]
) ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "When using begin/end properties, P82b_end_of_the_end must have exactly one date value." ;
[
sh:path crm:P82a_begin_of_the_begin ;
sh:minCount 1 ;
]
[
sh:path crm:P82b_end_of_the_end ;
sh:minCount 1 ;
]
)
]
]
[
sh:property [
sh:path rdfs:label ;
sh:nodeKind sh:Literal ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "When using a literal time description, exactly one rdfs:label is required." ;
[
sh:and (
[
sh:property [
sh:path crm:P82a_begin_of_the_begin ;
sh:or (
[ sh:datatype xsd:gYear ]
[ sh:datatype xsd:date ]
[ sh:datatype xsd:gYearMonth ]
) ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "When using begin/end properties, P82a_begin_of_the_begin must have exactly one date value." ;
]
]
[
sh:property [
sh:path crm:P82b_end_of_the_end ;
sh:or (
[ sh:datatype xsd:gYear ]
[ sh:datatype xsd:date ]
[ sh:datatype xsd:gYearMonth ]
) ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "When using begin/end properties, P82b_end_of_the_end must have exactly one date value." ;
]
]
[
sh:not [
sh:path crm:P82_at_some_time_within ;
sh:minCount 1 ;
]
]
)
]
]
) .

pfpsh:crm_E86_Leaving a sh:NodeShape ;
Expand Down
Loading