logger.log(Level.WARNING, "No shadow document found");
return;
}
ShadowDocument doc = (ShadowDocument) result.get(0);
resultList.addAll(doc.getProperty(Page.elements));
// Filter list and return only top level nodes
for (GraphObject obj : resultList) {
if (obj instanceof DOMNode) {
DOMNode node = (DOMNode) obj;
if (!doc.equals(node) && !node.hasIncomingRelationships(DOMChildren.class)) {
filteredResults.add(node);
}