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 |
Base64ToString |
Decodes a base64 string.
|
class |
BreakUpString |
Breaks up a string into multiple lines if wider than the specified number of columns.
|
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 |
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 |
StringToHtmlCharacterEntities |
Turns a string into valid HTML, replacing characters like '<', '>' etc with their character entities.
|
class |
StringToString |
Dummy converter, does not perform any conversion.
|
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
|