|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.globus.rsl.RslAttributes
public class RslAttributes
This class provides convieniene methods for accessing and manipulatig simple rsl expressions. The class provides methods for retreiving and setting values of specified attributes.
Field Summary | |
---|---|
protected RslNode |
rslTree
|
Constructor Summary | |
---|---|
RslAttributes()
Creates an empty RslAttributes object. |
|
RslAttributes(RslNode rslTree)
Creates a new RslAttributes object with specified rsl parse tree. |
|
RslAttributes(String rsl)
Creates a new RslAttributes object from specified RSL string. |
Method Summary | |
---|---|
void |
add(String attribute,
String value)
Adds a simple value to the list of values of a given attribute. |
void |
addMulti(String attribute,
String[] values)
Adds a list of values as a single value to the specified attribute. |
void |
addVariable(String attribute,
String varName,
String value)
Adds a new variable definition to the specified variable definitions attribute. |
List |
get(String attribute)
Deprecated. use getMulti() instead. |
String |
getFirstValue(String attribute)
Deprecated. use getSingle() instead. |
Map |
getMap(String attribute)
Returns a key/value pair map for a specified attribute. |
List |
getMulti(String attribute)
Returns a list of strings for a specified attribute. |
protected NameOpValue |
getRelation(String attribute)
|
RslNode |
getRslNode()
Returns the rsl parse tree. |
String |
getSingle(String attribute)
Returns a string value of the specified attribute. |
Map |
getVariables(String attribute)
Returns a variable name/value pair map of variable definitions. |
void |
remove(String attribute)
Removes a specific attribute from attribute/value relations. |
boolean |
remove(String attribute,
String value)
Removes a specific value from a list of values of the specified attribute. |
boolean |
removeMap(String attribute,
String key)
Removes a specific key from a list of values of the specified attribute. |
boolean |
removeVariable(String attribute,
String varName)
Removes a specific variable definition given a variable name. |
void |
set(String attribute,
String value)
Sets the attribute value to the given value. |
void |
setMulti(String attribute,
String[] values)
Sets the attribute value to the given list of values. |
String |
toRSL()
Returns the rsl. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RslNode rslTree
Constructor Detail |
---|
public RslAttributes()
public RslAttributes(RslNode rslTree)
rslTree
- the rsl parse tree.public RslAttributes(String rsl) throws ParseException
rsl
- the rsl string.
ParseException
- if the rsl cannot be parsed.Method Detail |
---|
public RslNode getRslNode()
public String getSingle(String attribute)
attribute
- the rsl attribute to return the value of.
public List getMulti(String attribute)
attribute
- the rsl attribute to return the values of.
public Map getMap(String attribute)
attribute
- the rsl attribute to return the key/value pair map of.
public Map getVariables(String attribute)
attribute
- the attribute that defines variables. Currently,
only 'rsl_substitution' is supported.
public void addVariable(String attribute, String varName, String value)
attribute
- the variable definitions attribute - rsl_subsititution.varName
- the variable name to add.value
- the value of the variable to add.public boolean removeVariable(String attribute, String varName)
attribute
- the attribute that defines variable definitions.varName
- the name of the variable to remove.
public void remove(String attribute)
attribute
- the attribute name to remove.public boolean remove(String attribute, String value)
attribute
- the attribute from which to remote the value from.value
- the specific value to remove.
public boolean removeMap(String attribute, String key)
attribute
- the attribute to remove the key from.key
- the key to remove.
protected NameOpValue getRelation(String attribute)
public void set(String attribute, String value)
attribute
- the attribute to set the value of.value
- the value to add.public void add(String attribute, String value)
attribute
- the attribute to add the value to.value
- the value to add.public void setMulti(String attribute, String[] values)
attribute
- the attribute to set the value of.values
- the list of values to add.public void addMulti(String attribute, String[] values)
attribute
- the attribute to add the list of values to.values
- the values to add.public String getFirstValue(String attribute)
public List get(String attribute)
public String toRSL()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |