enju_loc 0.1.0.pre2 → 0.1.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/loc_search_controller.rb +1 -1
- data/app/models/loc_search.rb +13 -15
- data/lib/enju_loc/engine.rb +1 -0
- data/lib/enju_loc/loc_search.rb +1 -1
- data/lib/enju_loc/version.rb +1 -1
- data/spec/cassette_library/LocSearch/_ModsRecord/should_parse_MODS_metadata.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_create_a_valid_manifestation.yml +12 -12
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_create_lcsh_subjects_only.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_create_multiple_series_statements.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_distinguish_title_information_with_subject.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_a_manifestation_that_has_invalid_classification.yml +20 -17
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_another_serial.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_audio_book.yml +38 -34
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_e-resource.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_e-resource_packaged_.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_notated_music.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_note_fields.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_publication_year.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_serial.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_import_video_publication.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_parse_title_information_properly.yml +16 -14
- data/spec/cassette_library/LocSearch/_import_from_sru_response/should_support_name_and_title_subjects.yml +16 -14
- data/spec/cassette_library/LocSearch/_search/should_return_a_search_result.yml +16 -14
- data/spec/cassette_library/LocSearchController/GET_index/should_get_index.yml +16 -14
- data/spec/cassette_library/LocSearchController/GET_index/should_get_index_with_page_parameter.yml +16 -14
- data/spec/cassette_library/LocSearchController/POST_create/should_create_a_bibliographic_record_if_lccn_is_set.yml +16 -14
- data/spec/cassette_library/LocSearchController/POST_create/should_not_create_a_bibliographic_record_if_lccn_is_not_set.yml +18 -20
- data/spec/dummy/config/boot.rb +2 -2
- data/spec/dummy/db/migrate/133_create_agent_merges.rb +15 -0
- data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +13 -0
- data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +1 -1
- data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +5 -0
- data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +9 -0
- data/spec/dummy/db/schema.rb +22 -3
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/fixtures/agent_types.yml +6 -25
- data/spec/models/loc_search_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -1
- metadata +37 -31
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -1528
- data/spec/dummy/log/test.log +0 -54815
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad30cc6720622987403d9a1fa651d5ef300b33bf
|
4
|
+
data.tar.gz: 89ff96361a63d8501792ce07083619941fbc6582
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6f3baeff7a8b82f8c7d2cd552b39f1bf42a64e8378a5759984ae3becfd9f1744a8e29cbff89438848caeab60dfac1fb1be4c53424518588022542c0274c27e1
|
7
|
+
data.tar.gz: 62b0e0829caab8c2658e3c33ac88834cffbfa8d813fb74526bca1be9c4f4bf136b0b87a4c1b7665b45fb6daef61a1774cee9caee715ebb091b9ee09b6bb761e3
|
data/app/models/loc_search.rb
CHANGED
@@ -35,7 +35,7 @@ class LocSearch
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
def publisher
|
38
|
-
|
38
|
+
@node.xpath( './/mods:publisher', MODS_NS ).map do |e|
|
39
39
|
e.content
|
40
40
|
end.join( ", " )
|
41
41
|
end
|
@@ -47,7 +47,7 @@ class LocSearch
|
|
47
47
|
class DCRecord < LocSearch
|
48
48
|
DC_NS = { "dc" => "http://purl.org/dc/elements/1.1/" }
|
49
49
|
def title
|
50
|
-
|
50
|
+
@node.xpath( './/dc:title', DC_NS ).first.content
|
51
51
|
end
|
52
52
|
def lccn
|
53
53
|
@node.xpath( './/dc:identifier[@type="lccn"]', DC_NS ).first.content
|
@@ -64,7 +64,7 @@ class LocSearch
|
|
64
64
|
options[ :startRecord ] = ( page - 1 ) * 10 + 1
|
65
65
|
options.delete :page
|
66
66
|
end
|
67
|
-
options = { :maximumRecords => 10, :recordSchema => :mods }.merge(
|
67
|
+
options = { :maximumRecords => 10, :recordSchema => :mods }.merge(options)
|
68
68
|
options = options.merge( { :query => query, :version => "1.1", :operation => "searchRetrieve" } )
|
69
69
|
params = options.map do |k, v|
|
70
70
|
"#{ URI.escape( k.to_s ) }=#{ URI.escape( v.to_s ) }"
|
@@ -74,27 +74,25 @@ class LocSearch
|
|
74
74
|
|
75
75
|
def self.search( query, options = {} )
|
76
76
|
if query and not query.empty?
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
doc = Nokogiri::XML( open(url) )
|
81
|
-
items = doc.search( '//zs:record' ).map{|e| ModsRecord.new e }
|
77
|
+
url = make_sru_request_uri(query, options)
|
78
|
+
doc = Nokogiri::XML(Faraday.get(url).body)
|
79
|
+
items = doc.search('//zs:record').map{|e| ModsRecord.new e }
|
82
80
|
@results = { :items => items,
|
83
|
-
:total_entries => doc.xpath(
|
81
|
+
:total_entries => doc.xpath('//zs:numberOfRecords').first.try(:content).to_i }
|
84
82
|
else
|
85
83
|
{ :items => [], :total_entries => 0 }
|
86
84
|
end
|
87
85
|
end
|
88
86
|
|
89
|
-
def self.import_from_sru_response(
|
90
|
-
identifier = Identifier.where(:
|
87
|
+
def self.import_from_sru_response(lccn)
|
88
|
+
identifier = Identifier.where(body: lccn, identifier_type_id: IdentifierType.where(name: 'lccn').first_or_create.id).first
|
91
89
|
return if identifier
|
92
|
-
url = make_sru_request_uri(
|
93
|
-
response = Nokogiri::XML(
|
94
|
-
return unless response.try(
|
90
|
+
url = make_sru_request_uri("bath.lccn=#{ lccn }")
|
91
|
+
response = Nokogiri::XML(Faraday.get(url).body).at( '//zs:recordData', {"zs" => "http://www.loc.gov/zing/srw/"} )
|
92
|
+
return unless response.try(:content)
|
95
93
|
doc = Nokogiri::XML::Document.new
|
96
94
|
doc << response.at( "//mods:mods", { "mods" => "http://www.loc.gov/mods/v3" } )
|
97
|
-
Manifestation.import_record_from_loc(
|
95
|
+
Manifestation.import_record_from_loc(doc)
|
98
96
|
end
|
99
97
|
end
|
100
98
|
|
data/lib/enju_loc/engine.rb
CHANGED
data/lib/enju_loc/loc_search.rb
CHANGED
data/lib/enju_loc/version.rb
CHANGED
@@ -2,31 +2,33 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&
|
5
|
+
uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&operation=searchRetrieve&query=bath.lccn=2007012024&recordSchema=mods&version=1.1
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
|
-
|
11
|
-
-
|
12
|
-
|
13
|
-
-
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
14
16
|
response:
|
15
17
|
status:
|
16
18
|
code: 200
|
17
19
|
message: OK
|
18
20
|
headers:
|
19
|
-
|
21
|
+
Content-Length:
|
20
22
|
- '6909'
|
21
|
-
|
23
|
+
Server:
|
22
24
|
- Metaproxy/1.5.3
|
23
|
-
|
25
|
+
Connection:
|
24
26
|
- Keep-Alive
|
25
|
-
|
27
|
+
Content-Type:
|
26
28
|
- text/xml
|
27
29
|
body:
|
28
|
-
encoding:
|
29
|
-
string:
|
30
|
+
encoding: UTF-8
|
31
|
+
string: "<?xml version=\"1.0\"?>\n<zs:searchRetrieveResponse xmlns:zs=\"http://www.loc.gov/zing/srw/\"><zs:version>1.1</zs:version><zs:numberOfRecords>1</zs:numberOfRecords><zs:records><zs:record><zs:recordSchema>mods</zs:recordSchema><zs:recordPacking>xml</zs:recordPacking><zs:recordData><mods
|
30
32
|
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.loc.gov/mods/v3\"
|
31
33
|
version=\"3.4\" xsi:schemaLocation=\"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd\">\n
|
32
34
|
\ <titleInfo>\n <title>Everything is miscellaneous</title>\n <subTitle>the
|
@@ -106,6 +108,6 @@ http_interactions:
|
|
106
108
|
encoding=\"iso8601\">20071005142314.0</recordChangeDate>\n <recordIdentifier>14780655</recordIdentifier>\n
|
107
109
|
\ <recordOrigin>Converted from MARCXML to MODS version 3.4 using MARC21slim2MODS3-4.xsl\n\t\t\t\t(Revision
|
108
110
|
1.94 2014/02/21)</recordOrigin>\n </recordInfo>\n</mods></zs:recordData><zs:recordPosition>1</zs:recordPosition></zs:record></zs:records></zs:searchRetrieveResponse>\n"
|
109
|
-
http_version:
|
110
|
-
recorded_at:
|
111
|
-
recorded_with: VCR 2.9.
|
111
|
+
http_version:
|
112
|
+
recorded_at: Thu, 02 Oct 2014 12:13:16 GMT
|
113
|
+
recorded_with: VCR 2.9.3
|
@@ -2,29 +2,29 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&
|
5
|
+
uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&operation=searchRetrieve&query=bath.lccn=2007012024&recordSchema=mods&version=1.1
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
|
-
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Accept-Encoding:
|
11
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
-
|
14
|
+
Accept:
|
13
15
|
- "*/*"
|
14
|
-
user-agent:
|
15
|
-
- Ruby
|
16
16
|
response:
|
17
17
|
status:
|
18
18
|
code: 200
|
19
19
|
message: OK
|
20
20
|
headers:
|
21
|
-
|
21
|
+
Content-Length:
|
22
22
|
- '6909'
|
23
|
-
|
23
|
+
Server:
|
24
24
|
- Metaproxy/1.5.3
|
25
|
-
|
25
|
+
Connection:
|
26
26
|
- Keep-Alive
|
27
|
-
|
27
|
+
Content-Type:
|
28
28
|
- text/xml
|
29
29
|
body:
|
30
30
|
encoding: UTF-8
|
@@ -108,6 +108,6 @@ http_interactions:
|
|
108
108
|
encoding=\"iso8601\">20071005142314.0</recordChangeDate>\n <recordIdentifier>14780655</recordIdentifier>\n
|
109
109
|
\ <recordOrigin>Converted from MARCXML to MODS version 3.4 using MARC21slim2MODS3-4.xsl\n\t\t\t\t(Revision
|
110
110
|
1.94 2014/02/21)</recordOrigin>\n </recordInfo>\n</mods></zs:recordData><zs:recordPosition>1</zs:recordPosition></zs:record></zs:records></zs:searchRetrieveResponse>\n"
|
111
|
-
http_version:
|
112
|
-
recorded_at:
|
113
|
-
recorded_with: VCR 2.9.
|
111
|
+
http_version:
|
112
|
+
recorded_at: Thu, 02 Oct 2014 12:12:55 GMT
|
113
|
+
recorded_with: VCR 2.9.3
|
data/spec/cassette_library/LocSearch/_import_from_sru_response/should_create_lcsh_subjects_only.yml
CHANGED
@@ -2,31 +2,33 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&
|
5
|
+
uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&operation=searchRetrieve&query=bath.lccn=2011281911&recordSchema=mods&version=1.1
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
|
-
|
11
|
-
-
|
12
|
-
|
13
|
-
-
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
14
16
|
response:
|
15
17
|
status:
|
16
18
|
code: 200
|
17
19
|
message: OK
|
18
20
|
headers:
|
19
|
-
|
21
|
+
Content-Length:
|
20
22
|
- '3199'
|
21
|
-
|
23
|
+
Server:
|
22
24
|
- Metaproxy/1.5.3
|
23
|
-
|
25
|
+
Connection:
|
24
26
|
- Keep-Alive
|
25
|
-
|
27
|
+
Content-Type:
|
26
28
|
- text/xml
|
27
29
|
body:
|
28
|
-
encoding:
|
29
|
-
string:
|
30
|
+
encoding: UTF-8
|
31
|
+
string: "<?xml version=\"1.0\"?>\n<zs:searchRetrieveResponse xmlns:zs=\"http://www.loc.gov/zing/srw/\"><zs:version>1.1</zs:version><zs:numberOfRecords>1</zs:numberOfRecords><zs:records><zs:record><zs:recordSchema>mods</zs:recordSchema><zs:recordPacking>xml</zs:recordPacking><zs:recordData><mods
|
30
32
|
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.loc.gov/mods/v3\"
|
31
33
|
version=\"3.4\" xsi:schemaLocation=\"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd\">\n
|
32
34
|
\ <titleInfo>\n <nonSort>The </nonSort>\n <title>RSpec book</title>\n
|
@@ -61,6 +63,6 @@ http_interactions:
|
|
61
63
|
\ <recordIdentifier>16781422</recordIdentifier>\n <recordOrigin>Converted
|
62
64
|
from MARCXML to MODS version 3.4 using MARC21slim2MODS3-4.xsl\n\t\t\t\t(Revision
|
63
65
|
1.94 2014/02/21)</recordOrigin>\n </recordInfo>\n</mods></zs:recordData><zs:recordPosition>1</zs:recordPosition></zs:record></zs:records></zs:searchRetrieveResponse>\n"
|
64
|
-
http_version:
|
65
|
-
recorded_at:
|
66
|
-
recorded_with: VCR 2.9.
|
66
|
+
http_version:
|
67
|
+
recorded_at: Thu, 02 Oct 2014 12:13:00 GMT
|
68
|
+
recorded_with: VCR 2.9.3
|
@@ -2,31 +2,33 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&
|
5
|
+
uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&operation=searchRetrieve&query=bath.lccn=2012471967&recordSchema=mods&version=1.1
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
|
-
|
11
|
-
-
|
12
|
-
|
13
|
-
-
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
14
16
|
response:
|
15
17
|
status:
|
16
18
|
code: 200
|
17
19
|
message: OK
|
18
20
|
headers:
|
19
|
-
|
21
|
+
Content-Length:
|
20
22
|
- '3440'
|
21
|
-
|
23
|
+
Server:
|
22
24
|
- Metaproxy/1.5.3
|
23
|
-
|
25
|
+
Connection:
|
24
26
|
- Keep-Alive
|
25
|
-
|
27
|
+
Content-Type:
|
26
28
|
- text/xml
|
27
29
|
body:
|
28
|
-
encoding:
|
29
|
-
string:
|
30
|
+
encoding: UTF-8
|
31
|
+
string: "<?xml version=\"1.0\"?>\n<zs:searchRetrieveResponse xmlns:zs=\"http://www.loc.gov/zing/srw/\"><zs:version>1.1</zs:version><zs:numberOfRecords>1</zs:numberOfRecords><zs:records><zs:record><zs:recordSchema>mods</zs:recordSchema><zs:recordPacking>xml</zs:recordPacking><zs:recordData><mods
|
30
32
|
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.loc.gov/mods/v3\"
|
31
33
|
version=\"3.4\" xsi:schemaLocation=\"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd\">\n
|
32
34
|
\ <titleInfo>\n <nonSort>The </nonSort>\n <title>Rails view</title>\n
|
@@ -64,6 +66,6 @@ http_interactions:
|
|
64
66
|
encoding=\"iso8601\">20121102161644.0</recordChangeDate>\n <recordIdentifier>17516814</recordIdentifier>\n
|
65
67
|
\ <recordOrigin>Converted from MARCXML to MODS version 3.4 using MARC21slim2MODS3-4.xsl\n\t\t\t\t(Revision
|
66
68
|
1.94 2014/02/21)</recordOrigin>\n </recordInfo>\n</mods></zs:recordData><zs:recordPosition>1</zs:recordPosition></zs:record></zs:records></zs:searchRetrieveResponse>\n"
|
67
|
-
http_version:
|
68
|
-
recorded_at:
|
69
|
-
recorded_with: VCR 2.9.
|
69
|
+
http_version:
|
70
|
+
recorded_at: Thu, 02 Oct 2014 12:12:59 GMT
|
71
|
+
recorded_with: VCR 2.9.3
|
@@ -2,31 +2,33 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&
|
5
|
+
uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&operation=searchRetrieve&query=bath.lccn=2008273186&recordSchema=mods&version=1.1
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
|
-
|
11
|
-
-
|
12
|
-
|
13
|
-
-
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
14
16
|
response:
|
15
17
|
status:
|
16
18
|
code: 200
|
17
19
|
message: OK
|
18
20
|
headers:
|
19
|
-
|
21
|
+
Content-Length:
|
20
22
|
- '3417'
|
21
|
-
|
23
|
+
Server:
|
22
24
|
- Metaproxy/1.5.3
|
23
|
-
|
25
|
+
Connection:
|
24
26
|
- Keep-Alive
|
25
|
-
|
27
|
+
Content-Type:
|
26
28
|
- text/xml
|
27
29
|
body:
|
28
|
-
encoding:
|
29
|
-
string:
|
30
|
+
encoding: UTF-8
|
31
|
+
string: "<?xml version=\"1.0\"?>\n<zs:searchRetrieveResponse xmlns:zs=\"http://www.loc.gov/zing/srw/\"><zs:version>1.1</zs:version><zs:numberOfRecords>1</zs:numberOfRecords><zs:records><zs:record><zs:recordSchema>mods</zs:recordSchema><zs:recordPacking>xml</zs:recordPacking><zs:recordData><mods
|
30
32
|
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.loc.gov/mods/v3\"
|
31
33
|
version=\"3.4\" xsi:schemaLocation=\"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd\">\n
|
32
34
|
\ <titleInfo>\n <title>Flexible Rails</title>\n <subTitle>Flex 3 on
|
@@ -62,6 +64,6 @@ http_interactions:
|
|
62
64
|
encoding=\"iso8601\">20090811090147.0</recordChangeDate>\n <recordIdentifier>15262217</recordIdentifier>\n
|
63
65
|
\ <recordOrigin>Converted from MARCXML to MODS version 3.4 using MARC21slim2MODS3-4.xsl\n\t\t\t\t(Revision
|
64
66
|
1.94 2014/02/21)</recordOrigin>\n </recordInfo>\n</mods></zs:recordData><zs:recordPosition>1</zs:recordPosition></zs:record></zs:records></zs:searchRetrieveResponse>\n"
|
65
|
-
http_version:
|
66
|
-
recorded_at:
|
67
|
-
recorded_with: VCR 2.9.
|
67
|
+
http_version:
|
68
|
+
recorded_at: Thu, 02 Oct 2014 12:12:57 GMT
|
69
|
+
recorded_with: VCR 2.9.3
|
@@ -2,31 +2,33 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&
|
5
|
+
uri: http://lx2.loc.gov:210/LCDB?maximumRecords=10&operation=searchRetrieve&query=bath.lccn=2014381788&recordSchema=mods&version=1.1
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
|
-
|
11
|
-
-
|
12
|
-
|
13
|
-
-
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
14
16
|
response:
|
15
17
|
status:
|
16
18
|
code: 200
|
17
19
|
message: OK
|
18
20
|
headers:
|
19
|
-
|
20
|
-
- '
|
21
|
-
|
21
|
+
Content-Length:
|
22
|
+
- '4430'
|
23
|
+
Server:
|
22
24
|
- Metaproxy/1.5.3
|
23
|
-
|
25
|
+
Connection:
|
24
26
|
- Keep-Alive
|
25
|
-
|
27
|
+
Content-Type:
|
26
28
|
- text/xml
|
27
29
|
body:
|
28
|
-
encoding:
|
29
|
-
string:
|
30
|
+
encoding: UTF-8
|
31
|
+
string: "<?xml version=\"1.0\"?>\n<zs:searchRetrieveResponse xmlns:zs=\"http://www.loc.gov/zing/srw/\"><zs:version>1.1</zs:version><zs:numberOfRecords>1</zs:numberOfRecords><zs:records><zs:record><zs:recordSchema>mods</zs:recordSchema><zs:recordPacking>xml</zs:recordPacking><zs:recordData><mods
|
30
32
|
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.loc.gov/mods/v3\"
|
31
33
|
version=\"3.4\" xsi:schemaLocation=\"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd\">\n
|
32
34
|
\ <titleInfo>\n <title>Harry Potter and the sorcerer's stone</title>\n
|
@@ -49,7 +51,8 @@ http_interactions:
|
|
49
51
|
\ <note type=\"statement of responsibility\" altRepGroup=\"00\">by J.K. Rowling
|
50
52
|
; illustrations by Mary GrandPré.</note>\n <note>\"Year 1\"--Spine.</note>\n
|
51
53
|
\ <note>Sequel: Harry Potter and the Chamber of Secrets.</note>\n <subject
|
52
|
-
authority=\"lcsh\">\n <
|
54
|
+
authority=\"lcsh\">\n <name type=\"personal\">\n <namePart type=\"termsOfAddress\">(Fictitious
|
55
|
+
character)</namePart>\n <namePart>Potter, Harry</namePart>\n </name>\n
|
53
56
|
\ <genre>Juvenile fiction</genre>\n </subject>\n <subject authority=\"lcsh\">\n
|
54
57
|
\ <topic>Granger, Hermione (Fictitious character)</topic>\n <genre>Juvenile
|
55
58
|
fiction</genre>\n </subject>\n <subject authority=\"lcsh\">\n <topic>Weasley,
|
@@ -73,9 +76,9 @@ http_interactions:
|
|
73
76
|
type=\"lccn\">2014381788</identifier>\n <recordInfo>\n <descriptionStandard>aacr</descriptionStandard>\n
|
74
77
|
\ <recordContentSource authority=\"marcorg\">DLC</recordContentSource>\n
|
75
78
|
\ <recordCreationDate encoding=\"marc\">140603</recordCreationDate>\n <recordChangeDate
|
76
|
-
encoding=\"iso8601\">
|
79
|
+
encoding=\"iso8601\">20140905142912.0</recordChangeDate>\n <recordIdentifier>18174426</recordIdentifier>\n
|
77
80
|
\ <recordOrigin>Converted from MARCXML to MODS version 3.4 using MARC21slim2MODS3-4.xsl\n\t\t\t\t(Revision
|
78
81
|
1.94 2014/02/21)</recordOrigin>\n </recordInfo>\n</mods></zs:recordData><zs:recordPosition>1</zs:recordPosition></zs:record></zs:records></zs:searchRetrieveResponse>\n"
|
79
|
-
http_version:
|
80
|
-
recorded_at:
|
81
|
-
recorded_with: VCR 2.9.
|
82
|
+
http_version:
|
83
|
+
recorded_at: Thu, 02 Oct 2014 12:13:09 GMT
|
84
|
+
recorded_with: VCR 2.9.3
|