Sha256: fb4caf4589bb828718031012da4bfab835f22a545b67dcba8b7cd08c66545aba

Contents?: true

Size: 782 Bytes

Versions: 2

Compression:

Stored size: 782 Bytes

Contents

module ResearchMetadataAnnouncement

  module Transformer

    # Extracts publication metadata from the Pure Research Information System and
    # converts it into an announcement
    #
    class Publication < ResearchMetadataAnnouncement::Transformer::Base

      # @param config [Hash]
      # @option config [String] :url The URL of the Pure host.
      # @option config [String] :username The username of the Pure host account.
      # @option config [String] :password The password of the Pure host account.
      def initialize(config)
        super
        make_extractor :publication
      end

      private

      def prepare_uri
        uri = strip_uri_scheme @resource.dois[0] if @resource && @resource.dois[0]
        handle_resolver uri
      end

    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
research_metadata_announcement-0.4.2 lib/research_metadata_announcement/transformer/publication.rb
research_metadata_announcement-0.4.1 lib/research_metadata_announcement/transformer/publication.rb