Class: OAI::Provider::Metadata::DublinCore

Inherits:
Format
  • Object
show all
Defined in:
lib/oai/provider/metadata_format/oai_dc.rb

Overview

OAI::Metadata::DublinCore

Simple implementation of the Dublin Core metadata format.

Instance Attribute Summary

Attributes inherited from Format

#element_namespace, #fields, #namespace, #prefix, #schema

Instance Method Summary collapse

Methods inherited from Format

#encode

Constructor Details

#initializeDublinCore

Returns a new instance of DublinCore.



7
8
9
10
11
12
13
14
15
# File 'lib/oai/provider/metadata_format/oai_dc.rb', line 7

def initialize
  @prefix = 'oai_dc'
  @schema = 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd'
  @namespace = 'http://www.openarchives.org/OAI/2.0/oai_dc/'
  @element_namespace = 'dc'
  @fields = [ :title, :creator, :subject, :description, :publisher,
              :contributor, :date, :type, :format, :identifier,
              :source, :language, :relation, :coverage, :rights]
end

Instance Method Details

#header_specificationObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/oai/provider/metadata_format/oai_dc.rb', line 17

def header_specification
  {
    'xmlns:oai_dc' => "http://www.openarchives.org/OAI/2.0/oai_dc/",
    'xmlns:dc' => "http://purl.org/dc/elements/1.1/",
    'xmlns:xsi' => "http://www.w3.org/2001/XMLSchema-instance",
    'xsi:schemaLocation' => 
      %{http://www.openarchives.org/OAI/2.0/oai_dc/ 
        http://www.openarchives.org/OAI/2.0/oai_dc.xsd}            
  }
end