net.sourceforge.nite.search.rewriter
Interface QueryRewriter

All Known Implementing Classes:
DefaultQueryRewriter

public interface QueryRewriter

An interface for a class that accepts a query plan and can rewrite the contents according to a set of rewriting rules or heuristics, and also rewrite the results to match the form expected by the provider of the original query.

Author:
nmayo@inf.ed.ac.uk

Method Summary
 NodeQuery rewrite(NodeQuery query)
          Rewrite the given query plan according to a set of rules.
 java.util.List rewriteResult(java.util.List result)
          Rewrite the result to match the expected result form of the original input query.
 

Method Detail

rewrite

NodeQuery rewrite(NodeQuery query)
Rewrite the given query plan according to a set of rules.

Parameters:
query - the NodeQuery which is to be rewritten
Returns:
a new NodeQuery representing the rewritten query plan

rewriteResult

java.util.List rewriteResult(java.util.List result)
Rewrite the result to match the expected result form of the original input query. Subclasses must implement this to provide a mapping from the results structure of the rewritten query onto the results structure of the original query.

Parameters:
result - the results of the query