Package org.outerj.daisy.diff.html.dom
Class BodyNode
- java.lang.Object
-
- org.outerj.daisy.diff.html.dom.Node
-
- org.outerj.daisy.diff.html.dom.TagNode
-
- org.outerj.daisy.diff.html.dom.BodyNode
-
-
Constructor Summary
Constructors Constructor Description BodyNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
copyTree()
List<Node>
getMinimalDeletedSet(long id)
This recursive method considers a descendant deleted if all its children hadTextNode
s that now are marked as removed with the provided id.-
Methods inherited from class org.outerj.daisy.diff.html.dom.TagNode
addChild, addChild, equals, expandWhiteSpace, getAttributes, getChild, getEndTag, getIndexOf, getLeftMostChild, getMatchRatio, getNbChildren, getOpeningTag, getQName, getRightMostChild, hashCode, isBlockLevel, isBlockLevel, isBlockLevel, isInline, isInline, isInline, isPre, isSameTag, isSimilarTag, iterator, setRoot, splitUntill, toString
-
Methods inherited from class org.outerj.daisy.diff.html.dom.Node
detectIgnorableWhiteSpace, getLastCommonParent, getParent, getParentTree, getRoot, inPre, isWhiteAfter, isWhiteBefore, setParent, setWhiteAfter, setWhiteBefore
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getMinimalDeletedSet
public List<Node> getMinimalDeletedSet(long id)
Description copied from class:TagNode
This recursive method considers a descendant deleted if all its children had
TextNode
s that now are marked as removed with the provided id. If all children of a descendant is considered deleted, only that descendant is kept in the collection of the deleted nodes, and its children are removed from the collection of the deleted nodes.
The HTML tag nodes that never had any text content are never considered removedIt actually might have nothing to do with being really deleted, because the element might be kept after its text content was deleted.
Example:
table cells can be kept after its text content was deleted horizontal rule has never had text content, but can be deleted- Overrides:
getMinimalDeletedSet
in classTagNode
-
-