iRODS Metadata Templates
Working Group:
Building Blocks and Lessons Learned
May 28-31, 2024
iRODS User Group Meeting 2024
Amsterdam, Netherlands
Terrell Russell, Ph.D
Executive Director
iRODS Consortium
Metadata Templates Working Group
Founded mid-2018
Motivation
iRODS needs to help curators define and validate 'good' metadata for their pipelines and environments.
Pre-History
Applications - Boiling the Ocean
2014-2016
Pre-History - Metalnx
Pre-History - Metalnx
Pre-History - CloudBrowser
Pre-History - CloudBrowser and Jargon
Defining some of these endpoints in the web client and the Java client library led to discussion about a Swagger API (later known as OpenAPI).
This also restarted a conversation about a REST API for all of iRODS itself, but now to include some metadata template endpoints.
Pre-History - May 2017
TRiRODS
Rick Skarbez
Metadata Templates Working Group - Formed
June 2018
and by March 2019...
Metalnx metadata templates stored in the Metalnx database as jsonschema
Metadata Templates Working Group - June 2019
Maastricht and Utrecht demonstrated iRODS rules to provide a round trip from JSON to AVU to JSON
Non-Consortium implementations - some convergence appearing...
CEDAR coming online as interface / home for editor
Metadata Templates Working Group - June 2019
Identified Five Elements
Metadata Templates Working Group - July 2019
Five Layers, reordered
Metadata Templates Working Group - Late 2019
September 2019
October 2019
Metadata Templates Working Group - Early 2020
February 2020
April 2020 - Atomic AVUs merged into iRODS
July 2020
Metadata Templates Working Group - Late 2020
August 2020
November 2020 - CEDAR moving to JSON-LD
Metadata Templates Working Group - Late 2020
August 2020
November 2020 - CEDAR moving to JSON-LD
Metadata Templates Working Group - 2021
January 2021
February 2021
July 2021
Metadata Templates Working Group - 2022
February 2022
March 2022
June 2022 - We should have a working group whitepaper
August 2022
October 2022
Metadata Templates Working Group - Early 2023
March 2023
June 2023
Metadata Templates Working Group - July 2023
Metadata Templates Working Group - Late 2023
August 2023
November 2023
Metadata Templates Working Group - 2024
January 2024
March 2024
May 2024
Conclusions
Running Code
# attach a template
$ irule -r irods_rule_engine_plugin-irods_rule_language-instance \
"metadata_templates_collection_attach('*logical_path', '*schema_location', 'url')" \
'*logical_path=/tempZone/home/rods/thedir%*schema_location=\
https://raw.githubusercontent.com/fge/sample-json-schemas/master/jsonrpc2.0/jsonrpc-request-2.0.json' \
ruleExecOut
# show AVU
$ imeta ls -C thedir
AVUs defined for collection /tempZone/home/rods/thedir:
attribute: irods::metadata_templates
value: https://raw.githubusercontent.com/fge/sample-json-schemas/master/jsonrpc2.0/jsonrpc-request-2.0.json
units: url
# detach a template
$ irule -r irods_rule_engine_plugin-irods_rule_language-instance \
"metadata_templates_collection_detach('*logical_path', '*schema_location', 'removeme')" \
'*logical_path=/tempZone/home/rods/thedir%*schema_location=doesnotexist' \
ruleExecOut
# attach a template $ irule -r irods_rule_engine_plugin-irods_rule_language-instance \ "metadata_templates_collection_attach('*logical_path', '*schema_location', 'url')" \ '*logical_path=/tempZone/home/rods/thedir%*schema_location=\ https://raw.githubusercontent.com/fge/sample-json-schemas/master/jsonrpc2.0/jsonrpc-request-2.0.json' \ ruleExecOut # show AVU $ imeta ls -C thedir AVUs defined for collection /tempZone/home/rods/thedir: attribute: irods::metadata_templates value: https://raw.githubusercontent.com/fge/sample-json-schemas/master/jsonrpc2.0/jsonrpc-request-2.0.json units: url # detach a template $ irule -r irods_rule_engine_plugin-irods_rule_language-instance \ "metadata_templates_collection_detach('*logical_path', '*schema_location', 'removeme')" \ '*logical_path=/tempZone/home/rods/thedir%*schema_location=doesnotexist' \ ruleExecOut
Running Code
# gather, print to stdout $ irule -r irods_rule_engine_plugin-irods_rule_language-instance \ "metadata_templates_collection_gather('*logical_path', '*recursive', *schemas); \ writeLine('stdout', *schemas)" \ '*logical_path=/tempZone/home/rods/thedir%*recursive=0%*schemas=""' \ ruleExecOut # validate data object $ irule -r irods_rule_engine_plugin-irods_rule_language-instance \ "metadata_templates_collection_gather('*logical_path', '*recursive', *schemas); \ metadata_templates_data_object_validate('*data_object_path', *schemas, *rc); \ writeLine('stdout', *rc)" \ '*logical_path=/tempZone/home/rods/thedir%*recursive=0%*schemas=""%\ *data_object_path=/tempZone/home/rods/thedir/a.txt%*rc=""' \ ruleExecOut # validate a collection $ irule -r irods_rule_engine_plugin-irods_rule_language-instance \ "metadata_templates_collection_gather('*logical_path', '*recursive', *schemas); \ metadata_templates_collection_validate('*logical_path', *schemas, *recursive, *errors); \ writeLine('stdout', *errors)" \ '*logical_path=/tempZone/home/rods/thedir%*recursive=0%*schemas=""%*errors=""' \ ruleExecOut
Running Code
$ bash bats-core/bin/bats test_metadata_templates.bats
test_metadata_templates.bats
✓ collection - attach, gather, detach template
✓ attach bad schema
✓ validate data object
✓ validate collection
4 tests, 0 failures
Thank you!
Questions?