public class JRQueryParser extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EXCEPTION_MESSAGE_KEY_TOKEN_SEPARATORS_NOT_CONFIGURED |
| Constructor and Description |
|---|
JRQueryParser() |
| Modifier and Type | Method and Description |
|---|---|
String |
asClauseText(String[] tokens)
Deprecated.
Replaced by
asClauseText(String[], Character). |
String |
asClauseText(String[] tokens,
Character separator)
(Re)constructs a query clause chunk from the chunk tokens.
|
String |
asText(JRQueryChunk[] chunks)
(Re)creates the query text from a list of chunks.
|
protected char |
defaultTokenSeparator() |
protected char |
determineClauseTokenSeparator(String clauseChunk) |
protected String |
getTokenSeparators() |
static JRQueryParser |
instance()
Returns a query parser instance.
|
void |
parse(String text,
JRQueryChunkHandler chunkHandler)
Parses a report query.
|
protected void |
parseClause(JRQueryChunkHandler chunkHandler,
String clauseChunk) |
public static final String EXCEPTION_MESSAGE_KEY_TOKEN_SEPARATORS_NOT_CONFIGURED
public static JRQueryParser instance()
public void parse(String text, JRQueryChunkHandler chunkHandler)
text - the query textchunkHandler - a handler that will be asked to handle parsed query chunksprotected void parseClause(JRQueryChunkHandler chunkHandler, String clauseChunk)
protected char determineClauseTokenSeparator(String clauseChunk)
protected String getTokenSeparators()
public String asText(JRQueryChunk[] chunks)
chunks - the chunkspublic String asClauseText(String[] tokens)
asClauseText(String[], Character).tokens - the chunk tokensJRQueryChunk.TYPE_CLAUSE_TOKENSpublic String asClauseText(String[] tokens, Character separator)
tokens - the chunk tokensseparator - the chunk tokens separator characterJRQueryChunk.TYPE_CLAUSE_TOKENSprotected char defaultTokenSeparator()
Copyright © 2017. All rights reserved.