## org.apache.lucene.xmlparser
Class CoreParser

    java.lang.Object
      org.apache.lucene.xmlparser.CoreParser

All Implemented Interfaces:
  QueryBuilder

Direct Known Subclasses:
  CorePlusExtensionsParser

    public class CoreParser

extends java.lang.Object
implements QueryBuilder

Assembles a QueryBuilder which uses only core Lucene Query objects

Field Summary
`protected Analyzer` `analyzer`
`protected FilterBuilderFactory` `filterFactory`
`static int` `maxNumCachedFilters`
`protected QueryParser` `parser`
`protected QueryBuilderFactory` `queryFactory`

Constructor Summary
`` `CoreParser(Analyzer analyzer, QueryParser parser)` Construct an XML parser that uses a single instance QueryParser for handling UserQuery tags - all parse operations are synchronised on this parser
`` `CoreParser(java.lang.String defaultField, Analyzer analyzer)` Constructs an XML parser that creates a QueryParser for each UserQuery request.
`protected` `CoreParser(java.lang.String defaultField, Analyzer analyzer, QueryParser parser)`

Method Summary
`void` `addFilterBuilder(java.lang.String nodeName, FilterBuilder builder)`
`void` `addQueryBuilder(java.lang.String nodeName, QueryBuilder builder)`
`Query` `getQuery(org.w3c.dom.Element e)`
`Query` `parse(java.io.InputStream xmlStream)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### analyzer

    protected Analyzer analyzer

### parser

    protected QueryParser parser

### queryFactory

    protected QueryBuilderFactory queryFactory

### filterFactory

    protected FilterBuilderFactory filterFactory

### maxNumCachedFilters

    public static int maxNumCachedFilters

Constructor Detail

### CoreParser

    public CoreParser(Analyzer analyzer,
                      QueryParser parser)

  Construct an XML parser that uses a single instance QueryParser for handling UserQuery tags - all parse operations are synchronised on this parser

  Parameters:
    `analyzer` -
    `parser` - A QueryParser which will be synchronized on during parse calls.

### CoreParser

    public CoreParser(java.lang.String defaultField,
                      Analyzer analyzer)

  Constructs an XML parser that creates a QueryParser for each UserQuery request.

  Parameters:
    `defaultField` - The default field name used by QueryParsers constructed for UserQuery tags
    `analyzer` -

### CoreParser

    protected CoreParser(java.lang.String defaultField,
                         Analyzer analyzer,
                         QueryParser parser)

Method Detail

### parse

    public Query parse(java.io.InputStream xmlStream)
                throws ParserException

  Throws:
    `ParserException`

### addQueryBuilder

    public void addQueryBuilder(java.lang.String nodeName,
                                QueryBuilder builder)

### addFilterBuilder

    public void addFilterBuilder(java.lang.String nodeName,
                                 FilterBuilder builder)

### getQuery

    public Query getQuery(org.w3c.dom.Element e)
                   throws ParserException

  Specified by:
    `getQuery` in interface `QueryBuilder`
  Throws:
    `ParserException`

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.