berkeley_library-tind 0.4.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +16 -4
- data/.gitignore +3 -0
- data/.idea/inspectionProfiles/Project_Default.xml +10 -0
- data/.idea/tind.iml +24 -22
- data/CHANGES.md +24 -0
- data/README.md +136 -3
- data/berkeley_library-tind.gemspec +2 -0
- data/bin/alma-multiple-tind +50 -0
- data/bin/alma-single-tind +48 -0
- data/bin/save_tind_records +80 -0
- data/bin/tind-marc +73 -0
- data/lib/berkeley_library/tind/mapping/additional_datafield_process.rb +128 -0
- data/lib/berkeley_library/tind/mapping/alma.rb +42 -0
- data/lib/berkeley_library/tind/mapping/alma_base.rb +101 -0
- data/lib/berkeley_library/tind/mapping/alma_multiple_tind.rb +31 -0
- data/lib/berkeley_library/tind/mapping/alma_single_tind.rb +28 -0
- data/lib/berkeley_library/tind/mapping/config.rb +44 -0
- data/lib/berkeley_library/tind/mapping/csv_mapper.rb +35 -0
- data/lib/berkeley_library/tind/mapping/csv_multiple_mapper.rb +41 -0
- data/lib/berkeley_library/tind/mapping/data/one_to_multiple_mapping.csv +4 -0
- data/lib/berkeley_library/tind/mapping/data/one_to_one_mapping.csv +39 -0
- data/lib/berkeley_library/tind/mapping/external_tind_field.rb +103 -0
- data/lib/berkeley_library/tind/mapping/field_catalog.rb +146 -0
- data/lib/berkeley_library/tind/mapping/field_catalog_util.rb +59 -0
- data/lib/berkeley_library/tind/mapping/match_tind_field.rb +77 -0
- data/lib/berkeley_library/tind/mapping/misc.rb +69 -0
- data/lib/berkeley_library/tind/mapping/multiple_rule.rb +36 -0
- data/lib/berkeley_library/tind/mapping/single_rule.rb +143 -0
- data/lib/berkeley_library/tind/mapping/tind_control_subfield.rb +59 -0
- data/lib/berkeley_library/tind/mapping/tind_field.rb +49 -0
- data/lib/berkeley_library/tind/mapping/tind_field_from_leader.rb +27 -0
- data/lib/berkeley_library/tind/mapping/tind_field_from_multiple_map.rb +59 -0
- data/lib/berkeley_library/tind/mapping/tind_field_from_single_map.rb +170 -0
- data/lib/berkeley_library/tind/mapping/tind_field_util.rb +112 -0
- data/lib/berkeley_library/tind/mapping/tind_marc.rb +134 -0
- data/lib/berkeley_library/tind/mapping/tind_subfield_util.rb +154 -0
- data/lib/berkeley_library/tind/mapping/util.rb +117 -0
- data/lib/berkeley_library/tind/mapping.rb +1 -0
- data/lib/berkeley_library/tind/marc/xml_builder.rb +70 -0
- data/lib/berkeley_library/tind/marc/xml_reader.rb +22 -16
- data/lib/berkeley_library/tind/marc/xml_writer.rb +152 -0
- data/lib/berkeley_library/tind/module_info.rb +1 -1
- data/lib/berkeley_library/util/files.rb +38 -0
- data/spec/berkeley_library/tind/mapping/additional_datafield_process_spec.rb +35 -0
- data/spec/berkeley_library/tind/mapping/alma_base_spec.rb +115 -0
- data/spec/berkeley_library/tind/mapping/alma_multiple_tind_spec.rb +20 -0
- data/spec/berkeley_library/tind/mapping/alma_single_tind_spec.rb +87 -0
- data/spec/berkeley_library/tind/mapping/alma_spec.rb +28 -0
- data/spec/berkeley_library/tind/mapping/config_spec.rb +19 -0
- data/spec/berkeley_library/tind/mapping/csv_mapper_spec.rb +27 -0
- data/spec/berkeley_library/tind/mapping/csv_multiple_mapper_spec.rb +27 -0
- data/spec/berkeley_library/tind/mapping/external_tind_field_spec.rb +45 -0
- data/spec/berkeley_library/tind/mapping/field_catalog_spec.rb +78 -0
- data/spec/berkeley_library/tind/mapping/field_catalog_util_spec.rb +57 -0
- data/spec/berkeley_library/tind/mapping/match_tind_field_spec.rb +25 -0
- data/spec/berkeley_library/tind/mapping/misc_spec.rb +51 -0
- data/spec/berkeley_library/tind/mapping/multiple_rule_spec.rb +44 -0
- data/spec/berkeley_library/tind/mapping/single_rule_spec.rb +52 -0
- data/spec/berkeley_library/tind/mapping/tind_control_subfield_spec.rb +96 -0
- data/spec/berkeley_library/tind/mapping/tind_field_from_leader_spec.rb +21 -0
- data/spec/berkeley_library/tind/mapping/tind_field_from_multiple_map_spec.rb +31 -0
- data/spec/berkeley_library/tind/mapping/tind_field_from_single_map_spec.rb +150 -0
- data/spec/berkeley_library/tind/mapping/tind_field_spec.rb +60 -0
- data/spec/berkeley_library/tind/mapping/tind_field_util_spec.rb +68 -0
- data/spec/berkeley_library/tind/mapping/tind_marc_spec.rb +88 -0
- data/spec/berkeley_library/tind/mapping/tind_subfield_util_spec.rb +48 -0
- data/spec/berkeley_library/tind/mapping/util_spec.rb +56 -0
- data/spec/berkeley_library/tind/marc/xml_reader_spec.rb +22 -0
- data/spec/berkeley_library/tind/marc/xml_writer_spec.rb +218 -0
- data/spec/data/issue-4.xml +157 -0
- data/spec/data/mapping/991032333019706532-sru.xml +216 -0
- data/spec/data/mapping/one_to_multiple_mapping.csv +4 -0
- data/spec/data/mapping/one_to_one_mapping.csv +39 -0
- data/spec/data/mapping/record.xml +263 -0
- data/spec/data/mapping/record_not_qualified.xml +36 -0
- data/spec/data/new-records.xml +46 -0
- metadata +128 -2
@@ -0,0 +1,218 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'equivalent-xml'
|
3
|
+
|
4
|
+
module BerkeleyLibrary
|
5
|
+
module TIND
|
6
|
+
module MARC
|
7
|
+
describe XMLWriter do
|
8
|
+
let(:input_path) { 'spec/data/new-records.xml' }
|
9
|
+
attr_reader :record
|
10
|
+
|
11
|
+
before(:each) do
|
12
|
+
reader = XMLReader.new(input_path)
|
13
|
+
@record = reader.first
|
14
|
+
end
|
15
|
+
|
16
|
+
describe :open do
|
17
|
+
|
18
|
+
it 'writes a MARC record to a file as XML' do
|
19
|
+
Dir.mktmpdir(File.basename(__FILE__, '.rb')) do |dir|
|
20
|
+
output_path = File.join(dir, 'marc.xml')
|
21
|
+
XMLWriter.open(output_path) { |w| w.write(record) }
|
22
|
+
|
23
|
+
expected = File.open(input_path) { |f| Nokogiri::XML(f) }
|
24
|
+
actual = File.open(output_path) { |f| Nokogiri::XML(f) }
|
25
|
+
|
26
|
+
aggregate_failures do
|
27
|
+
EquivalentXml.equivalent?(expected, actual) do |n1, n2, result|
|
28
|
+
expect(n2.to_s).to eq(n1.to_s) unless result
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'writes a MARC record to a StringIO' do
|
35
|
+
out = StringIO.new
|
36
|
+
XMLWriter.open(out) { |w| w.write(record) }
|
37
|
+
expected = File.open(input_path) { |f| Nokogiri::XML(f) }
|
38
|
+
actual = Nokogiri::XML(out.string)
|
39
|
+
aggregate_failures do
|
40
|
+
EquivalentXml.equivalent?(expected, actual) do |n1, n2, result|
|
41
|
+
expect(n2.to_s).to eq(n1.to_s) unless result
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'accepts Nokogiri options' do
|
47
|
+
Dir.mktmpdir(File.basename(__FILE__, '.rb')) do |dir|
|
48
|
+
expected_path = File.join(dir, 'expected.xml')
|
49
|
+
XMLWriter.open(expected_path) { |w| w.write(record) }
|
50
|
+
|
51
|
+
actual_path = File.join(dir, 'actual.xml')
|
52
|
+
XMLWriter.open(actual_path, indent_text: "\t") { |w| w.write(record) }
|
53
|
+
|
54
|
+
expected = File.read(expected_path).gsub(%r{ (?= *<)(?!/)}, "\t")
|
55
|
+
actual = File.read(actual_path)
|
56
|
+
expect(actual).to eq(expected)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'accepts an explicit UTF-8 argument' do
|
61
|
+
Dir.mktmpdir(File.basename(__FILE__, '.rb')) do |dir|
|
62
|
+
output_path = File.join(dir, 'marc.xml')
|
63
|
+
XMLWriter.open(output_path, encoding: 'UTF-8') { |w| w.write(record) }
|
64
|
+
|
65
|
+
expected = File.open(input_path) { |f| Nokogiri::XML(f) }
|
66
|
+
actual = File.open(output_path) { |f| Nokogiri::XML(f) }
|
67
|
+
|
68
|
+
aggregate_failures do
|
69
|
+
EquivalentXml.equivalent?(expected, actual) do |n1, n2, result|
|
70
|
+
expect(n2.to_s).to eq(n1.to_s) unless result
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'only writes UTF-8' do
|
77
|
+
Dir.mktmpdir(File.basename(__FILE__, '.rb')) do |dir|
|
78
|
+
output_path = File.join(dir, 'marc.xml')
|
79
|
+
expect { XMLWriter.open(output_path, encoding: 'UTF-16') }.to raise_error(ArgumentError)
|
80
|
+
expect(File.exist?(output_path)).to eq(false)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
it 'rejects an invalid file path' do
|
85
|
+
bad_directory = Dir.mktmpdir(File.basename(__FILE__, '.rb')) { |dir| dir }
|
86
|
+
expect(File.directory?(bad_directory)).to eq(false)
|
87
|
+
output_path = File.join(bad_directory, 'marc.xml')
|
88
|
+
expect { XMLWriter.open(output_path) }.to raise_error(ArgumentError)
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'rejects a non-IO, non-String argument' do
|
92
|
+
invalid_target = Object.new
|
93
|
+
expect { XMLWriter.open(invalid_target) }.to raise_error(ArgumentError)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
describe :close do
|
98
|
+
it 'closes without writing the closing tag if nothing has been written' do
|
99
|
+
Dir.mktmpdir(File.basename(__FILE__, '.rb')) do |dir|
|
100
|
+
output_path = File.join(dir, 'marc.xml')
|
101
|
+
w = XMLWriter.new(output_path)
|
102
|
+
w.close
|
103
|
+
|
104
|
+
stat = File.stat(output_path)
|
105
|
+
expect(stat.size).to eq(0)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
it 'writes the closing tag if the opening tag has been written' do
|
110
|
+
Dir.mktmpdir(File.basename(__FILE__, '.rb')) do |dir|
|
111
|
+
output_path = File.join(dir, 'marc.xml')
|
112
|
+
XMLWriter.open(output_path)
|
113
|
+
expect(File.exist?(output_path)).to eq(true)
|
114
|
+
|
115
|
+
doc = File.open(output_path) { |f| Nokogiri::XML(f) }
|
116
|
+
expect(doc.root.name).to eq('collection')
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
describe :write do
|
122
|
+
it 'raises an IOError if the writer has already been closed' do
|
123
|
+
Dir.mktmpdir(File.basename(__FILE__, '.rb')) do |dir|
|
124
|
+
output_path = File.join(dir, 'marc.xml')
|
125
|
+
w = XMLWriter.new(output_path)
|
126
|
+
w.close
|
127
|
+
|
128
|
+
expect { w.write(record) }.to raise_error(IOError)
|
129
|
+
|
130
|
+
stat = File.stat(output_path)
|
131
|
+
expect(stat.size).to eq(0)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
it 'does not write a nil leader' do
|
136
|
+
record.leader = nil
|
137
|
+
marc_xml = StringIO.open do |out|
|
138
|
+
XMLWriter.open(out) { |w| w.write(record) }
|
139
|
+
out.string
|
140
|
+
end
|
141
|
+
expect(marc_xml).not_to include('leader')
|
142
|
+
end
|
143
|
+
|
144
|
+
it 'does not write a blank leader' do
|
145
|
+
record.leader = ''
|
146
|
+
marc_xml = StringIO.open do |out|
|
147
|
+
XMLWriter.open(out) { |w| w.write(record) }
|
148
|
+
out.string
|
149
|
+
end
|
150
|
+
expect(marc_xml).not_to include('leader')
|
151
|
+
end
|
152
|
+
|
153
|
+
describe 'issue #4' do
|
154
|
+
let(:record_expected) { ::MARC::XMLReader.new('spec/data/issue-4.xml').first }
|
155
|
+
let(:record_actual) do
|
156
|
+
marc_xml = StringIO.open do |out|
|
157
|
+
XMLWriter.open(out) { |w| w.write(record_expected) }
|
158
|
+
out.string
|
159
|
+
end
|
160
|
+
|
161
|
+
::MARC::XMLReader.new(StringIO.new(marc_xml)).first
|
162
|
+
end
|
163
|
+
|
164
|
+
it 'does not reorder fields' do
|
165
|
+
expected_tags = record_expected.fields.map(&:tag)
|
166
|
+
actual_tags = record_actual.fields.map(&:tag).reject { |t| t == '000' }
|
167
|
+
|
168
|
+
expect(actual_tags).to eq(expected_tags)
|
169
|
+
end
|
170
|
+
|
171
|
+
it 'supports FFT fields' do
|
172
|
+
df_expected = record_expected['FFT']
|
173
|
+
expect(df_expected).to be_a(::MARC::DataField) # just to be sure
|
174
|
+
|
175
|
+
df_actual = record_actual['FFT']
|
176
|
+
expect(df_actual).to be_a(::MARC::DataField)
|
177
|
+
%i[tag indicator1 indicator2].each do |attr|
|
178
|
+
v_actual = df_actual.send(attr)
|
179
|
+
v_expected = df_expected.send(attr)
|
180
|
+
expect(v_actual).to eq(v_expected)
|
181
|
+
end
|
182
|
+
|
183
|
+
df_expected.subfields.each_with_index do |sf_expected, i|
|
184
|
+
sf_actual = df_actual.subfields[i]
|
185
|
+
expect(sf_actual.code).to eq(sf_expected.code)
|
186
|
+
expect(sf_actual.value).to eq(sf_expected.value)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
it 'writes to a Tempfile object' do
|
192
|
+
Dir.mktmpdir(File.basename(__FILE__, '.rb')) do |dir|
|
193
|
+
out = Tempfile.new(File.join(dir, 'marc.xml'))
|
194
|
+
begin
|
195
|
+
# noinspection RubyMismatchedArgumentType
|
196
|
+
w = XMLWriter.new(out)
|
197
|
+
w.write(record)
|
198
|
+
w.close
|
199
|
+
|
200
|
+
expected = File.open(input_path) { |f| Nokogiri::XML(f) }
|
201
|
+
actual = File.open(out.path) { |f| Nokogiri::XML(f) }
|
202
|
+
ensure
|
203
|
+
out.close
|
204
|
+
out.unlink
|
205
|
+
end
|
206
|
+
|
207
|
+
aggregate_failures do
|
208
|
+
EquivalentXml.equivalent?(expected, actual) do |n1, n2, result|
|
209
|
+
expect(n2.to_s).to eq(n1.to_s) unless result
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
@@ -0,0 +1,157 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<collection xmlns="http://www.loc.gov/MARC21/slim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
|
3
|
+
<record>
|
4
|
+
<leader> Z 22 4500</leader>
|
5
|
+
<datafield tag="245" ind1=" " ind2=" ">
|
6
|
+
<subfield code="a">Caricatures of Paul Bunyan</subfield>
|
7
|
+
</datafield>
|
8
|
+
<datafield tag="260" ind1=" " ind2=" ">
|
9
|
+
<subfield code="c">19--.</subfield>
|
10
|
+
</datafield>
|
11
|
+
<datafield tag="300" ind1=" " ind2=" ">
|
12
|
+
<subfield code="b">color</subfield>
|
13
|
+
<subfield code="c">10 1/2 x 12 1/2 inches.</subfield>
|
14
|
+
<subfield code="a">16 caricatures</subfield>
|
15
|
+
</datafield>
|
16
|
+
<datafield tag="500" ind1=" " ind2=" ">
|
17
|
+
<subfield code="a">Title supplied by cataloger.</subfield>
|
18
|
+
</datafield>
|
19
|
+
<datafield tag="500" ind1=" " ind2=" ">
|
20
|
+
<subfield code="a">Published or produced by the Mead Sales Company. Identified artists include Hutton, S.W. Wilcox, and Henry C. Pitz.</subfield>
|
21
|
+
</datafield>
|
22
|
+
<datafield tag="650" ind1=" " ind2=" ">
|
23
|
+
<subfield code="a">Bunyan, Paul (Legendary character) Pictorial works. </subfield>
|
24
|
+
</datafield>
|
25
|
+
<datafield tag="655" ind1=" " ind2=" ">
|
26
|
+
<subfield code="2">gmgpc</subfield>
|
27
|
+
<subfield code="a">Caricatures Color. </subfield>
|
28
|
+
</datafield>
|
29
|
+
<datafield tag="700" ind1="1" ind2=" ">
|
30
|
+
<subfield code="a">Pitz, Henry C. 1895-1976. (Henry Clarence),</subfield>
|
31
|
+
</datafield>
|
32
|
+
<datafield tag="710" ind1="2" ind2=" ">
|
33
|
+
<subfield code="a">Mead Sales Company.</subfield>
|
34
|
+
</datafield>
|
35
|
+
<datafield tag="903" ind1=" " ind2=" ">
|
36
|
+
<subfield code="b">c</subfield>
|
37
|
+
</datafield>
|
38
|
+
<datafield tag="041" ind1=" " ind2=" ">
|
39
|
+
<subfield code="a">eng</subfield>
|
40
|
+
</datafield>
|
41
|
+
<datafield tag="902" ind1=" " ind2=" ">
|
42
|
+
<subfield code="d">2022-03-23</subfield>
|
43
|
+
</datafield>
|
44
|
+
<datafield tag="336" ind1=" " ind2=" ">
|
45
|
+
<subfield code="a">Image</subfield>
|
46
|
+
</datafield>
|
47
|
+
<datafield tag="852" ind1=" " ind2=" ">
|
48
|
+
<subfield code="c">Bioscience, Natural Resources & Public Health Library</subfield>
|
49
|
+
</datafield>
|
50
|
+
<datafield tag="980" ind1=" " ind2=" ">
|
51
|
+
<subfield code="a">Forestry</subfield>
|
52
|
+
</datafield>
|
53
|
+
<datafield tag="982" ind1=" " ind2=" ">
|
54
|
+
<subfield code="a">Forestry</subfield>
|
55
|
+
<subfield code="b">Forestry</subfield>
|
56
|
+
</datafield>
|
57
|
+
<datafield tag="901" ind1=" " ind2=" ">
|
58
|
+
<subfield code="m">991065640639706532</subfield>
|
59
|
+
</datafield>
|
60
|
+
<datafield tag="856" ind1="4" ind2="1">
|
61
|
+
<subfield code="u">https://search.library.berkeley.edu/discovery/fulldisplay?context=L&vid=01UCS_BER:UCB&docid=alma991065640639706532</subfield>
|
62
|
+
<subfield code="y">View library catalog record.</subfield>
|
63
|
+
</datafield>
|
64
|
+
<datafield tag="998" ind1=" " ind2=" ">
|
65
|
+
<subfield code="a">fake-value</subfield>
|
66
|
+
</datafield>
|
67
|
+
<datafield tag="035" ind1=" " ind2=" ">
|
68
|
+
<subfield code="a">b142086125</subfield>
|
69
|
+
</datafield>
|
70
|
+
<datafield tag="FFT" ind1=" " ind2=" ">
|
71
|
+
<subfield code="d">001</subfield>
|
72
|
+
<subfield code="a">https://digitalassets.lib.berkeley.edu/forestry/ucb/images/b142086125_i180839998/b142086125_i180839998_001.jpg</subfield>
|
73
|
+
</datafield>
|
74
|
+
</record>
|
75
|
+
<record>
|
76
|
+
<leader> Z 22 4500</leader>
|
77
|
+
<datafield tag="245" ind1=" " ind2=" ">
|
78
|
+
<subfield code="a">Photographs from the University of California Forestry Club</subfield>
|
79
|
+
</datafield>
|
80
|
+
<datafield tag="260" ind1=" " ind2=" ">
|
81
|
+
<subfield code="c">1930-1939.</subfield>
|
82
|
+
</datafield>
|
83
|
+
<datafield tag="300" ind1=" " ind2=" ">
|
84
|
+
<subfield code="a">1 album (photographic prints)</subfield>
|
85
|
+
</datafield>
|
86
|
+
<datafield tag="500" ind1=" " ind2=" ">
|
87
|
+
<subfield code="a">Title supplied by cataloger.</subfield>
|
88
|
+
</datafield>
|
89
|
+
<datafield tag="500" ind1=" " ind2=" ">
|
90
|
+
<subfield code="a">Photographed and or compiled by the Forestry Club.</subfield>
|
91
|
+
</datafield>
|
92
|
+
<datafield tag="520" ind1=" " ind2=" ">
|
93
|
+
<subfield code="a">Album contains views of the University of California campus, Camp Califorest, and of the camp newspaper (Bull of the Woods).</subfield>
|
94
|
+
</datafield>
|
95
|
+
<datafield tag="610" ind1=" " ind2=" ">
|
96
|
+
<subfield code="a">University of California (1868-1952) Forestry Club Pictorial works. </subfield>
|
97
|
+
</datafield>
|
98
|
+
<datafield tag="610" ind1=" " ind2=" ">
|
99
|
+
<subfield code="a">University of California (1868-1952) Camp Califorest Pictorial works. </subfield>
|
100
|
+
</datafield>
|
101
|
+
<datafield tag="610" ind1=" " ind2=" ">
|
102
|
+
<subfield code="a">University of California (1868-1952) Pictorial works. </subfield>
|
103
|
+
</datafield>
|
104
|
+
<datafield tag="655" ind1=" " ind2=" ">
|
105
|
+
<subfield code="2">gmgpc</subfield>
|
106
|
+
<subfield code="a">Photographs.</subfield>
|
107
|
+
</datafield>
|
108
|
+
<datafield tag="710" ind1="2" ind2=" ">
|
109
|
+
<subfield code="a">University of California, Berkeley. Forestry students.</subfield>
|
110
|
+
</datafield>
|
111
|
+
<datafield tag="710" ind1="2" ind2=" ">
|
112
|
+
<subfield code="a">University of California (1868-1952) Forestry Club.</subfield>
|
113
|
+
</datafield>
|
114
|
+
<datafield tag="903" ind1=" " ind2=" ">
|
115
|
+
<subfield code="b">c</subfield>
|
116
|
+
</datafield>
|
117
|
+
<datafield tag="041" ind1=" " ind2=" ">
|
118
|
+
<subfield code="a">eng</subfield>
|
119
|
+
</datafield>
|
120
|
+
<datafield tag="269" ind1=" " ind2=" ">
|
121
|
+
<subfield code="a">1930</subfield>
|
122
|
+
</datafield>
|
123
|
+
<datafield tag="902" ind1=" " ind2=" ">
|
124
|
+
<subfield code="d">2022-03-23</subfield>
|
125
|
+
</datafield>
|
126
|
+
<datafield tag="336" ind1=" " ind2=" ">
|
127
|
+
<subfield code="a">Image</subfield>
|
128
|
+
</datafield>
|
129
|
+
<datafield tag="852" ind1=" " ind2=" ">
|
130
|
+
<subfield code="c">Bioscience, Natural Resources & Public Health Library</subfield>
|
131
|
+
</datafield>
|
132
|
+
<datafield tag="980" ind1=" " ind2=" ">
|
133
|
+
<subfield code="a">Forestry</subfield>
|
134
|
+
</datafield>
|
135
|
+
<datafield tag="982" ind1=" " ind2=" ">
|
136
|
+
<subfield code="a">Forestry</subfield>
|
137
|
+
<subfield code="b">Forestry</subfield>
|
138
|
+
</datafield>
|
139
|
+
<datafield tag="901" ind1=" " ind2=" ">
|
140
|
+
<subfield code="m">991065707389706532</subfield>
|
141
|
+
</datafield>
|
142
|
+
<datafield tag="856" ind1="4" ind2="1">
|
143
|
+
<subfield code="u">https://search.library.berkeley.edu/discovery/fulldisplay?context=L&vid=01UCS_BER:UCB&docid=alma991065707389706532</subfield>
|
144
|
+
<subfield code="y">View library catalog record.</subfield>
|
145
|
+
</datafield>
|
146
|
+
<datafield tag="998" ind1=" " ind2=" ">
|
147
|
+
<subfield code="a">fake-value</subfield>
|
148
|
+
</datafield>
|
149
|
+
<datafield tag="035" ind1=" " ind2=" ">
|
150
|
+
<subfield code="a">b142107827</subfield>
|
151
|
+
</datafield>
|
152
|
+
<datafield tag="FFT" ind1=" " ind2=" ">
|
153
|
+
<subfield code="d">002</subfield>
|
154
|
+
<subfield code="a">https://digitalassets.lib.berkeley.edu/forestry/ucb/images/b142086125_i180839998/b142086125_i180839998_002.jpg</subfield>
|
155
|
+
</datafield>
|
156
|
+
</record>
|
157
|
+
</collection>
|
@@ -0,0 +1,216 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?><searchRetrieveResponse xmlns="http://www.loc.gov/zing/srw/">
|
2
|
+
<version>1.2</version>
|
3
|
+
<numberOfRecords>1</numberOfRecords>
|
4
|
+
<records>
|
5
|
+
<record>
|
6
|
+
<recordSchema>marcxml</recordSchema>
|
7
|
+
<recordPacking>xml</recordPacking>
|
8
|
+
<recordData>
|
9
|
+
<record xmlns="http://www.loc.gov/MARC21/slim">
|
10
|
+
<leader>02731cam a2200421Ii 4500</leader>
|
11
|
+
<controlfield tag="001">991032333019706532</controlfield>
|
12
|
+
<controlfield tag="005">20211019014713.0</controlfield>
|
13
|
+
<controlfield tag="008">000110s1777 cc 000 0 chi d</controlfield>
|
14
|
+
<datafield ind1=" " ind2=" " tag="035">
|
15
|
+
<subfield code="a">(CUY)UCB-b109259853-01ucs_ber</subfield>
|
16
|
+
</datafield>
|
17
|
+
<datafield ind1=" " ind2=" " tag="035">
|
18
|
+
<subfield code="a">(OCoLC)43247971</subfield>
|
19
|
+
</datafield>
|
20
|
+
<datafield ind1=" " ind2=" " tag="035">
|
21
|
+
<subfield code="a">(OCoLC)ocm43247971</subfield>
|
22
|
+
</datafield>
|
23
|
+
<datafield ind1=" " ind2=" " tag="035">
|
24
|
+
<subfield code="a">(EXLNZ-01UCS_NETWORK)9913298571106531</subfield>
|
25
|
+
</datafield>
|
26
|
+
<datafield ind1=" " ind2=" " tag="040">
|
27
|
+
<subfield code="a">CUY</subfield>
|
28
|
+
<subfield code="b">eng</subfield>
|
29
|
+
<subfield code="e">cgcrb</subfield>
|
30
|
+
<subfield code="c">CUY</subfield>
|
31
|
+
<subfield code="d">OCLCQ</subfield>
|
32
|
+
<subfield code="d">OCLCF</subfield>
|
33
|
+
<subfield code="d">OCLCQ</subfield>
|
34
|
+
<subfield code="d">OCLCO</subfield>
|
35
|
+
<subfield code="d">OCLCQ</subfield>
|
36
|
+
</datafield>
|
37
|
+
<datafield ind1=" " ind2=" " tag="049">
|
38
|
+
<subfield code="a">CUYM</subfield>
|
39
|
+
</datafield>
|
40
|
+
<datafield ind1="1" ind2=" " tag="100">
|
41
|
+
<subfield code="6">880-01</subfield>
|
42
|
+
<subfield code="a">Yue, Ke,</subfield>
|
43
|
+
<subfield code="d">1183-1234,</subfield>
|
44
|
+
<subfield code="e">author</subfield>
|
45
|
+
</datafield>
|
46
|
+
<datafield ind1="1" ind2=" " tag="880">
|
47
|
+
<subfield code="6">100-01</subfield>
|
48
|
+
<subfield code="a">岳珂,</subfield>
|
49
|
+
<subfield code="d">1183-1234,</subfield>
|
50
|
+
<subfield code="e">author</subfield>
|
51
|
+
</datafield>
|
52
|
+
<datafield ind1="1" ind2="0" tag="245">
|
53
|
+
<subfield code="6">880-02</subfield>
|
54
|
+
<subfield code="a">Bao zhen zhai fa shu zan :</subfield>
|
55
|
+
<subfield code="b">28 juan /</subfield>
|
56
|
+
<subfield code="c">Yue Ke zhuan.</subfield>
|
57
|
+
</datafield>
|
58
|
+
<datafield ind1="1" ind2="0" tag="880">
|
59
|
+
<subfield code="6">245-02</subfield>
|
60
|
+
<subfield code="a">寶真齋法書贊 :</subfield>
|
61
|
+
<subfield code="b">二十八卷 /</subfield>
|
62
|
+
<subfield code="c">岳珂撰.</subfield>
|
63
|
+
</datafield>
|
64
|
+
<datafield ind1=" " ind2=" " tag="250">
|
65
|
+
<subfield code="6">880-03</subfield>
|
66
|
+
<subfield code="a">Wu ying dian ju zhen ban.</subfield>
|
67
|
+
</datafield>
|
68
|
+
<datafield ind1=" " ind2=" " tag="880">
|
69
|
+
<subfield code="6">250-03</subfield>
|
70
|
+
<subfield code="a">武英殿聚珍版.</subfield>
|
71
|
+
</datafield>
|
72
|
+
<datafield ind1=" " ind2="1" tag="264">
|
73
|
+
<subfield code="6">880-04</subfield>
|
74
|
+
<subfield code="a">[Fujian :</subfield>
|
75
|
+
<subfield code="b">Fujian bu zheng si,</subfield>
|
76
|
+
<subfield code="c">Qing qian long 42 nian [1777]</subfield>
|
77
|
+
</datafield>
|
78
|
+
<datafield ind1=" " ind2="1" tag="880">
|
79
|
+
<subfield code="6">264-04</subfield>
|
80
|
+
<subfield code="a">[福建 :</subfield>
|
81
|
+
<subfield code="b">福建佈政司,</subfield>
|
82
|
+
<subfield code="c">清乾隆42年[1777]</subfield>
|
83
|
+
</datafield>
|
84
|
+
<datafield ind1=" " ind2=" " tag="300">
|
85
|
+
<subfield code="a">8 volumes (double leaves) in case ;</subfield>
|
86
|
+
<subfield code="c">23 cm</subfield>
|
87
|
+
</datafield>
|
88
|
+
<datafield ind1=" " ind2=" " tag="336">
|
89
|
+
<subfield code="a">text</subfield>
|
90
|
+
<subfield code="b">txt</subfield>
|
91
|
+
<subfield code="2">rdacontent</subfield>
|
92
|
+
</datafield>
|
93
|
+
<datafield ind1=" " ind2=" " tag="337">
|
94
|
+
<subfield code="a">unmediated</subfield>
|
95
|
+
<subfield code="b">n</subfield>
|
96
|
+
<subfield code="2">rdamedia</subfield>
|
97
|
+
</datafield>
|
98
|
+
<datafield ind1=" " ind2=" " tag="338">
|
99
|
+
<subfield code="a">volume</subfield>
|
100
|
+
<subfield code="b">nc</subfield>
|
101
|
+
<subfield code="2">rdacarrier</subfield>
|
102
|
+
</datafield>
|
103
|
+
<datafield ind1=" " ind2=" " tag="500">
|
104
|
+
<subfield code="6">880-05</subfield>
|
105
|
+
<subfield code="a">Engraved (early 19th cent.?) from Wu ying dian ju zhen ban ed.</subfield>
|
106
|
+
</datafield>
|
107
|
+
<datafield ind1=" " ind2=" " tag="880">
|
108
|
+
<subfield code="6">500-05</subfield>
|
109
|
+
<subfield code="a">Engraved (early 19th cent.?) from 武英殿聚珍版 ed.</subfield>
|
110
|
+
</datafield>
|
111
|
+
<datafield ind1=" " ind2="0" tag="650">
|
112
|
+
<subfield code="6">880-06</subfield>
|
113
|
+
<subfield code="a">Calligraphy, Chinese.</subfield>
|
114
|
+
</datafield>
|
115
|
+
<datafield ind1=" " ind2="7" tag="880">
|
116
|
+
<subfield code="6">650-06</subfield>
|
117
|
+
<subfield code="a">子部</subfield>
|
118
|
+
<subfield code="x">藝術類</subfield>
|
119
|
+
<subfield code="x">書畫之属</subfield>
|
120
|
+
<subfield code="2">sk</subfield>
|
121
|
+
</datafield>
|
122
|
+
<datafield ind1=" " ind2="7" tag="650">
|
123
|
+
<subfield code="a">Calligraphy, Chinese.</subfield>
|
124
|
+
<subfield code="2">fast</subfield>
|
125
|
+
<subfield code="0">(OCoLC)fst00844390</subfield>
|
126
|
+
</datafield>
|
127
|
+
<datafield ind1="0" ind2="8" tag="776">
|
128
|
+
<subfield code="i">Online version:</subfield>
|
129
|
+
<subfield code="t">Bao zhen zhai fa shu zan.</subfield>
|
130
|
+
<subfield code="b">Wu ying dian ju zhen ban.</subfield>
|
131
|
+
<subfield code="d">[China : s.n., between 1774 and 1912]]</subfield>
|
132
|
+
<subfield code="w">(OCoLC)698022544</subfield>
|
133
|
+
</datafield>
|
134
|
+
<datafield ind1=" " ind2=" " tag="880">
|
135
|
+
<subfield code="6">500-00</subfield>
|
136
|
+
<subfield code="a">"玄","弘"字缺末笔(卷八葉八飯,葉九正; 卷七葉十二反),"琰","顒"字不避諱(卷七頁葉二十四正, 卷二十首葉反, 卷十葉十三反)</subfield>
|
137
|
+
</datafield>
|
138
|
+
<datafield ind1=" " ind2=" " tag="880">
|
139
|
+
<subfield code="6">500-00</subfield>
|
140
|
+
<subfield code="a">半葉框19.5x12.6 公分,9行21字小字雙行字數同,四周雙邊, 白口, 單黑魚尾,版心上鐫書名中鐫卷序及頁碼下鐫校者姓名.目录下鐫"武英殿聚珍版"</subfield>
|
141
|
+
</datafield>
|
142
|
+
<datafield ind1=" " ind2=" " tag="880">
|
143
|
+
<subfield code="6">500-00</subfield>
|
144
|
+
<subfield code="a">首有乾隆甲午仲夏 [1774]“御製題武英殿聚珍版十韻 有序”.</subfield>
|
145
|
+
</datafield>
|
146
|
+
<datafield ind1=" " ind2=" " tag="880">
|
147
|
+
<subfield code="6">500-00</subfield>
|
148
|
+
<subfield code="a">是書特征與杨之峰作"《武英殿聚珍版丛书》零种的鉴定"一文中關於福建本的描述相符合, 出版年据马月华作"略论福建本'外聚珍'"中“福建省“ 外聚珍” 五次印本目录总表”.</subfield>
|
149
|
+
</datafield>
|
150
|
+
<datafield ind1=" " ind2=" " tag="880">
|
151
|
+
<subfield code="6">561-00</subfield>
|
152
|
+
<subfield code="a">本書各冊封面有手題書名及卷序以及"陶孝邈瀏覽一次",首冊另有手題“戊辰仲春山農為紫藤舘主人題面”並鈐有“山子”朱文方印. 第八冊扉頁手題“此書為娛圍生舊藏貽其甥趙蘭士題簽者為孫子杉農瀏覽者為陶子紫畛 庚午熾暑無聊題卷画”. 鈐印:“今関天彭之印”</subfield>
|
153
|
+
<subfield code="5">CU-EAST</subfield>
|
154
|
+
</datafield>
|
155
|
+
<datafield ind1=" " ind2="4" tag="880">
|
156
|
+
<subfield code="6">510-00</subfield>
|
157
|
+
<subfield code="a">图书馆学刊,</subfield>
|
158
|
+
<subfield code="c">2009(01) : 89-91.</subfield>
|
159
|
+
</datafield>
|
160
|
+
<datafield ind1=" " ind2="4" tag="880">
|
161
|
+
<subfield code="6">510-00</subfield>
|
162
|
+
<subfield code="a">中国典籍与文化,</subfield>
|
163
|
+
<subfield code="c">2010(02): 73-85.</subfield>
|
164
|
+
</datafield>
|
165
|
+
<datafield ind1=" " ind2=" " tag="955">
|
166
|
+
<subfield code="a">eaek</subfield>
|
167
|
+
<subfield code="9">local</subfield>
|
168
|
+
</datafield>
|
169
|
+
<datafield ind1=" " ind2=" " tag="955">
|
170
|
+
<subfield code="a">20211019</subfield>
|
171
|
+
<subfield code="b">eahl</subfield>
|
172
|
+
<subfield code="9">local</subfield>
|
173
|
+
</datafield>
|
174
|
+
<datafield ind1=" " ind2=" " tag="955">
|
175
|
+
<subfield code="a">eaek</subfield>
|
176
|
+
<subfield code="9">local</subfield>
|
177
|
+
</datafield>
|
178
|
+
<datafield ind1=" " ind2=" " tag="996">
|
179
|
+
<subfield code="e">GLADN117908085</subfield>
|
180
|
+
<subfield code="9">local</subfield>
|
181
|
+
</datafield>
|
182
|
+
<datafield ind1=" " ind2=" " tag="996">
|
183
|
+
<subfield code="a">b109259853</subfield>
|
184
|
+
<subfield code="b">Updated: 12-21-20</subfield>
|
185
|
+
<subfield code="c">Created: 03-16-09</subfield>
|
186
|
+
<subfield code="d">CatDate: 08-25-11</subfield>
|
187
|
+
<subfield code="9">local</subfield>
|
188
|
+
</datafield>
|
189
|
+
<datafield ind1=" " ind2=" " tag="AVA">
|
190
|
+
<subfield code="0">991032333019706532</subfield>
|
191
|
+
<subfield code="8">22670862550006532</subfield>
|
192
|
+
<subfield code="a">01UCS_BER</subfield>
|
193
|
+
<subfield code="b">NRLF</subfield>
|
194
|
+
<subfield code="c">NRLF (UCB)</subfield>
|
195
|
+
<subfield code="d">6138.7712</subfield>
|
196
|
+
<subfield code="e">available</subfield>
|
197
|
+
<subfield code="f">1</subfield>
|
198
|
+
<subfield code="g">0</subfield>
|
199
|
+
<subfield code="i">UCB_Campus</subfield>
|
200
|
+
<subfield code="j">nbea</subfield>
|
201
|
+
<subfield code="k">0</subfield>
|
202
|
+
<subfield code="p">1</subfield>
|
203
|
+
<subfield code="q">Northern Regional Library Facility</subfield>
|
204
|
+
<subfield code="t">v. 1-8</subfield>
|
205
|
+
</datafield>
|
206
|
+
</record>
|
207
|
+
</recordData>
|
208
|
+
<recordIdentifier>991032333019706532</recordIdentifier>
|
209
|
+
<recordPosition>1</recordPosition>
|
210
|
+
</record>
|
211
|
+
</records>
|
212
|
+
<extraResponseData xmlns:xb="http://www.exlibris.com/repository/search/xmlbeans/">
|
213
|
+
<xb:exact>true</xb:exact>
|
214
|
+
<xb:responseDate>2022-04-04T10:17:17-0700</xb:responseDate>
|
215
|
+
</extraResponseData>
|
216
|
+
</searchRetrieveResponse>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
tag_origin,tag_destination,subfield_single_from,subfield_single_to,subfield_combined_from_1,subfield_combined_to_1,symbol_1 ,subfield_combined_from_2,subfield_combined_to_2,symbol_2,subfield_combined_from_3,subfield_combined_to_3,symbol_3,New_indecator,Position_from,Position_to,Map_if_no_this_tag_existed,Map_if_no_this_tag_subfield_existed, Keep_one_if_multiple_available
|
2
|
+
100,700,"6,e","6,e","a,b,c,d,q",a,,,,,,,,"1,_",,,,,
|
3
|
+
110,710,"6,e","6,e","a,b",a,,,,,,,,"2,_",,,,,
|
4
|
+
111,711,6,6,"a,c,d,e,f,n,p,t",a,,,,,,,,"_,_",,,,,
|
5
|
+
242,246,6,6,"a,b,p,n",a,,,,,,,,,,,,,
|
6
|
+
245,245,"6,a","6,a","n,p",p,,,,,"b,f,k",b,,"_,_",,,,,
|
7
|
+
246,246,6,6,"a,b,p,n",a,,,,,,,,"_,_",,,,,
|
8
|
+
250,250,"6,a","6,a",,,,,,,,,,"_,_",,,,,
|
9
|
+
255,255,"6,a,b,c","6,a,b,c",,,,,,,,,,"_,_",,,,,
|
10
|
+
260,260,"6,a,b,c","6,a,b,c",,,,,,,,,,"_,_",,,,,
|
11
|
+
264,260,"6,a,b,c","6,a,b,c",,,,,,,,,,"_,_",,,260,,1
|
12
|
+
300,300,"6,b,c","6,b,c","3,a",a,,,,,,,,"_,_",,,,,
|
13
|
+
351,505,6,6,"a,b",a,,,,,,,,"_,_",,,,,
|
14
|
+
490,490,6,6,"a,v",a,,,,,,,,"_,_",,,,,
|
15
|
+
500,500,"6,a","6,a",,,,,,,,,,"_,_",,,,,
|
16
|
+
502,502,6,6,"a,b,c,d,g,o",a,,,,,,,,"_,_",,,,,
|
17
|
+
505,505,6,6,"a,g,r,t",a,,,,,,,,"_,_",,,,,
|
18
|
+
507,255,"6,a","6,a",,,,,,,,,,"_,_",,,,255__a,
|
19
|
+
520,520,"6,a","6,a",,,,,,,,,,"_,_",,,,,
|
20
|
+
522,522,"6,a","6,a",,,,,,,,,,"_,_",,,,,
|
21
|
+
524,524,"6,a","6,a",,,,,,,,,,"_,_",,,,,
|
22
|
+
536,536,"6,a","6,a",,,,,,,,,,"_,_",,,,,
|
23
|
+
541,541,6,6,"c,a,d",a,,,,,,,,"_,_",,,,,
|
24
|
+
545,545,"6,a","6,a",,,,,,,,,,"_,_",,,,,
|
25
|
+
546,546,"6,a","6,a",,,,,,,,,,"_,_",,,,,
|
26
|
+
600,600,6,6,"a,b,c,d,f,j,k,l,m,n,o,p,q,r,s,t",a,,"x,y,z,v",a,a--a,,,,"_,_",,,,,
|
27
|
+
610,610,6,6,"a,b,c,d,f,j,k,l,m,n,o,p,q,r,s,t",a,,"x,y,z,v",a,a--a,,,,"_,_",,,,,
|
28
|
+
611,611,6,6,"a,b,c,d,f,j,k,l,m,n,o,p,q,r,s,t",a,,"x,y,z,v",a,a--a,,,,"_,_",,,,,
|
29
|
+
630,630,6,6,"a,b,c,d,f,j,k,l,m,n,o,p,q,r,s,t",a,,"x,y,z,v",a,a--a,,,,"_,_",,,,,
|
30
|
+
650,650,6,6,"a,b,c",a,,"x,y,z,v",a,a--a,,,,"_,_",,,,,
|
31
|
+
651,651,6,6,a,a,,"x,y,z,v",a,a--a,,,,"_,_",,,,,
|
32
|
+
655,655,"6,2","6,2",a,a,,"x,y,z,v",a,a--a,,,,"_,_",,,,,
|
33
|
+
700,700,"6,e","6,e","a,b,c,d,q",a,,,,,,,,"1,_",,,,,
|
34
|
+
710,710,"6,e","6,e","a,b",a,,,,,,,,"2,_",,,,,
|
35
|
+
711,711,6,6,"a,c,d,e,f,n,p,t",a,,,,,,,,"_,_",,,,,
|
36
|
+
720,700,"6,a,e","6,a,e",,,,,,,,,,"1,_",,,,,
|
37
|
+
752,651,6,6,,,,"a,b,c,d,f,g",a,a--a,,,,"_,_",,,,,
|
38
|
+
773,773,"6,t,j,k,o","6,t,j,k,o",,,,,,,,,,"_,_",,,,,
|
39
|
+
907,901,"6,a","6,m",,,,,,,,,,"_,_",,,,,
|