clarin.sru.fcs.queryparser¶
- class clarin.sru.fcs.queryparser.FCSQueryParser[source]¶
Bases:
SRUQueryParser
[QueryNode
]Default query parser to parse FCS-QL.
- supports_version(version: SRUVersion | None) bool [source]¶
Check if query is supported by a specific version of SRU/CQL.
- parse_query(version: SRUVersion, parameters: Dict[str, str], diagnostics: SRUDiagnosticList) SRUQuery[QueryNode] | None [source]¶
Parse a query into an abstract syntax tree.
- Parameters:
version – the SRU version the request was made
parameters – the request parameters containing the query
diagnostics – a SRUDiagnosticList for storing fatal and non-fatal diagnostics
- Returns:
the parsed query or
None
if the query could not be parsed