Class ComputedNamespaceConstructorExpression

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

public class ComputedNamespaceConstructorExpression extends Expression
Expression representing a computed namespace constructor.
See Also:
  • Constructor Details

    • ComputedNamespaceConstructorExpression

      public ComputedNamespaceConstructorExpression(String prefix, Expression uriExpression, ExceptionMetadata metadata)
      Constructor for static prefix: namespace prefix { uri }
      Parameters:
      prefix - The static namespace prefix
      uriExpression - The URI expression
      metadata - The exception metadata
    • ComputedNamespaceConstructorExpression

      public ComputedNamespaceConstructorExpression(Expression prefixExpression, Expression uriExpression, ExceptionMetadata metadata)
      Constructor for dynamic prefix: namespace { prefixExpression } { uri }
      Parameters:
      prefixExpression - The dynamic prefix expression
      uriExpression - The URI expression
      metadata - The exception metadata
  • Method Details

    • hasStaticPrefix

      public boolean hasStaticPrefix()
    • getPrefix

      public String getPrefix()
    • getPrefixExpression

      public Expression getPrefixExpression()
    • getUriExpression

      public Expression getUriExpression()
    • 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