Sha256: 1a51e05cffacb508e5b92c7b3585f953c4dd55f65d02c9d21951c3109a065da3

Contents?: true

Size: 1.34 KB

Versions: 24

Compression:

Stored size: 1.34 KB

Contents

module Exlibris
  module Primo
    module WebService
      module Request
        # 
        # Search Primo
        # 
        class Search < Base
          self.has_client
          self.soap_action = :search_brief
          include DisplayFields
          include Languages
          include Locations
          include QueryTerms
          include SearchElements
          include SortBys

          add_default_search_elements :start_index => "1", 
            :bulk_size => "5", :did_u_mean_enabled => "false"

          add_search_elements :start_index, :bulk_size, :did_u_mean_enabled,
              :highlighting_enabled, :get_more, :inst_boost

          def to_xml
            super { |xml|
              xml.PrimoSearchRequest("xmlns" => "http://www.exlibris.com/primo/xsd/search/request") {
                query_terms_xml.call xml
                search_elements_xml.call xml
                languages_xml.call xml
                sort_bys_xml.call xml
                display_fields_xml.call xml
                locations_xml.call xml
              }
            }
          end
        end

        # 
        # Get a specific record from Primo.
        # 
        class FullView < Search
          # Add doc_id to the base elements
          self.add_base_elements :doc_id
          self.soap_action = :get_record
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
exlibris-primo-2.1.1 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-2.1.0 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-2.0.0 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.1.9 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.1.8 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.1.7 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.1.6 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.1.5 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.1.4 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.1.3 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.1.2 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.1.1 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.1.0 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.0.11 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.0.10 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.0.9 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.0.8 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.0.7 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.0.6 lib/exlibris/primo/web_service/request/search.rb
exlibris-primo-1.0.5 lib/exlibris/primo/web_service/request/search.rb