Package jodd.lagarto.dom
Class Text
- java.lang.Object
-
- jodd.lagarto.dom.Node
-
- jodd.lagarto.dom.Text
-
- All Implemented Interfaces:
java.lang.Cloneable
public class Text extends Node
Text node. Text value is stored as node value in decoded, readable form. There is also an option to get and set html content in raw, html form.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jodd.lagarto.dom.Node
Node.NodeType
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Booleanblankprotected java.lang.StringencodedText-
Fields inherited from class jodd.lagarto.dom.Node
attributes, childElementNodes, childElementNodesCount, childNodes, nodeName, nodeRawName, nodeType, nodeValue, ownerDocument, parentNode, siblingElementIndex, siblingIndex, siblingNameIndex
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Textclone()java.lang.StringgetTextValue()Returns encoded HTML text.booleanisBlank()Returnstrueif text content is blank.voidsetNodeValue(java.lang.String value)Sets the plain text as node value.voidsetTextValue(java.lang.String text)Sets HTML text, but decodes it first.protected voidvisitNode(NodeVisitor nodeVisitor)Visits single node.-
Methods inherited from class jodd.lagarto.dom.Node
addChild, addChild, appendTextContent, changeOwnerDocument, check, cloneTo, detachFromParent, filterChildNodes, findChildNodeWithName, getAttribute, getAttribute, getAttributeInstance, getAttributesCount, getChild, getChild, getChildElement, getChildElements, getChildElementsCount, getChildElementsCount, getChildNodes, getChildNodesCount, getCssPath, getFirstChild, getFirstChildElement, getFirstChildElement, getHtml, getInnerHtml, getLastChild, getLastChildElement, getLastChildElement, getNextSibling, getNextSiblingElement, getNextSiblingName, getNodeName, getNodeRawName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getPreviousSiblingElement, getPreviousSiblingName, getSiblingElementIndex, getSiblingIndex, getSiblingNameIndex, getTextContent, hasAttribute, hasAttributes, hasChildNodes, indexOfAttributeInstance, initAttributes, initChildElementNodes, initChildNodes, initSiblingNames, insertAfter, insertAfter, insertBefore, insertBefore, insertChild, insertChild, isAttributeContaining, reindexChildren, reindexChildrenOnAdd, removeAllChilds, removeAttribute, removeChild, removeChild, setAttribute, setAttribute, visit, visitChildren
-
-
-
-
Constructor Detail
-
Text
public Text(Document ownerDocument, java.lang.String text)
-
-
Method Detail
-
isBlank
public boolean isBlank()
Returnstrueif text content is blank.
-
setNodeValue
public void setNodeValue(java.lang.String value)
Sets the plain text as node value.- Overrides:
setNodeValuein classNode
-
setTextValue
public void setTextValue(java.lang.String text)
Sets HTML text, but decodes it first.
-
getTextValue
public java.lang.String getTextValue()
Returns encoded HTML text.
-
visitNode
protected void visitNode(NodeVisitor nodeVisitor)
Description copied from class:NodeVisits single node. Implementations just needs to call the correct visitor callback function.
-
-