Package org.globus.rsl
Class ListRslNode
- java.lang.Object
-
- org.globus.rsl.AbstractRslNode
-
- org.globus.rsl.ListRslNode
-
public class ListRslNode extends AbstractRslNode
This class represents an abstract RSL parse tree. It is composed of variable definitions (bindings), relations, and sub-specifications (sub nodes).
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List_bindingsprotected java.util.List_relations-
Fields inherited from class org.globus.rsl.AbstractRslNode
_operator, _specifications, AND, MULTI, OR
-
-
Constructor Summary
Constructors Constructor Description ListRslNode()ListRslNode(int operator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Bindings bindings)booleanadd(NameOpValue relation)AbstractRslNodeevaluate(java.util.Map symbolTable)Evalutes the rsl tree against the specified symbol table.java.util.ListgetBindings()Returns the variable definitions.BindingsgetBindings(java.lang.String attribute)Returns the variable definitions associated wit the given attribute.NameOpValuegetParam(java.lang.String attribute)Returns the relation associated with the given attribute.java.util.ListgetRelations()Returns the relations.voidmergeTo(AbstractRslNode dstNode)BindingsremoveBindings(java.lang.String attribute)Removes a bindings list for the specified attribute.NameOpValueremoveParam(java.lang.String attribute)Removes a relation for the specified attribute.voidtoRSL(java.lang.StringBuffer buf, boolean explicitConcat)Produces a RSL representation of node.-
Methods inherited from class org.globus.rsl.AbstractRslNode
add, canonicalize, evaluate, getOperator, getOperatorAsString, getOperatorAsString, getSpecifications, merge, removeSpecification, setOperator, toRSL, toString
-
-
-
-
Method Detail
-
add
public boolean add(Bindings bindings)
- Specified by:
addin classAbstractRslNode
-
add
public boolean add(NameOpValue relation)
- Specified by:
addin classAbstractRslNode
-
getParam
public NameOpValue getParam(java.lang.String attribute)
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
public Bindings getBindings(java.lang.String attribute)
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.
-
removeBindings
public Bindings removeBindings(java.lang.String attribute)
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.
-
removeParam
public NameOpValue removeParam(java.lang.String attribute)
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.
-
mergeTo
public void mergeTo(AbstractRslNode dstNode)
- Overrides:
mergeToin classAbstractRslNode
-
getRelations
public java.util.List getRelations()
Returns the relations.- Returns:
- the list of relations.
-
getBindings
public java.util.List getBindings()
Returns the variable definitions.- Returns:
- the map of variable definitions.
-
evaluate
public AbstractRslNode evaluate(java.util.Map symbolTable) throws RslEvaluationException
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
public void toRSL(java.lang.StringBuffer buf, boolean explicitConcat)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.
-
-