YAZ
5.34.0
|
Implements ZOOM SRU. More...
#include <assert.h>
#include <string.h>
#include <errno.h>
#include "zoom-p.h"
#include <yaz/log.h>
#include <yaz/pquery.h>
Go to the source code of this file.
Functions | |
static void | set_SRU_error (ZOOM_connection c, Z_SRW_diagnostic *d) |
static zoom_ret | send_srw (ZOOM_connection c, Z_SRW_PDU *sr) |
static Z_SRW_PDU * | ZOOM_srw_get_pdu (ZOOM_connection c, int type) |
zoom_ret | ZOOM_connection_srw_send_scan (ZOOM_connection c) |
zoom_ret | ZOOM_connection_srw_send_search (ZOOM_connection c) |
static zoom_ret | handle_srw_response (ZOOM_connection c, Z_SRW_searchRetrieveResponse *res) |
static zoom_ret | handle_srw_scan_response (ZOOM_connection c, Z_SRW_scanResponse *res) |
int | ZOOM_handle_sru (ZOOM_connection c, Z_HTTP_Response *hres, zoom_ret *cret, char **addinfo) |
Implements ZOOM SRU.
Definition in file zoom-sru.c.
|
static |
Definition at line 252 of file zoom-sru.c.
References Z_OtherInformationUnit::category, Z_NamePlusRecord::databaseName, Z_NamePlusRecord::databaseRecord, Z_External::descriptor, Z_SRW_searchRetrieveResponse::diagnostics, Z_External::direct_reference, Z_OtherInformationUnit::externallyDefinedInfo, Z_External::facetList, Z_SRW_searchRetrieveResponse::facetList, Z_External::indirect_reference, Z_OtherInformationUnit::information, Z_OtherInformation::list, ZOOM_resultset_p::live_set, ZOOM_connection_p::log_details, nmem_destroy(), nmem_transfer(), Z_SRW_searchRetrieveResponse::num_diagnostics, Z_OtherInformation::num_elements, Z_SRW_searchRetrieveResponse::num_records, Z_SRW_searchRetrieveResponse::numberOfRecords, Z_External::octet_aligned, ZOOM_resultset_p::odr, odr_create_Odr_oct(), odr_extract_mem(), odr_getmem, ZOOM_connection_p::odr_in, odr_malloc(), odr_oiddup(), Z_SRW_record::recordData_buf, Z_SRW_record::recordData_len, Z_SRW_record::recordPosition, Z_SRW_searchRetrieveResponse::records, Z_SRW_record::recordSchema, Z_SRW_searchRetrieveResponse::resultCountPrecision, Z_SRW_searchRetrieveResponse::resultSetId, ZOOM_task_p::search, set_SRU_error(), ZOOM_resultset_p::size, sru_decode_surrogate_diagnostics(), Z_SRW_searchRetrieveResponse::suggestions, ZOOM_connection_p::tasks, Z_External::u, Z_NamePlusRecord::u, ZOOM_task_p::u, Z_External::which, Z_NamePlusRecord::which, Z_OtherInformationUnit::which, ZOOM_task_p::which, yaz_log(), yaz_oid_recsyn_xml, yaz_oid_userinfo_facet_1, Z_External_octet, Z_External_userFacets, Z_NamePlusRecord_databaseRecord, Z_OtherInfo_externallyDefinedInfo, zoom_complete, ZOOM_connection_put_event(), ZOOM_connection_srw_send_search(), ZOOM_Event_create(), ZOOM_EVENT_RECV_SEARCH, ZOOM_handle_facet_list(), ZOOM_memcached_hitcount(), ZOOM_record_cache_add(), ZOOM_record_cache_lookup(), ZOOM_resultset_option_set(), and ZOOM_TASK_SEARCH.
Referenced by ZOOM_handle_sru().
|
static |
Definition at line 394 of file zoom-sru.c.
References Z_SRW_scanResponse::diagnostics, nmem_destroy(), nmem_transfer(), Z_SRW_scanResponse::num_diagnostics, Z_SRW_scanResponse::num_terms, ZOOM_scanset_p::odr, odr_extract_mem(), odr_getmem, ZOOM_connection_p::odr_in, ZOOM_scanset_p::options, ZOOM_task_p::scan, ZOOM_scanset_p::scan_response, set_SRU_error(), ZOOM_scanset_p::srw_scan_response, ZOOM_connection_p::tasks, ZOOM_task_p::u, ZOOM_task_p::which, zoom_complete, ZOOM_options_set_int(), and ZOOM_TASK_SCAN.
Referenced by ZOOM_handle_sru().
|
static |
Definition at line 32 of file zoom-sru.c.
References ZOOM_connection_p::charset, ZOOM_connection_p::host_port, Z_GDU::HTTP_Request, ZOOM_connection_p::odr_out, ZOOM_connection_p::options, ZOOM_connection_p::proxy_mode, ZOOM_connection_p::sru_mode, Z_GDU::u, yaz_solr_encode_request(), yaz_sru_get_encode(), yaz_sru_post_encode(), yaz_sru_soap_encode(), z_get_HTTP_Request_uri(), ZOOM_options_get(), ZOOM_send_GDU(), zoom_sru_get, zoom_sru_post, zoom_sru_soap, and zoom_sru_solr.
Referenced by ZOOM_connection_srw_send_scan(), and ZOOM_connection_srw_send_search().
|
static |
Definition at line 22 of file zoom-sru.c.
References Z_SRW_diagnostic::details, Z_SRW_diagnostic::uri, ZOOM_set_dset_error(), and ZOOM_uri_to_code().
Referenced by handle_srw_response(), and handle_srw_scan_response().
zoom_ret ZOOM_connection_srw_send_scan | ( | ZOOM_connection | c | ) |
Definition at line 92 of file zoom-sru.c.
References Z_SRW_scanRequest::maximumTerms, odr_intdup(), ZOOM_connection_p::odr_out, odr_strdup(), ZOOM_scanset_p::options, ZOOM_scanset_p::query, Z_SRW_scanRequest::queryType, Z_SRW_scanRequest::responsePosition, ZOOM_task_p::scan, Z_SRW_PDU::scan_request, Z_SRW_scanRequest::scanClause, send_srw(), ZOOM_connection_p::tasks, Z_SRW_PDU::u, ZOOM_task_p::u, Z_Query::which, ZOOM_task_p::which, yaz_encode_sru_extra(), Z_Query_type_1, Z_Query_type_101, Z_Query_type_104, Z_SRW_scan_request, zoom_complete, ZOOM_ERROR_UNSUPPORTED_QUERY, ZOOM_options_get(), ZOOM_options_get_int(), ZOOM_query_get_query_string(), ZOOM_query_get_Z_Query(), ZOOM_set_error(), ZOOM_srw_get_pdu(), and ZOOM_TASK_SCAN.
Referenced by ZOOM_connection_exec_task().
zoom_ret ZOOM_connection_srw_send_search | ( | ZOOM_connection | c | ) |
Definition at line 145 of file zoom-sru.c.
References Z_External::cql, ZOOM_connection_p::error, Z_SRW_searchRetrieveRequest::facetList, ZOOM_resultset_p::live_set, Z_SRW_searchRetrieveRequest::maximumRecords, ZOOM_resultset_p::odr, odr_intdup(), ZOOM_connection_p::odr_out, odr_strdup(), odr_strdup_null(), ZOOM_resultset_p::options, Z_SRW_searchRetrieveRequest::query, ZOOM_resultset_p::query, Z_SRW_searchRetrieveRequest::queryType, Z_SRW_searchRetrieveRequest::recordPacking, Z_SRW_searchRetrieveRequest::recordSchema, ZOOM_resultset_p::req_facets, Z_SRW_PDU::request, ZOOM_task_p::search, send_srw(), ZOOM_resultset_p::setname, ZOOM_resultset_p::size, Z_SRW_searchRetrieveRequest::sort, Z_SRW_searchRetrieveRequest::sort_type, Z_SRW_searchRetrieveRequest::sortKeys, Z_SRW_searchRetrieveRequest::startRecord, ZOOM_resultset_p::step, ZOOM_connection_p::tasks, Z_Query::type_1, Z_Query::type_104, Z_External::u, Z_SRW_PDU::u, Z_Query::u, ZOOM_task_p::u, Z_External::which, Z_Query::which, ZOOM_task_p::which, yaz_encode_sru_extra(), yaz_pqf_parse_facet_list(), Z_External_CQL, Z_Query_type_1, Z_Query_type_104, Z_SRW_searchRetrieve_request, Z_SRW_sort_type_sort, zoom_complete, ZOOM_ERROR_UNSUPPORTED_QUERY, ZOOM_memcached_search(), ZOOM_options_set(), ZOOM_query_get_query_string(), ZOOM_query_get_sru11(), ZOOM_query_get_Z_Query(), ZOOM_record_cache_lookup(), ZOOM_resultset_option_get(), ZOOM_set_error(), ZOOM_srw_get_pdu(), and ZOOM_TASK_SEARCH.
Referenced by handle_srw_response(), and ZOOM_connection_exec_task().
int ZOOM_handle_sru | ( | ZOOM_connection | c, |
Z_HTTP_Response * | hres, | ||
zoom_ret * | cret, | ||
char ** | addinfo | ||
) |
Definition at line 417 of file zoom-sru.c.
References Z_HTTP_Response::code, Z_HTTP_Response::content_buf, Z_HTTP_Response::content_len, Z_SRW_PDU::extraResponseData_buf, Z_SRW_PDU::extraResponseData_len, Z_SOAP::fault, Z_SOAP_Fault::fault_code, Z_SOAP_Fault::fault_string, Z_SOAP::generic, handle_srw_response(), handle_srw_scan_response(), ZOOM_connection_p::odr_in, odr_malloc(), ZOOM_connection_p::options, Z_SOAP_Generic::p, Z_SRW_PDU::response, Z_SRW_PDU::scan_response, ZOOM_connection_p::sru_mode, Z_SRW_PDU::srw_version, Z_SOAP::u, Z_SRW_PDU::u, Z_SOAP::which, Z_SRW_PDU::which, yaz_solr_decode_response(), yaz_srw_check_content_type(), yaz_srw_codec(), YAZ_XMLNS_SRU_v1_response, YAZ_XMLNS_SRU_v2_mask, z_soap_codec(), Z_SOAP_error, Z_SOAP_fault, Z_SOAP_generic, Z_SRW_scan_response, Z_SRW_searchRetrieve_response, ZOOM_options_set(), ZOOM_options_setl(), ZOOM_set_HTTP_error(), and zoom_sru_solr.
Referenced by handle_http().
|
static |
Definition at line 61 of file zoom-sru.c.
References Z_SRW_PDU::extra_args, Z_SRW_extra_arg::next, odr_malloc(), ZOOM_connection_p::odr_out, Z_SRW_PDU::password, ZOOM_connection_p::password, ZOOM_connection_p::sru_version, type, ZOOM_connection_p::url_authentication, ZOOM_connection_p::user, Z_SRW_PDU::username, and yaz_srw_get_pdu().
Referenced by ZOOM_connection_srw_send_scan(), and ZOOM_connection_srw_send_search().