Class: Skala::PrimoAdapter::Search::RequestTransformation::SetupInnerSearchRequest

Inherits:
Transformator::Transformation::Step
  • Object
show all
Defined in:
lib/skala/primo_adapter/search/request_transformation/setup_inner_search_request.rb

Instance Method Summary collapse

Instance Method Details

#callObject

setup inner search request that will be wrapped in a cdata element at the end



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/skala/primo_adapter/search/request_transformation/setup_inner_search_request.rb', line 11

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>AND</BoolOpeator>
          </QueryTerms>
          <StartIndex></StartIndex>
          <BulkSize></BulkSize>
          <DidUMeanEnabled>false</DidUMeanEnabled>
          <HighlightingEnabled>false</HighlightingEnabled>
          <Languages></Languages>
          <Locations></Locations>
        </PrimoSearchRequest>
        <onCampus></onCampus>
        <institution></institution>
      </searchRequest>
    xml
  )
end