Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.query
Class QueryParser

    java.lang.Object
      org.basex.util.InputParser
          org.basex.query.QueryParser

Direct Known Subclasses:
  QuerySuggest

    public class QueryParser

extends InputParser

Simple query parser; can be overwritten to support more complex parsings.

Author:
  Workgroup DBIS, University of Konstanz 2005-09, ISC License, Christian Gruen

Field Summary
`TokenList` | `modLoaded` List of loaded modules.

Fields inherited from class org.basex.util.InputParser
`file, ql, qm, qp, qu`

Constructor Summary
`QueryParser(QueryContext c)` Constructor.

Method Summary
`Expr` | `parse(java.lang.String q, IO f, Uri u)` Parses the specified query.
`Expr` | `parse(Uri u, boolean end)` Parses the specified query.
`Expr` | `path()` [ 68] Parses a PathExpr

Methods inherited from class org.basex.util.InputParser
`consume, consume, consume, consumeWS, curr, curr, ent, found, init, invalidEnt, mark, more, next, quote, rest, valid`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### modLoaded

    public TokenList modLoaded

  List of loaded modules.

Constructor Detail

### QueryParser

    public QueryParser(QueryContext c)

  Constructor.

  Parameters:
    `c` - query context

Method Detail

### parse

    public Expr parse(java.lang.String q,
                      IO f,
                      Uri u)
               throws QueryException

  Parses the specified query. If `uri != null`, the query is treated as a module

  Parameters:
    `q` - input query
    `f` - optional input file
    `u` - module uri
  Returns:
    resulting expression
  Throws:
    `QueryException` - xquery exception

### parse

    public Expr parse(Uri u,
                      boolean end)
               throws QueryException

  Parses the specified query. If `uri != null`, the query is treated as a module [ 1] Parses a Module.

  Parameters:
    `u` - module uri
    `end` - if true, input must be completely evaluated
  Returns:
    resulting expression
  Throws:
    `QueryException` - xquery exception

### path

    public Expr path()
              throws QueryException

  [ 68] Parses a PathExpr. [ 69] Parses a RelativePathExpr.

  Returns:
    query expression
  Throws:
    `QueryException` - xquery exception

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD