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 +4 -4
- data/fixtures/spec/CUL_MODS/mods-top-level-location-vs-relateditem-location.xml +9 -6
- data/lib/cul_hydra/risearch_members.rb +1 -1
- data/lib/cul_hydra/solrizer/mods_fieldable.rb +9 -0
- data/lib/cul_hydra/version.rb +1 -1
- data/lib/cul_hydra/version.rb~ +1 -1
- data/lib/tasks/index.rake +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a9bdfdcfcd9c0166e9c60bebf41c051f4e5673c
|
4
|
+
data.tar.gz: 7b6f4090d51a484def9bc6700f8bdde0a7433593
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
4
|
-
<physicalLocation>
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
<
|
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
|
data/lib/cul_hydra/version.rb
CHANGED
data/lib/cul_hydra/version.rb~
CHANGED
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 =
|
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,
|
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
|