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 +4 -4
- data/lib/libis/tools/mets_file.rb +6 -2
- data/lib/libis/tools/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1beb34bf6d3caa983e0909913526c51fede24c5a10eb612a54c3deca274c11a
|
4
|
+
data.tar.gz: 5ec72ceeffaa443b21599036ffa1a647e3a645fb00009647b3929868f734826b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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|
|
data/lib/libis/tools/version.rb
CHANGED