Skip to content

Commit

Permalink
typeIndex shapes (#5)
Browse files Browse the repository at this point in the history
* 1st version of shapes
* 2nd version of shapes
Co-authored-by: Wouter Termont <[email protected]>
  • Loading branch information
timea-solid authored Feb 11, 2023
1 parent d7f4a5f commit 61c3907
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
18 changes: 18 additions & 0 deletions shapes/typeIndex.shex
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
PREFIX solid: <http://www.w3.org/ns/solid/terms#>
PREFIX ldp: <http://www.w3.org/ns/ldp#>
PREFIX typeIndex: <#>

typeIndex:TypeIndex EXTRA a {
a [solid:TypeIndex] ;
( a [solid:ListedDocument] | a [solid:UnlistedDocument] )
}

typeIndex:TypeRegistration EXTRA a {
a [solid:TypeRegistration] ;
solid:forClass IRI ;
(
solid:instanceContainer { a [ldp:Container] }
|
solid:instance IRI
) ;
}
29 changes: 29 additions & 0 deletions shapes/typeIndex.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX solid: <http://www.w3.org/ns/solid/terms#>
PREFIX ldp: <http://www.w3.org/ns/ldp#>
PREFIX : <#>

:TypeIndexShape a sh:NodeShape ;
sh:targetClass solid:ListedDocument, solid:UnlistedDocument, solid:TypeIndex .

:TypeRegistrationShape a sh:NodeShape ;
sh:targetClass solid:TypeRegistration ;
sh:property [
sh:path solid:forClass ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:predicate solid:instanceContainer ;
sh:class ldp:Container ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ;
sh:property [
sh:predicate solid:instance ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
sh:maxCount 1 ;
] .

0 comments on commit 61c3907

Please sign in to comment.