Sha256: 25a7f384c3ba142fad84d1eec9e7de94620603ff6ae3aff41418fe11aa6ba3cf

Contents?: true

Size: 776 Bytes

Versions: 3

Compression:

Stored size: 776 Bytes

Contents

# encoding: utf-8

require 'libis/tools/xml_document'
require 'libis/tools/mets_file'
require_relative 'client'

module Libis
  module Services
    module Rosetta

      class IeHandler < Libis::Services::Rosetta::Client

        def initialize(base_url = 'http://depot.lias.be', options = {})
          super 'repository', 'IEWebServices', {url: base_url}.merge(options)
        end

        def get_mets(ie, flags = 0)
          result = call_raw :get_ie, pds_handle: @pds_handle, ie_pid: ie, flags: flags
          Libis::Tools::MetsFile.parse(result[:get_ie])
        end

        def get_metadata(ie)
          result = call_raw :get_md, pds_handle: @pds_handle, 'PID' => ie
          Libis::Tools::MetsFile.parse(result[:get_md])
        end

      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
libis-services-1.0.10 lib/libis/services/rosetta/ie_handler.rb
libis-services-1.0.7 lib/libis/services/rosetta/ie_handler.rb
libis-services-1.0.6 lib/libis/services/rosetta/ie_handler.rb