adams.flow.transformer.TwitterFilter
Filters Twitter objects (tweet/status) according to the provided filter expression. Only objects that match the filter expression are passed on.
The expressions use the following grammar:
expr_list ::= expr_list expr | expr;
expr ::= ( expr )
| boolexpr
;
boolexpr ::= BOOLEAN
| ( boolexpr )
| not boolexpr
| boolexpr and boolexpr
| boolexpr or boolexpr
| boolexpr xor boolexpr
| numexpr < numexpr
| numexpr <= numexpr
| numexpr = numexpr
| numexpr > numexpr
| numexpr >= numexpr
| numexpr <> numexpr
| retweet
| isretweeted
| langcode <match> pattern
| country <match> pattern
| countrycode <match> pattern
| place <match> pattern
| source <match> pattern
| text <match> pattern
| user <match> pattern
| screenname <match> pattern
| hashtag <match> pattern
| usermention <match> pattern
| statuslang <match> pattern
| if[else] ( boolexpr:test , boolexpr:test_true , boolexpr:test_false )
| has ( parameter )
;
numexpr ::= num
| longitude
| latitude
| favcount
;
parameter ::= langcode
| country
| countrycode
| place
| source
| text
| user
| longitude
| latitude
;
The '<match>' operator can be one of the following:
1. '=' - exact match (the twitter field must be the exact 'pattern' string)
2. ':' - substring match (the 'pattern' can occur anywhere in the twitter field)
3. '~' - regular expression match (the 'pattern' is a regular expression that the twitter field must match)
Please note, all strings are converted to lower case before the filter is applied.
Flow input/output:
- input: twitter4j.Status
- output: twitter4j.Status
The logging level for outputting errors and debugging output.
command-line | -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> |
default | WARNING |
The name of the actor.
command-line | -name <java.lang.String> |
default | TwitterFilter |
The annotations to attach to this actor.
command-line | -annotation <adams.core.base.BaseAnnotation> |
default |
|
If set to true, transformation is skipped and the input token is just forwarded as it is.
command-line | -skip <boolean> |
default | false |
If set to true, the flow execution at this level gets stopped in case this actor encounters an error; the error gets propagated; useful for critical actors.
command-line | -stop-flow-on-error <boolean> |
default | false |
If enabled, then no errors are output in the console; Note: the enclosing actor handler must have this enabled as well.
command-line | -silent <boolean> |
default | false |
The filter expression to use.
command-line | -expression <adams.core.base.TwitterFilterExpression> |
default |
|