Class Filter
java.lang.Object
org.apache.uima.collection.impl.cpm.utils.Filter
Parses the filter expression associated with a Cas Processor in the cpe descriptor.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassObject containing single filter.classLeft part of filter expression.classOperand.classRight part of the filter expression. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) LinkedListThe expression list.protected booleanThe filter initialized.protected booleanThe is and filter.protected booleanThe is or filter.(package private) StackThe stack. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidBuilds filter expression from values from the stack.static voidThe main method.Parses filter expression.private voidparseTokens(StringTokenizer aTokenizer) Parses tokens.
-
Field Details
-
stack
Stack stackThe stack. -
expressionList
LinkedList expressionListThe expression list. -
isAndFilter
protected boolean isAndFilterThe is and filter. -
isOrFilter
protected boolean isOrFilterThe is or filter. -
filterInitialized
protected boolean filterInitializedThe filter initialized.
-
-
Constructor Details
-
Filter
public Filter()
-
-
Method Details
-
parse
Parses filter expression.- Parameters:
expression- - filter expression to parse- Returns:
- - list of filters
- Throws:
ParseException- -
-
parseTokens
Parses tokens.- Parameters:
aTokenizer- - tokenized filter expression- Throws:
ParseException- -
-
evaluate
Builds filter expression from values from the stack.- Parameters:
anOp- the an op- Throws:
ParseException- -
-
main
The main method.- Parameters:
args- the arguments
-