Class RslNode
java.lang.Object
org.globus.rsl.AbstractRslNode
org.globus.rsl.RslNode
This class represents a RSL parse tree. It is composed of variable definitions
(bindings), relations, and sub-specifications (sub nodes).
-
Field Summary
FieldsFields inherited from class AbstractRslNode
_operator, _specifications, AND, MULTI, OR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanadd(NameOpValue relation) Evalutes the rsl tree against the specified symbol table.Returns the variable definitions.getBindings(String attribute) Returns the variable definitions associated wit the given attribute.Returns the relation associated with the given attribute.Returns the relations.voidmergeTo(AbstractRslNode dstNode) put(NameOpValue relation) removeBindings(String attribute) Removes a bindings list for the specified attribute.removeParam(String attribute) Removes a relation for the specified attribute.voidtoRSL(StringBuffer buf, boolean explicitConcat) Produces a RSL representation of node.Methods inherited from class AbstractRslNode
add, canonicalize, evaluate, getOperator, getOperatorAsString, getOperatorAsString, getSpecifications, merge, removeSpecification, setOperator, toRSL, toString
-
Field Details
-
_relations
-
_bindings
-
-
Constructor Details
-
RslNode
public RslNode() -
RslNode
public RslNode(int operator)
-
-
Method Details
-
put
-
add
- Specified by:
addin classAbstractRslNode
-
put
-
add
- Specified by:
addin classAbstractRslNode
-
mergeTo
- Overrides:
mergeToin classAbstractRslNode
-
getParam
Returns the relation associated with the given attribute.- Specified by:
getParamin classAbstractRslNode- Parameters:
attribute- the attribute of the relation.- Returns:
- the relation for the attribute. Null, if not found.
-
getBindings
Returns the variable definitions associated wit the given attribute.- Specified by:
getBindingsin classAbstractRslNode- Parameters:
attribute- the attribute of the variable deinitions.- Returns:
- the variable deinitions for the attribute. Null, if not found.
-
removeParam
Removes a relation for the specified attribute.- Specified by:
removeParamin classAbstractRslNode- Parameters:
attribute- the attribute name for the relation to remove.- Returns:
- the relation that was removed.
-
removeBindings
Removes a bindings list for the specified attribute.- Specified by:
removeBindingsin classAbstractRslNode- Parameters:
attribute- the attribute name for the bindings.- Returns:
- the bindings that were removed.
-
getRelations
-
getBindings
Returns the variable definitions.- Returns:
- the map of variable definitions.
-
evaluate
Evalutes the rsl tree against the specified symbol table. All the variable definitions are first evaluated because they might update the symbol table. Then all the relations followed by the sub-specifications are evaluated.- Specified by:
evaluatein classAbstractRslNode- Parameters:
symbolTable- the symbol table to evalute variables against.- Returns:
- the evaluated rsl tree.
- Throws:
RslEvaluationException- If an error occured during rsl evaluation.
-
toRSL
Produces a RSL representation of node.- Specified by:
toRSLin classAbstractRslNode- Parameters:
buf- buffer to add the RSL representation to.explicitConcat- if true explicit concatination will be used in RSL strings.
-