Show / Hide Table of Contents

    Class QueryTemplateManager

    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)

    LUCENENET (.NET Core): This is not compiled this because .NET Standard does not currently support XSL Transform.

    Inheritance
    System.Object
    QueryTemplateManager
    Namespace: Lucene.Net.QueryParsers.Xml
    Assembly: Lucene.Net.QueryParser.dll
    Syntax
    public class QueryTemplateManager : object

    Constructors

    | Improve this Doc View Source

    QueryTemplateManager()

    Declaration
    public QueryTemplateManager()
    | Improve this Doc View Source

    QueryTemplateManager(Stream)

    Declaration
    public QueryTemplateManager(Stream xslIs)
    Parameters
    Type Name Description
    Stream xslIs

    Methods

    | Improve this Doc View Source

    AddDefaultQueryTemplate(Stream)

    Declaration
    public virtual void AddDefaultQueryTemplate(Stream xslIs)
    Parameters
    Type Name Description
    Stream xslIs
    | Improve this Doc View Source

    AddQueryTemplate(String, Stream)

    Declaration
    public virtual void AddQueryTemplate(string name, Stream xslIs)
    Parameters
    Type Name Description
    System.String name
    Stream xslIs
    | Improve this Doc View Source

    GetQueryAsDOM(IDictionary<String, String>)

    Declaration
    public virtual XmlDocument GetQueryAsDOM(IDictionary<string, string> formProperties)
    Parameters
    Type Name Description
    IDictionary<System.String, System.String> formProperties
    Returns
    Type Description
    XmlDocument
    | Improve this Doc View Source

    GetQueryAsDOM(IDictionary<String, String>, Stream)

    Slow means of constructing query - parses stylesheet from input stream

    Declaration
    public static XmlDocument GetQueryAsDOM(IDictionary<string, string> formProperties, Stream xslIs)
    Parameters
    Type Name Description
    IDictionary<System.String, System.String> formProperties
    Stream xslIs
    Returns
    Type Description
    XmlDocument
    | Improve this Doc View Source

    GetQueryAsDOM(IDictionary<String, String>, String)

    Declaration
    public virtual XmlDocument GetQueryAsDOM(IDictionary<string, string> formProperties, string queryTemplateName)
    Parameters
    Type Name Description
    IDictionary<System.String, System.String> formProperties
    System.String queryTemplateName
    Returns
    Type Description
    XmlDocument
    | Improve this Doc View Source

    GetQueryAsDOM(IDictionary<String, String>, XslCompiledTransform)

    Fast means of constructing query using a cached,precompiled stylesheet

    Declaration
    public static XmlDocument GetQueryAsDOM(IDictionary<string, string> formProperties, XslCompiledTransform template)
    Parameters
    Type Name Description
    IDictionary<System.String, System.String> formProperties
    XslCompiledTransform template
    Returns
    Type Description
    XmlDocument
    | Improve this Doc View Source

    GetQueryAsXmlString(IDictionary<String, String>)

    Declaration
    public virtual string GetQueryAsXmlString(IDictionary<string, string> formProperties)
    Parameters
    Type Name Description
    IDictionary<System.String, System.String> formProperties
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    GetQueryAsXmlString(IDictionary<String, String>, Stream)

    Slow means of constructing query parsing a stylesheet from an input stream

    Declaration
    public static string GetQueryAsXmlString(IDictionary<string, string> formProperties, Stream xslIs)
    Parameters
    Type Name Description
    IDictionary<System.String, System.String> formProperties
    Stream xslIs
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    GetQueryAsXmlString(IDictionary<String, String>, String)

    Declaration
    public virtual string GetQueryAsXmlString(IDictionary<string, string> formProperties, string queryTemplateName)
    Parameters
    Type Name Description
    IDictionary<System.String, System.String> formProperties
    System.String queryTemplateName
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    GetQueryAsXmlString(IDictionary<String, String>, XslCompiledTransform)

    Fast means of constructing query using a precompiled stylesheet

    Declaration
    public static string GetQueryAsXmlString(IDictionary<string, string> formProperties, XslCompiledTransform template)
    Parameters
    Type Name Description
    IDictionary<System.String, System.String> formProperties
    XslCompiledTransform template
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    GetTemplates(Stream)

    Parses a query stylesheet for repeated use

    Declaration
    public static XslCompiledTransform GetTemplates(Stream xslIs)
    Parameters
    Type Name Description
    Stream xslIs
    Returns
    Type Description
    XslCompiledTransform
    | Improve this Doc View Source

    TransformCriteria(IDictionary<String, String>, Stream, Stream)

    Slower transformation using an uncompiled stylesheet (suitable for development environment)

    Declaration
    public static void TransformCriteria(IDictionary<string, string> formProperties, Stream xslIs, Stream result)
    Parameters
    Type Name Description
    IDictionary<System.String, System.String> formProperties
    Stream xslIs
    Stream result
    | Improve this Doc View Source

    TransformCriteria(IDictionary<String, String>, XslCompiledTransform, Stream)

    Fast transformation using a pre-compiled stylesheet (suitable for production environments)

    Declaration
    public static void TransformCriteria(IDictionary<string, string> formProperties, XslCompiledTransform transformer, Stream result)
    Parameters
    Type Name Description
    IDictionary<System.String, System.String> formProperties
    XslCompiledTransform transformer
    Stream result
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)