Package org.rumbledb.expressions.xml
Class ComputedAttributeConstructorExpression
java.lang.Object
org.rumbledb.expressions.Node
org.rumbledb.expressions.Expression
org.rumbledb.expressions.xml.ComputedAttributeConstructorExpression
Expression representing a computed attribute 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
ConstructorsConstructorDescriptionComputedAttributeConstructorExpression
(Name attributeName, Expression valueExpression, ExceptionMetadata metadata) Constructor for static attribute name: attribute attributeName { value }ComputedAttributeConstructorExpression
(Expression nameExpression, Expression valueExpression, ExceptionMetadata metadata) Constructor for dynamic attribute name: attribute { nameExpression } { value } -
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(AbstractNodeVisitor<T> visitor, T argument) Accept method for the visitor pattern.Get the static attribute nameReturns all children nodes as a list.Get the dynamic attribute name expressionGet the value expressionboolean
Check if the attribute 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
-
ComputedAttributeConstructorExpression
public ComputedAttributeConstructorExpression(Name attributeName, Expression valueExpression, ExceptionMetadata metadata) Constructor for static attribute name: attribute attributeName { value }- Parameters:
attributeName
- The static attribute namevalueExpression
- The value expressionmetadata
- The exception metadata
-
ComputedAttributeConstructorExpression
public ComputedAttributeConstructorExpression(Expression nameExpression, Expression valueExpression, ExceptionMetadata metadata) Constructor for dynamic attribute name: attribute { nameExpression } { value }- Parameters:
nameExpression
- The dynamic attribute name expressionvalueExpression
- The value expressionmetadata
- The exception metadata
-
-
Method Details
-
getAttributeName
Get the static attribute name- Returns:
- The static attribute name
-
getNameExpression
Get the dynamic attribute name expression- Returns:
- The dynamic attribute name expression
-
getValueExpression
Get the value expression- Returns:
- The value expression
-
hasStaticName
public boolean hasStaticName()Check if the attribute has a static name- Returns:
- True if the attribute 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
-