Class TextNodeExpression


public class TextNodeExpression extends Expression
An expression representing a text node, as part of a direct element constructor content.
See Also:
  • Constructor Details

    • TextNodeExpression

      public TextNodeExpression(String content, ExceptionMetadata metadata)
      Constructor for a text node.
      Parameters:
      content - The content of the text node
      metadata - The exception metadata
  • Method Details

    • getContent

      public String getContent()
      Get the content of the text node
      Returns:
      The content of the text node
    • getChildren

      public List<Node> getChildren()
      Description copied from class: Node
      Returns all children nodes as a list. The list is new and can be modified at will by the caller.
      Specified by:
      getChildren in class Node
      Returns:
      the children nodes as a list.
    • accept

      public <T> T accept(AbstractNodeVisitor<T> visitor, T argument)
      Description copied from class: Node
      Accept method for the visitor pattern.
      Specified by:
      accept in class Node
      Type Parameters:
      T - the type of the objects returned by the visitor.
      Parameters:
      visitor - the visitor.
      argument - the input from the visitor.
      Returns:
      the object returned by this visitor
    • serializeToJSONiq

      public void serializeToJSONiq(StringBuffer sb, int indent)
      Specified by:
      serializeToJSONiq in class Node