cul_hydra 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cul_hydra/risearch_members.rb +32 -0
- 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: f781b50741ba5033e8befb86f7c1258250016592
|
4
|
+
data.tar.gz: d3d5888a4e3c74576d238bba68fa68773c699cc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5197dbc0e00ce674ee31892589c6e40bc23063ad4ad46cb49a674bbdd0b8a4e87c822290f44d19ca92885aa2585b91c8ed34a321a7e4734022c8a25205c613ce
|
7
|
+
data.tar.gz: c535c795331b38e79d1b1e87a2ae0ceb151e1fcbaf4943bc8bfdc9968d0459a15f82c8647c563765d953d39378ea57f103aeb5bb4b197f202df106f330906202
|
@@ -87,6 +87,38 @@ module ClassMethods
|
|
87
87
|
count = get_project_constituent_results(pid,verbose_output,'count/json')
|
88
88
|
return count.blank? ? 0 : count[0]['count'].to_i
|
89
89
|
end
|
90
|
+
|
91
|
+
#Publish target members
|
92
|
+
|
93
|
+
def get_publish_target_member_results(pid, verbose_output=false, format='json')
|
94
|
+
|
95
|
+
project_constituent_query =
|
96
|
+
'select $pid from <#ri>
|
97
|
+
where $pid <http://purl.org/dc/terms/publisher> <fedora:' + pid + '>'
|
98
|
+
|
99
|
+
puts 'Performing query:' if verbose_output
|
100
|
+
puts project_constituent_query if verbose_output
|
101
|
+
|
102
|
+
search_response = JSON(Cul::Hydra::Fedora.repository.find_by_itql(project_constituent_query, {
|
103
|
+
:type => 'tuples',
|
104
|
+
:format => format,
|
105
|
+
:limit => '',
|
106
|
+
:stream => 'on'
|
107
|
+
}))
|
108
|
+
|
109
|
+
return search_response['results']
|
110
|
+
end
|
111
|
+
|
112
|
+
def get_publish_target_member_pids(pid, verbose_output=false)
|
113
|
+
unique_pids = get_publish_target_member_results(pid,verbose_output,'json')
|
114
|
+
unique_pids.map{|result| result['pid'].gsub('info:fedora/', '') }.uniq
|
115
|
+
end
|
116
|
+
|
117
|
+
def get_publish_target_member_count(pid, verbose_output=false)
|
118
|
+
count = get_publish_target_member_results(pid,verbose_output,'count/json')
|
119
|
+
return count.blank? ? 0 : count[0]['count'].to_i
|
120
|
+
end
|
121
|
+
|
90
122
|
end
|
91
123
|
extend ClassMethods
|
92
124
|
end
|
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.0.
|
4
|
+
version: 1.0.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-05-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: blacklight
|
@@ -501,3 +501,4 @@ signing_key:
|
|
501
501
|
specification_version: 4
|
502
502
|
summary: ActiveFedora, OM, and Solrizer implementations for CUL repository apps
|
503
503
|
test_files: []
|
504
|
+
has_rdoc:
|