org.shapelogic.filter
Class FilterFactory
java.lang.Object
org.shapelogic.filter.FilterFactory
public class FilterFactory
- extends java.lang.Object
Turns logic expressions into filters.
Uses Antlr parser to parse to AST, Abstract Syntax Tree,
then traverses the tree to build the filter.
- Author:
- Sami Badawi
Method Summary |
static java.lang.String |
escapeBackspace(java.lang.String input)
Replace escaped characters with the character
\\ -> \
\" -> "
\' -> ' |
static
<BaseClass,Element>
IFilter<BaseClass,Element> |
|
makeFilter(org.antlr.runtime.tree.CommonTree tree)
|
static
<BaseClass,Element>
IFilter<BaseClass,Element> |
|
makeFilter(java.lang.String filterName)
|
static
<BaseClass,Element>
IFilter<BaseClass,Element> |
|
makeFilter(java.lang.String filterName,
java.lang.Object constraint)
|
static
<BaseClass,Element>
IFilter<BaseClass,Element> |
|
makeTreeFilter(java.lang.String inputExpression)
|
static java.lang.Object |
parseCronstraintParameterTree(org.antlr.runtime.tree.CommonTree tree)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AND
public static final java.lang.String AND
- See Also:
- Constant Field Values
OR
public static final java.lang.String OR
- See Also:
- Constant Field Values
NOT
public static final java.lang.String NOT
- See Also:
- Constant Field Values
CONSTRAINT
public static final java.lang.String CONSTRAINT
- See Also:
- Constant Field Values
STRING_TYPE
public static final java.lang.String STRING_TYPE
- See Also:
- Constant Field Values
DOUBLE_TYPE
public static final java.lang.String DOUBLE_TYPE
- See Also:
- Constant Field Values
VARIABLE_TYPE
public static final java.lang.String VARIABLE_TYPE
- See Also:
- Constant Field Values
FILTER_PACKAGE
public static final java.lang.String FILTER_PACKAGE
- See Also:
- Constant Field Values
BACKSPACE
public static final char BACKSPACE
- See Also:
- Constant Field Values
FilterFactory
public FilterFactory()
makeFilter
public static <BaseClass,Element> IFilter<BaseClass,Element> makeFilter(java.lang.String filterName)
makeFilter
public static <BaseClass,Element> IFilter<BaseClass,Element> makeFilter(java.lang.String filterName,
java.lang.Object constraint)
makeFilter
public static <BaseClass,Element> IFilter<BaseClass,Element> makeFilter(org.antlr.runtime.tree.CommonTree tree)
makeTreeFilter
public static <BaseClass,Element> IFilter<BaseClass,Element> makeTreeFilter(java.lang.String inputExpression)
parseCronstraintParameterTree
public static java.lang.Object parseCronstraintParameterTree(org.antlr.runtime.tree.CommonTree tree)
escapeBackspace
public static java.lang.String escapeBackspace(java.lang.String input)
- Replace escaped characters with the character
\\ -> \
\" -> "
\' -> '
Copyright © 2009. All Rights Reserved.