55
55
# repository_url 'http://localhost/provider'
56
56
# record_prefix 'oai:localhost'
57
57
# admin_email 'root@localhost'
58
+ # sample_identifier 'oai:pubmedcentral.gov:13900'
58
59
# source_model MyModel.new
59
60
# end
60
61
#
97
98
# record_prefix 'oai:blog'
98
99
# admin_email 'root@localhost'
99
100
# source_model OAI::Provider::ActiveRecordWrapper.new(Post)
101
+ # sample_identifier 'oai:pubmedcentral.gov:13900'
100
102
# end
101
103
#
102
104
# Create a custom controller:
@@ -184,7 +186,7 @@ class Base
184
186
185
187
class << self
186
188
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
188
190
189
191
def register_format ( format )
190
192
@formats ||= { }
@@ -218,6 +220,7 @@ def inherited(klass)
218
220
alias_method :deletion_support , :delete_support=
219
221
alias_method :update_granularity , :granularity=
220
222
alias_method :source_model , :model=
223
+ alias_method :sample_id , :identifier=
221
224
222
225
end
223
226
@@ -228,6 +231,7 @@ def inherited(klass)
228
231
Base . admin_email 'nobody@localhost'
229
232
Base . deletion_support OAI ::Const ::Delete ::TRANSIENT
230
233
Base . update_granularity OAI ::Const ::Granularity ::HIGH
234
+ Base . sample_id '13900'
231
235
232
236
Base . register_format ( OAI ::Provider ::Metadata ::DublinCore . instance )
233
237
0 commit comments