Package eu.clarin.sru.server
Class SearchTermsQueryParser
- java.lang.Object
-
- eu.clarin.sru.server.SearchTermsQueryParser
-
- All Implemented Interfaces:
SRUQueryParser<List<String>>
public class SearchTermsQueryParser extends Object implements SRUQueryParser<List<String>>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSearchTermsQueryParser.SearchTermsQuery
-
Constructor Summary
Constructors Constructor Description SearchTermsQueryParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getQueryParameterNames()Get the list of query parameters.StringgetQueryType()Get the short name for supported query, e.g.StringgetQueryTypeDefintion()The URI for the for the query type’s definition.SRUQuery<List<String>>parseQuery(SRUVersion version, Map<String,String> parameters, SRUDiagnosticList diagnostics)Parse a query into an abstract syntax treebooleansupportsVersion(SRUVersion version)Check if query is supported by a specific version of SRU/CQL
-
-
-
Method Detail
-
getQueryType
public String getQueryType()
Description copied from interface:SRUQueryParserGet the short name for supported query, e.g. "cql".- Specified by:
getQueryTypein interfaceSRUQueryParser<List<String>>- Returns:
- the query short name
-
supportsVersion
public boolean supportsVersion(SRUVersion version)
Description copied from interface:SRUQueryParserCheck if query is supported by a specific version of SRU/CQL- Specified by:
supportsVersionin interfaceSRUQueryParser<List<String>>- Parameters:
version- the version- Returns:
trueif version is supported,falseotherwise
-
getQueryTypeDefintion
public String getQueryTypeDefintion()
Description copied from interface:SRUQueryParserThe URI for the for the query type’s definition.- Specified by:
getQueryTypeDefintionin interfaceSRUQueryParser<List<String>>- Returns:
- the URI for the for the query type’s definition.
-
getQueryParameterNames
public List<String> getQueryParameterNames()
Description copied from interface:SRUQueryParserGet the list of query parameters.- Specified by:
getQueryParameterNamesin interfaceSRUQueryParser<List<String>>- Returns:
- the list of query parameters names.
-
parseQuery
public SRUQuery<List<String>> parseQuery(SRUVersion version, Map<String,String> parameters, SRUDiagnosticList diagnostics)
Description copied from interface:SRUQueryParserParse a query into an abstract syntax tree- Specified by:
parseQueryin interfaceSRUQueryParser<List<String>>- Parameters:
version- the SRU version the request was madeparameters- the request parameters containing the query (@seeSRUQueryParser.getQueryParameterNames()diagnostics- aSRUDiagnosticListfor storing fatal and non-fatal diagnostics- Returns:
- the parsed query or
nullif the query could not be parsed
-
-