cul_scv_hydra 0.22.7 → 0.22.8

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: fee4c2f931371cbd1957daca914793b419d4d878
4
- data.tar.gz: 9ee170c5764a6c01ec50efffd499569c3d344bed
3
+ metadata.gz: 1a9bdfdcfcd9c0166e9c60bebf41c051f4e5673c
4
+ data.tar.gz: 7b6f4090d51a484def9bc6700f8bdde0a7433593
5
5
  SHA512:
6
- metadata.gz: e225c9555c17775be784def42a334e76b33aebe30b2181d6cb10318d2dd40b9515bee46c732d0f8f40f247e557779ba93b010db5cdd5f3da6b0d1e85c0308a8c
7
- data.tar.gz: 6927ae1cfd3b4d79e50db49e20e16cab6543156189ac81214ec3bd1137b02f8a91cc20fab3ae6752fe944e1c880fd6ebb62f261966ac4602537f862bba53edee
6
+ metadata.gz: fbc7b110d30b0a2ec1111e0c587e20bfa39aaf560503e86d8caa8fddea91649c61362ac501290ff09d3c7e9eaa3c3828891640dff701e9522ab119a5d6da4722
7
+ data.tar.gz: 198d4a6f45211f98a944bd42383d5832a5d3de4dcbddc4ae423fec27f390a5389d799d9ce821701a1224f1101774a1d66e256faf044e57619c73a80af066bd99
@@ -1,11 +1,14 @@
1
1
  <?xml version='1.0' encoding='UTF-8'?>
2
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
- <url access="object in context" usage="primary display">http://somewhere.cul.columbia.edu/something/123</url>
3
+ <location>
4
+ <physicalLocation authority='marcorg'>NNC-RB</physicalLocation>
5
+ <physicalLocation>Rare Book and Manuscript Library, Columbia University</physicalLocation>
6
+ <shelfLocator>(Box no.
7
+ 057)</shelfLocator>
8
+ <sublocation>exampleSublocation</sublocation>
9
+ <url access="object in context" usage="primary display">http://item-in-context.cul.columbia.edu/something/123</url>
10
+ <url>http://another-location.cul.columbia.edu/zzz/yyy</url>
11
+ <url>http://great-url.cul.columbia.edu/ooo</url>
9
12
  </location>
10
13
  <relatedItem displayLabel="Project" type="host">
11
14
  <titleInfo>
@@ -51,7 +51,7 @@ module ClassMethods
51
51
  unique_pids = get_direct_member_results(pid,verbose_output,'json')
52
52
  unique_pids.map{|result| result['pid'].gsub('info:fedora/', '') }.uniq
53
53
  end
54
-
54
+
55
55
  def get_direct_member_count(pid, verbose_output=false)
56
56
  count = get_direct_member_results(pid,verbose_output,'count/json')
57
57
  return count.blank? ? 0 : count[0]['count'].to_i
@@ -244,6 +244,14 @@ module Cul::Hydra::Solrizer
244
244
  item_in_context_url_val
245
245
  end
246
246
 
247
+ def non_item_in_context_url(node=mods)
248
+ non_item_in_context_url_val = []
249
+ node.xpath("./mods:location/mods:url[not(@access='object in context')]", MODS_NS).collect do |n|
250
+ non_item_in_context_url_val << ModsFieldable.normalize(n.text, true)
251
+ end
252
+ non_item_in_context_url_val
253
+ end
254
+
247
255
  def project_url(node=mods)
248
256
  project_url_val = []
249
257
  node.xpath("./mods:relatedItem[@type='host' and @displayLabel='Project']/mods:location/mods:url", MODS_NS).collect do |n|
@@ -337,6 +345,7 @@ module Cul::Hydra::Solrizer
337
345
  solr_doc["lib_date_notes_ssm"] = date_notes
338
346
  solr_doc["lib_non_date_notes_ssm"] = non_date_notes
339
347
  solr_doc["lib_item_in_context_url_ssm"] = item_in_context_url
348
+ solr_doc["lib_non_item_in_context_url_ssm"] = non_item_in_context_url
340
349
  solr_doc["lib_project_url_ssm"] = project_url
341
350
  solr_doc["origin_info_place_ssm"] = origin_info_place
342
351
  solr_doc["origin_info_place_for_display_ssm"] = origin_info_place_for_display
@@ -1,6 +1,6 @@
1
1
  module Cul
2
2
  module Hydra
3
- VERSION = '0.22.7'
3
+ VERSION = '0.22.8'
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 = '0.22.6'
3
+ VERSION = '0.22.7'
4
4
  def self.version
5
5
  VERSION
6
6
  end
data/lib/tasks/index.rake CHANGED
@@ -24,7 +24,7 @@ namespace :cul_scv_hydra do
24
24
  pids_to_omit = nil
25
25
  end
26
26
 
27
- skip_generic_resources = true if ENV['skip_generic_resources'] == 'true'
27
+ skip_generic_resources = (ENV['skip_generic_resources'] == 'true')
28
28
 
29
29
  begin
30
30
  pids.each do |pid|
@@ -52,6 +52,8 @@ namespace :cul_scv_hydra do
52
52
  next
53
53
  end
54
54
 
55
+ skip_generic_resources = (ENV['skip_generic_resources'] == 'true')
56
+
55
57
  start_time = Time.now
56
58
  pids = Cul::Scv::Hydra::RisearchMembers.get_project_constituent_pids(project_pid, true)
57
59
  total = pids.length
@@ -59,7 +61,7 @@ namespace :cul_scv_hydra do
59
61
  counter = 0
60
62
 
61
63
  pids.each do |pid|
62
- Cul::Hydra::Indexer.index_pid(pid, false, false)
64
+ Cul::Hydra::Indexer.index_pid(pid, skip_generic_resources, false)
63
65
  counter += 1
64
66
  puts "Indexed #{counter} of #{total} | #{Time.now - start_time} seconds"
65
67
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cul_scv_hydra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.7
4
+ version: 0.22.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Armintor