net.sf.jasperreports.engine.util

## Class JRQueryParser

- java.lang.Object
- - net.sf.jasperreports.engine.util.JRQueryParser

-     public class JRQueryParser
      extends java.lang.Object

  Report query parser.
  Version:
    $Id: JRQueryParser.java 6583 2013-10-14 09:20:42Z lucianc $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JRQueryParser()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `asClauseText(java.lang.String[] tokens)` Deprecated. Replaced by `asClauseText(String[], Character)`.
    `java.lang.String` | `asClauseText(java.lang.String[] tokens, java.lang.Character separator)` (Re)constructs a query clause chunk from the chunk tokens.
    `java.lang.String` | `asText(JRQueryChunk[] chunks)` (Re)creates the query text from a list of chunks.
    `protected char` | `defaultTokenSeparator()`
    `protected char` | `determineClauseTokenSeparator(java.lang.String clauseChunk)`
    `protected java.lang.String` | `getTokenSeparators()`
    `static JRQueryParser` | `instance()` Returns a query parser instance.
    `void` | `parse(java.lang.String text, JRQueryChunkHandler chunkHandler)` Parses a report query.
    `protected void` | `parseClause(JRQueryChunkHandler chunkHandler, java.lang.String clauseChunk)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JRQueryParser

          public JRQueryParser()

  - ### Method Detail

    - #### instance

          public static JRQueryParser instance()

      Returns a query parser instance.
      Returns:
        a query parser instance

    - #### parse

          public void parse(java.lang.String text,
                   JRQueryChunkHandler chunkHandler)

      Parses a report query.
      Parameters:
        `text` - the query text
        `chunkHandler` - a handler that will be asked to handle parsed query chunks

    - #### parseClause

          protected void parseClause(JRQueryChunkHandler chunkHandler,
                         java.lang.String clauseChunk)

    - #### determineClauseTokenSeparator

          protected char determineClauseTokenSeparator(java.lang.String clauseChunk)

    - #### getTokenSeparators

          protected java.lang.String getTokenSeparators()

    - #### asText

          public java.lang.String asText(JRQueryChunk[] chunks)

      (Re)creates the query text from a list of chunks.
      Parameters:
        `chunks` - the chunks
      Returns:
        the recreated query text

    - #### asClauseText

          public java.lang.String asClauseText(java.lang.String[] tokens)

      Deprecated. Replaced by `asClauseText(String[], Character)`.
      (Re)constructs a query clause chunk from the chunk tokens.
      Parameters:
        `tokens` - the chunk tokens
      Returns:
        the reconstructed query clause chunk
      See Also:
        `JRQueryChunk.TYPE_CLAUSE_TOKENS`

    - #### asClauseText

          public java.lang.String asClauseText(java.lang.String[] tokens,
                                      java.lang.Character separator)

      (Re)constructs a query clause chunk from the chunk tokens.
      Parameters:
        `tokens` - the chunk tokens
        `separator` - the chunk tokens separator character
      Returns:
        the reconstructed query clause chunk
      See Also:
        `JRQueryChunk.TYPE_CLAUSE_TOKENS`

    - #### defaultTokenSeparator

          protected char defaultTokenSeparator()

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com