Xindice API
version 1.2m1

org.apache.xindice.core.query
Interface QueryResolver

All Superinterfaces:
Configurable
All Known Implementing Classes:
TextQueryResolver, XPathQueryResolver, XUpdateQueryResolver

public interface QueryResolver
extends Configurable

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

Version:
$Revision: 541508 $, $Date: 2007-05-24 21:54:12 -0400 (Thu, 24 May 2007) $

Method Summary
 Query compileQuery(Collection context, String query, NamespaceMap nsMap, Key[] keys)
          compileQuery compiles a Query against the specified Collection context and returns the compiled Query.
 String getQueryStyle()
          getQueryStyle returns the Query style supported by this Resolver.
 NodeSet query(Collection context, 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 org.apache.xindice.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 String getQueryStyle()
getQueryStyle returns the Query style supported by this Resolver.

Returns:
The query style

compileQuery

public Query compileQuery(Collection context,
                          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 NodeSet query(Collection context,
                     String query,
                     NamespaceMap nsMap,
                     Key[] keys)
              throws QueryException
query compiles a Query against the specified Collection context and returns the query results.

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 resulting NodeSet
Throws:
QueryException

Xindice API
version 1.2m1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.