cul_hydra 1.3.6 → 1.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe4ba4c680dcea9404bfb212289593a966f4873b
4
- data.tar.gz: 53d811bfe46285cf98dcd523fa39bf521ec3027d
3
+ metadata.gz: 57b046842e517c4452af5cb21a6359c4aefdff88
4
+ data.tar.gz: 5b6122776131139c34d7ff6e6da266c9a8314f6d
5
5
  SHA512:
6
- metadata.gz: 5b3caee8ee92f083491a732e5952e23b9813c397af27a59cd8697d3a9640e0487fb58c51e4dee523f687e18bc65736462d823e04394daa085e08e85502d081a8
7
- data.tar.gz: c8538f0b7b3babff13a71823970255249091e41d2d881f9a7e879de20e44c5ddca981be18f6e6ff49420a399cc9d1a35ebc07c1ab950fd2f7711677ddc09e62e
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=>[:textable, :displayable])
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
  }
@@ -4,5 +4,6 @@
4
4
  <note type="banana">Banana note</note>
5
5
  <note type="date">Date note</note>
6
6
  <note type="date source">Date source note</note>
7
+ <note type="filename">filename_to_be_excluded.tif</note>
7
8
  <note type="view direction">WEST</note>
8
9
  </mods>
@@ -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
@@ -1,6 +1,6 @@
1
1
  module Cul
2
2
  module Hydra
3
- VERSION = '1.3.6'
3
+ VERSION = '1.3.7'
4
4
  def self.version
5
5
  VERSION
6
6
  end
@@ -1,6 +1,6 @@
1
1
  module Cul
2
2
  module Hydra
3
- VERSION = '1.3.5'
3
+ VERSION = '1.3.6'
4
4
  def self.version
5
5
  VERSION
6
6
  end
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.6
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-10 00:00:00.000000000 Z
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