adiwg-mdtranslator 2.16.1 → 2.18.0rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -2
  3. data/Rakefile +1 -0
  4. data/adiwg-mdtranslator.gemspec +1 -1
  5. data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +8 -3
  6. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_attribute.rb +6 -2
  7. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_attribute.rb +12 -0
  8. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_contact.rb +11 -0
  9. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_georectifiedRepresentation.rb +9 -0
  10. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_georeferenceableRepresentation.rb +9 -0
  11. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_gridRepresentation.rb +10 -0
  12. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_processStep.rb +3 -14
  13. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_processing.rb +4 -5
  14. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_rangeElementDescription.rb +38 -0
  15. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_vectorRepresentation.rb +10 -0
  16. data/lib/adiwg/mdtranslator/version.rb +3 -1
  17. data/lib/adiwg/mdtranslator/writers/html/sections/html_algorithm.rb +48 -0
  18. data/lib/adiwg/mdtranslator/writers/html/sections/html_attribute.rb +12 -0
  19. data/lib/adiwg/mdtranslator/writers/html/sections/html_georectifiedRepresentation.rb +12 -0
  20. data/lib/adiwg/mdtranslator/writers/html/sections/html_georeferenceableRepresentation.rb +13 -0
  21. data/lib/adiwg/mdtranslator/writers/html/sections/html_gridRepresentation.rb +13 -0
  22. data/lib/adiwg/mdtranslator/writers/html/sections/html_nominalResolution.rb +51 -0
  23. data/lib/adiwg/mdtranslator/writers/html/sections/html_processReport.rb +47 -0
  24. data/lib/adiwg/mdtranslator/writers/html/sections/html_processStep.rb +35 -8
  25. data/lib/adiwg/mdtranslator/writers/html/sections/html_processing.rb +89 -0
  26. data/lib/adiwg/mdtranslator/writers/html/sections/html_rangeElementDescription.rb +40 -0
  27. data/lib/adiwg/mdtranslator/writers/html/sections/html_source.rb +25 -0
  28. data/lib/adiwg/mdtranslator/writers/html/sections/html_vectorRepresentation.rb +13 -0
  29. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_algorithm.rb +61 -0
  30. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_georectified.rb +9 -0
  31. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_georeferenceable.rb +10 -0
  32. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_grid.rb +11 -1
  33. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_identifier.rb +2 -2
  34. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_individual.rb +22 -0
  35. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_leProcessStep.rb +167 -0
  36. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_leSource.rb +150 -0
  37. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_liProcessStep.rb +130 -0
  38. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_liSource.rb +126 -0
  39. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_lineage.rb +5 -4
  40. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb +61 -0
  41. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_organization.rb +22 -0
  42. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_partyIdentifier.rb +92 -0
  43. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processReport.rb +66 -0
  44. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processStep.rb +22 -101
  45. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processing.rb +110 -0
  46. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_rangeElementDescription.rb +45 -0
  47. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_sampleDimension.rb +8 -0
  48. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb +19 -95
  49. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_vectorRepresentation.rb +9 -0
  50. data/lib/adiwg/mdtranslator/writers/iso19115_1/iso19115_1_writer_messages_eng.yml +11 -0
  51. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_algorithm.rb +61 -0
  52. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_leProcessStep.rb +153 -0
  53. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_leSource.rb +134 -0
  54. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_liProcessStep.rb +126 -0
  55. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_liSource.rb +114 -0
  56. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_lineage.rb +13 -11
  57. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb +61 -0
  58. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_processReport.rb +66 -0
  59. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_processStep.rb +22 -96
  60. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_processing.rb +110 -0
  61. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_source.rb +20 -82
  62. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_taxonomy.rb +2 -2
  63. data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer_messages_eng.yml +9 -0
  64. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_attribute.rb +1 -0
  65. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb +1 -0
  66. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_georectifiedRepresentation.rb +1 -0
  67. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_georeferenceableRepresentation.rb +1 -0
  68. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_gridRepresentation.rb +1 -0
  69. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb +0 -1
  70. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processing.rb +1 -1
  71. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_vectorRepresentation.rb +1 -0
  72. metadata +36 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5648f5e66d246d037e252f21ab96b678acd191582beac5faed22ce1b335d7922
4
- data.tar.gz: f0125ed07e0fdfebfbc25b52ebb3144865d863713d09a37d171159fbeb86c6a8
3
+ metadata.gz: ecb7704090196204491ef42a0817dd4e9980188e3e63852d61cb7f0406b57f80
4
+ data.tar.gz: 396c316ebdabbbe7acccf9deacbc45cd662799bb379e2a97389ecf546d04477d
5
5
  SHA512:
6
- metadata.gz: 0d7255a476ebf2e7d3dd60795693523b04f37dd9887ff1fbdee97eb67b5a4954532aa4925f993c64325f19b75e75d19a5226294310b025a9483ea4dd9848a109
7
- data.tar.gz: 57d9fdf2c382e1ddf057faea4666c949c54915e7962b45820f5bd0486e8fd1f21274748aeb272a689d56423bc9734d540ddea423f9af061872f0639dd85203a5
6
+ metadata.gz: 69eb88558f05db637609abe2047853a6517ce0a5ee7e85e2ad9c7fd679d52cde0d3fd4af206a73bb2ebd9cafde309e97e10dc49f02bc0e0ab0a076cfa9fc6fcb
7
+ data.tar.gz: 806fcca0134b19ea6da6619eb60c1480f73ef0f4323c847d51165fd5b377741b4ce48248f57a92276d4c6a7f6c24882ea554cc95efe6eaf0cb72f9c46af2ca7d
data/CHANGELOG.md CHANGED
@@ -1,7 +1,27 @@
1
1
  # Change Log
2
2
 
3
- ## [v2.15.0](https://github.com/adiwg/mdTranslator/tree/v2.15.0)
3
+ ## [v2.17.1](https://github.com/adiwg/mdTranslator/tree/v2.17.1)
4
4
 
5
+ [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.16.1...v2.17.1)
6
+
7
+ **Closed issues:**
8
+
9
+ - Enumerated Value lists Description written to the ISO 19110 output? [\#218](https://github.com/adiwg/mdTranslator/issues/218)
10
+ - Support applicationProfile and protocolRequest in onlineResource [\#215](https://github.com/adiwg/mdTranslator/issues/215)
11
+
12
+ **Merged pull requests:**
13
+
14
+ - Dev [\#219](https://github.com/adiwg/mdTranslator/pull/219) ([jlblcc](https://github.com/jlblcc))
15
+ - Add support for LE\_ProcessStep and LE\_Source [\#217](https://github.com/adiwg/mdTranslator/pull/217) ([stansmith907](https://github.com/stansmith907))
16
+
17
+ ## [v2.16.1](https://github.com/adiwg/mdTranslator/tree/v2.16.1) (2019-09-24)
18
+ [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.15.0...v2.16.1)
19
+
20
+ **Merged pull requests:**
21
+
22
+ - Data Dictionary support for 19115-1 [\#216](https://github.com/adiwg/mdTranslator/pull/216) ([stansmith907](https://github.com/stansmith907))
23
+
24
+ ## [v2.15.0](https://github.com/adiwg/mdTranslator/tree/v2.15.0) (2019-05-17)
5
25
  [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.14.2...v2.15.0)
6
26
 
7
27
  **Implemented enhancements:**
@@ -9,6 +29,10 @@
9
29
  - Add writer for ISO 19115-1 [\#207](https://github.com/adiwg/mdTranslator/issues/207)
10
30
  - Add ISO 19115-3 \(1\) Support [\#209](https://github.com/adiwg/mdTranslator/pull/209) ([stansmith907](https://github.com/stansmith907))
11
31
 
32
+ **Merged pull requests:**
33
+
34
+ - Fix issue with FGDC taxonomy reader [\#211](https://github.com/adiwg/mdTranslator/pull/211) ([stansmith907](https://github.com/stansmith907))
35
+
12
36
  ## [v2.14.2](https://github.com/adiwg/mdTranslator/tree/v2.14.2) (2018-11-02)
13
37
  [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.14.1...v2.14.2)
14
38
 
@@ -124,7 +148,6 @@
124
148
 
125
149
  - Minor bug fixes [\#182](https://github.com/adiwg/mdTranslator/pull/182) ([stansmith907](https://github.com/stansmith907))
126
150
  - mdTranslator version 2.9.0 [\#181](https://github.com/adiwg/mdTranslator/pull/181) ([stansmith907](https://github.com/stansmith907))
127
- - Remove repository name from harvest set tag in sbJson writer. [\#151](https://github.com/adiwg/mdTranslator/pull/151) ([stansmith907](https://github.com/stansmith907))
128
151
 
129
152
  ## [v2.9.1](https://github.com/adiwg/mdTranslator/tree/v2.9.1) (2018-02-03)
130
153
  [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.9.0...v2.9.1)
@@ -235,6 +258,10 @@
235
258
  ## [v2.3.4](https://github.com/adiwg/mdTranslator/tree/v2.3.4) (2017-10-13)
236
259
  [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.3.3...v2.3.4)
237
260
 
261
+ **Merged pull requests:**
262
+
263
+ - Remove repository name from harvest set tag in sbJson writer. [\#151](https://github.com/adiwg/mdTranslator/pull/151) ([stansmith907](https://github.com/stansmith907))
264
+
238
265
  ## [v2.3.3](https://github.com/adiwg/mdTranslator/tree/v2.3.3) (2017-10-11)
239
266
  [Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.3.2...v2.3.3)
240
267
 
data/Rakefile CHANGED
@@ -26,6 +26,7 @@ Rake::TestTask.new do |t|
26
26
  'test/translator/tc*.rb'
27
27
  ]
28
28
  t.verbose = true
29
+ t.warning = false
29
30
  end
30
31
 
31
32
  desc 'Run tests'
@@ -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", ">= 2.7"
37
+ spec.add_runtime_dependency "adiwg-mdjson_schemas", "2.8.0.pre.beta2"
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"
@@ -303,6 +303,7 @@ class InternalMetadata
303
303
  contactId: nil,
304
304
  isOrganization: false,
305
305
  name: nil,
306
+ externalIdentifier: [],
306
307
  positionName: nil,
307
308
  memberOfOrgs: [],
308
309
  logos: [],
@@ -497,6 +498,7 @@ class InternalMetadata
497
498
  numberOfValues: nil,
498
499
  standardDeviation: nil,
499
500
  bitsPerValue: nil,
501
+ rangeElementDescription: [],
500
502
  boundMin: nil,
501
503
  boundMax: nil,
502
504
  boundUnits: nil,
@@ -958,7 +960,7 @@ class InternalMetadata
958
960
  def newProcessing
959
961
  {
960
962
  identifier: {},
961
- softwareReferences: [],
963
+ softwareReference: {},
962
964
  procedureDescription: nil,
963
965
  documentation: [],
964
966
  runtimeParameters: nil,
@@ -973,11 +975,10 @@ class InternalMetadata
973
975
  rationale: nil,
974
976
  timePeriod: {},
975
977
  processors: [],
976
- references: [],
977
978
  stepSources: [],
978
979
  stepProducts: [],
980
+ references: [],
979
981
  scope: {},
980
- output: [],
981
982
  processingInformation: {},
982
983
  reports: []
983
984
  }
@@ -1179,6 +1180,7 @@ class InternalMetadata
1179
1180
 
1180
1181
  def newGridInfo
1181
1182
  {
1183
+ scope: [],
1182
1184
  numberOfDimensions: nil,
1183
1185
  dimension: [],
1184
1186
  cellGeometry: nil,
@@ -1198,6 +1200,7 @@ class InternalMetadata
1198
1200
 
1199
1201
  def newVectorInfo
1200
1202
  {
1203
+ scope: [],
1201
1204
  topologyLevel: nil,
1202
1205
  vectorObject: []
1203
1206
  }
@@ -1212,6 +1215,7 @@ class InternalMetadata
1212
1215
 
1213
1216
  def newGeorectifiedInfo
1214
1217
  {
1218
+ scope: [],
1215
1219
  gridRepresentation: {},
1216
1220
  checkPointAvailable: false,
1217
1221
  checkPointDescription: nil,
@@ -1225,6 +1229,7 @@ class InternalMetadata
1225
1229
 
1226
1230
  def newGeoreferenceableInfo
1227
1231
  {
1232
+ scope: [],
1228
1233
  gridRepresentation: {},
1229
1234
  controlPointAvailable: false,
1230
1235
  orientationParameterAvailable: false,
@@ -59,6 +59,7 @@ module ADIWG
59
59
  end
60
60
 
61
61
  # entity attribute 5.1.2.4 (attrdomv) - attribute domain value (required)
62
+ domainLength = hDictionary[:domains].length
62
63
  axDomain = xAttribute.xpath('./attrdomv')
63
64
  unless axDomain.empty?
64
65
 
@@ -104,9 +105,12 @@ module ADIWG
104
105
  # add domainId to attribute
105
106
  # fgdc allows multiple domain definitions
106
107
  # mdJson allows only one domain definition for an attribute
107
- # take the first, if this is a problem the user will need to fix in the editor
108
+ # take the first domain that is assigned to the attribute,
109
+ # if this is a problem the user will need to fix in the editor
108
110
  unless hDictionary[:domains].empty?
109
- hAttribute[:domainId] = hDictionary[:domains][0][:domainId]
111
+ if hDictionary[:domains].length > domainLength
112
+ hAttribute[:domainId] = hDictionary[:domains][domainLength][:domainId]
113
+ end
110
114
  end
111
115
 
112
116
  axBegin = xAttribute.xpath('./begdatea')
@@ -6,6 +6,8 @@
6
6
  # Stan Smith 2016-10-18 original script
7
7
 
8
8
  require_relative 'module_identifier'
9
+ require_relative 'module_rangeElementDescription'
10
+
9
11
 
10
12
  module ADIWG
11
13
  module Mdtranslator
@@ -101,6 +103,16 @@ module ADIWG
101
103
  end
102
104
  end
103
105
 
106
+ if hAttribute.has_key?('rangeElementDescription')
107
+ unless hAttribute['rangeElementDescription'].nil?
108
+ intAttGroup[:rangeElementDescription] = []
109
+
110
+ hAttribute['rangeElementDescription'].each do |item|
111
+ intAttGroup[:rangeElementDescription] << RangeElementDescription.unpack(item, responseObj, outContext)
112
+ end
113
+ end
114
+ end
115
+
104
116
  # attribute group - offset
105
117
  if hAttribute.has_key?('offset')
106
118
  unless hAttribute['offset'] == ''
@@ -9,6 +9,7 @@ require_relative 'module_onlineResource'
9
9
  require_relative 'module_phone'
10
10
  require_relative 'module_address'
11
11
  require_relative 'module_graphic'
12
+ require_relative 'module_identifier'
12
13
 
13
14
  module ADIWG
14
15
  module Mdtranslator
@@ -42,6 +43,16 @@ module ADIWG
42
43
  @MessagePath.issueError(101, responseObj)
43
44
  end
44
45
 
46
+ if hContact.has_key?('externalIdentifier')
47
+ aItems = hContact['externalIdentifier']
48
+ aItems.each do |item|
49
+ hReturn = Identifier.unpack(item, responseObj, outContext)
50
+ unless hReturn.nil?
51
+ intContact[:externalIdentifier] << hReturn
52
+ end
53
+ end
54
+ end
55
+
45
56
  # contact - is organization (required)
46
57
  if hContact.has_key?('isOrganization')
47
58
  if hContact['isOrganization'] === true
@@ -104,6 +104,15 @@ module ADIWG
104
104
  end
105
105
  end
106
106
 
107
+ if hGeoRec.has_key?('scope')
108
+ hGeoRec['scope'].each do |item|
109
+ scope = Scope.unpack(item, responseObj, inContext)
110
+ unless scope.nil?
111
+ intGeoRec[:scope] << scope
112
+ end
113
+ end
114
+ end
115
+
107
116
  return intGeoRec
108
117
 
109
118
  end
@@ -88,6 +88,15 @@ module ADIWG
88
88
  end
89
89
  end
90
90
 
91
+ if hGeoRef.has_key?('scope')
92
+ hGeoRef['scope'].each do |item|
93
+ scope = Scope.unpack(item, responseObj, inContext)
94
+ unless scope.nil?
95
+ intGeoRef[:scope] << scope
96
+ end
97
+ end
98
+ end
99
+
91
100
  return intGeoRef
92
101
 
93
102
  end
@@ -6,6 +6,7 @@
6
6
  # Stan Smith 2016-10-19 original script
7
7
 
8
8
  require_relative 'module_dimension'
9
+ require_relative 'module_scope'
9
10
 
10
11
  module ADIWG
11
12
  module Mdtranslator
@@ -71,6 +72,15 @@ module ADIWG
71
72
  end
72
73
  end
73
74
 
75
+ if hGrid.has_key?('scope')
76
+ hGrid['scope'].each do |item|
77
+ scope = Scope.unpack(item, responseObj, outContext)
78
+ unless scope.nil?
79
+ intGrid[:scope] << scope
80
+ end
81
+ end
82
+ end
83
+
74
84
  return intGrid
75
85
 
76
86
  end
@@ -110,7 +110,7 @@ module ADIWG
110
110
  end
111
111
  end
112
112
 
113
- # process step - step products [] {source}
113
+ # process step LE 'output' - step products [] {source}
114
114
  if hProcStep.has_key?('stepProduct')
115
115
  aSources = hProcStep['stepProduct']
116
116
  aSources.each do |item|
@@ -132,18 +132,7 @@ module ADIWG
132
132
  end
133
133
  end
134
134
 
135
- # process step - output [] {source}
136
- if hProcStep.has_key?('output')
137
- aSources = hProcStep['output']
138
- aSources.each do |item|
139
- hSource = Source.unpack(item, responseObj, outContext)
140
- unless hSource.nil?
141
- intProcStep[:output] << hSource
142
- end
143
- end
144
- end
145
-
146
- # process step - processing information {processing}
135
+ # process step LE - processing information {processing}
147
136
  if hProcStep.has_key?('processingInformation')
148
137
  unless hProcStep['processingInformation'].empty?
149
138
  hReturn = Processing.unpack(hProcStep['processingInformation'], responseObj, outContext)
@@ -153,7 +142,7 @@ module ADIWG
153
142
  end
154
143
  end
155
144
 
156
- # process step - report [] {processReport}
145
+ # process step LE - report [] {processReport}
157
146
  if hProcStep.has_key?('report')
158
147
  aReports = hProcStep['report']
159
148
  aReports.each do |item|
@@ -47,11 +47,10 @@ module ADIWG
47
47
 
48
48
  # processing - software reference
49
49
  if hProcessing.has_key?('softwareReference')
50
- aCitation = hProcessing['softwareReference']
51
- aCitation.each do |item|
52
- hCitation = Citation.unpack(item, responseObj, outContext)
53
- unless hCitation.nil?
54
- intProcessing[:softwareReferences] << hCitation
50
+ unless hProcessing['softwareReference'].empty?
51
+ hReturn = Citation.unpack(hProcessing['softwareReference'], responseObj, outContext)
52
+ unless hReturn.nil?
53
+ intProcessing[:softwareReference] = hReturn
55
54
  end
56
55
  end
57
56
  end
@@ -0,0 +1,38 @@
1
+ # unpack range element description
2
+
3
+ module ADIWG
4
+ module Mdtranslator
5
+ module Readers
6
+ module MdJson
7
+
8
+ module RangeElementDescription
9
+
10
+ def self.unpack(hRangeElementDescription, responseObj, inContext = nil)
11
+ @MessagePath = ADIWG::Mdtranslator::Readers::MdJson::MdJson
12
+
13
+ outContext = 'range element description'
14
+ outContext = inContext + ' > ' + outContext unless inContext.nil?
15
+
16
+ intRangeElementDescription = {}
17
+
18
+ if hRangeElementDescription.has_key?('name')
19
+ intRangeElementDescription[:name] = hRangeElementDescription['name']
20
+ end
21
+
22
+ if hRangeElementDescription.has_key?('definition')
23
+ intRangeElementDescription[:definition] = hRangeElementDescription['definition']
24
+ end
25
+
26
+ if hRangeElementDescription.has_key?('rangeElements')
27
+ intRangeElementDescription[:rangeElements] = hRangeElementDescription['rangeElements']
28
+ end
29
+
30
+ return intRangeElementDescription
31
+
32
+ end
33
+
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -6,6 +6,7 @@
6
6
  # Stan Smith 2016-10-19 original script
7
7
 
8
8
  require_relative 'module_vectorObject'
9
+ require_relative 'module_scope'
9
10
 
10
11
  module ADIWG
11
12
  module Mdtranslator
@@ -52,6 +53,15 @@ module ADIWG
52
53
  end
53
54
  end
54
55
 
56
+ if hVector.has_key?('scope')
57
+ hVector['scope'].each do |item|
58
+ scope = Scope.unpack(item, responseObj, outContext)
59
+ unless scope.nil?
60
+ intVector[:scope] << scope
61
+ end
62
+ end
63
+ end
64
+
55
65
  # error messages
56
66
  unless haveVector
57
67
  @MessagePath.issueError(911, responseObj, inContext)
@@ -1,6 +1,8 @@
1
1
  # adiwg mdTranslator
2
2
 
3
3
  # version 2 history
4
+ # 2.17.1 2019-11-06 fix attribute domain assignment
5
+ # 2.17.0 2019-09-28 add support for LE_ProcessStep and LE_Source
4
6
  # 2.16.1 2019-09-19 refactor fgdc reader to output FGDC entityAttribute citation title as dictionary citation title
5
7
  # 2.16.1 2019-09-18 add applicationProfile and protocolRequest to onlineResource
6
8
  # 2.16.0 2019-09-17 add 19110:2005 dictionary support to 19115-1
@@ -107,7 +109,7 @@
107
109
  module ADIWG
108
110
  module Mdtranslator
109
111
  # current mdtranslator version
110
- VERSION = "2.16.1"
112
+ VERSION = "2.18.0rc2"
111
113
  end
112
114
  end
113
115
 
@@ -0,0 +1,48 @@
1
+ # HTML writer
2
+ # algorithm
3
+
4
+ # History:
5
+ # Stan Smith 2019-09-24 original script
6
+
7
+ require_relative 'html_citation'
8
+
9
+ module ADIWG
10
+ module Mdtranslator
11
+ module Writers
12
+ module Html
13
+
14
+ class Html_Algorithm
15
+
16
+ def initialize(html)
17
+ @html = html
18
+ end
19
+
20
+ def writeHtml(hAlgorithm)
21
+
22
+ # classes used
23
+ citationClass = Html_Citation.new(@html)
24
+
25
+ # algorithm - description
26
+ unless hAlgorithm[:description].nil?
27
+ @html.em('Description: ')
28
+ @html.text!(hAlgorithm[:description])
29
+ @html.br
30
+ end
31
+
32
+ # algorithm - citation {citation}
33
+ unless hAlgorithm[:citation].empty?
34
+ @html.details do
35
+ @html.summary('Algorithm citation', {'class' => 'h5'})
36
+ @html.section(:class => 'block') do
37
+ citationClass.writeHtml(hAlgorithm[:citation])
38
+ end
39
+ end
40
+ end
41
+
42
+ end # writeHtml
43
+ end # Html_Algorithm
44
+
45
+ end
46
+ end
47
+ end
48
+ end
@@ -5,6 +5,7 @@
5
5
  # Stan Smith 2017-04-02 original script
6
6
 
7
7
  require_relative 'html_identifier'
8
+ require_relative 'html_rangeElementDescription'
8
9
 
9
10
  module ADIWG
10
11
  module Mdtranslator
@@ -20,6 +21,7 @@ module ADIWG
20
21
  def writeHtml(hAttribute)
21
22
  # classes used
22
23
  identifierClass = Html_Identifier.new(@html)
24
+ rangeElementDescriptionClass = Html_RangeElementDescription.new(@html)
23
25
 
24
26
  # attribute - sequence identifier
25
27
  unless hAttribute[:sequenceIdentifier].nil?
@@ -116,6 +118,16 @@ module ADIWG
116
118
  @html.br
117
119
  end
118
120
 
121
+ # attribute - range element description
122
+ hAttribute[:rangeElementDescription].each do |red|
123
+ @html.details do
124
+ @html.summary('Range Element Description', 'class' => 'h5')
125
+ @html.section(:class => 'block') do
126
+ rangeElementDescriptionClass.writeHtml(red)
127
+ end
128
+ end
129
+ end
130
+
119
131
  # attribute - bound minimum
120
132
  unless hAttribute[:boundMinimum].nil?
121
133
  @html.em('Bound Minimum: ')
@@ -5,6 +5,7 @@
5
5
  # Stan Smith 2017-03-28 original script
6
6
 
7
7
  require_relative 'html_gridRepresentation'
8
+ require_relative 'html_scope'
8
9
 
9
10
  module ADIWG
10
11
  module Mdtranslator
@@ -21,6 +22,17 @@ module ADIWG
21
22
 
22
23
  # classes used
23
24
  gridClass = Html_GridRepresentation.new(@html)
25
+ scopeClass = Html_Scope.new(@html)
26
+
27
+ # georectified representation - scope
28
+ hGeorectified[:scope].each do |scope|
29
+ @html.details do
30
+ @html.summary('Scope ', 'class' => 'h5')
31
+ @html.section(:class => 'block') do
32
+ scopeClass.writeHtml(hGeorectified[:scope])
33
+ end
34
+ end
35
+ end
24
36
 
25
37
  # georectified representation - grid {gridRepresentation}
26
38
  unless hGeorectified[:gridRepresentation].empty?
@@ -6,6 +6,7 @@
6
6
 
7
7
  require_relative 'html_gridRepresentation'
8
8
  require_relative 'html_citation'
9
+ require_relative 'html_scope'
9
10
 
10
11
  module ADIWG
11
12
  module Mdtranslator
@@ -23,6 +24,18 @@ module ADIWG
23
24
  # classes used
24
25
  gridClass = Html_GridRepresentation.new(@html)
25
26
  citationClass = Html_Citation.new(@html)
27
+ scopeClass = Html_Scope.new(@html)
28
+
29
+ # georeferenceable representation - scope
30
+ hGeoreferenceable[:scope].each do |scope|
31
+ @html.details do
32
+ @html.summary('Scope ', 'class' => 'h5')
33
+ @html.section(:class => 'block') do
34
+ scopeClass.writeHtml(hGeoreferenceable[:scope])
35
+ end
36
+ end
37
+ end
38
+
26
39
 
27
40
  # georeferenceable representation - grid {gridRepresentation}
28
41
  unless hGeoreferenceable[:gridRepresentation].empty?
@@ -6,6 +6,7 @@
6
6
  # Stan Smith 2015-07-31 original script
7
7
 
8
8
  require_relative 'html_dimension'
9
+ require_relative 'html_scope'
9
10
 
10
11
  module ADIWG
11
12
  module Mdtranslator
@@ -22,6 +23,18 @@ module ADIWG
22
23
 
23
24
  # classes used
24
25
  dimensionClass = Html_Dimension.new(@html)
26
+ scopeClass = Html_Scope.new(@html)
27
+
28
+ # grid representation - scope
29
+ hGrid[:scope].each do |scope|
30
+ @html.details do
31
+ @html.summary('Scope ', 'class' => 'h5')
32
+ @html.section(:class => 'block') do
33
+ scopeClass.writeHtml(hGrid[:scope])
34
+ end
35
+ end
36
+ end
37
+
25
38
 
26
39
  # grid representation - number of dimensions
27
40
  unless hGrid[:numberOfDimensions].nil?
@@ -0,0 +1,51 @@
1
+ # HTML writer
2
+ # nominal resolution
3
+
4
+ # History:
5
+ # Stan Smith 2019-09-24 original script
6
+
7
+ require_relative 'html_measure'
8
+
9
+ module ADIWG
10
+ module Mdtranslator
11
+ module Writers
12
+ module Html
13
+
14
+ class Html_NominalResolution
15
+
16
+ def initialize(html)
17
+ @html = html
18
+ end
19
+
20
+ def writeHtml(hResolution)
21
+
22
+ # classes used
23
+ measureClass = Html_Measure.new(@html)
24
+
25
+ # nominal resolution - scanning resolution {measure}
26
+ unless hResolution[:scanningResolution].empty?
27
+ @html.details do
28
+ @html.summary('Scanning Resolution', {'class' => 'h5'})
29
+ @html.section(:class => 'block') do
30
+ measureClass.writeHtml(hResolution[:scanningResolution])
31
+ end
32
+ end
33
+ end
34
+
35
+ # nominal resolution - ground resolution {measure}
36
+ unless hResolution[:groundResolution].empty?
37
+ @html.details do
38
+ @html.summary('Ground Resolution', {'class' => 'h5'})
39
+ @html.section(:class => 'block') do
40
+ measureClass.writeHtml(hResolution[:groundResolution])
41
+ end
42
+ end
43
+ end
44
+
45
+ end # writeHtml
46
+ end # Html_NominalResolution
47
+
48
+ end
49
+ end
50
+ end
51
+ end