adiwg-mdtranslator 2.19.0.pre.beta.21 → 2.19.0.pre.beta.22
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e744e49fe2c92d3e5fa2294fa194ce8ce6859d807f526bbf13cd99986111889a
|
4
|
+
data.tar.gz: 18b42409a786e7e6f4f9a94154bd241f0fdfdc9dc1a500cdbde7935c5e59784d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d447dbf152ff9c02d8a3dc96eb1f67f11fd81da4b262a9eb23efb0cdd60acf17e2cc6f7cf33aafe21fd3d1cf0098c4e93b9215f085f310d57671befcc9e66a6a
|
7
|
+
data.tar.gz: 599b8a0c23ded139f5682b9d4b431f8dfba947faf6e71e688fa5a50acbb89286de64e79ea3023175e4defa37bce30233c7517d377766491a0bf62b2e5572ecb1
|
data/Gemfile.lock
CHANGED
@@ -277,6 +277,33 @@ module ADIWG
|
|
277
277
|
|
278
278
|
# data identification - resource constraints [] {MD_Constraints}
|
279
279
|
aConstraint = hResource[:constraints]
|
280
|
+
legalConstraint = aConstraint.find { |hCon| hCon[:type] == 'legal' }
|
281
|
+
# handle distribution liability statements - add to legal constraint -> other constraints
|
282
|
+
aDistInfo = hMetadata[:distributorInfo]
|
283
|
+
liabilityStatements = []
|
284
|
+
aDistInfo.each do |hDistribution|
|
285
|
+
unless hDistribution.empty?
|
286
|
+
unless hDistribution[:liabilityStatement].nil?
|
287
|
+
liabilityStatements << hDistribution[:liabilityStatement]
|
288
|
+
end
|
289
|
+
end
|
290
|
+
end
|
291
|
+
if liabilityStatements.any?
|
292
|
+
# Create a new legal constraint if it doesn't exist
|
293
|
+
unless legalConstraint
|
294
|
+
legalConstraint = {
|
295
|
+
type: 'legal',
|
296
|
+
legalConstraint: {
|
297
|
+
otherCons: []
|
298
|
+
}
|
299
|
+
}
|
300
|
+
aConstraint << legalConstraint
|
301
|
+
end
|
302
|
+
liabilityStatements.each do |liabilityStatement|
|
303
|
+
legalConstraint[:legalConstraint][:otherCons] << liabilityStatement
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
280
307
|
aConstraint.each do |hCon|
|
281
308
|
@xml.tag!('mri:resourceConstraints') do
|
282
309
|
constraintClass.writeXML(hCon, 'resource information')
|
@@ -286,6 +313,8 @@ module ADIWG
|
|
286
313
|
@xml.tag!('mri:resourceConstraints')
|
287
314
|
end
|
288
315
|
|
316
|
+
# data identification - resource constraints {} from distribution liability statement
|
317
|
+
|
289
318
|
# data identification - associated resource [] {MD_AssociatedResource}
|
290
319
|
aAssocRes.each do |hAssocRes|
|
291
320
|
@xml.tag!('mri:associatedResource') do
|
@@ -24,7 +24,16 @@ module ADIWG
|
|
24
24
|
# date - date (required)
|
25
25
|
unless date.nil?
|
26
26
|
case dateRes
|
27
|
-
when 'Y'
|
27
|
+
when 'Y'
|
28
|
+
dateStr = AdiwgDateTimeFun.stringDateFromDateTime(date, 'Y')
|
29
|
+
@xml.tag!('gco:Date', dateStr)
|
30
|
+
when 'YM'
|
31
|
+
dateStr = AdiwgDateTimeFun.stringDateFromDateTime(date, 'YM')
|
32
|
+
@xml.tag!('gco:Date', dateStr)
|
33
|
+
when 'YMD'
|
34
|
+
dateStr = AdiwgDateTimeFun.stringDateFromDateTime(date, 'YMD')
|
35
|
+
@xml.tag!('gco:Date', dateStr)
|
36
|
+
when 'YMDh', 'YMDhm', 'YMDhms'
|
28
37
|
dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(date, 'YMDhms')
|
29
38
|
@xml.tag!('gco:DateTime', dateStr)
|
30
39
|
when 'YMDhZ', 'YMDhmZ', 'YMDhmsZ'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adiwg-mdtranslator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.19.0.pre.beta.
|
4
|
+
version: 2.19.0.pre.beta.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stan Smith
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-05-
|
12
|
+
date: 2024-05-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|