Package eu.clarin.sru.server
Class SRUQueryParserRegistry.Builder
- java.lang.Object
-
- eu.clarin.sru.server.SRUQueryParserRegistry.Builder
-
- Enclosing class:
- SRUQueryParserRegistry
public static class SRUQueryParserRegistry.Builder extends Object
Builder for creatingSRUQueryParserRegistry
instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SRUQueryParserRegistry
build()
Create a configuredSRUQueryParserRegistry
instance from this builder.SRUQueryParserRegistry.Builder
register(SRUQueryParser<?> parser)
Register a new query parserSRUQueryParserRegistry.Builder
registerDefaults()
-
-
-
Constructor Detail
-
Builder
public Builder(boolean registerDefaults)
Constructor.- Parameters:
registerDefaults
- iftrue
, register SRU/CQL standard query parsers (queryType cql and searchTerms), otherwise do nothing
-
Builder
public Builder()
Constructor. Automatically registers registers SRU/CQL standard query parsers (queryType cql and searchTerms).
-
-
Method Detail
-
registerDefaults
public SRUQueryParserRegistry.Builder registerDefaults()
-
register
public SRUQueryParserRegistry.Builder register(SRUQueryParser<?> parser) throws SRUConfigException
Register a new query parser- Parameters:
parser
- the query parser instance to be registered- Returns:
- this
SRUQueryParserRegistry.Builder
instance (to allow chaining) - Throws:
SRUConfigException
- if a query parser for the same query type was already registered
-
build
public SRUQueryParserRegistry build()
Create a configuredSRUQueryParserRegistry
instance from this builder.- Returns:
- a
SRUQueryParserRegistry
instance
-
-