com.espertech.esper.epl.parse
Class ASTFilterSpecHelper

java.lang.Object
  extended by com.espertech.esper.epl.parse.ASTFilterSpecHelper

public class ASTFilterSpecHelper
extends Object

Builds a filter specification from filter AST nodes.


Constructor Summary
ASTFilterSpecHelper()
           
 
Method Summary
protected static String escapeDot(String identifierToEscape)
          Escape all unescape dot characters in the text (identifier only) passed in.
protected static String getPropertyName(org.antlr.runtime.tree.Tree parentNode, int startIndex)
          Return the generated property name that is defined by the AST child node and it's siblings.
static int unescapedIndexOfDot(String identifier)
          Find the index of an unescaped dot (.) character, or return -1 if none found.
static String unescapeDot(String identifierToUnescape)
          Un-Escape all escaped dot characters in the text (identifier only) passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTFilterSpecHelper

public ASTFilterSpecHelper()
Method Detail

getPropertyName

protected static String getPropertyName(org.antlr.runtime.tree.Tree parentNode,
                                        int startIndex)
Return the generated property name that is defined by the AST child node and it's siblings.

Parameters:
parentNode - the AST node to consider as the parent for the child nodes to look at
startIndex - the index of the child node to start looking at
Returns:
property name, ie. indexed[1] or mapped('key') or nested.nested or a combination or just 'simple'.

escapeDot

protected static String escapeDot(String identifierToEscape)
Escape all unescape dot characters in the text (identifier only) passed in.

Parameters:
identifierToEscape - text to escape
Returns:
text where dots are escaped

unescapedIndexOfDot

public static int unescapedIndexOfDot(String identifier)
Find the index of an unescaped dot (.) character, or return -1 if none found.

Parameters:
identifier - text to find an un-escaped dot character
Returns:
index of first unescaped dot

unescapeDot

public static String unescapeDot(String identifierToUnescape)
Un-Escape all escaped dot characters in the text (identifier only) passed in.

Parameters:
identifierToUnescape - text to un-escape
Returns:
string

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com