use of eu.transkribus.core.model.beans.customtags.BlackeningTag in project TranskribusCore by Transkribus.
the class ExportCache method getTagsForShapeElement.
private void getTagsForShapeElement(ITrpShapeType element) throws IOException {
String textStr = element.getUnicodeText();
CustomTagList cl = element.getCustomTagList();
if (textStr == null || cl == null)
throw new IOException("Element has no text or custom tag list: " + element + ", class: " + element.getClass().getName());
for (CustomTag nonIndexedTag : cl.getNonIndexedTags()) {
// logger.debug("nonindexed tag found ");
if (!nonIndexedTag.getTagName().equals("readingOrder")) {
storeCustomTag(nonIndexedTag, textStr);
}
}
/*
* blacken String if necessary
*/
if (doBlackening) {
for (CustomTag indexedTag : cl.getIndexedTags()) {
if (indexedTag instanceof BlackeningTag) {
// logger.debug("blackening found " + textStr);
textStr = ExportUtils.blackenString(indexedTag, textStr);
}
}
}
for (CustomTag indexedTag : cl.getIndexedTags()) {
// logger.debug("tagname " + indexedTag.getTagName());
storeCustomTag(indexedTag, textStr);
}
}
Aggregations