| java.lang.Object org.apache.lucene.xmlparser.QueryTemplateManager
QueryTemplateManager | public class QueryTemplateManager (Code) | | Provides utilities for turning query form input (such as from a web page or Swing gui) into
Lucene XML queries by using XSL templates. This approach offers a convenient way of externalizing
and changing how user input is turned into Lucene queries.
Database applications often adopt similar practices by externalizing SQL in template files that can
be easily changed/optimized by a DBA.
The static methods can be used on their own or by creating an instance of this class you can store and
re-use compiled stylesheets for fast use (e.g. in a server environment)
author: Mark Harwood |
Method Summary | |
public void | addDefaultQueryTemplate(InputStream xslIs) | public void | addQueryTemplate(String name, InputStream xslIs) | public Document | getQueryAsDOM(Properties formProperties, String queryTemplateName) | public Document | getQueryAsDOM(Properties formProperties) | public static Document | getQueryAsDOM(Properties formProperties, Templates template) | public static Document | getQueryAsDOM(Properties formProperties, InputStream xslIs) | public String | getQueryAsXmlString(Properties formProperties, String queryTemplateName) | public String | getQueryAsXmlString(Properties formProperties) | public static String | getQueryAsXmlString(Properties formProperties, Templates template) | public static String | getQueryAsXmlString(Properties formProperties, InputStream xslIs) | public static Templates | getTemplates(InputStream xslIs) | public static void | transformCriteria(Properties formProperties, InputStream xslIs, Result result) | public static void | transformCriteria(Properties formProperties, Templates template, Result result) | public static void | transformCriteria(Properties formProperties, Transformer transformer, Result result) |
QueryTemplateManager | public QueryTemplateManager()(Code) | | |
|
|