}
public List<MarkupElement> determineOriginsFor(String content, List<MarkupElement> areas) {
List<MarkupElement> result = new ArrayList<MarkupElement>();
try {
OriginSearch search = originSearchFactory.create();
for (MarkupElement me : areas) {
result.addAll(search.resolveGap(me.getStart(), me.getMarkedSubstringFrom(content)));
}
} catch (Exception e) {
logger.error("Failed to create origin search, cannot determine origins.", e);
}
//logger.debug("Origins to transfer: "+result);