Class DirElemConstructorExpression

java.lang.Object
org.rumbledb.expressions.Node
org.rumbledb.expressions.Expression
org.rumbledb.expressions.xml.DirElemConstructorExpression

public class DirElemConstructorExpression extends Expression
Expression representing a direct element constructor.
See Also:
  • Constructor Details

    • DirElemConstructorExpression

      public DirElemConstructorExpression(Name elementName, List<Expression> content, List<Expression> attributes, List<NamespaceDeclaration> namespaceDeclarations, ExceptionMetadata metadata)
      Constructor for a direct element constructor.
      Parameters:
      elementName - Resolved expanded name of the element
      content - The content of the element
      attributes - The attributes of the element
      namespaceDeclarations - Namespace declaration entries (not attribute nodes)
      metadata - The exception metadata
  • Method Details

    • getNodeName

      public Name getNodeName()
      Resolved expanded name of the element.
    • getContent

      public List<Expression> getContent()
      Get the content of the element
      Returns:
      The content of the element
    • getAttributes

      public List<Expression> getAttributes()
      Get the attributes of the element
      Returns:
      The attributes of the element
    • getNamespaceDeclarations

      public List<NamespaceDeclaration> getNamespaceDeclarations()
    • 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
    • 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.
    • serializeToJSONiq

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