Summary
Parsing an E-ARK SIP via EARKSIP.parse(...) has two related issues:
contentInformationType is never populated from METS, so it stays at default MIXED.
contentType is derived from CONTENTINFORMATIONTYPE / OTHERCONTENTINFORMATIONTYPE instead of TYPE / OTHERTYPE.
Steps to Reproduce
- Create a SIP with root METS attributes:
TYPE="Other"
csip:OTHERTYPE="Moving images - on tangible media"
csip:CONTENTINFORMATIONTYPE="OTHER"
csip:OTHERCONTENTINFORMATIONTYPE="MOVINGIMAGES-PROFILE-1.0"
- Parse it with
new EARKSIP().parse(path).
- Inspect results:
sip.getContentType().asString() → incorrect (taken from content information fields)
sip.getContentInformationType().asString() → remains MIXED
Expected
contentType should come from TYPE / OTHERTYPE
contentInformationType should come from csip:CONTENTINFORMATIONTYPE / csip:OTHERCONTENTINFORMATIONTYPE
Actual
contentType incorrectly uses content information attributes
contentInformationType remains default MIXED
Likely Cause
In EARKUtils.setIPContentType(...), the value is taken from CONTENTINFORMATIONTYPE / OTHERCONTENTINFORMATIONTYPE rather than TYPE / OTHERTYPE.
Also, processMainMets(...) (and representation parsing) never call a setter for contentInformationType.
Summary
Parsing an E-ARK SIP via
EARKSIP.parse(...)has two related issues:contentInformationTypeis never populated from METS, so it stays at defaultMIXED.contentTypeis derived fromCONTENTINFORMATIONTYPE/OTHERCONTENTINFORMATIONTYPEinstead ofTYPE/OTHERTYPE.Steps to Reproduce
TYPE="Other"csip:OTHERTYPE="Moving images - on tangible media"csip:CONTENTINFORMATIONTYPE="OTHER"csip:OTHERCONTENTINFORMATIONTYPE="MOVINGIMAGES-PROFILE-1.0"new EARKSIP().parse(path).sip.getContentType().asString()→ incorrect (taken from content information fields)sip.getContentInformationType().asString()→ remainsMIXEDExpected
contentTypeshould come fromTYPE/OTHERTYPEcontentInformationTypeshould come fromcsip:CONTENTINFORMATIONTYPE/csip:OTHERCONTENTINFORMATIONTYPEActual
contentTypeincorrectly uses content information attributescontentInformationTyperemains defaultMIXEDLikely Cause
In
EARKUtils.setIPContentType(...), the value is taken fromCONTENTINFORMATIONTYPE/OTHERCONTENTINFORMATIONTYPErather thanTYPE/OTHERTYPE.Also,
processMainMets(...)(and representation parsing) never call a setter forcontentInformationType.