Sha256: 79f123b4e96c589d7e2f063414820ef72dc00727f199af637c07971af905fe3f

Contents?: true

Size: 599 Bytes

Versions: 25

Compression:

Stored size: 599 Bytes

Contents

module Exlibris
  module Primo
    module Pnx
      # 
      # Handle OpenURL elements
      # 
      module Openurl
        #
        # Parse addata to provide an OpenURL query string
        #
        def openurl
          @openurl ||= ""
          if @openurl.blank?
            xml.root.xpath("addata/*").each do |addata|
              @openurl << "rft.#{addata.name}=#{addata.inner_text}&" unless (addata.inner_text.nil? or addata.inner_text.strip.empty?)
            end
            @openurl << "rft.primo=#{@record_id}"
          end
          @openurl
        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/pnx/openurl.rb
exlibris-primo-2.1.0 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-2.0.0 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.1.9 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.1.8 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.1.7 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.1.6 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.1.5 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.1.4 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.1.3 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.1.2 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.1.1 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.1.0 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.0.11 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.0.10 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.0.9 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.0.8 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.0.7 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.0.6 lib/exlibris/primo/pnx/openurl.rb
exlibris-primo-1.0.5 lib/exlibris/primo/pnx/openurl.rb