class |
AbstractConversionFromString |
Ancestor for conversion schemes that convert strings into other objects.
|
class |
AbstractStringConversion |
Ancestor for string conversion schemes.
|
class |
AbstractValidateString |
Ancestor for string conversions that ensure a string only contains valid
characters according to some rules.
|
class |
BackQuote |
Backquotes, i.e., escapes with a backslash, characters like quotes (single and double), new lines, tabs.
See also:
adams.data.conversion.Quote
adams.data.conversion.UnQuote
adams.data.conversion.UnBackQuote
Valid options are:
|
class |
Base64ToByteArray |
Decodes a base64 string into a byte array.
|
class |
Base64ToString |
Decodes a base64 string.
|
class |
BreakUpString |
Breaks up a string into multiple lines if wider than the specified number of columns.
|
class |
CommandlineToAny |
Turns a command-line into an object.
|
class |
HexToByte |
Turns a hexadecimal string into a Byte.
|
class |
HexToInt |
Turns a hexadecimal string into an Integer.
|
class |
HtmlCharacterEntitiesToString |
Turns HTML character entities like '<' into their character representations like '<'.
|
class |
LeftPad |
Left pads a string up to a maximum number of characters.
|
class |
LowerCase |
Turns a String into a lowercase String.
|
class |
PrettyPrintXML |
Turns the XML string into a pretty-printed XML string.
See also:
adams.data.conversion.XMLToDOM
adams.data.conversion.DOMToString
|
class |
Quote |
Surrounds a string with quotes (single or double), if necessary due to blanks or other characters (new line, tab) in the string.
However, you can also 'force' the quoting.
See also:
adams.data.conversion.UnQuote
adams.data.conversion.BackQuote
adams.data.conversion.UnBackQuote
|
class |
ReplaceFileExtension |
Interprets the string as file name and replaces its extension with the provided one.
|
class |
RightPad |
Right pads a string up to a maximum number of characters.
|
class |
RomanToInt |
Converts a roman numeral string (eg 'MCM') into an integer (eg 1900).
|
class |
SimpleAsciiToUnicode |
Turns an ASCII string into a Unicode one, by replacing hexadecimal unicode character representations like '\xf3' with their unicode characters.
For instance, "D'\xe1'cil" becomes "Dácil".
|
class |
SimpleUnicodeToAscii |
Turns a Unicode string into an ASCII one, by replacing the Unicode characters with something like '\xf3' (including the single quotes).
For instance, "Dácil" becomes "D'\xe1'cil".
|
class |
SpreadSheetEscapeColumnName |
Escapes a column name (if necessary) to be used in a column range expression.
|
class |
SpreadSheetInsertCellLocation |
Replaces the specified placeholder with a cell location generated from the user-supplied row and column.
|
class |
SpreadSheetInsertColumnPosition |
Replaces the specified placeholder with a column string (e.g., BG) generated from the user-supplied column.
|
class |
SpreadSheetUnescapeColumnName |
Unescapes a column name (if necessary) that was to be used in a column range expression.
|
class |
StringExpression |
Evaluates a string expression.
Variables are supported as well, e.g.: pow(X,@{exp}) with '@{exp}' being a variable available at execution time.
The following grammar is used for the expressions:
expr_list ::= '=' expr_list expr_part | expr_part ;
expr_part ::= expr ;
expr ::= ( expr )
# data types
| number
| string
| boolean
| date
# constants
| true
| false
| pi
| e
| now()
| today()
# negating numeric value
| -expr
# comparisons
| expr < expr
| expr <= expr
| expr > expr
| expr >= expr
| expr = expr
| expr != expr (or: expr <> expr)
# boolean operations
| ! expr (or: not expr)
| expr & expr (or: expr and expr)
| expr | expr (or: expr or expr)
| if[else] ( expr , expr (if true) , expr (if false) )
| ifmissing ( variable , expr (default value if variable is missing) )
| has ( variable )
| isNaN ( expr )
# arithmetics
| expr + expr
| expr - expr
| expr * expr
| expr / expr
| expr ^ expr (power of)
| expr % expr (modulo)
;
# numeric functions
| abs ( expr )
| sqrt ( expr )
| cbrt ( expr )
| log ( expr )
| log10 ( expr )
| exp ( expr )
| sin ( expr )
| sinh ( expr )
| cos ( expr )
| cosh ( expr )
| tan ( expr )
| tanh ( expr )
| atan ( expr )
| atan2 ( exprY , exprX )
| hypot ( exprX , exprY )
| signum ( expr )
| rint ( expr )
| floor ( expr )
| pow[er] ( expr , expr )
| ceil ( expr )
| min ( expr1 , expr2 )
| max ( expr1 , expr2 )
| year ( expr )
| month ( expr )
| day ( expr )
| hour ( expr )
| minute ( expr )
| second ( expr )
| weekday ( expr )
| weeknum ( expr )
# string functions
| substr ( expr , start [, end] )
| left ( expr , len )
| mid ( expr , start , len )
| right ( expr , len )
| rept ( expr , count )
| concatenate ( expr1 , expr2 [, expr3-5] )
| lower[case] ( expr )
| upper[case] ( expr )
| trim ( expr )
| matches ( expr , regexp )
| trim ( expr )
| len[gth] ( str )
| find ( search , expr [, pos] ) (find 'search' in 'expr', return 1-based position)
| replace ( str , pos , len , newstr )
| substitute ( str , find , replace [, occurrences] )
| str ( expr )
| str ( expr , numdecimals )
| str ( expr , decimalformat )
| ext ( file_str ) (extracts extension from file)
| replaceext ( file_str, ext_str ) (replaces the extension of the file with the new one)
# array functions
| len[gth] ( array )
| get ( array , index )
;
Notes:
- Variables are either all upper case letters (e.g., "ABC") or any character apart from "]" enclosed by "[" and "]" (e.g., "[Hello World]").
- 'start' and 'end' for function 'substr' are indices that start at 1.
- 'index' for function 'get' starts at 1.
- Index 'end' for function 'substr' is excluded (like Java's 'String.substring(int,int)' method)
- Line comments start with '#'
- Semi-colons (';') or commas (',') can be used as separator in the formulas,
e.g., 'pow(2,2)' is equivalent to 'pow(2;2)'
- dates have to be of format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss'
- times have to be of format 'HH:mm:ss' or 'yyyy-MM-dd HH:mm:ss'
- the characters in square brackets in function names are optional:
e.g.
|
class |
StringToBase64 |
Encodes a string as base64.
|
class |
StringToByte |
Turns a String into a Byte.
|
class |
StringToByteArray |
Converts a string into a byte array.
|
class |
StringToCharArray |
Converts a string into a char array.
|
class |
StringToCustomStringRepresentation |
Turns a String into an object of a class with an associated object editor that has implements adams.gui.goe.CustomStringRepresentationHandler.
|
class |
StringToDateTimeType |
Parses a string and turns it into an instance of the specified date/time type.
|
class |
StringToDouble |
Turns a String into a Double.
|
class |
StringToField |
Turns a String into a Field object.
|
class |
StringToFile |
Turns a String into a File object.
|
class |
StringToHtmlCharacterEntities |
Turns a string into valid HTML, replacing characters like '<', '>' etc with their character entities.
|
class |
StringToInt |
Turns a String into an Integer.
|
class |
StringToJson |
Turns a string into a JSON object or array.
|
class |
StringToLong |
Turns a String into a Long.
|
class |
StringToMat5Array |
Converts a string like '[1, 2; 3, 4]' into a Matlab matrix.
|
class |
StringToPoint2D |
class |
StringToProperties |
Turns a String into a Properties object.
|
class |
StringToQuadrilateralLocation |
Converts a string into a adams.core.base.QuadrilateralLocation object.
|
class |
StringToRectangle |
Converts a string into a adams.core.base.BaseRectangle object, using 'x y w h' or 'x0 y0 x1 y1'.
|
class |
StringToRemoteCommand |
Parses the String and turns it into a RemoteCommand object.
|
class |
StringToReport |
Reads the report from the incoming string using the specified report reader.
|
class |
StringToString |
Dummy converter, does not perform any conversion.
|
class |
StringToTextContainer |
Wraps the String in a adams.data.text.TextContainer, which allows the storage of meta-data using the attached report and/or notes.
|
class |
StringToURL |
Turns a String into a URL object.
|
class |
StringToValidFileName |
Turns any string into a valid file name.
|
class |
StringToValidStorageName |
Turns any string into a valid storage name.
|
class |
StringToValidVariableName |
Turns any string into a valid variable name.
|
class |
UnBackQuote |
Reverses backquoting, i.e., removes the escaping with backslash, restoring characters like quotes (single and double), new lines, tabs.
See also:
adams.data.conversion.Quote
adams.data.conversion.UnQuote
adams.data.conversion.BackQuote
Valid options are:
|
class |
UnQuote |
Removes the quotes (single or double) surrounding a string.
|
class |
UpperCase |
Turns a String into an uppercase String.
|
class |
URLDecode |
Decodes the URL encoded string back to a regular string (uses java.net.URLDecoder).
|
class |
URLEncode |
Encodes the string to make it usable within a URL (uses java.net.URLEncoder).
|
class |
UseForwardSlashes |
Converts backslashes in file names to forward slashes.
Does not touch the '\\' prefix of UNC paths.
|
class |
WekaCommandToCode |
Applies a commandline converter to the incoming commandline to generate code.
Uses the following project:
https://github.com/fracpete/command-to-code-weka-package
|
class |
XMLToDOM |
Turns an XML string into a org.w3c.dom.Document DOM object.
|
class |
YamlStringToList |
Converts the YAML string into a java.util.Map object.
|
class |
YamlStringToMap |
Converts the YAML string into a java.util.Map object.
|