-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Invalid resource maps can be submitted to Metacat without error #1981
Comments
Metacat only validates selected data formats based on their So from those DataONE rules linked above, the items to validate might include:
Here's what a minimal resource map might contain if the package has one metadata object and one data object and follows these rules: @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix cito: <http://purl.org/spar/cito/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ore: <http://www.openarchives.org/ore/terms/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix provone: <http://purl.dataone.org/provone/2015/01/15/ontology#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dataone: <https://cn.dataone.org/cn/v2/resolve/> .
<dataone:METADATA_ID>
dcterms:identifier "METADATA_ID"^^xsd:string ;
cito:documents <dataone:METADATA_ID>, <dataone:DATAOBJ_ID> ;
cito:isDocumentedBy <dataone:METADATA_ID> ;
ore:isAggregatedBy <dataone:RESOURCE_MAP_ID#aggregation> .
<dataone:RESOURCE_MAP_ID>
dcterms:creator [
a dcterms:Agent ;
foaf:name "DataONE R Client"^^xsd:string
] ;
dcterms:identifier "RESOURCE_MAP_ID"^^xsd:string ;
dcterms:modified "2024-10-08T20:24:47Z"^^xsd:dateTime ;
ore:describes <dataone:RESOURCE_MAP_ID#aggregation> ;
a ore:ResourceMap .
<dataone:RESOURCE_MAP_ID#aggregation>
dc:title "DataONE Aggregation" ;
ore:aggregates <dataone:METADATA_ID>, <dataone:DATAOBJ_ID> ;
a ore:Aggregation .
<dataone:DATAOBJ_ID>
dcterms:identifier "DATAOBJ_ID"^^xsd:string ;
cito:isDocumentedBy <dataone:METADATA_ID> ;
ore:isAggregatedBy <dataone:RESOURCE_MAP_ID#aggregation> . flowchart TD
A(ore:ResourceMap RESOURCE_MAP_ID) -->|ore:describes| B(ore:Aggregation)
B --> |ore:aggregates| C(METADATA_ID)
B --> |ore:aggregates| D(DATAOBJ_ID)
C --> |cito:documents| C
C --> |cito:documents| D
So, we'd need SHACL rules for those conditions listed above. Would that be sufficient? Also, how would we deal with RMs that are currently in the system but are not valid according to those rules? |
@mbjones the DataONE docs indicate that resource maps go through a validation process:
From: Data Packaging: Resource map validation Are the checks you described above included in this validation? Is there anyway for MetacatUI to access the |
IIRC, that is part of the CN Synchronization process, and not a Metacat-based validator. So your RM gets saved to Metacat, and then at some later time in the future (minutes, hours, days) it is synced to the CN, during which a |
While investigating our collection of submission errors in MetacatUI, I discovered that it's possible submit an invalid resource map to Metacat and receive a 200 status without any error. I would expect that resource maps would be validated in the same way that sysmeta and EML objects are.
Here's a reproducible example:
Create an invalid resource map. In my case, I saved a
resource_map.xml
file with the following text:<?xml version="1.0" encod
Create sysmeta for the object. I used this
sysmeta_template.rdf.xml
:You'll want to the
submitter
to your ORCIDHTTP/1.1 200 200
status along with the the PID for the resource map:The file then exists on the server, but of course, is not really a resource map, e.g.
Here's the code above as downloadable files (just remember to remove the
.txt
).sysmeta_template.rdf.xml.txt
create_res_map.sh.txt
resource_map.xml.txt
The text was updated successfully, but these errors were encountered: