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
Represents the root of a HTML document.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopyTree()
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
-
Constructor Details
-
BodyNode
public BodyNode()
-
-
Method Details
-
copyTree
-
getMinimalDeletedSet
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
-