oai 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +80 -0
- data/Rakefile +113 -0
- data/bin/oai +68 -0
- data/examples/models/file_model.rb +63 -0
- data/examples/providers/dublin_core.rb +474 -0
- data/lib/oai.rb +7 -13
- data/lib/oai/client.rb +133 -83
- data/lib/oai/{get_record.rb → client/get_record.rb} +0 -0
- data/lib/oai/{header.rb → client/header.rb} +2 -2
- data/lib/oai/{identify.rb → client/identify.rb} +0 -0
- data/lib/oai/{list_identifiers.rb → client/list_identifiers.rb} +0 -0
- data/lib/oai/{list_metadata_formats.rb → client/list_metadata_formats.rb} +0 -0
- data/lib/oai/{list_records.rb → client/list_records.rb} +0 -0
- data/lib/oai/{list_sets.rb → client/list_sets.rb} +1 -1
- data/lib/oai/{metadata_format.rb → client/metadata_format.rb} +0 -0
- data/lib/oai/{record.rb → client/record.rb} +0 -0
- data/lib/oai/{response.rb → client/response.rb} +1 -1
- data/lib/oai/constants.rb +34 -0
- data/lib/oai/exception.rb +72 -1
- data/lib/oai/harvester.rb +38 -0
- data/lib/oai/harvester/config.rb +41 -0
- data/lib/oai/harvester/harvest.rb +144 -0
- data/lib/oai/harvester/logging.rb +70 -0
- data/lib/oai/harvester/mailer.rb +17 -0
- data/lib/oai/harvester/shell.rb +334 -0
- data/lib/oai/provider.rb +300 -0
- data/lib/oai/provider/metadata_format.rb +72 -0
- data/lib/oai/provider/metadata_format/oai_dc.rb +29 -0
- data/lib/oai/provider/model.rb +71 -0
- data/lib/oai/provider/model/activerecord_caching_wrapper.rb +135 -0
- data/lib/oai/provider/model/activerecord_wrapper.rb +136 -0
- data/lib/oai/provider/partial_result.rb +18 -0
- data/lib/oai/provider/response.rb +119 -0
- data/lib/oai/provider/response/error.rb +16 -0
- data/lib/oai/provider/response/get_record.rb +32 -0
- data/lib/oai/provider/response/identify.rb +24 -0
- data/lib/oai/provider/response/list_identifiers.rb +29 -0
- data/lib/oai/provider/response/list_metadata_formats.rb +21 -0
- data/lib/oai/provider/response/list_records.rb +32 -0
- data/lib/oai/provider/response/list_sets.rb +23 -0
- data/lib/oai/provider/response/record_response.rb +68 -0
- data/lib/oai/provider/resumption_token.rb +106 -0
- data/lib/oai/set.rb +14 -5
- data/test/activerecord_provider/config/connection.rb +5 -0
- data/test/activerecord_provider/config/database.yml +6 -0
- data/test/activerecord_provider/database/ar_migration.rb +59 -0
- data/test/activerecord_provider/database/oaipmhtest +0 -0
- data/test/activerecord_provider/fixtures/dc.yml +1501 -0
- data/test/activerecord_provider/helpers/providers.rb +44 -0
- data/test/activerecord_provider/helpers/set_provider.rb +36 -0
- data/test/activerecord_provider/models/dc_field.rb +7 -0
- data/test/activerecord_provider/models/dc_set.rb +6 -0
- data/test/activerecord_provider/models/oai_token.rb +3 -0
- data/test/activerecord_provider/tc_ar_provider.rb +93 -0
- data/test/activerecord_provider/tc_ar_sets_provider.rb +66 -0
- data/test/activerecord_provider/tc_caching_paging_provider.rb +53 -0
- data/test/activerecord_provider/tc_simple_paging_provider.rb +55 -0
- data/test/activerecord_provider/test_helper.rb +4 -0
- data/test/client/helpers/provider.rb +68 -0
- data/test/client/helpers/test_wrapper.rb +11 -0
- data/test/client/tc_exception.rb +36 -0
- data/test/{tc_get_record.rb → client/tc_get_record.rb} +11 -7
- data/test/client/tc_identify.rb +13 -0
- data/test/{tc_libxml.rb → client/tc_libxml.rb} +20 -10
- data/test/{tc_list_identifiers.rb → client/tc_list_identifiers.rb} +10 -8
- data/test/{tc_list_metadata_formats.rb → client/tc_list_metadata_formats.rb} +4 -1
- data/test/{tc_list_records.rb → client/tc_list_records.rb} +4 -1
- data/test/{tc_list_sets.rb → client/tc_list_sets.rb} +4 -2
- data/test/{tc_xpath.rb → client/tc_xpath.rb} +1 -1
- data/test/client/test_helper.rb +5 -0
- data/test/provider/models.rb +230 -0
- data/test/provider/tc_exceptions.rb +63 -0
- data/test/provider/tc_functional_tokens.rb +42 -0
- data/test/provider/tc_provider.rb +69 -0
- data/test/provider/tc_resumption_tokens.rb +46 -0
- data/test/provider/tc_simple_provider.rb +85 -0
- data/test/provider/test_helper.rb +36 -0
- metadata +123 -27
- data/test/tc_exception.rb +0 -38
- data/test/tc_identify.rb +0 -8
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ProviderExceptions < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def setup
|
6
|
+
@provider = ComplexProvider.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_resumption_token_exception
|
10
|
+
assert_raise(OAI::ResumptionTokenException) do
|
11
|
+
@provider.list_records(:resumption_token => 'aaadddd:1000')
|
12
|
+
end
|
13
|
+
assert_raise(OAI::ResumptionTokenException) do
|
14
|
+
@provider.list_records(:resumption_token => 'oai_dc:1000')
|
15
|
+
end
|
16
|
+
assert_raise(OAI::ResumptionTokenException) do
|
17
|
+
@provider.list_identifiers(:resumption_token => '..::!:.:!:')
|
18
|
+
end
|
19
|
+
assert_raise(OAI::ResumptionTokenException) do
|
20
|
+
@provider.list_identifiers(:resumption_token => '\:\\:\/$%^&*!@#!:1')
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_bad_verb_raises_exception
|
25
|
+
assert @provider.process_request(:verb => 'BadVerb') =~ /badVerb/
|
26
|
+
assert @provider.process_request(:verb => '\a$#^%!@') =~ /badVerb/
|
27
|
+
assert @provider.process_request(:verb => 'identity') =~ /badVerb/
|
28
|
+
assert @provider.process_request(:verb => '!!\\$\$\.+') =~ /badVerb/
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_bad_format_raises_exception
|
32
|
+
assert_raise(OAI::FormatException) do
|
33
|
+
@provider.get_record(:identifier => 'oai:test/1', :metadata_prefix => 'html')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_bad_id_raises_exception
|
38
|
+
assert_raise(OAI::IdException) do
|
39
|
+
@provider.get_record(:identifier => 'oai:test/5000')
|
40
|
+
end
|
41
|
+
assert_raise(OAI::IdException) do
|
42
|
+
@provider.get_record(:identifier => 'oai:test/-1')
|
43
|
+
end
|
44
|
+
assert_raise(OAI::IdException) do
|
45
|
+
@provider.get_record(:identifier => 'oai:test/one')
|
46
|
+
end
|
47
|
+
assert_raise(OAI::IdException) do
|
48
|
+
@provider.get_record(:identifier => 'oai:test/\\$1\1!')
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_no_records_match_dates_that_are_out_of_range
|
53
|
+
assert_raise(OAI::NoMatchException) do
|
54
|
+
@provider.list_records(:from => Chronic.parse("November 2 2000"),
|
55
|
+
:until => Chronic.parse("November 1 2000"))
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_no_records_match_bad_set
|
60
|
+
assert_raise(OAI::NoMatchException) { @provider.list_records(:set => 'unknown') }
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ResumptionTokenFunctionalTest < Test::Unit::TestCase
|
4
|
+
include REXML
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@provider = ComplexProvider.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_resumption_tokens
|
11
|
+
assert_nothing_raised { Document.new(@provider.list_records) }
|
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
|
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
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_from_and_until_with_resumption_tokens
|
22
|
+
# Should return 300 records broken into 3 groups of 100.
|
23
|
+
assert_nothing_raised { Document.new(@provider.list_records) }
|
24
|
+
doc = Document.new(
|
25
|
+
@provider.list_records(
|
26
|
+
:from => Chronic.parse("September 1 2004"),
|
27
|
+
:until => Chronic.parse("November 30 2004"))
|
28
|
+
)
|
29
|
+
assert_equal 100, doc.elements["/OAI-PMH/ListRecords"].to_a.size
|
30
|
+
token = doc.elements["/OAI-PMH/resumptionToken"].text
|
31
|
+
|
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
|
36
|
+
|
37
|
+
doc = Document.new(@provider.list_records(:resumption_token => token))
|
38
|
+
assert_nil doc.elements["/OAI-PMH/resumptionToken"]
|
39
|
+
assert_equal 100, doc.elements["/OAI-PMH/ListRecords"].to_a.size
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class OaiTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def setup
|
6
|
+
@mapped_provider = MappedProvider.new
|
7
|
+
@big_provider = BigProvider.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_list_identifiers_for_correct_xml
|
11
|
+
doc = REXML::Document.new(@mapped_provider.list_identifiers)
|
12
|
+
assert_not_nil doc.elements['OAI-PMH/ListIdentifiers']
|
13
|
+
assert_not_nil doc.elements['OAI-PMH/ListIdentifiers/header']
|
14
|
+
assert_not_nil doc.elements['OAI-PMH/ListIdentifiers/header/identifier']
|
15
|
+
assert_not_nil doc.elements['OAI-PMH/ListIdentifiers/header/datestamp']
|
16
|
+
assert_not_nil doc.elements['OAI-PMH/ListIdentifiers/header/setSpec']
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_list_records_for_correct_xml
|
20
|
+
doc = REXML::Document.new(@mapped_provider.list_records)
|
21
|
+
assert_not_nil doc.elements['OAI-PMH/ListRecords/record/header']
|
22
|
+
assert_not_nil doc.elements['OAI-PMH/ListRecords/record/metadata']
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_mapped_source
|
26
|
+
assert_nothing_raised { REXML::Document.new(@mapped_provider.list_records) }
|
27
|
+
doc = REXML::Document.new(@mapped_provider.list_records)
|
28
|
+
assert_equal "title_0", doc.elements['OAI-PMH/ListRecords/record/metadata/oai_dc:dc/dc:creator'].text
|
29
|
+
assert_equal "creator_0", doc.elements['OAI-PMH/ListRecords/record/metadata/oai_dc:dc/dc:title'].text
|
30
|
+
assert_equal "tag_0", doc.elements['OAI-PMH/ListRecords/record/metadata/oai_dc:dc/dc:subject'].text
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_from
|
34
|
+
assert_nothing_raised { REXML::Document.new(@big_provider.list_records) }
|
35
|
+
doc = REXML::Document.new(
|
36
|
+
@big_provider.list_records(:from => Chronic.parse("February 1 2001"))
|
37
|
+
)
|
38
|
+
assert_equal 100, doc.elements['OAI-PMH/ListRecords'].to_a.size
|
39
|
+
|
40
|
+
doc = REXML::Document.new(
|
41
|
+
@big_provider.list_records(:from => Chronic.parse("January 1 2001"))
|
42
|
+
)
|
43
|
+
assert_equal 200, doc.elements['OAI-PMH/ListRecords'].to_a.size
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_until
|
47
|
+
assert_nothing_raised { REXML::Document.new(@big_provider.list_records) }
|
48
|
+
doc = REXML::Document.new(
|
49
|
+
@big_provider.list_records(:until => Chronic.parse("November 1 2000"))
|
50
|
+
)
|
51
|
+
assert_equal 100, doc.elements['OAI-PMH/ListRecords'].to_a.size
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_from_and_until
|
55
|
+
assert_nothing_raised { REXML::Document.new(@big_provider.list_records) }
|
56
|
+
doc = REXML::Document.new(
|
57
|
+
@big_provider.list_records(:from => Chronic.parse("November 1 2000"),
|
58
|
+
:until => Chronic.parse("November 30 2000"))
|
59
|
+
)
|
60
|
+
assert_equal 100, doc.elements['OAI-PMH/ListRecords'].to_a.size
|
61
|
+
|
62
|
+
doc = REXML::Document.new(
|
63
|
+
@big_provider.list_records(:from => Chronic.parse("December 1 2000"),
|
64
|
+
:until => Chronic.parse("December 31 2000"))
|
65
|
+
)
|
66
|
+
assert_equal 100, doc.elements['OAI-PMH/ListRecords'].to_a.size
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ResumptionTokenTest < Test::Unit::TestCase
|
4
|
+
include REXML
|
5
|
+
include OAI::Provider
|
6
|
+
|
7
|
+
def setup
|
8
|
+
@token = ResumptionToken.new(
|
9
|
+
:from => Chronic.parse("January 1 2005"),
|
10
|
+
:until => Chronic.parse("January 31 2005"),
|
11
|
+
:set => "A",
|
12
|
+
:metadata_prefix => "oai_dc",
|
13
|
+
:last => 1
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_resumption_token_options_encoding
|
18
|
+
assert_equal "oai_dc.s(A).f(2005-01-01T17:00:00Z).u(2005-01-31T17:00:00Z)",
|
19
|
+
@token.to_s
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_resumption_token_next_method
|
23
|
+
assert_equal 100, @token.next(100).last
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_resumption_token_to_condition_hash
|
27
|
+
hash = @token.to_conditions_hash
|
28
|
+
assert_equal @token.from, hash[:from]
|
29
|
+
assert_equal @token.until, hash[:until]
|
30
|
+
assert_equal @token.set, hash[:set]
|
31
|
+
assert_equal @token.prefix, hash[:metadata_prefix]
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_resumption_token_parsing
|
35
|
+
new_token = ResumptionToken.parse(
|
36
|
+
"oai_dc.s(A).f(2005-01-01T17:00:00Z).u(2005-01-31T17:00:00Z):1"
|
37
|
+
)
|
38
|
+
assert_equal @token, new_token
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_resumption_token_to_xml
|
42
|
+
doc = REXML::Document.new(@token.to_xml)
|
43
|
+
assert_equal "#{@token.to_s}:#{@token.last}", doc.elements['/resumptionToken'].text
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class TestSimpleProvider < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def setup
|
6
|
+
@simple_provider = SimpleProvider.new
|
7
|
+
@model = @simple_provider.class.model
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_identify
|
11
|
+
doc = REXML::Document.new(@simple_provider.identify)
|
12
|
+
assert_equal @simple_provider.class.name,
|
13
|
+
doc.elements["/OAI-PMH/Identify/repositoryName"].text
|
14
|
+
assert_equal SimpleModel.new.earliest.to_s,
|
15
|
+
doc.elements["/OAI-PMH/Identify/earliestDatestamp"].text
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_list_sets
|
19
|
+
doc = REXML::Document.new(@simple_provider.list_sets)
|
20
|
+
sets = doc.elements["/OAI-PMH/ListSets"]
|
21
|
+
assert_equal @model.sets.size, sets.size
|
22
|
+
assert_equal @model.sets[0].name, sets[0].elements["//setName"].text
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_metadata_formats
|
26
|
+
assert_nothing_raised { REXML::Document.new(@simple_provider.list_metadata_formats) }
|
27
|
+
doc = REXML::Document.new(@simple_provider.list_metadata_formats)
|
28
|
+
assert_equal "oai_dc",
|
29
|
+
doc.elements['/OAI-PMH/ListMetadataFormats/metadataFormat/metadataPrefix'].text
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_list_records_without_constraints
|
33
|
+
assert_nothing_raised { REXML::Document.new(@simple_provider.list_records) }
|
34
|
+
|
35
|
+
total = @model.find(:all).size
|
36
|
+
doc = REXML::Document.new(@simple_provider.list_records)
|
37
|
+
assert_equal total, doc.elements['OAI-PMH/ListRecords'].size
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_list_records_with_set_equal_a
|
41
|
+
total = @model.find(:all, :set => 'A').size
|
42
|
+
doc = REXML::Document.new(@simple_provider.list_records(:set => 'A'))
|
43
|
+
assert_equal total, doc.elements['OAI-PMH/ListRecords'].size
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_list_record_with_set_equal_ab
|
47
|
+
total = @model.find(:all, :set => 'A:B').size
|
48
|
+
doc = REXML::Document.new(@simple_provider.list_records(:set => 'A:B'))
|
49
|
+
assert_equal total, doc.elements['OAI-PMH/ListRecords'].size
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_list_identifiers_without_constraints
|
53
|
+
assert_nothing_raised { REXML::Document.new(@simple_provider.list_identifiers) }
|
54
|
+
|
55
|
+
total = @model.find(:all).size
|
56
|
+
doc = REXML::Document.new(@simple_provider.list_identifiers)
|
57
|
+
assert_equal total, doc.elements['OAI-PMH/ListIdentifiers'].to_a.size
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_list_identifiers_with_set_equal_a
|
61
|
+
total = @model.find(:all, :set => 'A').size
|
62
|
+
doc = REXML::Document.new(@simple_provider.list_identifiers(:set => 'A'))
|
63
|
+
assert_equal total, doc.elements['OAI-PMH/ListIdentifiers'].to_a.size
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_list_indentifiers_with_set_equal_ab
|
67
|
+
total = @model.find(:all, :set => 'A:B').size
|
68
|
+
doc = REXML::Document.new(@simple_provider.list_identifiers(:set => 'A:B'))
|
69
|
+
assert_equal total, doc.elements['OAI-PMH/ListIdentifiers'].to_a.size
|
70
|
+
end
|
71
|
+
|
72
|
+
def test_get_record
|
73
|
+
assert_nothing_raised { REXML::Document.new(@simple_provider.get_record(:identifier => 'oai:test/1')) }
|
74
|
+
doc = REXML::Document.new(@simple_provider.get_record(:identifier => 'oai:test/1'))
|
75
|
+
assert_equal 'oai:test/1', doc.elements['OAI-PMH/GetRecord/record/header/identifier'].text
|
76
|
+
end
|
77
|
+
|
78
|
+
def test_deleted_record
|
79
|
+
assert_nothing_raised { REXML::Document.new(@simple_provider.get_record(:identifier => 'oai:test/6')) }
|
80
|
+
doc = REXML::Document.new(@simple_provider.get_record(:identifier => 'oai:test/5'))
|
81
|
+
assert_equal 'oai:test/5', doc.elements['OAI-PMH/GetRecord/record/header/identifier'].text
|
82
|
+
assert_equal 'deleted', doc.elements['OAI-PMH/GetRecord/record/header'].attributes["status"]
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'oai'
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
require File.dirname(__FILE__) + '/models'
|
5
|
+
include OAI
|
6
|
+
|
7
|
+
class SimpleProvider < Provider::Base
|
8
|
+
repository_name 'Test Provider'
|
9
|
+
record_prefix 'oai:test'
|
10
|
+
source_model SimpleModel.new
|
11
|
+
end
|
12
|
+
|
13
|
+
class BigProvider < Provider::Base
|
14
|
+
repository_name 'Another Provider'
|
15
|
+
record_prefix 'oai:test'
|
16
|
+
source_model BigModel.new
|
17
|
+
end
|
18
|
+
|
19
|
+
class TokenProvider < Provider::Base
|
20
|
+
repository_name 'Token Provider'
|
21
|
+
record_prefix 'oai:test'
|
22
|
+
source_model BigModel.new(25)
|
23
|
+
end
|
24
|
+
|
25
|
+
class MappedProvider < Provider::Base
|
26
|
+
repository_name 'Mapped Provider'
|
27
|
+
record_prefix 'oai:test'
|
28
|
+
source_model MappedModel.new
|
29
|
+
end
|
30
|
+
|
31
|
+
class ComplexProvider < Provider::Base
|
32
|
+
repository_name 'Complex Provider'
|
33
|
+
repository_url 'http://localhost'
|
34
|
+
record_prefix 'oai:test'
|
35
|
+
source_model ComplexModel.new(100)
|
36
|
+
end
|
metadata
CHANGED
@@ -3,13 +3,13 @@ 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.
|
7
|
-
date:
|
6
|
+
version: 0.0.4
|
7
|
+
date: 2007-02-05 00:00:00 -05: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
|
11
11
|
email: ehs@pobox.com
|
12
|
-
homepage: http://www.textualize.com/
|
12
|
+
homepage: http://www.textualize.com/ruby_oai_0
|
13
13
|
rubyforge_project:
|
14
14
|
description:
|
15
15
|
autorequire: oai
|
@@ -29,44 +29,140 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- Ed Summers
|
31
31
|
files:
|
32
|
+
- README
|
33
|
+
- Rakefile
|
34
|
+
- bin/oai
|
35
|
+
- test/activerecord_provider
|
36
|
+
- test/client
|
37
|
+
- test/provider
|
38
|
+
- test/test.xml
|
39
|
+
- test/activerecord_provider/config
|
40
|
+
- test/activerecord_provider/database
|
41
|
+
- test/activerecord_provider/fixtures
|
42
|
+
- test/activerecord_provider/helpers
|
43
|
+
- test/activerecord_provider/models
|
44
|
+
- test/activerecord_provider/tc_ar_provider.rb
|
45
|
+
- test/activerecord_provider/tc_ar_sets_provider.rb
|
46
|
+
- test/activerecord_provider/tc_caching_paging_provider.rb
|
47
|
+
- test/activerecord_provider/tc_simple_paging_provider.rb
|
48
|
+
- test/activerecord_provider/test_helper.rb
|
49
|
+
- test/activerecord_provider/config/connection.rb
|
50
|
+
- test/activerecord_provider/config/database.yml
|
51
|
+
- test/activerecord_provider/database/ar_migration.rb
|
52
|
+
- test/activerecord_provider/database/oaipmhtest
|
53
|
+
- test/activerecord_provider/fixtures/dc.yml
|
54
|
+
- test/activerecord_provider/helpers/providers.rb
|
55
|
+
- test/activerecord_provider/helpers/set_provider.rb
|
56
|
+
- test/activerecord_provider/models/dc_field.rb
|
57
|
+
- test/activerecord_provider/models/dc_set.rb
|
58
|
+
- test/activerecord_provider/models/oai_token.rb
|
59
|
+
- test/client/helpers
|
60
|
+
- test/client/tc_exception.rb
|
61
|
+
- test/client/tc_get_record.rb
|
62
|
+
- test/client/tc_identify.rb
|
63
|
+
- test/client/tc_libxml.rb
|
64
|
+
- test/client/tc_list_identifiers.rb
|
65
|
+
- test/client/tc_list_metadata_formats.rb
|
66
|
+
- test/client/tc_list_records.rb
|
67
|
+
- test/client/tc_list_sets.rb
|
68
|
+
- test/client/tc_xpath.rb
|
69
|
+
- test/client/test_helper.rb
|
70
|
+
- test/client/helpers/provider.rb
|
71
|
+
- test/client/helpers/test_wrapper.rb
|
72
|
+
- test/provider/models.rb
|
73
|
+
- test/provider/tc_exceptions.rb
|
74
|
+
- test/provider/tc_functional_tokens.rb
|
75
|
+
- test/provider/tc_provider.rb
|
76
|
+
- test/provider/tc_resumption_tokens.rb
|
77
|
+
- test/provider/tc_simple_provider.rb
|
78
|
+
- test/provider/test_helper.rb
|
32
79
|
- lib/oai
|
33
80
|
- lib/oai.rb
|
34
81
|
- lib/test.rb
|
82
|
+
- lib/oai/client
|
35
83
|
- lib/oai/client.rb
|
84
|
+
- lib/oai/constants.rb
|
36
85
|
- lib/oai/exception.rb
|
37
|
-
- lib/oai/
|
38
|
-
- lib/oai/
|
39
|
-
- lib/oai/
|
40
|
-
- lib/oai/
|
41
|
-
- lib/oai/list_metadata_formats.rb
|
42
|
-
- lib/oai/list_records.rb
|
43
|
-
- lib/oai/list_sets.rb
|
44
|
-
- lib/oai/metadata_format.rb
|
45
|
-
- lib/oai/record.rb
|
46
|
-
- lib/oai/response.rb
|
86
|
+
- lib/oai/harvester
|
87
|
+
- lib/oai/harvester.rb
|
88
|
+
- lib/oai/provider
|
89
|
+
- lib/oai/provider.rb
|
47
90
|
- lib/oai/set.rb
|
48
91
|
- lib/oai/xpath.rb
|
49
|
-
-
|
50
|
-
-
|
51
|
-
-
|
52
|
-
-
|
53
|
-
-
|
54
|
-
-
|
55
|
-
-
|
56
|
-
-
|
57
|
-
-
|
58
|
-
-
|
92
|
+
- lib/oai/client/get_record.rb
|
93
|
+
- lib/oai/client/header.rb
|
94
|
+
- lib/oai/client/identify.rb
|
95
|
+
- lib/oai/client/list_identifiers.rb
|
96
|
+
- lib/oai/client/list_metadata_formats.rb
|
97
|
+
- lib/oai/client/list_records.rb
|
98
|
+
- lib/oai/client/list_sets.rb
|
99
|
+
- lib/oai/client/metadata_format.rb
|
100
|
+
- lib/oai/client/record.rb
|
101
|
+
- lib/oai/client/response.rb
|
102
|
+
- lib/oai/harvester/config.rb
|
103
|
+
- lib/oai/harvester/harvest.rb
|
104
|
+
- lib/oai/harvester/logging.rb
|
105
|
+
- lib/oai/harvester/mailer.rb
|
106
|
+
- lib/oai/harvester/shell.rb
|
107
|
+
- lib/oai/provider/extensions
|
108
|
+
- lib/oai/provider/metadata_format
|
109
|
+
- lib/oai/provider/metadata_format.rb
|
110
|
+
- lib/oai/provider/model
|
111
|
+
- lib/oai/provider/model.rb
|
112
|
+
- lib/oai/provider/partial_result.rb
|
113
|
+
- lib/oai/provider/response
|
114
|
+
- lib/oai/provider/response.rb
|
115
|
+
- lib/oai/provider/resumption_token.rb
|
116
|
+
- lib/oai/provider/metadata_format/oai_dc.rb
|
117
|
+
- lib/oai/provider/model/activerecord_caching_wrapper.rb
|
118
|
+
- lib/oai/provider/model/activerecord_wrapper.rb
|
119
|
+
- lib/oai/provider/response/error.rb
|
120
|
+
- lib/oai/provider/response/get_record.rb
|
121
|
+
- lib/oai/provider/response/identify.rb
|
122
|
+
- lib/oai/provider/response/list_identifiers.rb
|
123
|
+
- lib/oai/provider/response/list_metadata_formats.rb
|
124
|
+
- lib/oai/provider/response/list_records.rb
|
125
|
+
- lib/oai/provider/response/list_sets.rb
|
126
|
+
- lib/oai/provider/response/record_response.rb
|
127
|
+
- examples/models/file_model.rb
|
128
|
+
- examples/providers/dublin_core.rb
|
59
129
|
test_files: []
|
60
130
|
|
61
131
|
rdoc_options: []
|
62
132
|
|
63
133
|
extra_rdoc_files: []
|
64
134
|
|
65
|
-
executables:
|
66
|
-
|
135
|
+
executables:
|
136
|
+
- oai
|
67
137
|
extensions: []
|
68
138
|
|
69
139
|
requirements: []
|
70
140
|
|
71
|
-
dependencies:
|
72
|
-
|
141
|
+
dependencies:
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: activesupport
|
144
|
+
version_requirement:
|
145
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
146
|
+
requirements:
|
147
|
+
- - ">="
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: 1.3.1
|
150
|
+
version:
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: chronic
|
153
|
+
version_requirement:
|
154
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: 0.0.3
|
159
|
+
version:
|
160
|
+
- !ruby/object:Gem::Dependency
|
161
|
+
name: builder
|
162
|
+
version_requirement:
|
163
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: 2.0.0
|
168
|
+
version:
|