adiwg-mdtranslator 2.18.0 → 2.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/adiwg-mdtranslator.gemspec +1 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalPlanar.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_spatialDomain.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_distribution.rb +8 -0
- data/lib/adiwg/mdtranslator/version.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_distribution.rb +24 -2
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_entityDetail.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_process.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_spatialDomain.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_organization.rb +20 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_evaluationMethod.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb462b0759a76f8884d8cefc07d1372da8a60c589a5cd49e57fce7d3f06f5c00
|
4
|
+
data.tar.gz: 99ab44ea39cede67c810cc998bcec11e447b8b438f552966ff77ea15e038c405
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 310393021fe20a36d392a870b3b4edead47f956033db8dc8f7b556bef750338758bf5cfe15d0c06f7c8097fe9a6d2dfaf65469abbc5045517f3823bd48973362
|
7
|
+
data.tar.gz: 2ad0835b09716d5fbda52c67bb4421b5bd6a29b02845c8d5ef3d18a6b89704408a42d7a2c6d7b442e1f7b92b70c7222ccf24f0db533261a813ffdb0128165f48
|
data/adiwg-mdtranslator.gemspec
CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_runtime_dependency "thor", "~> 0.19"
|
35
35
|
spec.add_runtime_dependency "uuidtools", "~> 2.1"
|
36
36
|
spec.add_runtime_dependency "json-schema", "~> 2.7"
|
37
|
-
spec.add_runtime_dependency "adiwg-mdjson_schemas", "
|
37
|
+
spec.add_runtime_dependency "adiwg-mdjson_schemas", "~> 2.8"
|
38
38
|
spec.add_runtime_dependency "adiwg-mdcodes", "~> 2.8"
|
39
39
|
spec.add_runtime_dependency "jbuilder", "~> 2.5"
|
40
40
|
spec.add_runtime_dependency "kramdown", "~> 1.13"
|
@@ -47,6 +47,14 @@ module ADIWG
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
+
# there is a typo in mdEditor for liabilityStatement, handle this edge case
|
51
|
+
# https://github.com/adiwg/mdEditor/blob/f94770686df07ef76aa111f8f9734b32bbad7f21/app/pods/components/object/md-distribution/template.hbs#L22
|
52
|
+
if (intDistribution[:liabilityStatement].nil? || intDistribution.empty?) && hDistribution.has_key?('liablityStatement')
|
53
|
+
unless hDistribution['liablityStatement'] == ''
|
54
|
+
intDistribution[:liabilityStatement] = hDistribution['liablityStatement']
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
50
58
|
# distribution - distributor [distributor]
|
51
59
|
if hDistribution.has_key?('distributor')
|
52
60
|
aItems = hDistribution['distributor']
|
@@ -37,6 +37,28 @@ module ADIWG
|
|
37
37
|
# therefore, create a separate FGDC distribution record for each distributor
|
38
38
|
# and repeat the distribution information
|
39
39
|
|
40
|
+
if hDistribution[:distributor].empty?
|
41
|
+
@xml.tag!('distinfo') do
|
42
|
+
# distribution 6.2 (resdesc) - resource description
|
43
|
+
# <- distribution.description
|
44
|
+
unless hDistribution[:description].nil?
|
45
|
+
@xml.tag!('resdesc', hDistribution[:description])
|
46
|
+
end
|
47
|
+
if hDistribution[:description].nil? && @hResponseObj[:writerShowTags]
|
48
|
+
@xml.tag!('resdesc')
|
49
|
+
end
|
50
|
+
|
51
|
+
# distribution 6.3 (distliab) - liability (required)
|
52
|
+
# <- distribution.liabilityStatement
|
53
|
+
unless hDistribution[:liabilityStatement].nil?
|
54
|
+
@xml.tag!('distliab', hDistribution[:liabilityStatement])
|
55
|
+
end
|
56
|
+
if hDistribution[:liabilityStatement].nil?
|
57
|
+
@NameSpace.issueWarning(111,'distliab')
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
40
62
|
hDistribution[:distributor].each do |hDistributor|
|
41
63
|
|
42
64
|
outContext = nil
|
@@ -68,7 +90,7 @@ module ADIWG
|
|
68
90
|
unless hDistribution[:description].nil?
|
69
91
|
@xml.tag!('resdesc', hDistribution[:description])
|
70
92
|
end
|
71
|
-
if hDistribution[:description].nil?
|
93
|
+
if hDistribution[:description].nil? && @hResponseObj[:writerShowTags]
|
72
94
|
@xml.tag!('resdesc')
|
73
95
|
end
|
74
96
|
|
@@ -140,7 +162,7 @@ module ADIWG
|
|
140
162
|
unless techPre == ''
|
141
163
|
@xml.tag!('techpreq', techPre)
|
142
164
|
end
|
143
|
-
if techPre == ''
|
165
|
+
if techPre == '' && @hResponseObj[:writerShowTags]
|
144
166
|
@xml.tag!('techpreq')
|
145
167
|
end
|
146
168
|
|
@@ -31,7 +31,7 @@ module ADIWG
|
|
31
31
|
outContext = 'entity code ' + outContext unless outContext.nil?
|
32
32
|
|
33
33
|
# entity detail 5.1.1 (enttype) - entity type
|
34
|
-
@xml.tag!('
|
34
|
+
@xml.tag!('enttyp') do
|
35
35
|
|
36
36
|
# entity type 5.1.1.1 (enttypl) - entity type label (required)
|
37
37
|
# <- entity.entityCode
|
@@ -57,6 +57,7 @@ module ADIWG
|
|
57
57
|
hTimePeriod = hStep[:timePeriod]
|
58
58
|
unless hTimePeriod.empty?
|
59
59
|
hEndDT = hTimePeriod[:endDateTime]
|
60
|
+
hEndDT = hTimePeriod[:startDateTime] if hEndDT.nil? || hEndDT.empty?
|
60
61
|
unless hEndDT.empty?
|
61
62
|
procDate = AdiwgDateTimeFun.stringDateFromDateTime(hEndDT[:dateTime], hEndDT[:dateResolution])
|
62
63
|
procTime = AdiwgDateTimeFun.stringTimeFromDateTime(hEndDT[:dateTime], hEndDT[:dateResolution])
|
@@ -135,10 +135,10 @@ module ADIWG
|
|
135
135
|
|
136
136
|
# altitude bounding (altunit) - units of altitude
|
137
137
|
unless hBBox[:unitsOfAltitude].nil?
|
138
|
-
@xml.tag!('
|
138
|
+
@xml.tag!('altunits', hBBox[:unitsOfAltitude])
|
139
139
|
end
|
140
140
|
if hBBox[:unitsOfAltitude].nil? && @hResponseObj[:writerShowTags]
|
141
|
-
@xml.tag!('
|
141
|
+
@xml.tag!('altunits')
|
142
142
|
end
|
143
143
|
|
144
144
|
end
|
@@ -66,6 +66,26 @@ module ADIWG
|
|
66
66
|
@xml.tag!('cit:contactInfo')
|
67
67
|
end
|
68
68
|
|
69
|
+
# organization - party identifier
|
70
|
+
if hContact[:externalIdentifier] && hContact[:externalIdentifier].length > 0
|
71
|
+
hContact[:externalIdentifier].each do |identifier|
|
72
|
+
@xml.tag!('cit:partyIdentifier') do
|
73
|
+
identifierClass.writeXML(identifier);
|
74
|
+
end
|
75
|
+
end
|
76
|
+
else
|
77
|
+
if hContact[:contactId] &&
|
78
|
+
hContact[:contactId].is_a?(Hash)
|
79
|
+
@xml.tag!('cit:partyIdentifier') do
|
80
|
+
identifierClass.writeXML(hContact[:contactId]);
|
81
|
+
end
|
82
|
+
elsif hContact[:contactId].is_a?(String)
|
83
|
+
@xml.tag!('cit:partyIdentifier') do
|
84
|
+
identifierClass.writeXML({ identifier: hContact[:contactId] })
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
69
89
|
# organization - logo [] {MD_BrowseGraphic}
|
70
90
|
aLogos = hContact[:logos]
|
71
91
|
aLogos.each do |hLogo|
|
@@ -15,7 +15,7 @@ module ADIWG
|
|
15
15
|
json.type hMethod[:type]
|
16
16
|
json.dateTime hMethod[:dateTime]
|
17
17
|
json.methodDescription hMethod[:methodDescription]
|
18
|
-
json.evaluationProcedure Citation.build(hMethod[:
|
18
|
+
json.evaluationProcedure Citation.build(hMethod[:evaluationProcedure])
|
19
19
|
json.referenceDocument @Namespace.json_map(hMethod[:referenceDocument], Citation)
|
20
20
|
json.evaluationMethodType hMethod[:evaluationMethodType]
|
21
21
|
json.deductiveSource hMethod[:deductiveSource]
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adiwg-mdtranslator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.18.
|
4
|
+
version: 2.18.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stan Smith
|
8
8
|
- Josh Bradley
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -127,14 +127,14 @@ dependencies:
|
|
127
127
|
name: adiwg-mdjson_schemas
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- - "
|
130
|
+
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '2.8'
|
133
133
|
type: :runtime
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- - "
|
137
|
+
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '2.8'
|
140
140
|
- !ruby/object:Gem::Dependency
|
@@ -987,7 +987,7 @@ homepage: http://www.adiwg.org/mdTranslator
|
|
987
987
|
licenses:
|
988
988
|
- UNLICENSED
|
989
989
|
metadata: {}
|
990
|
-
post_install_message:
|
990
|
+
post_install_message:
|
991
991
|
rdoc_options: []
|
992
992
|
require_paths:
|
993
993
|
- lib
|
@@ -1002,8 +1002,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1002
1002
|
- !ruby/object:Gem::Version
|
1003
1003
|
version: '0'
|
1004
1004
|
requirements: []
|
1005
|
-
rubygems_version: 3.
|
1006
|
-
signing_key:
|
1005
|
+
rubygems_version: 3.4.12
|
1006
|
+
signing_key:
|
1007
1007
|
specification_version: 4
|
1008
1008
|
summary: The mdtranslator (metadata translator) is a tool for translating metadata
|
1009
1009
|
in one format to another. The tool is written and maintained by the Alaska Data
|