Class: OAI::Provider::Metadata::DublinCore
- Defined in:
- lib/oai/provider/metadata_format/oai_dc.rb
Overview
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
- #header_specification ⇒ Object
-
#initialize ⇒ DublinCore
constructor
A new instance of DublinCore.
Methods inherited from Format
Constructor Details
#initialize ⇒ DublinCore
Returns a new instance of DublinCore.
6 7 8 9 10 11 12 13 14 |
# File 'lib/oai/provider/metadata_format/oai_dc.rb', line 6 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_specification ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/oai/provider/metadata_format/oai_dc.rb', line 16 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}.gsub(/\s+/, ' ') } end |