Class ComputedElementConstructorExpression

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

public class ComputedElementConstructorExpression extends Expression
Expression representing a computed element constructor.
See Also:
  • Constructor Details

    • ComputedElementConstructorExpression

      public ComputedElementConstructorExpression(Name elementName, Expression contentExpression, ExceptionMetadata metadata)
      Constructor for static element name: element elementName { content }
      Parameters:
      elementName - The static element name
      contentExpression - The content expression
      metadata - The exception metadata
    • ComputedElementConstructorExpression

      public ComputedElementConstructorExpression(Expression nameExpression, Expression contentExpression, ExceptionMetadata metadata)
      Constructor for dynamic element name: element { nameExpression } { content }
      Parameters:
      nameExpression - The dynamic element name expression
      contentExpression - The content expression
      metadata - The exception metadata
  • Method Details

    • getElementName

      public Name getElementName()
      Get the static element name
      Returns:
      The static element name
    • getNameExpression

      public Expression getNameExpression()
      Get the dynamic element name expression
      Returns:
      The dynamic element name expression
    • getContentExpression

      public Expression getContentExpression()
      Get the content expression
      Returns:
      The content expression
    • hasStaticName

      public boolean hasStaticName()
      Check if the element has a static name
      Returns:
      True if the element has a static name, false otherwise
    • 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