dbXML API

## com.dbxml.db.core.query
Interface QueryResolver

All Superinterfaces:
  Configurable

All Known Implementing Classes:
  QueryResolverBase

public interface QueryResolver
extends Configurable

QueryResolver is an interface that has to be implemented to actually perfrom query resolution. dbXML provides an XPathQueryResolver to handle XPath queries against sets of Documents in a Collection.

Method Summary
`Query` `compileQuery(Collection context, java.lang.String query, NamespaceMap nsMap, Key[] keys)` compileQuery compiles a Query against the specified Collection context and returns the compiled Query.
`java.lang.String` `getQueryStyle()` getQueryStyle returns the Query style supported by this Resolver.
`ResultSet` `query(Transaction tx, Collection context, java.lang.String query, NamespaceMap nsMap, Key[] keys)` query compiles a Query against the specified Collection context and returns the query results.
`void` `setQueryEngine(QueryEngine engine)` setQueryEngine hands a reference for the QueryEngine to the Resolver.

Methods inherited from interface com.dbxml.util.Configurable
`getConfig, setConfig`

Method Detail

### setQueryEngine

    public void setQueryEngine(QueryEngine engine)

  setQueryEngine hands a reference for the QueryEngine to the Resolver.

  Parameters:
    `engine` - The QueryEngine

### getQueryStyle

    public java.lang.String getQueryStyle()

  getQueryStyle returns the Query style supported by this Resolver.

  Returns:
    The query style

### compileQuery

    public Query compileQuery(Collection context,
                              java.lang.String query,
                              NamespaceMap nsMap,
                              Key[] keys)
                       throws QueryException

  compileQuery compiles a Query against the specified Collection context and returns the compiled Query. This DOES NOT actually run the query, merely just parses it and primes any possible Indexers that the query might need.

  Parameters:
    `context` - The Collection Context
    `query` - The Query
    `nsMap` - The namespace Map (if any)
    `keys` - The initial Key set to use (if any)
  Returns:
    The compiled Query
  Throws:
    `QueryException`

### query

    public ResultSet query(Transaction tx,
                           Collection context,
                           java.lang.String query,
                           NamespaceMap nsMap,
                           Key[] keys)
                    throws QueryException

  query compiles a Query against the specified Collection context and returns the query results.

  Parameters:
    `tx` - The controlling Transaction
    `context` - The Collection Context
    `query` - The Query
    `nsMap` - The namespace Map (if any)
    `keys` - The initial Key set to use (if any)
  Returns:
    The resulting ResultSet
  Throws:
    `QueryException`

dbXML API

Copyright (c) 2004 The dbXML Group