Problem: It isn't easy to create reusable code in mets-reader-writer (metsrw) to use only the (user) needed PREMIS containers #1304
Labels
Ⓜ️ mets/premis
METS/PREMIS issues
Request: discussion
The path towards resolving the issue is unclear and opinion is sought from other community members.
Status: refining
The issue needs additional details to ensure that requirements are clear.
Type: feature
New functionality.
Wellcome
Wellcome Trust
Please describe the problem you'd like to be solved
Creating a PREMIS event might be done as follows:
That's going to satisfy me for pretty much every event so I can reuse this. But events use containers differently, a very rough summary of the ones I've audited (in Archivematica) that have empty containers (which are not mandatory in the PREMIS schema) look as follows:
As a user, I might want to conditionally output containers based on whether they are used or not but the nesting of tuples makes it a) difficult to construct conditionally, and b) difficult to filter the structure once created without more thorough processing.
Describe the solution you'd like to see implemented
I want to be able to signal to
metsrw
that I don't want something. So to be able to either construct a condensed PREMIS representation more easily and with less code repetition, or ask metsrw to optionally output a condensed PREMIS representation as required.Describe alternatives you've considered
For now, folks can use the verbose constructor to achieve this, but from what I can see, where the nesting gets deeper and more complex, parts of functions will need to be duplicated in other helper methods which is fairly redundant and a little less clean to write.
Additional context
Related artefactual-labs/mets-reader-writer#43
For Artefactual use:
Before you close this issue, you must check off the following:
The text was updated successfully, but these errors were encountered: