cul_hydra 1.3.0 → 1.3.1
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/config/fedora.yml +17 -0
- data/config/solr.yml +8 -0
- data/config/subs.yml +17 -0
- data/lib/cul_hydra/risearch_members.rb +29 -1
- data/lib/cul_hydra/version.rb +1 -1
- data/lib/cul_hydra/version.rb~ +8 -0
- metadata +7 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb441c7e64dcc3476f297e2bf7c5ebbd3494a5fd
|
|
4
|
+
data.tar.gz: b6bf355a41cc5260d901966f5d3880b2a1815d55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e12877524d1616aaeb03a68cb9678b8fc7b7e8cc5094a242778cf453b565d51f8ec528e426b67bb7927f39e2945fb291d9a3fd1ceda83b982c957a3a5d3f29b9
|
|
7
|
+
data.tar.gz: 34a912f57ce193f0f2fd340d852cd3494e5546af38838865d0661d00eef15624d6c7ef6cf544e843df2d0f30538687b11e9d5a9909351696a902cb1b0cfac72e
|
data/config/fedora.yml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
development:
|
|
2
|
+
:user: fedoraAdmin
|
|
3
|
+
:password: fedoraAdmin
|
|
4
|
+
:url: http://localhost:8983/fedora-test
|
|
5
|
+
:time_zone: "America/New_York"
|
|
6
|
+
|
|
7
|
+
test:
|
|
8
|
+
:user: fedoraAdmin
|
|
9
|
+
:password: fedoraAdmin
|
|
10
|
+
:url: http://localhost:8983/fedora-test
|
|
11
|
+
:time_zone: "America/New_York"
|
|
12
|
+
|
|
13
|
+
production:
|
|
14
|
+
:user: fedoraAdmin
|
|
15
|
+
:password: f+BULUS*^
|
|
16
|
+
:url: http://alcott.cul.columbia.edu:8080/fedora
|
|
17
|
+
:time_zone: "America/New_York"
|
data/config/solr.yml
ADDED
data/config/subs.yml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
development:
|
|
2
|
+
djatoka_server: "http://iris.cul.columbia.edu:8080"
|
|
3
|
+
fedora_server: "http://sayers.cul.columbia.edu:8080"
|
|
4
|
+
php_server: "http://bach.cul.columbia.edu/dev"
|
|
5
|
+
test:
|
|
6
|
+
djatoka_server: "http://iris.cul.columbia.edu:8080"
|
|
7
|
+
fedora_server: "http://sayers.cul.columbia.edu:8080"
|
|
8
|
+
php_server: "http://bach.cul.columbia.edu/dev"
|
|
9
|
+
production:
|
|
10
|
+
djatoka_server: "http://iris.cul.columbia.edu:8080"
|
|
11
|
+
fedora_server: "http://alcott.cul.columbia.edu:8080"
|
|
12
|
+
php_server: "http://bach.cul.columbia.edu"
|
|
13
|
+
|
|
14
|
+
hyacinth_prod:
|
|
15
|
+
djatoka_server: "http://iris.cul.columbia.edu:8080"
|
|
16
|
+
fedora_server: "http://alcott.cul.columbia.edu:8080"
|
|
17
|
+
php_server: "http://bach.cul.columbia.edu"
|
|
@@ -120,8 +120,8 @@ module ClassMethods
|
|
|
120
120
|
return count.blank? ? 0 : count[0]['count'].to_i
|
|
121
121
|
end
|
|
122
122
|
|
|
123
|
+
# Returns the pid of the first object found with the given identifier
|
|
123
124
|
def get_pid_for_identifier(identifier)
|
|
124
|
-
|
|
125
125
|
find_by_identifier_query = "select $pid from <#ri>
|
|
126
126
|
where $pid <http://purl.org/dc/elements/1.1/identifier> $identifier
|
|
127
127
|
and $identifier <mulgara:is> '#{identifier}'"
|
|
@@ -138,7 +138,35 @@ module ClassMethods
|
|
|
138
138
|
else
|
|
139
139
|
return nil
|
|
140
140
|
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Returns the pids of ALL objects found with the given identifier
|
|
144
|
+
def get_all_pids_for_identifier(identifier)
|
|
145
|
+
|
|
146
|
+
find_by_identifier_query = "select $pid from <#ri>
|
|
147
|
+
where $pid <http://purl.org/dc/elements/1.1/identifier> $identifier
|
|
148
|
+
and $identifier <mulgara:is> '#{identifier}'"
|
|
149
|
+
|
|
150
|
+
search_response = JSON(Cul::Hydra::Fedora.repository.find_by_itql(find_by_identifier_query, {
|
|
151
|
+
:type => 'tuples',
|
|
152
|
+
:format => 'json',
|
|
153
|
+
:limit => '',
|
|
154
|
+
:stream => 'on'
|
|
155
|
+
}))
|
|
156
|
+
|
|
157
|
+
puts 'searching for: ' + identifier.inspect
|
|
158
|
+
puts 'with query: ' + find_by_identifier_query.inspect
|
|
159
|
+
puts 'search_response: ' + search_response.inspect
|
|
160
|
+
|
|
161
|
+
pids_to_return = []
|
|
162
|
+
|
|
163
|
+
if search_response['results'].present?
|
|
164
|
+
search_response['results'].each do |result|
|
|
165
|
+
pids_to_return << result['pid'].gsub('info:fedora/', '')
|
|
166
|
+
end
|
|
167
|
+
end
|
|
141
168
|
|
|
169
|
+
return pids_to_return
|
|
142
170
|
end
|
|
143
171
|
|
|
144
172
|
end
|
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.1
|
|
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: 2015-
|
|
12
|
+
date: 2015-12-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: blacklight
|
|
@@ -357,11 +357,14 @@ files:
|
|
|
357
357
|
- app/models/static_audio_aggregator.rb
|
|
358
358
|
- app/models/static_image_aggregator.rb
|
|
359
359
|
- bin/rails
|
|
360
|
+
- config/fedora.yml
|
|
360
361
|
- config/jetty.yml
|
|
361
362
|
- config/locales/ldpd_hydra.en.yml
|
|
362
363
|
- config/predicate_mappings.yml
|
|
364
|
+
- config/solr.yml
|
|
363
365
|
- config/solr_mappings.yml
|
|
364
366
|
- config/solr_value_maps.yml
|
|
367
|
+
- config/subs.yml
|
|
365
368
|
- fixtures/cmodels/ldpd_ADLMetadata.xml
|
|
366
369
|
- fixtures/cmodels/ldpd_AESMetadata.xml
|
|
367
370
|
- fixtures/cmodels/ldpd_BagAggregator.xml
|
|
@@ -490,6 +493,7 @@ files:
|
|
|
490
493
|
- lib/cul_hydra/solrizer/value_mapper.rb
|
|
491
494
|
- lib/cul_hydra/solrizer_patch.rb
|
|
492
495
|
- lib/cul_hydra/version.rb
|
|
496
|
+
- lib/cul_hydra/version.rb~
|
|
493
497
|
- lib/tasks/cmodel.rake
|
|
494
498
|
- lib/tasks/cul_hydra_dev.rake
|
|
495
499
|
- lib/tasks/index.rake
|
|
@@ -516,7 +520,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
516
520
|
version: '0'
|
|
517
521
|
requirements: []
|
|
518
522
|
rubyforge_project:
|
|
519
|
-
rubygems_version: 2.4.
|
|
523
|
+
rubygems_version: 2.4.3
|
|
520
524
|
signing_key:
|
|
521
525
|
specification_version: 4
|
|
522
526
|
summary: ActiveFedora, OM, and Solrizer implementations for CUL repository apps
|