use of eu.transkribus.core.model.beans.TrpTranscriptMetadata in project TranskribusCore by Transkribus.
the class TrpLocation method initFromCustomTag.
// public boolean hasTranscriptMetadata() { return md != null; }
//
// public boolean hasShapeType() { return r != null || l != null || w != null; }
// public ITrpShapeType getLowestShapeType() {
// if (w == null && l == null)
// return r;
// else if (w == null)
// return l;
// else
// return w;
// }
private void initFromCustomTag() {
if (t == null)
return;
CustomTagList ctl = t.getCustomTagList();
if (ctl != null) {
ITrpShapeType s = ctl.getShape();
TrpPageType p = s.getPage();
TrpTranscriptMetadata md = p.getMd();
// logger.debug("md = "+md);
if (md != null) {
docId = md.getDocId();
localFolder = md.getLocalFolder();
pageNr = md.getPageNr();
pageId = md.getPageId();
}
shapeId = s.getId();
// if (s instanceof TrpTextRegionType) {
// r = (TrpTextRegionType) s;
// }
// else if (s instanceof TrpTextLineType) {
// r = (TrpTextRegionType) s.getParent();
// l = (TrpTextLineType) s;
// }
// else if (s instanceof TrpWordType) {
// l = (TrpTextLineType) s.getParent();
// r = l.getRegion();
// w = (TrpWordType) s;
// }
//
// shapeId = hasShapeType() ? getLowestShapeType().getId() : null;
}
}
Aggregations