Class Filter
- java.lang.Object
-
- org.apache.uima.collection.impl.cpm.utils.Filter
-
public class Filter extends java.lang.ObjectParses the filter expression associated with a Cas Processor in the cpe descriptor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classFilter.ExpressionObject containing single filter.classFilter.LeftPartLeft part of filter expression.classFilter.OperandOperand.classFilter.RightPartRight part of the filter expression.
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.LinkedListexpressionListThe expression list.protected booleanfilterInitializedThe filter initialized.protected booleanisAndFilterThe is and filter.protected booleanisOrFilterThe is or filter.(package private) java.util.StackstackThe stack.
-
Constructor Summary
Constructors Constructor Description Filter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidevaluate(java.lang.String anOp)Builds filter expression from values from the stack.static voidmain(java.lang.String[] args)The main method.java.util.LinkedListparse(java.lang.String expression)Parses filter expression.private voidparseTokens(java.util.StringTokenizer aTokenizer)Parses tokens.
-
-
-
Field Detail
-
stack
java.util.Stack stack
The stack.
-
expressionList
java.util.LinkedList expressionList
The expression list.
-
isAndFilter
protected boolean isAndFilter
The is and filter.
-
isOrFilter
protected boolean isOrFilter
The is or filter.
-
filterInitialized
protected boolean filterInitialized
The filter initialized.
-
-
Method Detail
-
parse
public java.util.LinkedList parse(java.lang.String expression) throws java.text.ParseExceptionParses filter expression.- Parameters:
expression- - filter expression to parse- Returns:
- - list of filters
- Throws:
java.text.ParseException- -
-
parseTokens
private void parseTokens(java.util.StringTokenizer aTokenizer) throws java.text.ParseExceptionParses tokens.- Parameters:
aTokenizer- - tokenized filter expression- Throws:
java.text.ParseException- -
-
evaluate
private void evaluate(java.lang.String anOp) throws java.text.ParseExceptionBuilds filter expression from values from the stack.- Parameters:
anOp- the an op- Throws:
java.text.ParseException- -
-
main
public static void main(java.lang.String[] args)
The main method.- Parameters:
args- the arguments
-
-