oai 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- RUBY_OAI_VERSION = '0.0.5'
1
+ RUBY_OAI_VERSION = '0.0.6'
2
2
 
3
3
  require 'rubygems'
4
4
  require 'rake'
@@ -2,6 +2,7 @@
2
2
  require 'uri'
3
3
  require 'net/http'
4
4
  require 'cgi'
5
+ require 'iconv'
5
6
 
6
7
  if not defined?(OAI::Const::VERBS)
7
8
  # Shared stuff
@@ -183,6 +184,7 @@ module OAI
183
184
  end
184
185
 
185
186
  def load_document(xml)
187
+ retried = false
186
188
  case @parser
187
189
  when 'libxml'
188
190
  begin
@@ -190,13 +192,28 @@ module OAI
190
192
  parser.string = xml
191
193
  return parser.parse
192
194
  rescue XML::Parser::ParseError => e
193
- raise OAI::Exception, 'response not well formed XML: '+e, caller
195
+ if retried
196
+ raise OAI::Exception, 'response not well formed XML: '+e, caller
197
+ end
198
+ ic = Iconv.new('UTF-8//IGNORE', 'UTF-8')
199
+ xml2 = ic.iconv(xml << ' ')[0..-2]
200
+ puts "equal? #{xml == xml2}"
201
+ retried = true
202
+ retry
194
203
  end
195
204
  when 'rexml'
196
205
  begin
197
206
  return REXML::Document.new(xml)
198
207
  rescue REXML::ParseException => e
199
- raise OAI::Exception, 'response not well formed XML: '+e, caller
208
+ if retried
209
+ puts xml
210
+ raise OAI::Exception, 'response not well formed XML: '+e, caller
211
+ end
212
+ puts "RETRYING"
213
+ ic = Iconv.new('UTF-8//IGNORE', 'UTF-8')
214
+ xml = ic.iconv(xml << ' ')[0..-2]
215
+ retried = true
216
+ retry
200
217
  end
201
218
  end
202
219
  end
@@ -246,8 +263,8 @@ module OAI
246
263
  end
247
264
 
248
265
  # Convert date formated strings in dates.
249
- realopts[:from] = parse_date(realopts[:from]) if realopts[:from]
250
- realopts[:until] = parse_date(realopts[:until]) if realopts[:until]
266
+ #realopts[:from] = parse_date(realopts[:from]) if realopts[:from]
267
+ #realopts[:until] = parse_date(realopts[:until]) if realopts[:until]
251
268
 
252
269
  # check for any bad options
253
270
  unless (realopts.keys - OAI::Const::VERBS[verb]).empty?
@@ -4,7 +4,7 @@ module OAI
4
4
  # OAI defines six verbs with various allowable options.
5
5
  VERBS = {
6
6
  'Identify' => [],
7
- 'ListMetadataFormats' => [],
7
+ 'ListMetadataFormats' => [:identifier],
8
8
  'ListSets' => [:resumption_token], # unused currently
9
9
  'GetRecord' => [:identifier, :from, :until, :set, :metadata_prefix],
10
10
  'ListIdentifiers' => [:from, :until, :set, :metadata_prefix, :resumption_token],
@@ -29,19 +29,21 @@ module OAI
29
29
  private
30
30
 
31
31
  def harvest(site)
32
- harvest_time = Time.now.utc
33
32
  opts = build_options_hash(@config.sites[site])
34
- opts[:until] = harvest_time.xmlschema
35
-
36
- # Allow a from date to be passed in
37
- if(@from)
38
- opts[:from] = @from
39
- else
40
- opts[:from] = earliest(opts[:url])
33
+ harvest_time = Time.now.utc
34
+
35
+ if "YYYY-MM-DD" == granularity(opts[:url])
36
+ opts[:until] = harvest_time.strftime("%Y-%m-%d")
37
+ opts[:from] = @from.strftime("%Y-%m-%d") if @from
38
+ else
39
+ opts[:until] = harvest_time.xmlschema
40
+ opts[:from] = @from.xmlschema if @from
41
41
  end
42
-
43
- opts.delete(:set) if 'all' == opts[:set]
44
42
 
43
+ # Allow a from date to be passed in
44
+ opts[:from] = earliest(opts[:url]) unless opts[:from]
45
+ opts.delete(:set) if 'all' == opts[:set]
46
+
45
47
  begin
46
48
  # Connect, and download
47
49
  file, records = call(opts.delete(:url), opts)
@@ -68,11 +70,6 @@ module OAI
68
70
  client = OAI::Client.new(url, :parser => @parser)
69
71
  provider_config = client.identify
70
72
 
71
- if Harvester::LOW_RESOLUTION == provider_config.granularity
72
- options[:from] = Time.parse(options[:from]).strftime("%Y-%m-%d")
73
- options[:until] = Time.parse(options[:until]).strftime("%Y-%m-%d")
74
- end
75
-
76
73
  file = Tempfile.new('oai_data')
77
74
  gz = Zlib::GzipWriter.new(file)
78
75
  gz << "<? xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
@@ -131,11 +128,20 @@ module OAI
131
128
  "_at_#{until_time.strftime('%H-%M-%S')}"
132
129
  end
133
130
 
131
+ def granularity(url)
132
+ client = OAI::Client.new url
133
+ client.identify.granularity
134
+ end
135
+
134
136
  # Get earliest timestamp from repository
135
137
  def earliest(url)
136
138
  client = OAI::Client.new url
137
139
  identify = client.identify
138
- Time.parse(identify.earliest_datestamp).utc.xmlschema
140
+ if "YYYY-MM-DD" == identify.granularity
141
+ Time.parse(identify.earliest_datestamp).strftime("%Y-%m-%d")
142
+ else
143
+ Time.parse(identify.earliest_datestamp).xmlschema
144
+ end
139
145
  end
140
146
 
141
147
  end
@@ -8,8 +8,8 @@ module OAI
8
8
  alias_method :orig_call, :call
9
9
  alias_method :orig_init, :initialize
10
10
 
11
- def initialize(config = nil, directory = nil, date = nil)
12
- orig_init(config, directory, date)
11
+ def initialize(*args)
12
+ orig_init(*args)
13
13
  @summary = []
14
14
  @logger = Logger.new(File.join(@config.logfile, "harvester.log"),
15
15
  shift_age = 'weekly') if @config.logfile
@@ -73,7 +73,7 @@ module OAI
73
73
  banner "Harvesting '#{site}'"
74
74
  if date && !date.empty?
75
75
  begin
76
- date = Chronic.parse(date.join(' ')).utc.xmlschema
76
+ date = Chronic.parse(date.join(' ')).utc
77
77
  rescue NoMethodError
78
78
  puts "Couldn't parse the date supplied"
79
79
  return
@@ -110,6 +110,8 @@ module OAI
110
110
  print_site(site)
111
111
  end
112
112
  puts
113
+ rescue
114
+ puts args + " doesn't appear to be configured, use list to see configured repositories."
113
115
  end
114
116
 
115
117
  def new
@@ -196,7 +196,11 @@ module OAI::Provider
196
196
  end
197
197
 
198
198
  def format(prefix)
199
- @formats[prefix]
199
+ if @formats[prefix].nil?
200
+ raise OAI::FormatException.new
201
+ else
202
+ @formats[prefix]
203
+ end
200
204
  end
201
205
 
202
206
  protected
@@ -30,8 +30,12 @@ module OAI::Provider::Metadata
30
30
  xml.tag!("#{prefix}:#{element_namespace}", header_specification) do
31
31
  fields.each do |field|
32
32
  values = value_for(field, record, map)
33
- values.each do |value|
34
- xml.tag! "#{element_namespace}:#{field}", value
33
+ if values.respond_to?(:each)
34
+ values.each do |value|
35
+ xml.tag! "#{element_namespace}:#{field}", value
36
+ end
37
+ else
38
+ xml.tag! "#{element_namespace}:#{field}", values
35
39
  end
36
40
  end
37
41
  end
@@ -14,6 +14,9 @@ module OAI::Provider
14
14
  # sets - should return an array of sets supported by the repository.
15
15
  # deleted? - individual records returned should respond true or false
16
16
  # when sent the deleted? message.
17
+ # available_formats - if overridden, individual records should return an
18
+ # array of prefixes for all formats in which that record is available,
19
+ # if other than ["oai_dc"]
17
20
  #
18
21
  # == Resumption Tokens
19
22
  #
@@ -46,7 +46,7 @@ module OAI::Provider
46
46
  def find(selector, options={})
47
47
  return next_set(options[:resumption_token]) if options[:resumption_token]
48
48
  conditions = sql_conditions(options)
49
-
49
+
50
50
  if :all == selector
51
51
  total = model.count(:id, :conditions => conditions)
52
52
  if @limit && total > @limit
@@ -54,6 +54,10 @@ module OAI
54
54
  http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd}
55
55
  }
56
56
  end
57
+
58
+ def extract_identifier(id)
59
+ id.sub("#{provider.prefix}/", '')
60
+ end
57
61
 
58
62
  def valid?
59
63
  return true if resumption?
@@ -18,13 +18,7 @@ module OAI::Provider::Response
18
18
  end
19
19
  end
20
20
  end
21
-
22
- private
23
-
24
- def extract_identifier(id)
25
- id.sub("#{provider.prefix}/", '')
26
- end
27
-
21
+
28
22
  end
29
23
 
30
24
  end
@@ -12,7 +12,7 @@ module OAI::Provider::Response
12
12
  r.adminEmail address
13
13
  end if provider.email
14
14
  r.earliestDatestamp provider.model.earliest
15
- r.deleteRecord provider.delete_support.to_s
15
+ r.deletedRecord provider.delete_support.to_s
16
16
  r.granularity provider.granularity
17
17
  end
18
18
  end
@@ -15,11 +15,12 @@ module OAI::Provider::Response
15
15
  records.each do |rec|
16
16
  header_for rec
17
17
  end
18
- end
19
18
 
20
- # append resumption token for getting next group of records
21
- if result.respond_to?(:token)
22
- r.target! << result.token.to_xml
19
+ # append resumption token for getting next group of records
20
+ if result.respond_to?(:token)
21
+ r.target! << result.token.to_xml
22
+ end
23
+
23
24
  end
24
25
  end
25
26
  end
@@ -1,11 +1,26 @@
1
1
  module OAI::Provider::Response
2
-
3
- class ListMetadataFormats < Base
2
+
3
+ class ListMetadataFormats < RecordResponse
4
+ valid_parameters :identifier
4
5
 
5
6
  def to_xml
7
+ # Get a list of all the formats the provider understands.
8
+ formats = provider.formats.values
9
+
10
+ # if it's a doc-specific request
11
+ if options.include?(:identifier)
12
+ id = extract_identifier(options[:identifier])
13
+ unless record = provider.model.find(id, options)
14
+ raise OAI::IdException.new
15
+ end
16
+
17
+ # Remove any format that this particular record can't be provided in.
18
+ formats.reject! { |f| !record_supports(record, f.prefix) }
19
+ end
20
+
6
21
  response do |r|
7
- r.ListMetadataFormats do
8
- provider.formats.each do |key, format|
22
+ r.ListMetadataFormats do
23
+ formats.each do |format|
9
24
  r.metadataFormat do
10
25
  r.metadataPrefix format.prefix
11
26
  r.schema format.schema
@@ -15,7 +30,13 @@ module OAI::Provider::Response
15
30
  end
16
31
  end
17
32
  end
18
-
33
+
34
+ def record_supports(record, prefix)
35
+ prefix == 'oai_dc' or
36
+ record.respond_to?("to_#{prefix}") or
37
+ record.respond_to?("map_#{prefix}")
38
+ end
39
+
19
40
  end
20
-
41
+
21
42
  end
@@ -17,11 +17,12 @@ module OAI::Provider::Response
17
17
  data_for rec unless deleted?(rec)
18
18
  end
19
19
  end
20
- end
21
20
 
22
- # append resumption token for getting next group of records
23
- if result.respond_to?(:token)
24
- r.target! << result.token.to_xml
21
+ # append resumption token for getting next group of records
22
+ if result.respond_to?(:token)
23
+ r.target! << result.token.to_xml
24
+ end
25
+
25
26
  end
26
27
  end
27
28
  end
@@ -19,7 +19,7 @@ class OAIPMHTables < ActiveRecord::Migration
19
19
  t.column :description, :string
20
20
  t.column :contributor, :string
21
21
  t.column :publisher, :string
22
- t.column :date, :string
22
+ t.column :date, :datetime
23
23
  t.column :type, :string
24
24
  t.column :format, :string
25
25
  t.column :source, :string
@@ -5,7 +5,7 @@
5
5
  creator: creator_85
6
6
  language: language_85
7
7
  title: title_85
8
- date: date_85
8
+ date: Sun Feb 04 11:30:22 -0800 2007
9
9
  type: type_85
10
10
  rights: rights_85
11
11
  contributor: contributor_85
@@ -20,7 +20,7 @@
20
20
  creator: creator_66
21
21
  language: language_66
22
22
  title: title_66
23
- date: date_66
23
+ date: Fri Feb 23 11:30:22 -0800 2007
24
24
  type: type_66
25
25
  rights: rights_66
26
26
  contributor: contributor_66
@@ -35,7 +35,7 @@
35
35
  creator: creator_9
36
36
  language: language_9
37
37
  title: title_9
38
- date: date_9
38
+ date: Sat Apr 21 12:30:22 -0700 2007
39
39
  type: type_9
40
40
  rights: rights_9
41
41
  contributor: contributor_9
@@ -50,7 +50,7 @@
50
50
  creator: creator_47
51
51
  language: language_47
52
52
  title: title_47
53
- date: date_47
53
+ date: Wed Mar 14 12:30:22 -0700 2007
54
54
  type: type_47
55
55
  rights: rights_47
56
56
  contributor: contributor_47
@@ -65,7 +65,7 @@
65
65
  creator: creator_28
66
66
  language: language_28
67
67
  title: title_28
68
- date: date_28
68
+ date: Mon Apr 02 12:30:22 -0700 2007
69
69
  type: type_28
70
70
  rights: rights_28
71
71
  contributor: contributor_28
@@ -80,7 +80,7 @@
80
80
  creator: creator_95
81
81
  language: language_95
82
82
  title: title_95
83
- date: date_95
83
+ date: Thu Jan 25 11:30:22 -0800 2007
84
84
  type: type_95
85
85
  rights: rights_95
86
86
  contributor: contributor_95
@@ -95,7 +95,7 @@
95
95
  creator: creator_76
96
96
  language: language_76
97
97
  title: title_76
98
- date: date_76
98
+ date: Tue Feb 13 11:30:22 -0800 2007
99
99
  type: type_76
100
100
  rights: rights_76
101
101
  contributor: contributor_76
@@ -110,7 +110,7 @@
110
110
  creator: creator_19
111
111
  language: language_19
112
112
  title: title_19
113
- date: date_19
113
+ date: Wed Apr 11 12:30:22 -0700 2007
114
114
  type: type_19
115
115
  rights: rights_19
116
116
  contributor: contributor_19
@@ -125,7 +125,7 @@
125
125
  creator: creator_57
126
126
  language: language_57
127
127
  title: title_57
128
- date: date_57
128
+ date: Sun Mar 04 11:30:22 -0800 2007
129
129
  type: type_57
130
130
  rights: rights_57
131
131
  contributor: contributor_57
@@ -140,7 +140,7 @@
140
140
  creator: creator_0
141
141
  language: language_0
142
142
  title: title_0
143
- date: date_0
143
+ date: Mon Apr 30 12:30:22 -0700 2007
144
144
  type: type_0
145
145
  rights: rights_0
146
146
  contributor: contributor_0
@@ -155,7 +155,7 @@
155
155
  creator: creator_38
156
156
  language: language_38
157
157
  title: title_38
158
- date: date_38
158
+ date: Fri Mar 23 12:30:22 -0700 2007
159
159
  type: type_38
160
160
  rights: rights_38
161
161
  contributor: contributor_38
@@ -170,7 +170,7 @@
170
170
  creator: creator_86
171
171
  language: language_86
172
172
  title: title_86
173
- date: date_86
173
+ date: Sat Feb 03 11:30:22 -0800 2007
174
174
  type: type_86
175
175
  rights: rights_86
176
176
  contributor: contributor_86
@@ -185,7 +185,7 @@
185
185
  creator: creator_67
186
186
  language: language_67
187
187
  title: title_67
188
- date: date_67
188
+ date: Thu Feb 22 11:30:22 -0800 2007
189
189
  type: type_67
190
190
  rights: rights_67
191
191
  contributor: contributor_67
@@ -200,7 +200,7 @@
200
200
  creator: creator_10
201
201
  language: language_10
202
202
  title: title_10
203
- date: date_10
203
+ date: Fri Apr 20 12:30:22 -0700 2007
204
204
  type: type_10
205
205
  rights: rights_10
206
206
  contributor: contributor_10
@@ -215,7 +215,7 @@
215
215
  creator: creator_48
216
216
  language: language_48
217
217
  title: title_48
218
- date: date_48
218
+ date: Tue Mar 13 12:30:22 -0700 2007
219
219
  type: type_48
220
220
  rights: rights_48
221
221
  contributor: contributor_48
@@ -230,7 +230,7 @@
230
230
  creator: creator_29
231
231
  language: language_29
232
232
  title: title_29
233
- date: date_29
233
+ date: Sun Apr 01 12:30:22 -0700 2007
234
234
  type: type_29
235
235
  rights: rights_29
236
236
  contributor: contributor_29
@@ -245,7 +245,7 @@
245
245
  creator: creator_96
246
246
  language: language_96
247
247
  title: title_96
248
- date: date_96
248
+ date: Wed Jan 24 11:30:22 -0800 2007
249
249
  type: type_96
250
250
  rights: rights_96
251
251
  contributor: contributor_96
@@ -260,7 +260,7 @@
260
260
  creator: creator_77
261
261
  language: language_77
262
262
  title: title_77
263
- date: date_77
263
+ date: Mon Feb 12 11:30:22 -0800 2007
264
264
  type: type_77
265
265
  rights: rights_77
266
266
  contributor: contributor_77
@@ -275,7 +275,7 @@
275
275
  creator: creator_20
276
276
  language: language_20
277
277
  title: title_20
278
- date: date_20
278
+ date: Tue Apr 10 12:30:22 -0700 2007
279
279
  type: type_20
280
280
  rights: rights_20
281
281
  contributor: contributor_20
@@ -290,7 +290,7 @@
290
290
  creator: creator_58
291
291
  language: language_58
292
292
  title: title_58
293
- date: date_58
293
+ date: Sat Mar 03 11:30:22 -0800 2007
294
294
  type: type_58
295
295
  rights: rights_58
296
296
  contributor: contributor_58
@@ -305,7 +305,7 @@
305
305
  creator: creator_1
306
306
  language: language_1
307
307
  title: title_1
308
- date: date_1
308
+ date: Sun Apr 29 12:30:22 -0700 2007
309
309
  type: type_1
310
310
  rights: rights_1
311
311
  contributor: contributor_1
@@ -320,7 +320,7 @@
320
320
  creator: creator_39
321
321
  language: language_39
322
322
  title: title_39
323
- date: date_39
323
+ date: Thu Mar 22 12:30:22 -0700 2007
324
324
  type: type_39
325
325
  rights: rights_39
326
326
  contributor: contributor_39
@@ -335,7 +335,7 @@
335
335
  creator: creator_87
336
336
  language: language_87
337
337
  title: title_87
338
- date: date_87
338
+ date: Fri Feb 02 11:30:22 -0800 2007
339
339
  type: type_87
340
340
  rights: rights_87
341
341
  contributor: contributor_87
@@ -350,7 +350,7 @@
350
350
  creator: creator_68
351
351
  language: language_68
352
352
  title: title_68
353
- date: date_68
353
+ date: Wed Feb 21 11:30:22 -0800 2007
354
354
  type: type_68
355
355
  rights: rights_68
356
356
  contributor: contributor_68
@@ -365,7 +365,7 @@
365
365
  creator: creator_30
366
366
  language: language_30
367
367
  title: title_30
368
- date: date_30
368
+ date: Sat Mar 31 12:30:22 -0700 2007
369
369
  type: type_30
370
370
  rights: rights_30
371
371
  contributor: contributor_30
@@ -380,7 +380,7 @@
380
380
  creator: creator_11
381
381
  language: language_11
382
382
  title: title_11
383
- date: date_11
383
+ date: Thu Apr 19 12:30:22 -0700 2007
384
384
  type: type_11
385
385
  rights: rights_11
386
386
  contributor: contributor_11
@@ -395,7 +395,7 @@
395
395
  creator: creator_49
396
396
  language: language_49
397
397
  title: title_49
398
- date: date_49
398
+ date: Mon Mar 12 12:30:22 -0700 2007
399
399
  type: type_49
400
400
  rights: rights_49
401
401
  contributor: contributor_49
@@ -410,7 +410,7 @@
410
410
  creator: creator_97
411
411
  language: language_97
412
412
  title: title_97
413
- date: date_97
413
+ date: Tue Jan 23 11:30:22 -0800 2007
414
414
  type: type_97
415
415
  rights: rights_97
416
416
  contributor: contributor_97
@@ -425,7 +425,7 @@
425
425
  creator: creator_78
426
426
  language: language_78
427
427
  title: title_78
428
- date: date_78
428
+ date: Sun Feb 11 11:30:22 -0800 2007
429
429
  type: type_78
430
430
  rights: rights_78
431
431
  contributor: contributor_78
@@ -440,7 +440,7 @@
440
440
  creator: creator_21
441
441
  language: language_21
442
442
  title: title_21
443
- date: date_21
443
+ date: Mon Apr 09 12:30:22 -0700 2007
444
444
  type: type_21
445
445
  rights: rights_21
446
446
  contributor: contributor_21
@@ -455,7 +455,7 @@
455
455
  creator: creator_59
456
456
  language: language_59
457
457
  title: title_59
458
- date: date_59
458
+ date: Fri Mar 02 11:30:22 -0800 2007
459
459
  type: type_59
460
460
  rights: rights_59
461
461
  contributor: contributor_59
@@ -470,7 +470,7 @@
470
470
  creator: creator_2
471
471
  language: language_2
472
472
  title: title_2
473
- date: date_2
473
+ date: Sat Apr 28 12:30:22 -0700 2007
474
474
  type: type_2
475
475
  rights: rights_2
476
476
  contributor: contributor_2
@@ -485,7 +485,7 @@
485
485
  creator: creator_40
486
486
  language: language_40
487
487
  title: title_40
488
- date: date_40
488
+ date: Wed Mar 21 12:30:22 -0700 2007
489
489
  type: type_40
490
490
  rights: rights_40
491
491
  contributor: contributor_40
@@ -500,7 +500,7 @@
500
500
  creator: creator_88
501
501
  language: language_88
502
502
  title: title_88
503
- date: date_88
503
+ date: Thu Feb 01 11:30:22 -0800 2007
504
504
  type: type_88
505
505
  rights: rights_88
506
506
  contributor: contributor_88
@@ -515,7 +515,7 @@
515
515
  creator: creator_69
516
516
  language: language_69
517
517
  title: title_69
518
- date: date_69
518
+ date: Tue Feb 20 11:30:22 -0800 2007
519
519
  type: type_69
520
520
  rights: rights_69
521
521
  contributor: contributor_69
@@ -530,7 +530,7 @@
530
530
  creator: creator_31
531
531
  language: language_31
532
532
  title: title_31
533
- date: date_31
533
+ date: Fri Mar 30 12:30:22 -0700 2007
534
534
  type: type_31
535
535
  rights: rights_31
536
536
  contributor: contributor_31
@@ -545,7 +545,7 @@
545
545
  creator: creator_12
546
546
  language: language_12
547
547
  title: title_12
548
- date: date_12
548
+ date: Wed Apr 18 12:30:22 -0700 2007
549
549
  type: type_12
550
550
  rights: rights_12
551
551
  contributor: contributor_12
@@ -560,7 +560,7 @@
560
560
  creator: creator_50
561
561
  language: language_50
562
562
  title: title_50
563
- date: date_50
563
+ date: Sun Mar 11 12:30:22 -0700 2007
564
564
  type: type_50
565
565
  rights: rights_50
566
566
  contributor: contributor_50
@@ -575,7 +575,7 @@
575
575
  creator: creator_98
576
576
  language: language_98
577
577
  title: title_98
578
- date: date_98
578
+ date: Mon Jan 22 11:30:22 -0800 2007
579
579
  type: type_98
580
580
  rights: rights_98
581
581
  contributor: contributor_98
@@ -590,7 +590,7 @@
590
590
  creator: creator_79
591
591
  language: language_79
592
592
  title: title_79
593
- date: date_79
593
+ date: Sat Feb 10 11:30:22 -0800 2007
594
594
  type: type_79
595
595
  rights: rights_79
596
596
  contributor: contributor_79
@@ -605,7 +605,7 @@
605
605
  creator: creator_3
606
606
  language: language_3
607
607
  title: title_3
608
- date: date_3
608
+ date: Fri Apr 27 12:30:22 -0700 2007
609
609
  type: type_3
610
610
  rights: rights_3
611
611
  contributor: contributor_3
@@ -620,7 +620,7 @@
620
620
  creator: creator_41
621
621
  language: language_41
622
622
  title: title_41
623
- date: date_41
623
+ date: Tue Mar 20 12:30:22 -0700 2007
624
624
  type: type_41
625
625
  rights: rights_41
626
626
  contributor: contributor_41
@@ -635,7 +635,7 @@
635
635
  creator: creator_22
636
636
  language: language_22
637
637
  title: title_22
638
- date: date_22
638
+ date: Sun Apr 08 12:30:22 -0700 2007
639
639
  type: type_22
640
640
  rights: rights_22
641
641
  contributor: contributor_22
@@ -650,7 +650,7 @@
650
650
  creator: creator_60
651
651
  language: language_60
652
652
  title: title_60
653
- date: date_60
653
+ date: Thu Mar 01 11:30:22 -0800 2007
654
654
  type: type_60
655
655
  rights: rights_60
656
656
  contributor: contributor_60
@@ -665,7 +665,7 @@
665
665
  creator: creator_89
666
666
  language: language_89
667
667
  title: title_89
668
- date: date_89
668
+ date: Wed Jan 31 11:30:22 -0800 2007
669
669
  type: type_89
670
670
  rights: rights_89
671
671
  contributor: contributor_89
@@ -680,7 +680,7 @@
680
680
  creator: creator_70
681
681
  language: language_70
682
682
  title: title_70
683
- date: date_70
683
+ date: Mon Feb 19 11:30:22 -0800 2007
684
684
  type: type_70
685
685
  rights: rights_70
686
686
  contributor: contributor_70
@@ -695,7 +695,7 @@
695
695
  creator: creator_32
696
696
  language: language_32
697
697
  title: title_32
698
- date: date_32
698
+ date: Thu Mar 29 12:30:22 -0700 2007
699
699
  type: type_32
700
700
  rights: rights_32
701
701
  contributor: contributor_32
@@ -710,7 +710,7 @@
710
710
  creator: creator_13
711
711
  language: language_13
712
712
  title: title_13
713
- date: date_13
713
+ date: Tue Apr 17 12:30:22 -0700 2007
714
714
  type: type_13
715
715
  rights: rights_13
716
716
  contributor: contributor_13
@@ -725,7 +725,7 @@
725
725
  creator: creator_51
726
726
  language: language_51
727
727
  title: title_51
728
- date: date_51
728
+ date: Sat Mar 10 11:30:22 -0800 2007
729
729
  type: type_51
730
730
  rights: rights_51
731
731
  contributor: contributor_51
@@ -740,7 +740,7 @@
740
740
  creator: creator_99
741
741
  language: language_99
742
742
  title: title_99
743
- date: date_99
743
+ date: Sun Jan 21 11:30:22 -0800 2007
744
744
  type: type_99
745
745
  rights: rights_99
746
746
  contributor: contributor_99
@@ -755,7 +755,7 @@
755
755
  creator: creator_80
756
756
  language: language_80
757
757
  title: title_80
758
- date: date_80
758
+ date: Fri Feb 09 11:30:22 -0800 2007
759
759
  type: type_80
760
760
  rights: rights_80
761
761
  contributor: contributor_80
@@ -770,7 +770,7 @@
770
770
  creator: creator_4
771
771
  language: language_4
772
772
  title: title_4
773
- date: date_4
773
+ date: Thu Apr 26 12:30:22 -0700 2007
774
774
  type: type_4
775
775
  rights: rights_4
776
776
  contributor: contributor_4
@@ -785,7 +785,7 @@
785
785
  creator: creator_42
786
786
  language: language_42
787
787
  title: title_42
788
- date: date_42
788
+ date: Mon Mar 19 12:30:22 -0700 2007
789
789
  type: type_42
790
790
  rights: rights_42
791
791
  contributor: contributor_42
@@ -800,7 +800,7 @@
800
800
  creator: creator_23
801
801
  language: language_23
802
802
  title: title_23
803
- date: date_23
803
+ date: Sat Apr 07 12:30:22 -0700 2007
804
804
  type: type_23
805
805
  rights: rights_23
806
806
  contributor: contributor_23
@@ -815,7 +815,7 @@
815
815
  creator: creator_61
816
816
  language: language_61
817
817
  title: title_61
818
- date: date_61
818
+ date: Wed Feb 28 11:30:22 -0800 2007
819
819
  type: type_61
820
820
  rights: rights_61
821
821
  contributor: contributor_61
@@ -830,7 +830,7 @@
830
830
  creator: creator_90
831
831
  language: language_90
832
832
  title: title_90
833
- date: date_90
833
+ date: Tue Jan 30 11:30:22 -0800 2007
834
834
  type: type_90
835
835
  rights: rights_90
836
836
  contributor: contributor_90
@@ -845,7 +845,7 @@
845
845
  creator: creator_71
846
846
  language: language_71
847
847
  title: title_71
848
- date: date_71
848
+ date: Sun Feb 18 11:30:22 -0800 2007
849
849
  type: type_71
850
850
  rights: rights_71
851
851
  contributor: contributor_71
@@ -860,7 +860,7 @@
860
860
  creator: creator_14
861
861
  language: language_14
862
862
  title: title_14
863
- date: date_14
863
+ date: Mon Apr 16 12:30:22 -0700 2007
864
864
  type: type_14
865
865
  rights: rights_14
866
866
  contributor: contributor_14
@@ -875,7 +875,7 @@
875
875
  creator: creator_52
876
876
  language: language_52
877
877
  title: title_52
878
- date: date_52
878
+ date: Fri Mar 09 11:30:22 -0800 2007
879
879
  type: type_52
880
880
  rights: rights_52
881
881
  contributor: contributor_52
@@ -890,7 +890,7 @@
890
890
  creator: creator_33
891
891
  language: language_33
892
892
  title: title_33
893
- date: date_33
893
+ date: Wed Mar 28 12:30:22 -0700 2007
894
894
  type: type_33
895
895
  rights: rights_33
896
896
  contributor: contributor_33
@@ -905,7 +905,7 @@
905
905
  creator: creator_81
906
906
  language: language_81
907
907
  title: title_81
908
- date: date_81
908
+ date: Thu Feb 08 11:30:22 -0800 2007
909
909
  type: type_81
910
910
  rights: rights_81
911
911
  contributor: contributor_81
@@ -920,7 +920,7 @@
920
920
  creator: creator_43
921
921
  language: language_43
922
922
  title: title_43
923
- date: date_43
923
+ date: Sun Mar 18 12:30:22 -0700 2007
924
924
  type: type_43
925
925
  rights: rights_43
926
926
  contributor: contributor_43
@@ -935,7 +935,7 @@
935
935
  creator: creator_24
936
936
  language: language_24
937
937
  title: title_24
938
- date: date_24
938
+ date: Fri Apr 06 12:30:22 -0700 2007
939
939
  type: type_24
940
940
  rights: rights_24
941
941
  contributor: contributor_24
@@ -950,7 +950,7 @@
950
950
  creator: creator_62
951
951
  language: language_62
952
952
  title: title_62
953
- date: date_62
953
+ date: Tue Feb 27 11:30:22 -0800 2007
954
954
  type: type_62
955
955
  rights: rights_62
956
956
  contributor: contributor_62
@@ -965,7 +965,7 @@
965
965
  creator: creator_5
966
966
  language: language_5
967
967
  title: title_5
968
- date: date_5
968
+ date: Wed Apr 25 12:30:22 -0700 2007
969
969
  type: type_5
970
970
  rights: rights_5
971
971
  contributor: contributor_5
@@ -980,7 +980,7 @@
980
980
  creator: creator_91
981
981
  language: language_91
982
982
  title: title_91
983
- date: date_91
983
+ date: Mon Jan 29 11:30:22 -0800 2007
984
984
  type: type_91
985
985
  rights: rights_91
986
986
  contributor: contributor_91
@@ -995,7 +995,7 @@
995
995
  creator: creator_72
996
996
  language: language_72
997
997
  title: title_72
998
- date: date_72
998
+ date: Sat Feb 17 11:30:22 -0800 2007
999
999
  type: type_72
1000
1000
  rights: rights_72
1001
1001
  contributor: contributor_72
@@ -1010,7 +1010,7 @@
1010
1010
  creator: creator_15
1011
1011
  language: language_15
1012
1012
  title: title_15
1013
- date: date_15
1013
+ date: Sun Apr 15 12:30:22 -0700 2007
1014
1014
  type: type_15
1015
1015
  rights: rights_15
1016
1016
  contributor: contributor_15
@@ -1025,7 +1025,7 @@
1025
1025
  creator: creator_53
1026
1026
  language: language_53
1027
1027
  title: title_53
1028
- date: date_53
1028
+ date: Thu Mar 08 11:30:22 -0800 2007
1029
1029
  type: type_53
1030
1030
  rights: rights_53
1031
1031
  contributor: contributor_53
@@ -1040,7 +1040,7 @@
1040
1040
  creator: creator_34
1041
1041
  language: language_34
1042
1042
  title: title_34
1043
- date: date_34
1043
+ date: Tue Mar 27 12:30:22 -0700 2007
1044
1044
  type: type_34
1045
1045
  rights: rights_34
1046
1046
  contributor: contributor_34
@@ -1055,7 +1055,7 @@
1055
1055
  creator: creator_82
1056
1056
  language: language_82
1057
1057
  title: title_82
1058
- date: date_82
1058
+ date: Wed Feb 07 11:30:22 -0800 2007
1059
1059
  type: type_82
1060
1060
  rights: rights_82
1061
1061
  contributor: contributor_82
@@ -1070,7 +1070,7 @@
1070
1070
  creator: creator_25
1071
1071
  language: language_25
1072
1072
  title: title_25
1073
- date: date_25
1073
+ date: Thu Apr 05 12:30:22 -0700 2007
1074
1074
  type: type_25
1075
1075
  rights: rights_25
1076
1076
  contributor: contributor_25
@@ -1085,7 +1085,7 @@
1085
1085
  creator: creator_63
1086
1086
  language: language_63
1087
1087
  title: title_63
1088
- date: date_63
1088
+ date: Mon Feb 26 11:30:22 -0800 2007
1089
1089
  type: type_63
1090
1090
  rights: rights_63
1091
1091
  contributor: contributor_63
@@ -1100,7 +1100,7 @@
1100
1100
  creator: creator_6
1101
1101
  language: language_6
1102
1102
  title: title_6
1103
- date: date_6
1103
+ date: Tue Apr 24 12:30:22 -0700 2007
1104
1104
  type: type_6
1105
1105
  rights: rights_6
1106
1106
  contributor: contributor_6
@@ -1115,7 +1115,7 @@
1115
1115
  creator: creator_44
1116
1116
  language: language_44
1117
1117
  title: title_44
1118
- date: date_44
1118
+ date: Sat Mar 17 12:30:22 -0700 2007
1119
1119
  type: type_44
1120
1120
  rights: rights_44
1121
1121
  contributor: contributor_44
@@ -1130,7 +1130,7 @@
1130
1130
  creator: creator_92
1131
1131
  language: language_92
1132
1132
  title: title_92
1133
- date: date_92
1133
+ date: Sun Jan 28 11:30:22 -0800 2007
1134
1134
  type: type_92
1135
1135
  rights: rights_92
1136
1136
  contributor: contributor_92
@@ -1145,7 +1145,7 @@
1145
1145
  creator: creator_73
1146
1146
  language: language_73
1147
1147
  title: title_73
1148
- date: date_73
1148
+ date: Fri Feb 16 11:30:22 -0800 2007
1149
1149
  type: type_73
1150
1150
  rights: rights_73
1151
1151
  contributor: contributor_73
@@ -1160,7 +1160,7 @@
1160
1160
  creator: creator_54
1161
1161
  language: language_54
1162
1162
  title: title_54
1163
- date: date_54
1163
+ date: Wed Mar 07 11:30:22 -0800 2007
1164
1164
  type: type_54
1165
1165
  rights: rights_54
1166
1166
  contributor: contributor_54
@@ -1175,7 +1175,7 @@
1175
1175
  creator: creator_35
1176
1176
  language: language_35
1177
1177
  title: title_35
1178
- date: date_35
1178
+ date: Mon Mar 26 12:30:22 -0700 2007
1179
1179
  type: type_35
1180
1180
  rights: rights_35
1181
1181
  contributor: contributor_35
@@ -1190,7 +1190,7 @@
1190
1190
  creator: creator_16
1191
1191
  language: language_16
1192
1192
  title: title_16
1193
- date: date_16
1193
+ date: Sat Apr 14 12:30:22 -0700 2007
1194
1194
  type: type_16
1195
1195
  rights: rights_16
1196
1196
  contributor: contributor_16
@@ -1205,7 +1205,7 @@
1205
1205
  creator: creator_83
1206
1206
  language: language_83
1207
1207
  title: title_83
1208
- date: date_83
1208
+ date: Tue Feb 06 11:30:22 -0800 2007
1209
1209
  type: type_83
1210
1210
  rights: rights_83
1211
1211
  contributor: contributor_83
@@ -1220,7 +1220,7 @@
1220
1220
  creator: creator_26
1221
1221
  language: language_26
1222
1222
  title: title_26
1223
- date: date_26
1223
+ date: Wed Apr 04 12:30:22 -0700 2007
1224
1224
  type: type_26
1225
1225
  rights: rights_26
1226
1226
  contributor: contributor_26
@@ -1235,7 +1235,7 @@
1235
1235
  creator: creator_64
1236
1236
  language: language_64
1237
1237
  title: title_64
1238
- date: date_64
1238
+ date: Sun Feb 25 11:30:22 -0800 2007
1239
1239
  type: type_64
1240
1240
  rights: rights_64
1241
1241
  contributor: contributor_64
@@ -1250,7 +1250,7 @@
1250
1250
  creator: creator_7
1251
1251
  language: language_7
1252
1252
  title: title_7
1253
- date: date_7
1253
+ date: Mon Apr 23 12:30:22 -0700 2007
1254
1254
  type: type_7
1255
1255
  rights: rights_7
1256
1256
  contributor: contributor_7
@@ -1265,7 +1265,7 @@
1265
1265
  creator: creator_45
1266
1266
  language: language_45
1267
1267
  title: title_45
1268
- date: date_45
1268
+ date: Fri Mar 16 12:30:22 -0700 2007
1269
1269
  type: type_45
1270
1270
  rights: rights_45
1271
1271
  contributor: contributor_45
@@ -1280,7 +1280,7 @@
1280
1280
  creator: creator_93
1281
1281
  language: language_93
1282
1282
  title: title_93
1283
- date: date_93
1283
+ date: Sat Jan 27 11:30:22 -0800 2007
1284
1284
  type: type_93
1285
1285
  rights: rights_93
1286
1286
  contributor: contributor_93
@@ -1295,7 +1295,7 @@
1295
1295
  creator: creator_74
1296
1296
  language: language_74
1297
1297
  title: title_74
1298
- date: date_74
1298
+ date: Thu Feb 15 11:30:22 -0800 2007
1299
1299
  type: type_74
1300
1300
  rights: rights_74
1301
1301
  contributor: contributor_74
@@ -1310,7 +1310,7 @@
1310
1310
  creator: creator_36
1311
1311
  language: language_36
1312
1312
  title: title_36
1313
- date: date_36
1313
+ date: Sun Mar 25 12:30:22 -0700 2007
1314
1314
  type: type_36
1315
1315
  rights: rights_36
1316
1316
  contributor: contributor_36
@@ -1325,7 +1325,7 @@
1325
1325
  creator: creator_17
1326
1326
  language: language_17
1327
1327
  title: title_17
1328
- date: date_17
1328
+ date: Fri Apr 13 12:30:22 -0700 2007
1329
1329
  type: type_17
1330
1330
  rights: rights_17
1331
1331
  contributor: contributor_17
@@ -1340,7 +1340,7 @@
1340
1340
  creator: creator_55
1341
1341
  language: language_55
1342
1342
  title: title_55
1343
- date: date_55
1343
+ date: Tue Mar 06 11:30:22 -0800 2007
1344
1344
  type: type_55
1345
1345
  rights: rights_55
1346
1346
  contributor: contributor_55
@@ -1355,7 +1355,7 @@
1355
1355
  creator: creator_84
1356
1356
  language: language_84
1357
1357
  title: title_84
1358
- date: date_84
1358
+ date: Mon Feb 05 11:30:22 -0800 2007
1359
1359
  type: type_84
1360
1360
  rights: rights_84
1361
1361
  contributor: contributor_84
@@ -1370,7 +1370,7 @@
1370
1370
  creator: creator_65
1371
1371
  language: language_65
1372
1372
  title: title_65
1373
- date: date_65
1373
+ date: Sat Feb 24 11:30:22 -0800 2007
1374
1374
  type: type_65
1375
1375
  rights: rights_65
1376
1376
  contributor: contributor_65
@@ -1385,7 +1385,7 @@
1385
1385
  creator: creator_8
1386
1386
  language: language_8
1387
1387
  title: title_8
1388
- date: date_8
1388
+ date: Sun Apr 22 12:30:22 -0700 2007
1389
1389
  type: type_8
1390
1390
  rights: rights_8
1391
1391
  contributor: contributor_8
@@ -1400,7 +1400,7 @@
1400
1400
  creator: creator_46
1401
1401
  language: language_46
1402
1402
  title: title_46
1403
- date: date_46
1403
+ date: Thu Mar 15 12:30:22 -0700 2007
1404
1404
  type: type_46
1405
1405
  rights: rights_46
1406
1406
  contributor: contributor_46
@@ -1415,7 +1415,7 @@
1415
1415
  creator: creator_27
1416
1416
  language: language_27
1417
1417
  title: title_27
1418
- date: date_27
1418
+ date: Tue Apr 03 12:30:22 -0700 2007
1419
1419
  type: type_27
1420
1420
  rights: rights_27
1421
1421
  contributor: contributor_27
@@ -1430,7 +1430,7 @@
1430
1430
  creator: creator_94
1431
1431
  language: language_94
1432
1432
  title: title_94
1433
- date: date_94
1433
+ date: Fri Jan 26 11:30:22 -0800 2007
1434
1434
  type: type_94
1435
1435
  rights: rights_94
1436
1436
  contributor: contributor_94
@@ -1445,7 +1445,7 @@
1445
1445
  creator: creator_75
1446
1446
  language: language_75
1447
1447
  title: title_75
1448
- date: date_75
1448
+ date: Wed Feb 14 11:30:22 -0800 2007
1449
1449
  type: type_75
1450
1450
  rights: rights_75
1451
1451
  contributor: contributor_75
@@ -1460,7 +1460,7 @@
1460
1460
  creator: creator_37
1461
1461
  language: language_37
1462
1462
  title: title_37
1463
- date: date_37
1463
+ date: Sat Mar 24 12:30:22 -0700 2007
1464
1464
  type: type_37
1465
1465
  rights: rights_37
1466
1466
  contributor: contributor_37
@@ -1475,7 +1475,7 @@
1475
1475
  creator: creator_18
1476
1476
  language: language_18
1477
1477
  title: title_18
1478
- date: date_18
1478
+ date: Thu Apr 12 12:30:22 -0700 2007
1479
1479
  type: type_18
1480
1480
  rights: rights_18
1481
1481
  contributor: contributor_18
@@ -1490,7 +1490,7 @@
1490
1490
  creator: creator_56
1491
1491
  language: language_56
1492
1492
  title: title_56
1493
- date: date_56
1493
+ date: Mon Mar 05 11:30:22 -0800 2007
1494
1494
  type: type_56
1495
1495
  rights: rights_56
1496
1496
  contributor: contributor_56
@@ -12,6 +12,12 @@ class ActiveRecordProviderTest < Test::Unit::TestCase
12
12
  assert doc.elements['/OAI-PMH/ListMetadataFormats/metadataFormat/metadataPrefix'].text == 'oai_dc'
13
13
  end
14
14
 
15
+ def test_metadata_formats_for_record
16
+ assert_nothing_raised { REXML::Document.new(@provider.list_metadata_formats(:identifier => 'oai:test/1')) }
17
+ doc = REXML::Document.new(@provider.list_metadata_formats)
18
+ assert doc.elements['/OAI-PMH/ListMetadataFormats/metadataFormat/metadataPrefix'].text == 'oai_dc'
19
+ end
20
+
15
21
  def test_list_records
16
22
  assert_nothing_raised { REXML::Document.new(@provider.list_records) }
17
23
  doc = REXML::Document.new(@provider.list_records)
@@ -10,12 +10,12 @@ class ResumptionTokenFunctionalTest < Test::Unit::TestCase
10
10
  def test_resumption_tokens
11
11
  assert_nothing_raised { Document.new(@provider.list_records) }
12
12
  doc = Document.new(@provider.list_records)
13
- assert_not_nil doc.elements["/OAI-PMH/resumptionToken"]
14
- assert_equal 100, doc.elements["/OAI-PMH/ListRecords"].to_a.size
15
- token = doc.elements["/OAI-PMH/resumptionToken"].text
13
+ assert_not_nil doc.elements["/OAI-PMH/ListRecords/resumptionToken"]
14
+ assert_equal 101, doc.elements["/OAI-PMH/ListRecords"].to_a.size
15
+ token = doc.elements["/OAI-PMH/ListRecords/resumptionToken"].text
16
16
  doc = Document.new(@provider.list_records(:resumption_token => token))
17
- assert_not_nil doc.elements["/OAI-PMH/resumptionToken"]
18
- assert_equal 100, doc.elements["/OAI-PMH/ListRecords"].to_a.size
17
+ assert_not_nil doc.elements["/OAI-PMH/ListRecords/resumptionToken"]
18
+ assert_equal 101, doc.elements["/OAI-PMH/ListRecords"].to_a.size
19
19
  end
20
20
 
21
21
  def test_from_and_until_with_resumption_tokens
@@ -26,16 +26,16 @@ class ResumptionTokenFunctionalTest < Test::Unit::TestCase
26
26
  :from => Chronic.parse("September 1 2004"),
27
27
  :until => Chronic.parse("November 30 2004"))
28
28
  )
29
- assert_equal 100, doc.elements["/OAI-PMH/ListRecords"].to_a.size
30
- token = doc.elements["/OAI-PMH/resumptionToken"].text
29
+ assert_equal 101, doc.elements["/OAI-PMH/ListRecords"].to_a.size
30
+ token = doc.elements["/OAI-PMH/ListRecords/resumptionToken"].text
31
31
 
32
32
  doc = Document.new(@provider.list_records(:resumption_token => token))
33
- assert_not_nil doc.elements["/OAI-PMH/resumptionToken"]
34
- assert_equal 100, doc.elements["/OAI-PMH/ListRecords"].to_a.size
35
- token = doc.elements["/OAI-PMH/resumptionToken"].text
33
+ assert_not_nil doc.elements["/OAI-PMH/ListRecords/resumptionToken"]
34
+ assert_equal 101, doc.elements["/OAI-PMH/ListRecords"].to_a.size
35
+ token = doc.elements["/OAI-PMH/ListRecords/resumptionToken"].text
36
36
 
37
37
  doc = Document.new(@provider.list_records(:resumption_token => token))
38
- assert_nil doc.elements["/OAI-PMH/resumptionToken"]
38
+ assert_nil doc.elements["/OAI-PMH/ListRecords/resumptionToken"]
39
39
  assert_equal 100, doc.elements["/OAI-PMH/ListRecords"].to_a.size
40
40
  end
41
41
 
@@ -6,8 +6,8 @@ class ResumptionTokenTest < Test::Unit::TestCase
6
6
 
7
7
  def setup
8
8
  @token = ResumptionToken.new(
9
- :from => Chronic.parse("January 1 2005"),
10
- :until => Chronic.parse("January 31 2005"),
9
+ :from => Time.utc(2005,"jan",1,17,0,0),
10
+ :until => Time.utc(2005,"jan",31,17,0,0),
11
11
  :set => "A",
12
12
  :metadata_prefix => "oai_dc",
13
13
  :last => 1
@@ -29,6 +29,13 @@ class TestSimpleProvider < Test::Unit::TestCase
29
29
  doc.elements['/OAI-PMH/ListMetadataFormats/metadataFormat/metadataPrefix'].text
30
30
  end
31
31
 
32
+ def test_metadata_formats_for_document
33
+ assert_nothing_raised { REXML::Document.new(@simple_provider.list_metadata_formats(:identifier => "oai:test/1")) }
34
+ doc = REXML::Document.new(@simple_provider.list_metadata_formats)
35
+ assert_equal "oai_dc",
36
+ doc.elements['/OAI-PMH/ListMetadataFormats/metadataFormat/metadataPrefix'].text
37
+ end
38
+
32
39
  def test_list_records_without_constraints
33
40
  assert_nothing_raised { REXML::Document.new(@simple_provider.list_records) }
34
41
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: oai
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.5
7
- date: 2007-02-16 00:00:00 -05:00
6
+ version: 0.0.6
7
+ date: 2007-06-05 00:00:00 -04:00
8
8
  summary: A ruby library for working with the Open Archive Initiative Protocol for Metadata Harvesting (OAI-PMH)
9
9
  require_paths:
10
10
  - lib