cul_hydra 1.3.6 → 1.3.7
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.
- checksums.yaml +4 -4
- data/app/models/cul/hydra/datastreams/mods_document.rb +1 -1
- data/fixtures/spec/CUL_MODS/mods-notes.xml +1 -0
- data/fixtures/spec/CUL_MODS/mods-physical-location-with-dual-location-shelflocator.xml +14 -0
- data/lib/cul_hydra/solrizer/mods_fieldable.rb +8 -4
- data/lib/cul_hydra/version.rb +1 -1
- data/lib/cul_hydra/version.rb~ +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57b046842e517c4452af5cb21a6359c4aefdff88
|
4
|
+
data.tar.gz: 5b6122776131139c34d7ff6e6da266c9a8314f6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30cf1096c6208e8ef81eab273ab22e536c46a6c0d6eea7826af4198bb36237bd257c235ee27428af4c4795ccb2dfafd02a1e972ce73511f49898c8f6e05a035f
|
7
|
+
data.tar.gz: 36711e7bd294a79840f28d4b9b8305484b8b4b42431d845f995f51ca5136be305ee5e696c511b311c50fb4eb60f5fc8aa32a862e80077158220688464486252a
|
@@ -89,7 +89,7 @@ class ModsDocument < ::ActiveFedora::OmDatastream
|
|
89
89
|
t.lib_repo(:path=>"physicalLocation",
|
90
90
|
:attributes=>{:authority=>"marcorg"},
|
91
91
|
:index_as=>[:textable])
|
92
|
-
t.shelf_locator(:path=>"shelfLocator", :index_as=>[:
|
92
|
+
t.shelf_locator(:path=>"shelfLocator", :index_as=>[:displayable])
|
93
93
|
t.sublocation(:path=>"sublocation", :index_as=>[:textable, :displayable])
|
94
94
|
t.url
|
95
95
|
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
2
|
+
<mods xmlns='http://www.loc.gov/mods/v3' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd' version='3.4'>
|
3
|
+
<location><physicalLocation authority='marcorg'>NNC-RB</physicalLocation>
|
4
|
+
<physicalLocation>Rare Book and Manuscript Library, Columbia University</physicalLocation>
|
5
|
+
<shelfLocator>(Box no.
|
6
|
+
057)</shelfLocator>
|
7
|
+
<sublocation>exampleSublocation</sublocation>
|
8
|
+
<holdingSimple>
|
9
|
+
<copyInformation>
|
10
|
+
<shelfLocator>Folder no. 5</shelfLocator>
|
11
|
+
</copyInformation>
|
12
|
+
</holdingSimple>
|
13
|
+
</location>
|
14
|
+
</mods>
|
@@ -190,9 +190,13 @@ module Cul::Hydra::Solrizer
|
|
190
190
|
end
|
191
191
|
|
192
192
|
def shelf_locators(node=mods)
|
193
|
-
node.xpath("./mods:location/mods:shelfLocator", MODS_NS).collect do |n|
|
193
|
+
values = node.xpath("./mods:location/mods:shelfLocator", MODS_NS).collect do |n|
|
194
194
|
ModsFieldable.normalize(n.text, true)
|
195
195
|
end
|
196
|
+
values += node.xpath("./mods:location/mods:holdingSimple/mods:copyInformation/mods:shelfLocator", MODS_NS).collect do |n|
|
197
|
+
ModsFieldable.normalize(n.text, true)
|
198
|
+
end
|
199
|
+
values
|
196
200
|
end
|
197
201
|
|
198
202
|
def textual_dates(node=mods)
|
@@ -250,14 +254,12 @@ module Cul::Hydra::Solrizer
|
|
250
254
|
|
251
255
|
def non_date_notes(node=mods)
|
252
256
|
non_date_notes = []
|
253
|
-
node.xpath("./mods:note[not(@type) or (@type != 'date' and @type != 'date source')]", MODS_NS).collect do |n|
|
257
|
+
node.xpath("./mods:note[not(@type) or (@type != 'date' and @type != 'date source' and @type != 'filename')]", MODS_NS).collect do |n|
|
254
258
|
if n.attr('type') == 'view direction'
|
255
259
|
non_date_notes << 'View Direction: ' + ModsFieldable.normalize(n.text, true)
|
256
260
|
else
|
257
261
|
non_date_notes << ModsFieldable.normalize(n.text, true)
|
258
262
|
end
|
259
|
-
|
260
|
-
|
261
263
|
end
|
262
264
|
return non_date_notes
|
263
265
|
end
|
@@ -376,6 +378,8 @@ module Cul::Hydra::Solrizer
|
|
376
378
|
solr_doc["lib_recipient_sim"] = names(:marcrelator, 'rcp')
|
377
379
|
solr_doc["lib_format_sim"] = formats
|
378
380
|
solr_doc["lib_shelf_sim"] = shelf_locators
|
381
|
+
solr_doc['location_shelf_locator_ssm'] = solr_doc["lib_shelf_sim"]
|
382
|
+
solr_doc["all_text_teim"] += solr_doc["lib_shelf_sim"]
|
379
383
|
solr_doc["lib_date_textual_ssm"] = textual_dates
|
380
384
|
solr_doc["lib_date_notes_ssm"] = date_notes
|
381
385
|
solr_doc["lib_non_date_notes_ssm"] = non_date_notes
|
data/lib/cul_hydra/version.rb
CHANGED
data/lib/cul_hydra/version.rb~
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cul_hydra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Armintor
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-02-
|
12
|
+
date: 2016-02-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: blacklight
|
@@ -459,6 +459,7 @@ files:
|
|
459
459
|
- fixtures/spec/CUL_MODS/mods-origin-info.xml
|
460
460
|
- fixtures/spec/CUL_MODS/mods-part.xml
|
461
461
|
- fixtures/spec/CUL_MODS/mods-physical-description.xml
|
462
|
+
- fixtures/spec/CUL_MODS/mods-physical-location-with-dual-location-shelflocator.xml
|
462
463
|
- fixtures/spec/CUL_MODS/mods-physical-location.xml
|
463
464
|
- fixtures/spec/CUL_MODS/mods-record-info.xml
|
464
465
|
- fixtures/spec/CUL_MODS/mods-relateditem-project.xml
|