Sha256: f5d2a8a69e413e3bea2502eca949df00e21442c2ad5252a3272231c5514531b6

Contents?: true

Size: 1.17 KB

Versions: 5

Compression:

Stored size: 1.17 KB

Contents

require "celsius/transformation/step"
require "ox"

class Celsius::Primo::SoapApi::Searcher::SearchBrief::SearchRequestTransformation::
  SetupInnerSearchRequest < Celsius::Transformation::Step

  #
  # setup inner search request that will be wrapped in a cdata element at the end
  #
  def call
    # we setup this skeleton instead of dynamic element creation because order matters with primo
    transformation.inner_search_request = Ox.parse(
      <<-xml
        <searchRequest xmlns="http://www.exlibris.com/primo/xsd/wsRequest" xmlns:uic="http://www.exlibris.com/primo/xsd/primoview/uicomponents">
          <PrimoSearchRequest xmlns="http://www.exlibris.com/primo/xsd/search/request">
            <QueryTerms>
              <BoolOpeator></BoolOpeator>
            </QueryTerms>
            <StartIndex></StartIndex>
            <BulkSize></BulkSize>
            <DidUMeanEnabled>false</DidUMeanEnabled>
            <HighlightingEnabled>false</HighlightingEnabled>
            <Languages></Languages>
            <Locations></Locations>
          </PrimoSearchRequest>
          <onCampus>false</onCampus>
          <institution></institution>
        </searchRequest>
      xml
    )
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
celsius-primo-0.1.4 lib/celsius/primo/soap_api/searcher/search_brief/search_request_transformation/setup_inner_search_request.rb
celsius-primo-0.1.3 lib/celsius/primo/soap_api/searcher/search_brief/search_request_transformation/setup_inner_search_request.rb
celsius-primo-0.1.2 lib/celsius/primo/soap_api/searcher/search_brief/search_request_transformation/setup_inner_search_request.rb
celsius-primo-0.1.1 lib/celsius/primo/soap_api/searcher/search_brief/search_request_transformation/setup_inner_search_request.rb
celsius-primo-0.1.0 lib/celsius/primo/soap_api/searcher/search_brief/search_request_transformation/setup_inner_search_request.rb