|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwxtutils.command
Parses and stores the content of a Processing Instruction node according to a name-value, attribute-like, philosophy
Field Summary | |
protected java.lang.String |
m_Cmd
The main command, what to do |
protected java.lang.String |
m_originalData
the string as we received it in the constructor |
Constructor Summary | |
command(java.lang.String data,
unit theUnit)
Creates a new instance of command |
Method Summary | |
protected boolean |
expandParams(java.util.HashMap propMap)
Expand any parameter with named properties from propMap Expect: "//image[position()='_wxt_property(index)']/description" |
java.lang.String |
getCommand()
Returns the command, m_Cmd |
java.lang.String |
getValue(java.lang.String n)
Returns a value, returns null if no match |
int |
getValueAsInteger(java.lang.String n)
Returns an integer value, returns -1 if no match |
protected boolean |
nonEmptyValues()
Check all params for empty value |
boolean |
paramExist(java.lang.String n)
Returns true if the string n exists as name, false otherwise |
protected boolean |
parse(java.lang.String data)
Parse the content of a PI. |
java.lang.String |
toString()
Returns the command as a string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String m_Cmd
protected java.lang.String m_originalData
Constructor Detail |
public command(java.lang.String data, unit theUnit) throws java.lang.Exception
java.lang.Exception
- thrown when parse errorMethod Detail |
public java.lang.String getCommand()
public java.lang.String toString()
public java.lang.String getValue(java.lang.String n)
n
- The name to look for
public int getValueAsInteger(java.lang.String n)
n
- The anme we are looking for
public boolean paramExist(java.lang.String n)
n
- The name to look for
protected boolean parse(java.lang.String data)
data
- The string to parse.
protected boolean expandParams(java.util.HashMap propMap)
propMap
- Properties which are candidates for expansionprotected boolean nonEmptyValues()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |