While working on implementing deletion of child Entities, it became apparent that the internal handling of Entity children was unnecessarily baroque. It recreated the METS children / file_groups structure leading to complications.
This change reads and writes the METS structure but stores all Entity children in a single list, sorted according to a predetermined order (Entities first, then mezzanine, master, etc Files). When you want a certain subtype just iterate through the list and pick out the ones you want.
While working on implementing deletion of child Entities, it became apparent that the internal handling of Entity children was unnecessarily baroque. It recreated the METS children / file_groups structure leading to complications. This change reads and writes the METS structure but stores all Entity children in a single list, sorted according to a predetermined order (Entities first, then mezzanine, master, etc Files). When you want a certain subtype just iterate through the list and pick out the ones you want.