|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.globus.rsl.AbstractRslNode
public abstract class AbstractRslNode
This class represents an abstract RSL parse tree. It is composed of variable definitions (bindings), relations, and sub-specifications (sub nodes).
Field Summary | |
---|---|
protected int |
_operator
|
protected java.util.List |
_specifications
|
static int |
AND
|
static int |
MULTI
|
static int |
OR
|
Constructor Summary | |
---|---|
AbstractRslNode()
|
|
AbstractRslNode(int operator)
|
Method Summary | |
---|---|
boolean |
add(AbstractRslNode node)
Adds a rsl parse tree to this node. |
abstract boolean |
add(Bindings bindings)
|
abstract boolean |
add(NameOpValue relations)
|
static java.lang.String |
canonicalize(java.lang.String str)
Canonicalizes a string by removing any underscores and moving all characters to lowercase. |
AbstractRslNode |
evaluate()
Evalutes the rsl tree. |
abstract AbstractRslNode |
evaluate(java.util.Map symbolTable)
Evalutes the rsl tree against the specified symbol table. |
abstract Bindings |
getBindings(java.lang.String attribute)
Returns the variable definitions associated wit the given attribute. |
int |
getOperator()
Returns the node operator. |
java.lang.String |
getOperatorAsString()
Returns the operator as a string. |
static java.lang.String |
getOperatorAsString(int op)
Returns a string represention of a given operator. |
abstract NameOpValue |
getParam(java.lang.String attribute)
Returns the relation associated with the given attribute. |
java.util.List |
getSpecifications()
Returns the list of sub-specifications. |
void |
merge(AbstractRslNode inNode)
Merges the specified node with the current node. |
void |
mergeTo(AbstractRslNode dstNode)
|
abstract Bindings |
removeBindings(java.lang.String attribute)
Removes a bindings list for the specified attribute. |
abstract NameOpValue |
removeParam(java.lang.String attribute)
Removes a relation for the specified attribute. |
boolean |
removeSpecification(AbstractRslNode node)
Removes a specific sub-specification tree from the sub-specification list. |
void |
setOperator(int oper)
Sets the operator. |
java.lang.String |
toRSL(boolean explicitConcat)
Returns a RSL representation of this relation. |
abstract void |
toRSL(java.lang.StringBuffer buf,
boolean explicitConcat)
Produces a RSL representation of node. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int AND
public static final int OR
public static final int MULTI
protected int _operator
protected java.util.List _specifications
Constructor Detail |
---|
public AbstractRslNode()
public AbstractRslNode(int operator)
Method Detail |
---|
public abstract boolean add(Bindings bindings)
public abstract boolean add(NameOpValue relations)
public boolean add(AbstractRslNode node)
node
- the rsl parse tree to add.public abstract NameOpValue getParam(java.lang.String attribute)
attribute
- the attribute of the relation.
public abstract Bindings getBindings(java.lang.String attribute)
attribute
- the attribute of the variable deinitions.
public boolean removeSpecification(AbstractRslNode node)
node
- node to remove.
public abstract Bindings removeBindings(java.lang.String attribute)
attribute
- the attribute name for the
bindings.
public abstract NameOpValue removeParam(java.lang.String attribute)
attribute
- the attribute name for the
relation to remove.
public void merge(AbstractRslNode inNode)
inNode
- the source parse tree.public void mergeTo(AbstractRslNode dstNode)
public java.util.List getSpecifications()
public int getOperator()
public void setOperator(int oper)
oper
- the operator.public java.lang.String getOperatorAsString()
public static java.lang.String getOperatorAsString(int op)
op
- the operator.
public AbstractRslNode evaluate() throws RslEvaluationException
RslEvaluationException
- If an error occured during
rsl evaluation.public abstract AbstractRslNode evaluate(java.util.Map symbolTable) throws RslEvaluationException
symbolTable
- the symbol table to evalute variables against.
RslEvaluationException
- If an error occured during
rsl evaluation.public java.lang.String toRSL(boolean explicitConcat)
explicitConcat
- if true explicit concatination will
be used in RSL strings.
public abstract void toRSL(java.lang.StringBuffer buf, boolean explicitConcat)
buf
- buffer to add the RSL representation to.explicitConcat
- if true explicit concatination will
be used in RSL strings.public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String canonicalize(java.lang.String str)
str
- string to canonicalize
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |