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 class
SearchTermsQueryParser.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.String
getQueryType()
Get the short name for supported query, e.g.String
getQueryTypeDefintion()
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 treeboolean
supportsVersion(SRUVersion version)
Check if query is supported by a specific version of SRU/CQL
-
-
-
Method Detail
-
getQueryType
public String getQueryType()
Description copied from interface:SRUQueryParser
Get the short name for supported query, e.g. "cql".- Specified by:
getQueryType
in interfaceSRUQueryParser<List<String>>
- Returns:
- the query short name
-
supportsVersion
public boolean supportsVersion(SRUVersion version)
Description copied from interface:SRUQueryParser
Check if query is supported by a specific version of SRU/CQL- Specified by:
supportsVersion
in interfaceSRUQueryParser<List<String>>
- Parameters:
version
- the version- Returns:
true
if version is supported,false
otherwise
-
getQueryTypeDefintion
public String getQueryTypeDefintion()
Description copied from interface:SRUQueryParser
The URI for the for the query type’s definition.- Specified by:
getQueryTypeDefintion
in interfaceSRUQueryParser<List<String>>
- Returns:
- the URI for the for the query type’s definition.
-
getQueryParameterNames
public List<String> getQueryParameterNames()
Description copied from interface:SRUQueryParser
Get the list of query parameters.- Specified by:
getQueryParameterNames
in 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:SRUQueryParser
Parse a query into an abstract syntax tree- Specified by:
parseQuery
in interfaceSRUQueryParser<List<String>>
- Parameters:
version
- the SRU version the request was madeparameters
- the request parameters containing the query (@seeSRUQueryParser.getQueryParameterNames()
diagnostics
- aSRUDiagnosticList
for storing fatal and non-fatal diagnostics- Returns:
- the parsed query or
null
if the query could not be parsed
-
-