org.thymeleaf.dom
Class AbstractTextNode

Object
  extended by org.thymeleaf.dom.Node
      extended by org.thymeleaf.dom.AbstractTextNode
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CDATASection, Text

public abstract class AbstractTextNode
extends Node

Base abstract class for text-based node types in Thymeleaf DOM trees: Texts and CDATASections.

Since:
2.0.0
Author:
Daniel Fernández
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.thymeleaf.dom.Node
Node.NodeLocalVariablesMap
 
Field Summary
 
Fields inherited from class org.thymeleaf.dom.Node
NODE_PROPERTY_XML_ENCODING, NODE_PROPERTY_XML_STANDALONE, NODE_PROPERTY_XML_VERSION
 
Method Summary
 String getContent()
           Returns the textual content of this node, as a String.
 String getEscapedContent()
           Returns the textual and escaped content of this node, as a String.
 String getOriginalContent()
           Returns the original content of this node (escaped or not), as a String.
 void setContent(String content)
           Modify the textual content of this node.
 void setContent(String content, boolean contentIsEscaped)
           Modify the textual content of this node.
 
Methods inherited from class org.thymeleaf.dom.Node
addAllNonExistingNodeLocalVariables, applyDialectPrefix, cloneNode, getDocumentName, getLineNumber, getNodeLocalVariableNames, getNodeProperty, getNodePropertyNames, getParent, getProcessCommentNodes, getProcessTextNodes, getRecomputeProcessorsAfterEachExecution, getRecomputeProcessorsImmediately, hasNodeLocalVariables, hasNodeProperty, hasParent, isProcessable, isSkippable, normalizeName, setAllNodeLocalVariables, setNodeLocalVariable, setNodeProperty, setParent, setProcessable, setProcessCommentNodes, setProcessTextNodes, setRecomputeProcessorsAfterEachExecution, setRecomputeProcessorsImmediately, setSkippable, unsafeGetNodeProperties, visit
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContent

public String getContent()

Returns the textual content of this node, as a String.

Returns:
the textual content of this node.

getEscapedContent

public String getEscapedContent()

Returns the textual and escaped content of this node, as a String.

Returns:
the textual content of this node.
Since:
2.1.3

getOriginalContent

public String getOriginalContent()

Returns the original content of this node (escaped or not), as a String.

Returns:
the textual content of this node.
Since:
2.1.3

setContent

public void setContent(String content)

Modify the textual content of this node.

Parameters:
content - the new content

setContent

public void setContent(String content,
                       boolean contentIsEscaped)

Modify the textual content of this node.

Parameters:
content - the new content
contentIsEscaped - whether the specified content is already escaped or not
Since:
2.1.3


Copyright © 2014 The THYMELEAF team. All Rights Reserved.