Sha256: a8be590c2e2dbe4667cfa80af446f3a3e50e3b39e9488815df1b8c167636e8c0

Contents?: true

Size: 1.07 KB

Versions: 25

Compression:

Stored size: 1.07 KB

Contents

module Exlibris
  module Primo
    module WebService
      module Request
        # 
        # 
        # 
        class QueryTerm
          include WriteAttributes
          include XmlUtil
          attr_accessor :index, :precision, :value
          attr_writer :include_values, :exclude_values
          
          def include_values
            @include_values ||= []
          end

          def exclude_values
            @exclude_values ||= []
          end

          def to_xml
            include_values = self.include_values
            exclude_values = self.exclude_values
            build_xml do |xml|
              xml.QueryTerm {
                xml.IndexField index
                xml.PrecisionOperator precision
                xml.Value value
                include_values.each do |include_value|
                  xml.includeValue include_value
                end
                exclude_values.each do |exclude_value|
                  xml.excludeValue exclude_value
                end
              }
            end
          end
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

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