5555# repository_url 'http://localhost/provider'
5656# record_prefix 'oai:localhost'
5757# admin_email 'root@localhost'
58+ # sample_identifier 'oai:pubmedcentral.gov:13900'
5859# source_model MyModel.new
5960# end
6061#
9798# record_prefix 'oai:blog'
9899# admin_email 'root@localhost'
99100# source_model OAI::Provider::ActiveRecordWrapper.new(Post)
101+ # sample_identifier 'oai:pubmedcentral.gov:13900'
100102# end
101103#
102104# Create a custom controller:
@@ -184,7 +186,7 @@ class Base
184186
185187 class << self
186188 attr_reader :formats
187- attr_accessor :name , :url , :prefix , :email , :delete_support , :granularity , :model
189+ attr_accessor :name , :url , :prefix , :email , :delete_support , :granularity , :model , :identifier
188190
189191 def register_format ( format )
190192 @formats ||= { }
@@ -218,6 +220,7 @@ def inherited(klass)
218220 alias_method :deletion_support , :delete_support=
219221 alias_method :update_granularity , :granularity=
220222 alias_method :source_model , :model=
223+ alias_method :sample_id , :identifier=
221224
222225 end
223226
@@ -228,6 +231,7 @@ def inherited(klass)
228231 Base . admin_email 'nobody@localhost'
229232 Base . deletion_support OAI ::Const ::Delete ::TRANSIENT
230233 Base . update_granularity OAI ::Const ::Granularity ::HIGH
234+ Base . sample_id '13900'
231235
232236 Base . register_format ( OAI ::Provider ::Metadata ::DublinCore . instance )
233237
0 commit comments