class |
AbstractAttributeCapabilities |
Ancestor for capabilities-based conditions.
|
class |
AbstractBooleanDatabaseCondition |
Ancestor for conditions that operate on a database.
|
class |
AbstractExpression |
Ancestor for conditions that use a boolean expression.
|
class |
AbstractMultiCondition |
Ancestor for conditions that use multiple sub-conditions.
|
class |
AbstractScript |
Ancestor for boolean script conditions.
|
class |
AbstractScriptedCondition |
Abstract ancestor for actors that execute scripts.
|
class |
AdamsInstanceCapabilities |
Filters adams.data.instance.Instance based on defined capabilities.
|
class |
And |
Performs a logical AND over all its sub-conditions, i.e., it only evaluates to 'true' if all of the sub-conditions evaluate to 'true' as well.
|
class |
BinaryFile |
Evaluates to 'true' if the file exists and is a binary file.
A heuristic is used to determine whether a file is binary, based on the first 1024 bytes.
|
class |
BooleanReportValue |
Returns 'true' if the boolean field in the report is present and is 'true'.
|
class |
BytesComplete |
Evaluates to 'true' if the bytes from the token are considered a 'complete' file.
|
class |
Counting |
Counts the tokens passing through and returns 'true' if min/max/interval are met.
|
class |
DirectoriesMatch |
Evaluates to 'true' if at least one sub-directory matches the regular expression in the specified directory.
|
class |
DirectoryExists |
Evaluates to 'true' if the directory exists.
|
class |
Expression |
Evaluates to 'true' if the expression evaluates to 'true'.
In case of java.lang.Number tokens that arrive at the input, these can be accessed in the expression via 'X'; string tokens can be accessed via expression '"X"' (surrounding double quotes are required).
If the incoming token is either a Report or a ReportHandler, the contents of the report get added as values as well (boolean, numeric or string) and you can access them via their name instead of 'X'.
The following grammar is used for evaluating the boolean 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) )
| 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] )
| replace ( str , pos , len , newstr )
| substitute ( str , find , replace [, occurrences] )
# 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 |
False |
Always evaluates to 'false'.
|
class |
FileComplete |
Evaluates to 'true' if the file (from option or token) is considered complete.
|
class |
FileExists |
Evaluates to 'true' if the file exists.
If a filename generator other than adams.core.io.NullFilenameGenerator is specified, then this takes precedence over the supplied filename (uses the token passing through).
|
class |
FileInUse |
Evaluates to 'true' if the file is currently being used by another process.
If a filename generator other than adams.core.io.NullFilenameGenerator is specified, then this takes precedence over the supplied filename (uses the token passing through).
|
class |
FilesMatch |
Evaluates to 'true' if at least one file matches the regular expression in the specified directory.
|
class |
Groovy |
A boolean condition that uses the condition defined in a Groovy script.
|
class |
HasClass |
Evaluates to 'true' if the specified class is available on the classpath.
|
class |
HasColumn |
Checks whether the spreadsheet passing through has a certain column.
|
class |
HasElements |
Checks whether the array passing through has a at least the specified number of elements.
|
class |
HasExifTag |
Checks whether the specified EXIF tag is present.
|
class |
HashSet |
Evaluates to true if the payload of the current token or the specified string (if non-empty) is present in the specified hashset.
The value gets transformed using the specified conversion.
See also:
adams.flow.standalone.HashSetInit
adams.flow.transformer.HashSetInit
|
class |
HasInterface |
Evaluates to 'true' if the objects implement the specified interface.
|
class |
HasLength |
Checks whether the array passing through has the required number of elements.
|
class |
HasMapValue |
Evaluates to true if the specified java.util.Map object is available in storage and a value is associated with the supplied key.
|
class |
HasProperty |
Evaluates to 'true' if the objects have the specified property path.
|
class |
HasQueue |
Evaluates to true if the specified queue is available in storage.
|
class |
HasRows |
Checks whether the spreadsheet passing through has the required number of rows.
|
class |
HasSize |
Checks whether the collection passing through has the required number of elements.
|
class |
HasStorageValue |
Evaluates to true if the specified storage value is present.
|
class |
HasVariable |
Evaluates to true if the specified variable is set.
|
class |
HasVariableValue |
Evaluates to true if the specified variable is present and its value is the same as the specified one.
|
class |
InList |
Checks whether the incoming string is among the specified items.
|
class |
IsAndroid |
Evaluates to 'true' if the operating system is Android.
|
class |
IsArm64 |
Evaluates to 'true' if the system architecture is Arm64.
|
class |
IsArray |
Evaluates to 'true' if the object passing through represents an array.
|
class |
IsBoolean |
Evaluates to 'true' if the payload of the token is a boolean string (true|false).
|
class |
IsByte |
Evaluates to 'true' if the payload of the token is a byte number/string.
|
class |
IsBzip2Compressed |
Checks whether the file or byte array is Bzip2 compressed.
|
class |
IsDouble |
Evaluates to 'true' if the payload of the token is a double number/string.
|
class |
IsFloat |
Evaluates to 'true' if the payload of the token is a float number/string.
|
class |
IsGzipCompressed |
Checks whether the file or byte array is Gzip compressed.
|
class |
IsInteger |
Evaluates to 'true' if the payload of the token is an integer number/string.
|
class |
IsLinux |
Evaluates to 'true' if the operating system is Linux.
|
class |
IsLong |
Evaluates to 'true' if the payload of the token is a long number/string.
|
class |
IsMac |
Evaluates to 'true' if the operating system is a Mac.
|
class |
IsMat5Array |
Checks whether the object represents a Matlab array.
|
class |
IsMat5Matrix |
Checks whether the object represents a Matlab matrix.
|
class |
IsMat5Struct |
Checks whether the object represents a Matlab struct data structure.
|
class |
IsNull |
Evaluates to 'true' if the payload of the token passing through is null.
|
class |
IsNumeric |
Evaluates to 'true' if the payload of the token is a number or a numeric string.
|
class |
IsRarCompressed |
Checks whether the file or byte array is Rar compressed.
|
class |
IsShort |
Evaluates to 'true' if the payload of the token is a short number/string.
|
class |
IsSubClass |
Evaluates to 'true' if the objects are derived from the specified superclass.
|
class |
IsWindows |
Evaluates to 'true' if the operating system is a Windows variant.
|
class |
IsXzCompressed |
Checks whether the file or byte array is Xz compressed.
|
class |
IsZipCompressed |
Checks whether the file or byte array is Zip compressed.
|
class |
IsZstdCompressed |
Checks whether the file or byte array is Zstd compressed.
|
class |
Not |
Negates the output of the specified condition.
|
class |
NotesErrors |
Evaluates to true if the notes handler passing through has any errors recorded.
|
class |
Or |
Performs a logical OR over all its sub-conditions, i.e., it evaluates to 'true' if any of the sub-conditions evaluates to 'true' as well.
|
class |
PromptUser |
Prompts the user to click on 'positive' or 'negative' button (negative button can be omitted).
The actor's name can be used in the message using the following placeholders:
{SHORT} - the short name
{FULL} - the full name (incl path)
Variables get expanded as well.
Can be used in a headless environment as well.
|
class |
RegExp |
Returns the result of the regular expression matching the incoming string.
|
class |
ReportValueExists |
Returns 'true' if the field in the report is present.
|
class |
Scripted |
A boolean condition that uses the condition defined in an external script.
|
class |
StorageFlagSet |
Evaluates to true if the specified storage value is present, a boolean and true.
|
class |
TableExists |
Checks whether table(s) exist that match the given regular expression.
|
class |
True |
Always evaluates to 'true'.
|
class |
VariableFlagSet |
Evaluates to true if the specified variable is present, a boolean and true.
|
class |
WekaCapabilities |
Filters weka.core.Instance and weka.core.Instances objects based on defined capabilities.
|
class |
WekaClassification |
Uses the index of the classification, i.e., the predicted label, as index of the switch
|