org.ow2.clif.scenario.isac.util
Class ParameterParser

java.lang.Object
  extended by org.ow2.clif.scenario.isac.util.ParameterParser

public abstract class ParameterParser
extends java.lang.Object

General methods for escaping/unescaping characters in Isac parameters' values. (originally moved from class org.ow2.clif.scenario.isac.egui.plugins.gui.ParameterWidget)

Author:
Bruno Dillenseger, JC Meillaud, A Peyrard

Constructor Summary
ParameterParser()
           
 
Method Summary
static java.lang.String addEscapeCharacter(java.lang.String separator, java.lang.String value)
          Add escape separator before each separator
static java.util.List<java.lang.String> getCheckBox(java.lang.String value)
           
static java.lang.String getCombo(java.lang.String value)
           
static java.util.List<java.lang.String> getNField(java.lang.String value)
           
static java.lang.String getRadioGroup(java.lang.String value)
           
static java.util.List<java.lang.String> getRealTokens(java.lang.String separator, java.lang.String value)
          Split the string value with the separator, and check if there is no escape character before the separator
static java.util.List<java.util.List<java.lang.String>> getTable(java.lang.String value)
          This method analyzes the value to be set in the table, and remove all escape characters
static java.lang.String unescape(java.lang.String value)
          Replaces every escape sequences by the corresponding original character
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterParser

public ParameterParser()
Method Detail

getNField

public static java.util.List<java.lang.String> getNField(java.lang.String value)

getRadioGroup

public static java.lang.String getRadioGroup(java.lang.String value)

getCheckBox

public static java.util.List<java.lang.String> getCheckBox(java.lang.String value)

getCombo

public static java.lang.String getCombo(java.lang.String value)

getTable

public static java.util.List<java.util.List<java.lang.String>> getTable(java.lang.String value)
This method analyzes the value to be set in the table, and remove all escape characters

Parameters:
value - The value containing the serialization of all values of the table
Returns:
The vector containing all the entries, each entries is in a vector, which contains the string values

addEscapeCharacter

public static java.lang.String addEscapeCharacter(java.lang.String separator,
                                                  java.lang.String value)
Add escape separator before each separator

Parameters:
separator - The separator character
value - The value of the string to add the escape characters
Returns:
The string modified

getRealTokens

public static java.util.List<java.lang.String> getRealTokens(java.lang.String separator,
                                                             java.lang.String value)
Split the string value with the separator, and check if there is no escape character before the separator

Parameters:
separator - The separator
value - The string value to be split
Returns:
The vector containing each token

unescape

public static java.lang.String unescape(java.lang.String value)
Replaces every escape sequences by the corresponding original character

Parameters:
value - the string where some characters are escaped by '\' character
Returns:
the unescaped string