clarin.sru.constants¶
- class clarin.sru.constants.SRUOperation(value)[source]¶
-
SRU operation
- EXPLAIN = 'explain'¶
A
explain
operation
- SEARCH_RETRIEVE = 'searchRetrieve'¶
A
searchRetrieve
operation
- SCAN = 'scan'¶
A
scan
operation
- class clarin.sru.constants.SRUQueryType(value)[source]¶
-
An enumeration.
- CQL = 'cql'¶
shorthand queryType identifier for CQL
- SEARCH_TERMS = 'searchTerms'¶
- class clarin.sru.constants.SRURecordPacking(value)[source]¶
-
SRU 2.0 record packing.
- PACKED = 'packed'¶
The client requests that the server should supply records strictly according to the requested schema.
- UNPACKED = 'unpacked'¶
The server is free to allow the location of application data to vary within the record.
- class clarin.sru.constants.SRURecordXmlEscaping(value)[source]¶
-
SRU Record XML escaping (or record packing in SRU 1.2).
- XML = 'xml'¶
XML record packing
- STRING = 'string'¶
String record packing
- class clarin.sru.constants.SRURenderBy(value)[source]¶
-
SRU Record XML escaping.
- CLIENT = 'client'¶
The client requests that the server simply return this URL in the response, in the href attribute of the xml-stylesheet processing instruction before the response xml.
- SERVER = 'server'¶
The client requests that the server format the response according to the specified stylesheet, assuming the default SRU response schema as input to the stylesheet.
- class clarin.sru.constants.SRUResultCountPrecision(value)[source]¶
-
(SRU 2.0) Indicate the accuracy of the result count reported by total number of records that matched the query.
- EXACT = 'exact'¶
The server guarantees that the reported number of records is accurate.
- UNKNOWN = 'unknown'¶
The server has no idea what the result count is, and does not want to venture an estimate.
- ESTIMATE = 'estimate'¶
The server does not know the result set count, but offers an estimate.
- MAXIMUM = 'maximum'¶
The value supplied is an estimate of the maximum possible count that the result set will attain.
- MINIMUM = 'minimum'¶
The server does not know the result count but guarantees that it is at least this large.
- CURRENT = 'current'¶
The value supplied is an estimate of the count at the time the response was sent, however the result set may continue to grow.
- class clarin.sru.constants.SRUVersion(value)[source]¶
-
SRU version
- VERSION_1_1 = '1.1'¶
- VERSION_1_2 = '1.2'¶
- VERSION_2_0 = '2.0'¶
- class clarin.sru.constants.SRUDiagnostics(value)[source]¶
-
Constants for SRU diagnostics
See also
SRU Diagnostics: http://www.loc.gov/standards/sru/diagnostics/
SRU Diagnostics List: http://www.loc.gov/standards/sru/diagnostics/diagnosticsList.html
- GENERAL_SYSTEM_ERROR = 'info:srw/diagnostic/1/1'¶
- SYSTEM_TEMPORARILY_UNAVAILABLE = 'info:srw/diagnostic/1/2'¶
- AUTHENTICATION_ERROR = 'info:srw/diagnostic/1/3'¶
- UNSUPPORTED_OPERATION = 'info:srw/diagnostic/1/4'¶
- UNSUPPORTED_VERSION = 'info:srw/diagnostic/1/5'¶
- UNSUPPORTED_PARAMETER_VALUE = 'info:srw/diagnostic/1/6'¶
- MANDATORY_PARAMETER_NOT_SUPPLIED = 'info:srw/diagnostic/1/7'¶
- UNSUPPORTED_PARAMETER = 'info:srw/diagnostic/1/8'¶
- DATABASE_DOES_NOT_EXIST = 'info:srw/diagnostic/1/235'¶
- QUERY_SYNTAX_ERROR = 'info:srw/diagnostic/1/10'¶
- TOO_MANY_CHARACTERS_IN_QUERY = 'info:srw/diagnostic/1/12'¶
- INVALID_OR_UNSUPPORTED_USE_OF_PARENTHESES = 'info:srw/diagnostic/1/13'¶
- INVALID_OR_UNSUPPORTED_USE_OF_QUOTES = 'info:srw/diagnostic/1/14'¶
- UNSUPPORTED_CONTEXT_SET = 'info:srw/diagnostic/1/15'¶
- UNSUPPORTED_INDEX = 'info:srw/diagnostic/1/16'¶
- UNSUPPORTED_COMBINATION_OF_INDEXES = 'info:srw/diagnostic/1/18'¶
- UNSUPPORTED_RELATION = 'info:srw/diagnostic/1/19'¶
- UNSUPPORTED_RELATION_MODIFIER = 'info:srw/diagnostic/1/20'¶
- UNSUPPORTED_COMBINATION_OF_RELATION_MODIFERS = 'info:srw/diagnostic/1/21'¶
- UNSUPPORTED_COMBINATION_OF_RELATION_AND_INDEX = 'info:srw/diagnostic/1/22'¶
- TOO_MANY_CHARACTERS_IN_TERM = 'info:srw/diagnostic/1/23'¶
- UNSUPPORTED_COMBINATION_OF_RELATION_AND_TERM = 'info:srw/diagnostic/1/24'¶
- NON_SPECIAL_CHARACTER_ESCAPED_IN_TERM = 'info:srw/diagnostic/1/26'¶
- EMPTY_TERM_UNSUPPORTED = 'info:srw/diagnostic/1/27'¶
- MASKING_CHARACTER_NOT_SUPPORTED = 'info:srw/diagnostic/1/28'¶
- MASKED_WORDS_TOO_SHORT = 'info:srw/diagnostic/1/29'¶
- TOO_MANY_MASKING_CHARACTERS_IN_TERM = 'info:srw/diagnostic/1/30'¶
- ANCHORING_CHARACTER_NOT_SUPPORTED = 'info:srw/diagnostic/1/31'¶
- ANCHORING_CHARACTER_IN_UNSUPPORTED_POSITION = 'info:srw/diagnostic/1/32'¶
- COMBINATION_OF_PROXIMITY_ADJACENCY_AND_MASKING_CHARACTERS_NOT_SUPPORTED = 'info:srw/diagnostic/1/33'¶
- COMBINATION_OF_PROXIMITY_ADJACENCY_AND_ANCHORING_CHARACTERS_NOT_SUPPORTED = 'info:srw/diagnostic/1/34'¶
- TERM_CONTAINS_ONLY_STOPWORDS = 'info:srw/diagnostic/1/35'¶
- TERM_IN_INVALID_FORMAT_FOR_INDEX_OR_RELATION = 'info:srw/diagnostic/1/36'¶
- UNSUPPORTED_BOOLEAN_OPERATOR = 'info:srw/diagnostic/1/37'¶
- TOO_MANY_BOOLEAN_OPERATORS_IN_QUERY = 'info:srw/diagnostic/1/38'¶
- PROXIMITY_NOT_SUPPORTED = 'info:srw/diagnostic/1/39'¶
- UNSUPPORTED_PROXIMITY_RELATION = 'info:srw/diagnostic/1/40'¶
- UNSUPPORTED_PROXIMITY_DISTANCE = 'info:srw/diagnostic/1/41'¶
- UNSUPPORTED_PROXIMITY_UNIT = 'info:srw/diagnostic/1/42'¶
- UNSUPPORTED_PROXIMITY_ORDERING = 'info:srw/diagnostic/1/43'¶
- UNSUPPORTED_COMBINATION_OF_PROXIMITY_MODIFIERS = 'info:srw/diagnostic/1/44'¶
- UNSUPPORTED_BOOLEAN_MODIFIER = 'info:srw/diagnostic/1/46'¶
- CANNOT_PROCESS_QUERY_REASON_UNKNOWN = 'info:srw/diagnostic/1/47'¶
- QUERY_FEATURE_UNSUPPORTED = 'info:srw/diagnostic/1/48'¶
- MASKING_CHARACTER_IN_UNSUPPORTED_POSITION = 'info:srw/diagnostic/1/49'¶
- RESULT_SETS_NOT_SUPPORTED = 'info:srw/diagnostic/1/50'¶
- RESULT_SET_DOES_NOT_EXIST = 'info:srw/diagnostic/1/51'¶
- RESULT_SET_TEMPORARILY_UNAVAILABLE = 'info:srw/diagnostic/1/52'¶
- RESULT_SETS_ONLY_SUPPORTED_FOR_RETRIEVAL = 'info:srw/diagnostic/1/53'¶
- COMBINATION_OF_RESULT_SETS_WITH_SEARCH_TERMS_NOT_SUPPORTED = 'info:srw/diagnostic/1/55'¶
- RESULT_SET_CREATED_WITH_UNPREDICTABLE_PARTIAL_RESULTS_AVAILABLE = 'info:srw/diagnostic/1/58'¶
- RESULT_SET_CREATED_WITH_VALID_PARTIAL_RESULTS_AVAILABLE = 'info:srw/diagnostic/1/59'¶
- RESULT_SET_NOT_CREATED_TOO_MANY_MATCHING_RECORDS = 'info:srw/diagnostic/1/60'¶
- FIRST_RECORD_POSITION_OUT_OF_RANGE = 'info:srw/diagnostic/1/61'¶
- RECORD_TEMPORARILY_UNAVAILABLE = 'info:srw/diagnostic/1/64'¶
- RECORD_DOES_NOT_EXIST = 'info:srw/diagnostic/1/65'¶
- UNKNOWN_SCHEMA_FOR_RETRIEVAL = 'info:srw/diagnostic/1/66'¶
- RECORD_NOT_AVAILABLE_IN_THIS_SCHEMA = 'info:srw/diagnostic/1/67'¶
- NOT_AUTHORISED_TO_SEND_RECORD = 'info:srw/diagnostic/1/68'¶
- NOT_AUTHORISED_TO_SEND_RECORD_IN_THIS_SCHEMA = 'info:srw/diagnostic/1/69'¶
- RECORD_TOO_LARGE_TO_SEND = 'info:srw/diagnostic/1/70'¶
- UNSUPPORTED_XML_ESCAPING_VALUE = 'info:srw/diagnostic/1/71'¶
- XPATH_RETRIEVAL_UNSUPPORTED = 'info:srw/diagnostic/1/72'¶
- XPATH_EXPRESSION_CONTAINS_UNSUPPORTED_FEATURE = 'info:srw/diagnostic/1/73'¶
- UNABLE_TO_EVALUATE_XPATH_EXPRESSION = 'info:srw/diagnostic/1/74'¶
- SORT_NOT_SUPPORTED = 'info:srw/diagnostic/1/80'¶
- UNSUPPORTED_SORT_SEQUENCE = 'info:srw/diagnostic/1/82'¶
- TOO_MANY_RECORDS_TO_SORT = 'info:srw/diagnostic/1/83'¶
- TOO_MANY_SORT_KEYS_TO_SORT = 'info:srw/diagnostic/1/84'¶
- CANNOT_SORT_INCOMPATIBLE_RECORD_FORMATS = 'info:srw/diagnostic/1/86'¶
- UNSUPPORTED_SCHEMA_FOR_SORT = 'info:srw/diagnostic/1/87'¶
- UNSUPPORTED_PATH_FOR_SORT = 'info:srw/diagnostic/1/88'¶
- PATH_UNSUPPORTED_FOR_SCHEMA = 'info:srw/diagnostic/1/89'¶
- UNSUPPORTED_DIRECTION = 'info:srw/diagnostic/1/90'¶
- UNSUPPORTED_CASE = 'info:srw/diagnostic/1/91'¶
- UNSUPPORTED_MISSING_VALUE_ACTION = 'info:srw/diagnostic/1/92'¶
- SORT_ENDED_DUE_TO_MISSING_VALUE = 'info:srw/diagnostic/1/93'¶
- SORT_SPEC_INCLUDED_BOTH_IN_QUERY_AND_PROTOCOL_QUERY_PREVAILS = 'info:srw/diagnostic/1/94'¶
- SORT_SPEC_INCLUDED_BOTH_IN_QUERY_AND_PROTOCOL_PROTOCOL_PREVAILS = 'info:srw/diagnostic/1/95'¶
- SORT_SPEC_INCLUDED_BOTH_IN_QUERY_AND_PROTOCOL_ERROR = 'info:srw/diagnostic/1/96'¶
- STYLESHEETS_NOT_SUPPORTED = 'info:srw/diagnostic/1/110'¶
- UNSUPPORTED_STYLESHEET = 'info:srw/diagnostic/1/111'¶
- RESPONSE_POSITION_OUT_OF_RANGE = 'info:srw/diagnostic/1/120'¶
- TOO_MANY_TERMS_REQUESTED = 'info:srw/diagnostic/1/121'¶
- classmethod get_by_uri(uri: str) SRUDiagnostics | None [source]¶
- class clarin.sru.constants.SRUParam(value)[source]¶
-
An enumeration.
- OPERATION = 'operation'¶
- VERSION = 'version'¶
- STYLESHEET = 'stylesheet'¶
- RENDER_BY = 'renderedBy'¶
- HTTP_ACCEPT = 'httpAccept'¶
- RESPONSE_TYPE = 'responseType'¶
- QUERY = 'query'¶
- QUERY_TYPE = 'queryType'¶
- START_RECORD = 'startRecord'¶
- MAXIMUM_RECORDS = 'maximumRecords'¶
- RECORD_XML_ESCAPING = 'recordXMLEscaping'¶
- RECORD_PACKING = 'recordPacking'¶
- RECORD_SCHEMA = 'recordSchema'¶
- RECORD_XPATH = 'recordXPath'¶
- RESULT_SET_TTL = 'resultSetTTL'¶
- SORT_KEYS = 'sortKeys'¶
- SCAN_CLAUSE = 'scanClause'¶
- RESPONSE_POSITION = 'responsePosition'¶
- MAXIMUM_TERMS = 'maximumTerms'¶
- X_UNLIMITED_RESULTSET = 'x-unlimited-resultset'¶
- X_UNLIMITED_TERMLIST = 'x-unlimited-termlist'¶
- X_INDENT_RESPONSE = 'x-indent-response'¶
- class clarin.sru.constants.SRUParamValue(value)[source]¶
-
An enumeration.
- OP_EXPLAIN = 'explain'¶
- OP_SCAN = 'scan'¶
- OP_SEARCH_RETRIEVE = 'searchRetrieve'¶
- VERSION_1_1 = '1.1'¶
- VERSION_1_2 = '1.2'¶
- RECORD_XML_ESCAPING_XML = 'xml'¶
- RECORD_XML_ESCAPING_STRING = 'string'¶
- RECORD_PACKING_PACKED = 'packed'¶
- RECORD_PACKING_UNPACKED = 'unpacked'¶
- RENDER_BY_CLIENT = 'client'¶
- RENDER_BY_SERVER = 'server'¶