artefactual-labs / mets-reader-writer

Library to parse and create METS files, especially for Archivematica.
https://mets-reader-writer.readthedocs.io
GNU Affero General Public License v3.0
20 stars 13 forks source link

Read and write OBJID (metsType attr) #59

Closed sevein closed 5 years ago

sevein commented 5 years ago

metsType supports attributes like LABEL or TYPE. Consider this an early implementation targeting a single attribute (OBJID) whereas a better solution with support for arbitrary fields will require further work.

About metsType from the spec:

It also has five possible attributes: 1. ID (an XML ID); 2. OBJID: a primary identifier assigned to the original source document; 3. LABEL: a title/text string identifying the document for users; 4. TYPE: a type for the object, e.g., book, journal, stereograph, etc.; and 5. PROFILE: the registered profile to which this METS document conforms. METS registry information is available from the Library of Congress at http://www.loc.gov/mets.

sevein commented 5 years ago

@cole, this is blocking https://github.com/artefactual/archivematica/pull/1365. It started happening when I had that function in move_to_backlog updating the METS with the placement backlog event, i.e. the resulting METS was losing the OBJID attribute and that was confusing Storage Service.