The SUMO toolbox  2018a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | List of all members
NodeConfig Class Reference
Inheritance diagram for NodeConfig:
Inheritance graph
[legend]

Public Member Functions

String getNodeText (String xpath)
 Return the text of the node identified by the given xpath expression The text of a node is the value xxx in <tag>xxx</tag>. More...
 
String getText (String defaultValue)
 Return the text of the current node, if empty return the default value. More...
 
String getNodeText (String xpath, String defaultValue)
 Same as above, except returns a default value if no match is found. More...
 
String getAttrValue (String key, String defaultValue)
 Return the value of the attribute specified by 'key' within the current node If the attribute does not exist or is empty return the default value. More...
 
String getAttrValue (String key)
 Return the value of the attribute specified by 'key' within the current node If the attribute does not exist or is empty return null. More...
 
void setAttributeValue (String key, String value)
 Set value of the attribute specified by 'key' to 'value' If the attribute does not exist, it is created. More...
 
double getDoubleAttrValue (String key, double defaultValue)
 
int getIntAttrValue (String key, int defaultValue)
 
boolean getBooleanAttrValue (String key, boolean defaultValue)
 
String getAttributeValue (String node, String name)
 Return the value of the attribute called 'name' within the node 'node'. More...
 
int getIntAttributeValue (String node, String name)
 
boolean getBooleanAttributeValue (String node, String name)
 
int getBooleanAsIntAttributeValue (String node, String name)
 
String getOption (String key)
 Returns the value of the 'value' attribute of the option node defined by 'key'. More...
 
String getOption (String key, String defaultValue)
 Same as above, except takes a default value. More...
 
boolean getBooleanOption (String key)
 
boolean getBooleanOption (String key, boolean defaultValue)
 
int getBooleanAsIntOption (String key)
 
int getBooleanAsIntOption (String key, int defaultValue)
 
double getDoubleOption (String key)
 
double getDoubleOption (String key, double defaultValue)
 
int getIntOption (String key)
 
int getIntOption (String key, int defaultValue)
 
long getLongOption (String key)
 
long getLongOption (String key, long defaultValue)
 
Properties getAllOptionsAsProperties ()
 
Properties getAllAttributesAsProperties ()
 
String toString ()
 
boolean supportsParent ()
 
Element getParent ()
 
void setParent (Element arg0)
 
Document getDocument ()
 
void setDocument (Document arg0)
 
boolean isReadOnly ()
 
boolean hasContent ()
 
String getName ()
 
void setName (String arg0)
 
String getText ()
 
void setText (String arg0)
 
String getStringValue ()
 
String getPath ()
 
String getPath (Element arg0)
 
String getUniquePath ()
 
String getUniquePath (Element arg0)
 
String asXML ()
 
void write (Writer arg0) throws IOException
 
Node getNode ()
 
Element getElement ()
 
short getNodeType ()
 
String getNodeTypeName ()
 
Node detach ()
 
List selectNodes (String arg0)
 
Object selectObject (String arg0)
 
List selectNodes (String arg0, String arg1)
 
List selectNodes (String arg0, String arg1, boolean arg2)
 
Node selectSingleNode (String arg0)
 
String valueOf (String arg0)
 
Number numberValueOf (String arg0)
 
boolean matches (String arg0)
 
XPath createXPath (String arg0) throws InvalidXPathException
 
Node asXPathResult (Element arg0)
 
void accept (Visitor arg0)
 
Object clone ()
 

Static Public Member Functions

static NodeConfig newInstance (Node n)
 Wrap a dom4j node. More...
 
static List< NodeConfigconvertToNodeConfig (Collection< Node > col)
 Convert a collection of Node objects into NodeConfig objects. More...
 
static List< Node > convertToNode (Collection< NodeConfig > col)
 Convert a collection of NodeConfig objects into plain Nodes. More...
 
static NodeConfig newInstanceFromText (String text)
 Creates a NodeConfig object based on an XML String. More...
 

Member Function Documentation

void accept ( Visitor  arg0)
inline
String asXML ( )
inline
Node asXPathResult ( Element  arg0)
inline
Object clone ( )
inline
static List<Node> convertToNode ( Collection< NodeConfig col)
inlinestatic

Convert a collection of NodeConfig objects into plain Nodes.

Parameters
col
Returns
static List<NodeConfig> convertToNodeConfig ( Collection< Node >  col)
inlinestatic

Convert a collection of Node objects into NodeConfig objects.

Parameters
col
Returns
XPath createXPath ( String  arg0) throws InvalidXPathException
inline
Node detach ( )
inline
Properties getAllAttributesAsProperties ( )
inline
Properties getAllOptionsAsProperties ( )
inline
String getAttributeValue ( String  node,
String  name 
)
inline

Return the value of the attribute called 'name' within the node 'node'.

Parameters
nodetag which contains the attribute defined by 'name'
namethe attribute name
Returns
the value of the attribute 'name' within the tag 'node'
String getAttrValue ( String  key,
String  defaultValue 
)
inline

Return the value of the attribute specified by 'key' within the current node If the attribute does not exist or is empty return the default value.

String getAttrValue ( String  key)
inline

Return the value of the attribute specified by 'key' within the current node If the attribute does not exist or is empty return null.

int getBooleanAsIntAttributeValue ( String  node,
String  name 
)
inline
int getBooleanAsIntOption ( String  key)
inline
int getBooleanAsIntOption ( String  key,
int  defaultValue 
)
inline
boolean getBooleanAttributeValue ( String  node,
String  name 
)
inline
boolean getBooleanAttrValue ( String  key,
boolean  defaultValue 
)
inline
boolean getBooleanOption ( String  key)
inline
boolean getBooleanOption ( String  key,
boolean  defaultValue 
)
inline
Document getDocument ( )
inline
double getDoubleAttrValue ( String  key,
double  defaultValue 
)
inline
double getDoubleOption ( String  key)
inline
double getDoubleOption ( String  key,
double  defaultValue 
)
inline
Element getElement ( )
inline
int getIntAttributeValue ( String  node,
String  name 
)
inline
int getIntAttrValue ( String  key,
int  defaultValue 
)
inline
int getIntOption ( String  key)
inline
int getIntOption ( String  key,
int  defaultValue 
)
inline
long getLongOption ( String  key)
inline
long getLongOption ( String  key,
long  defaultValue 
)
inline
String getName ( )
inline
Node getNode ( )
inline
String getNodeText ( String  xpath)
inline

Return the text of the node identified by the given xpath expression The text of a node is the value xxx in <tag>xxx</tag>.

Returns null if the node was not found.

String getNodeText ( String  xpath,
String  defaultValue 
)
inline

Same as above, except returns a default value if no match is found.

Parameters
xpath
defaultValue
Returns
short getNodeType ( )
inline
String getNodeTypeName ( )
inline
String getOption ( String  key)
inline

Returns the value of the 'value' attribute of the option node defined by 'key'.

The option node is relative to the current node.

Parameters
key
Returns
String getOption ( String  key,
String  defaultValue 
)
inline

Same as above, except takes a default value.

Parameters
key
defaultValue
Returns
Element getParent ( )
inline
String getPath ( )
inline
String getPath ( Element  arg0)
inline
String getStringValue ( )
inline
String getText ( String  defaultValue)
inline

Return the text of the current node, if empty return the default value.

String getText ( )
inline
String getUniquePath ( )
inline
String getUniquePath ( Element  arg0)
inline
boolean hasContent ( )
inline
boolean isReadOnly ( )
inline
boolean matches ( String  arg0)
inline
static NodeConfig newInstance ( Node  n)
inlinestatic

Wrap a dom4j node.

Parameters
n
Returns
static NodeConfig newInstanceFromText ( String  text)
inlinestatic

Creates a NodeConfig object based on an XML String.

Parameters
textXML string
Returns
Number numberValueOf ( String  arg0)
inline
List selectNodes ( String  arg0)
inline
List selectNodes ( String  arg0,
String  arg1 
)
inline
List selectNodes ( String  arg0,
String  arg1,
boolean  arg2 
)
inline
Object selectObject ( String  arg0)
inline
Node selectSingleNode ( String  arg0)
inline
void setAttributeValue ( String  key,
String  value 
)
inline

Set value of the attribute specified by 'key' to 'value' If the attribute does not exist, it is created.

Parameters
key
value
void setDocument ( Document  arg0)
inline
void setName ( String  arg0)
inline
void setParent ( Element  arg0)
inline
void setText ( String  arg0)
inline
boolean supportsParent ( )
inline
String toString ( )
inline
String valueOf ( String  arg0)
inline
void write ( Writer  arg0) throws IOException
inline

The documentation for this class was generated from the following file: