use of org.mycore.mets.model.struct.MdWrap in project mycore by MyCoRe-Org.
the class MCRMetsMods2IIIFConverter method extractMedataFromLogicalDiv.
protected List<MCRIIIFMetadata> extractMedataFromLogicalDiv(Mets mets, LogicalDiv divContainer) {
String dmdId = divContainer.getDmdId();
if (dmdId != null && !dmdId.isEmpty()) {
DmdSec dmdSec = mets.getDmdSecById(dmdId);
if (dmdSec != null) {
MdWrap mdWrap = dmdSec.getMdWrap();
MDTYPE mdtype = mdWrap.getMdtype();
MCRMetsIIIFModsMetadataExtractor extractor;
switch(mdtype) {
case MODS:
extractor = new MCRMetsIIIFModsMetadataExtractor();
break;
default:
LOGGER.info("No extractor found for mdType: {}", mdtype);
return Collections.emptyList();
}
return extractor.extractModsMetadata(mdWrap.asElement().getChild("xmlData", MCRConstants.METS_NAMESPACE));
}
}
return Collections.emptyList();
}