libis-tools 1.0.12 → 1.0.13

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
  SHA256:
3
- metadata.gz: 810ac9ed3a3b03f0ae8cc0d1deea5b1c6a0f70b0d34bce8eb752fba9da5583f9
4
- data.tar.gz: 5b51eb0c78b0928e1183f53bd270ec148f35b47f42a066432705a657279ccfa9
3
+ metadata.gz: d1beb34bf6d3caa983e0909913526c51fede24c5a10eb612a54c3deca274c11a
4
+ data.tar.gz: 5ec72ceeffaa443b21599036ffa1a647e3a645fb00009647b3929868f734826b
5
5
  SHA512:
6
- metadata.gz: a0a53c49318401d632db7a3e20a70a1378a50ce101c2e8f26ac0216aee3ffcb28c81287663b6daccb3693d2a962337c472f36254e6ea065aed2135e65cfbf876
7
- data.tar.gz: 207d258c97de31f803d71dd0f39c6cc37b00fbcfe0120bf37a36c3669c3ac43d4d1253b2c1cfed0004a24ed8215e03e9990af4853389c40958f6c5300497068f
6
+ metadata.gz: 67f28b6fa1c208137f3730ca2d2854bf3d86358434bf6f3770846ea008f6be96a193f0b3f7c6e49bdfa1866158f958bb8234df7dc28ae58631811222350922be
7
+ data.tar.gz: 3d12bb2aa8360009a45ba6e34734c20a219bd7b165778a07de7889886a030ae6db83a014cca433057ccb8dcec89fdf9a6fa153337f4c7acc3d7f022bc7cb8eca
@@ -91,14 +91,18 @@ module Libis
91
91
  end
92
92
 
93
93
  dmd_sec = xml_doc.root.xpath('mets:dmdSec', NS).inject({}) do |hash_dmd, dmd|
94
- hash_dmd[dmd[:ID]] = dmd.xpath('.//dc:record', NS).first.children.inject({}) do |h, c|
94
+ id = dmd[:ID]
95
+ id = id.slice(0..(id.index('-dmd') + 3))
96
+ hash_dmd[id] = dmd.xpath('.//dc:record', NS).first.children.inject({}) do |h, c|
95
97
  h[c.name] = c.content if c.name != 'text'
96
98
  h
97
99
  end
98
100
  hash_dmd
99
101
  end
100
102
  amd_sec = xml_doc.root.xpath('mets:amdSec', NS).inject({}) do |hash_amd, amd|
101
- hash_amd[amd[:ID]] = [:tech, :rights, :source, :digiprov].inject({}) do |hash_sec, sec|
103
+ id = amd[:ID]
104
+ id = id.slice(0..(id.index('-amd') + 3))
105
+ hash_amd[id] = [:tech, :rights, :source, :digiprov].inject({}) do |hash_sec, sec|
102
106
  md = amd.xpath("mets:#{sec}MD", NS).first
103
107
  return hash_sec unless md
104
108
  # hash_sec[sec] = md.xpath('mets:mdWrap/dnx:dnx/dnx:section', NS).inject({}) do |hash_md, dnx_sec|
@@ -1,5 +1,5 @@
1
1
  module Libis
2
2
  module Tools
3
- VERSION = '1.0.12'
3
+ VERSION = '1.0.13'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libis-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Dekeyser