public class Util extends Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static String |
camelCase(String inString_p)
uppercase the first char of each word
|
static String |
extractFileName(String filePath_p)
extracts the file name from full file path string.
|
static String |
getLicEmail()
returns the license email
|
static String |
getModelRoot()
returns the root file folder that contains models
|
static String |
getOsName()
returns OS name of this TestOptimal server.
|
static int |
getPort()
returns the port number used by this TestOptimal server.
|
static org.slf4j.Logger |
getServerLogger()
returns the server logger object, use it to log messages to ServerLog file.
|
static String |
getServerName()
returns current TestOptimal server host name
|
static String |
getVersionJava()
returns java version number.
|
static String |
getVersionTO()
returns version number of TestOptimal release build.
|
static boolean |
soundAlike(String string1_p,
String string2_p)
returns true if two strings sound like each other.
|
static boolean |
soundAlike(String string1_p,
String string2_p,
String conf_p)
returns true if two strings sound alike with the degree of similarity specified.
|
static boolean |
spellAlike(String string1_p,
String string2_p)
returns true if two strings are spelled alike with up to specified degree of differences allowed.
|
static boolean |
spellAlike(String string1_p,
String string2_p,
String conf_p)
returns true if two strings are spelled alike with up to specified degree of differences allowed.
|
static void |
submitModelExec(RunRequest runReq_p)
submits a model for execution on a runtime server managed by the SvrMgr
configured in the current TestOptimal server.
|
static void |
submitModelExec(String modelName_p,
String statDesc_p)
submits a model for execution on a runtime server managed by the SvrMgr
configured in the current TestOptimal server.
|
public static boolean soundAlike(String string1_p, String string2_p) throws Exception
Example:
$sys.soundAlike ('behavior','behavior')
string1_p
- string2_p
- Exception
public static boolean soundAlike(String string1_p, String string2_p, String conf_p) throws Exception
Example:
$soundAlike ('behavior','behaviour', '4')
string1_p
- string2_p
- conf_p
- between 0 and 4 with 0 match anything, 4 being sound exactly the same. invalid value is
defaulted to 4 (exactly sound like)Exception
public static boolean spellAlike(String string1_p, String string2_p, String conf_p) throws Exception
Example:
$spellAlike('collaboration', 'collaberaton', '1') $spellAlike('collaboration', 'collaberaon', '0.1')
string1_p
- original stringstring2_p
- string to compare toconf_p
- max number of chars difference between the two strings (edit distance) allowed or
fraction of the number of chars of the shorter string. For example 2 for maximum of 2 chars diff allowed
and 0.10 for 10% of the length of the shorter string rounded up.Exception
public static boolean spellAlike(String string1_p, String string2_p) throws Exception
Example:
$spellAlike('collaboration', 'collaberaton')
string1_p
- original stringstring2_p
- string to compare toException
public static String getModelRoot()
public static String getLicEmail()
public static String getServerName()
public static String getOsName()
public static String getVersionJava()
public static String getVersionTO()
public static String extractFileName(String filePath_p)
filePath_p
- public static String camelCase(String inString_p)
inString_p
- public static int getPort()
public static org.slf4j.Logger getServerLogger()
public static void submitModelExec(String modelName_p, String statDesc_p) throws MBTException
modelName_p
- model name deployed to SvrMgrstatDesc_p
- model execution descriptionMBTException
- on any error submitting the model for execution.public static void submitModelExec(RunRequest runReq_p) throws MBTException
runReq_p
- run request of type of com.testoptimal.server.model.RunRequestMBTException
- on any error submitting the model for execution.Copyright TestOptimal, LLC