Search in sources :

Example 1 with MdWrap

use of eu.transkribus.core.model.beans.mets.MdSecType.MdWrap in project TranskribusCore by Transkribus.

the class TrpMetsBuilder method buildSourceMdSec.

private static MdSecType buildSourceMdSec(TrpDocMetadata md) {
    MdWrap wrap = new MdWrap();
    wrap.setMDTYPE("OTHER");
    wrap.setID(TRP_DOC_MD_TYPE_CONST);
    MdWrap.XmlData xmlData = new MdWrap.XmlData();
    // clone md and set local folder to null
    // TrpDocMetadata mdClone = md.clone();
    // mdClone.setLocalFolder(null);
    // xmlData.getAny().add(mdClone);
    // FIXME if the localFolder is null, this will be treated as remote doc, but the fileKeys are null!! => nullpointerexception
    // md.setLocalFolder(null);
    xmlData.getAny().add(md);
    wrap.setXmlData(xmlData);
    MdSecType sec = new MdSecType();
    sec.setMdWrap(wrap);
    // link to the sourceMD with TrpDocMetadata
    sec.setID(SOURCE_DOC_MD_ID_CONST);
    return sec;
}
Also used : MdSecType(eu.transkribus.core.model.beans.mets.MdSecType) MdWrap(eu.transkribus.core.model.beans.mets.MdSecType.MdWrap)

Aggregations

MdSecType (eu.transkribus.core.model.beans.mets.MdSecType)1 MdWrap (eu.transkribus.core.model.beans.mets.MdSecType.MdWrap)1