Skip to content

Commit 107f5e9

Browse files
authored
Merge pull request crs4#64 from kikkomep/fix/issue-61
fix: trailing slash for Directory Data Entities is RECOMMENDED but not mandatory
2 parents 051bc60 + 9e8dc85 commit 107f5e9

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

rocrate_validator/profiles/ro-crate/must/4_data_entity_metadata.ttl

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,6 @@ ro-crate:DataEntityRquiredPropertiesShape a sh:NodeShape ;
141141
# sh:message "A Data Entity MUST be directly or indirectly linked to the `Root Data Entity` through the `hasPart` property" ;
142142
] .
143143

144-
ro-crate:DirectoryDataEntityRequiredValueRestriction a sh:NodeShape ;
145-
sh:name "Directory Data Entity: REQUIRED value restriction" ;
146-
sh:description """A Directory Data Entity MUST end with `/`""" ;
147-
sh:targetNode ro-crate:Directory ;
148-
sh:property [
149-
a sh:PropertyShape ;
150-
sh:name "Directory Data Entity: REQUIRED value restriction" ;
151-
sh:description """Check if the Directory Data Entity ends with `/`""" ;
152-
sh:path [ sh:inversePath rdf:type ] ;
153-
sh:message """Every Data Entity Directory URI MUST end with `/`""" ;
154-
sh:pattern "/$" ;
155-
] .
156-
157144
ro-crate:GenericDataEntityRequiredProperties a sh:NodeShape ;
158145
sh:name "Generic Data Entity: REQUIRED properties" ;
159146
sh:description """A Data Entity other than a File or a Directory MUST be a `DataEntity`""" ;

rocrate_validator/profiles/ro-crate/should/4_data_entity_metadata.ttl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,16 @@ ro-crate:FileRecommendedProperties a sh:NodeShape ;
5454
]
5555
)
5656
] .
57+
58+
ro-crate:DirectoryDataEntityRequiredValueRestriction a sh:NodeShape ;
59+
sh:name "Directory Data Entity: RECOMMENDED value restriction" ;
60+
sh:description """A Directory Data Entity SHOULD end with `/`""" ;
61+
sh:targetNode ro-crate:Directory ;
62+
sh:property [
63+
a sh:PropertyShape ;
64+
sh:name "Directory Data Entity: RECOMMENDED value restriction" ;
65+
sh:description """Check if the Directory Data Entity ends with `/`""" ;
66+
sh:path [ sh:inversePath rdf:type ] ;
67+
sh:message """Every Data Entity Directory URI SHOULD end with `/`""" ;
68+
sh:pattern "/$" ;
69+
] .

tests/integration/profiles/ro-crate/test_data_entity_metadata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ def test_directory_data_entity_wo_trailing_slash():
5959
"""Test a RO-Crate without a root data entity."""
6060
do_entity_test(
6161
paths.directory_data_entity_wo_trailing_slash,
62-
models.Severity.REQUIRED,
62+
models.Severity.RECOMMENDED,
6363
False,
64-
["Directory Data Entity: REQUIRED value restriction"],
65-
["Every Data Entity Directory URI MUST end with `/`"]
64+
["Directory Data Entity: RECOMMENDED value restriction"],
65+
["Every Data Entity Directory URI SHOULD end with `/`"]
6666
)
6767

6868

0 commit comments

Comments
 (0)