discovery-indexer 0.9.5 → 0.9.6

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: 4be308adec33e0a3f9d15ba5b9bbb80a32888505
4
- data.tar.gz: 7a275a1990a43e2411fc60e5fb5b89c4952640f9
3
+ metadata.gz: 3c328198b5aaf90f99e8b239b37aabacf9cfcdc7
4
+ data.tar.gz: 7ffabf609d7b24d5ae413f4cac213a9aabef2e8e
5
5
  SHA512:
6
- metadata.gz: 9dc25fc9802e51c534613452b47f074a6623b98ec3a121647431bbf80216aa1f27ed1b31b0d847703a797a0ec853b2ea460f4e4cb60862487b151d79a3e09310
7
- data.tar.gz: 8cab6aafeb05cdc42888addf59092252206f578e3d972e471f1bda7d8734d290c358276b59a9b91f787e10b0a91cea7d54a3304b25c091dad23050c25f0da3a3
6
+ metadata.gz: 7ec36accf3a418d95040bc8ca561a7f08fac0fabcb6d2cac133589f451620b885c16218daa7338c2b478771978eed2d2a6ae236a0eb9cde1b836941b8eb41434
7
+ data.tar.gz: 2595c1da62ab979b6f12db5ca3cc64102c622924090cc0cf355e3b14b405f33fbafb859282b65bc16c1516369a407c6bae61809e19b7f0e417a92ac9ae43857c
@@ -42,6 +42,11 @@ module DiscoveryIndexer
42
42
  # content_metadata.
43
43
  attr_accessor :dor_content_type
44
44
 
45
+ # @!attribute [rw] dor_display_type
46
+ # @return [String] The displayType as extracted from public xml
47
+ # identity_metadata.
48
+ attr_accessor :dor_display_type
49
+
45
50
  # @!attribute [rw] is_collection
46
51
  # @return [Boolean] true if the item type is collection in the identity_metadata
47
52
  attr_accessor :is_collection
@@ -20,8 +20,9 @@ module DiscoveryIndexer
20
20
  purlxml_model.dc = parse_dc()
21
21
  purlxml_model.rdf = parse_rdf()
22
22
  purlxml_model.is_collection = parse_is_collection()
23
- purlxml_model.collection_druids = parse_collection_druids()
23
+ purlxml_model.collection_druids = parse_collection_druids()
24
24
  purlxml_model.dor_content_type = parse_dor_content_type()
25
+ purlxml_model.dor_display_type = parse_dor_display_type()
25
26
  purlxml_model.release_tags_hash = parse_release_tags_hash()
26
27
  purlxml_model.file_ids = parse_file_ids()
27
28
  purlxml_model.image_ids = parse_image_ids()
@@ -148,6 +149,15 @@ module DiscoveryIndexer
148
149
  dct
149
150
  end
150
151
 
152
+ # the value of the displyType tag from a DOR collection's identityMetadata
153
+ # @return [String]
154
+ def parse_dor_display_type
155
+ identity_md = parse_identity_metadata
156
+ ddt = identity_md ? identity_md.xpath('//displayType').text : nil
157
+ DiscoveryIndexer::Logging.logger.debug "#{@druid} has no DOR display type (<identityMetadata> element may be missing displayType tag)" if !ddt || ddt.empty?
158
+ ddt
159
+ end
160
+
151
161
  # the @id attribute of resource/file elements that match the image type, including extension
152
162
  # @return [Array<String>] filenames
153
163
  def parse_image_ids
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DiscoveryIndexer
2
- VERSION = '0.9.5'
2
+ VERSION = '0.9.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discovery-indexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmed AlSum
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-08 00:00:00.000000000 Z
11
+ date: 2015-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  version: '0'
178
178
  requirements: []
179
179
  rubyforge_project:
180
- rubygems_version: 2.2.2
180
+ rubygems_version: 2.4.5
181
181
  signing_key:
182
182
  specification_version: 4
183
183
  summary: Shared library for the basic discovery indexing operation for Stanford DLSS.