Sha256: 75e362c252361c594bc836ac843f982b90385d59fd17045b0079dbc16f4b3ba6

Contents?: true

Size: 1.27 KB

Versions: 6

Compression:

Stored size: 1.27 KB

Contents

xml.instruct! :xml, :version=>"1.0"
xml.tag! "OAI-PMH", :xmlns => "http://www.openarchives.org/OAI/2.0/",
  "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
  "xsi:schemaLocation" => "http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd" do
  xml.responseDate Time.zone.now.utc.iso8601
  xml.request manifestations_url(:format => :oai), :verb => "ListIdentifiers", :metadataPrefix => "oai_dc"
  @oai[:errors].each do |error|
    xml.error :code => error
  end
  xml.ListIdentifiers do
    @manifestations.each do |manifestation|
      cache([:manifestation => manifestation.id, :fragment => 'list_identifiers_oai', :role => current_user_role_name, :locale => @locale]) do %>
        xml.header do
          xml.identifier manifestation.oai_identifier
          xml.datestamp manifestation.updated_at.utc.iso8601
          xml.setSpec manifestation.series_statement.id if manifestation.series_statement
        end
      end
    end
    if @resumption.present?
      if @resumption[:cursor].to_i + @manifestations.per_page < @manifestations.total_entries
        xml.resumptionToken @resumption[:token], :completeListSize => @manifestations.total_entries, :cursor => @resumption[:cursor], :expirationDate => @resumption[:expired_at]
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
enju_oai-0.1.0.pre4 app/views/manifestations/list_identifiers.oai.builder
enju_oai-0.1.0.pre3 app/views/manifestations/list_identifiers.oai.builder
enju_oai-0.1.0.pre2 app/views/manifestations/list_identifiers.oai.builder
enju_oai-0.1.0.pre app/views/manifestations/list_identifiers.oai.builder
enju_oai-0.0.4 app/views/manifestations/list_identifiers.oai.builder
enju_oai-0.0.3 app/views/manifestations/list_identifiers.oai.builder