Package org.rumbledb.expressions.xml
Class ComputedElementConstructorExpression
java.lang.Object
org.rumbledb.expressions.Node
org.rumbledb.expressions.Expression
org.rumbledb.expressions.xml.ComputedElementConstructorExpression
Expression representing a computed element constructor.
-
Field Summary
Fields inherited from class org.rumbledb.expressions.Expression
expressionClassification, isSequential, staticContext, staticSequenceType
Fields inherited from class org.rumbledb.expressions.Node
highestExecutionMode
-
Constructor Summary
ConstructorsConstructorDescriptionComputedElementConstructorExpression
(Name elementName, Expression contentExpression, ExceptionMetadata metadata) Constructor for static element name: element elementName { content }ComputedElementConstructorExpression
(Expression nameExpression, Expression contentExpression, ExceptionMetadata metadata) Constructor for dynamic element name: element { nameExpression } { content } -
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(AbstractNodeVisitor<T> visitor, T argument) Accept method for the visitor pattern.Returns all children nodes as a list.Get the content expressionGet the static element nameGet the dynamic element name expressionboolean
Check if the element has a static namevoid
serializeToJSONiq
(StringBuffer sb, int indent) Methods inherited from class org.rumbledb.expressions.Expression
alwaysReturnsAtMostOneItem, getExpressionClassification, getStaticContext, getStaticContextForRuntime, getStaticSequenceType, isSequential, isUnset, isUpdating, isUpdatingNonSequential, print, setExpressionClassification, setSequential, setStaticContext, setStaticSequenceType
Methods inherited from class org.rumbledb.expressions.Node
getDescendants, getDescendantsMatching, getHighestExecutionMode, getHighestExecutionMode, getMetadata, indentIt, isContextDependent, numberOfUnsetExecutionModes, setHighestExecutionMode, toString
-
Constructor Details
-
ComputedElementConstructorExpression
public ComputedElementConstructorExpression(Name elementName, Expression contentExpression, ExceptionMetadata metadata) Constructor for static element name: element elementName { content }- Parameters:
elementName
- The static element namecontentExpression
- The content expressionmetadata
- 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 expressioncontentExpression
- The content expressionmetadata
- The exception metadata
-
-
Method Details
-
getElementName
Get the static element name- Returns:
- The static element name
-
getNameExpression
Get the dynamic element name expression- Returns:
- The dynamic element name 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
Description copied from class:Node
Accept method for the visitor pattern. -
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 classNode
- Returns:
- the children nodes as a list.
-
serializeToJSONiq
- Specified by:
serializeToJSONiq
in classNode
-