adiwg-mdtranslator 2.15.0 → 2.18.0rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +29 -2
  3. data/Rakefile +9 -12
  4. data/adiwg-mdtranslator.gemspec +2 -2
  5. data/lib/adiwg/mdtranslator/internal/acquisition.json +108 -0
  6. data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +278 -18
  7. data/lib/adiwg/mdtranslator/internal/qualityReport.json +64 -0
  8. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_attribute.rb +6 -2
  9. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_entityAttribute.rb +5 -2
  10. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_fgdc.rb +11 -1
  11. data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +4 -0
  12. data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader_messages_eng.yml +15 -0
  13. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_algorithm.rb +65 -0
  14. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_attribute.rb +12 -0
  15. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_contact.rb +18 -2
  16. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_georectifiedRepresentation.rb +9 -0
  17. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_georeferenceableRepresentation.rb +9 -0
  18. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_gridRepresentation.rb +10 -0
  19. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_mdJson.rb +7 -1
  20. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_nominalResolution.rb +78 -0
  21. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_onlineResource.rb +25 -10
  22. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_party.rb +9 -2
  23. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_processReport.rb +66 -0
  24. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_processStep.rb +35 -9
  25. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_processing.rb +103 -0
  26. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_rangeElementDescription.rb +38 -0
  27. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_source.rb +27 -2
  28. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_vectorRepresentation.rb +10 -0
  29. data/lib/adiwg/mdtranslator/version.rb +6 -1
  30. data/lib/adiwg/mdtranslator/writers/html/sections/html_algorithm.rb +48 -0
  31. data/lib/adiwg/mdtranslator/writers/html/sections/html_georectifiedRepresentation.rb +12 -0
  32. data/lib/adiwg/mdtranslator/writers/html/sections/html_georeferenceableRepresentation.rb +13 -0
  33. data/lib/adiwg/mdtranslator/writers/html/sections/html_gridRepresentation.rb +13 -0
  34. data/lib/adiwg/mdtranslator/writers/html/sections/html_nominalResolution.rb +51 -0
  35. data/lib/adiwg/mdtranslator/writers/html/sections/html_onlineResource.rb +14 -0
  36. data/lib/adiwg/mdtranslator/writers/html/sections/html_processReport.rb +47 -0
  37. data/lib/adiwg/mdtranslator/writers/html/sections/html_processStep.rb +35 -8
  38. data/lib/adiwg/mdtranslator/writers/html/sections/html_processing.rb +89 -0
  39. data/lib/adiwg/mdtranslator/writers/html/sections/html_source.rb +27 -2
  40. data/lib/adiwg/mdtranslator/writers/html/sections/html_vectorRepresentation.rb +13 -0
  41. data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_fcFeatureCatalogue.rb +20 -15
  42. data/lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb +4 -4
  43. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_algorithm.rb +61 -0
  44. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_featureCatalog.rb +53 -0
  45. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_georectified.rb +9 -0
  46. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_georeferenceable.rb +10 -0
  47. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_grid.rb +11 -1
  48. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_identifier.rb +2 -2
  49. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_individual.rb +21 -0
  50. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_leProcessStep.rb +167 -0
  51. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_leSource.rb +150 -0
  52. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_liProcessStep.rb +130 -0
  53. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_liSource.rb +126 -0
  54. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_lineage.rb +5 -4
  55. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_mdMetadata.rb +18 -3
  56. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb +61 -0
  57. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_onlineResource.rb +19 -2
  58. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_organization.rb +23 -0
  59. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_partyIdentifier.rb +92 -0
  60. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processReport.rb +66 -0
  61. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processStep.rb +22 -101
  62. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processing.rb +110 -0
  63. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_rangeElementDescription.rb +45 -0
  64. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_sampleDimension.rb +8 -0
  65. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb +19 -95
  66. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_vectorRepresentation.rb +9 -0
  67. data/lib/adiwg/mdtranslator/writers/iso19115_1/iso19115_1_writer_messages_eng.yml +11 -0
  68. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_algorithm.rb +61 -0
  69. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_leProcessStep.rb +153 -0
  70. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_leSource.rb +134 -0
  71. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_liProcessStep.rb +126 -0
  72. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_liSource.rb +114 -0
  73. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_lineage.rb +13 -11
  74. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb +61 -0
  75. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_onlineResource.rb +26 -20
  76. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_processReport.rb +66 -0
  77. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_processStep.rb +22 -96
  78. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_processing.rb +110 -0
  79. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_source.rb +20 -82
  80. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_taxonomy.rb +2 -2
  81. data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer_messages_eng.yml +9 -0
  82. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_algorithm.rb +31 -0
  83. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_attribute.rb +1 -0
  84. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb +1 -0
  85. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_georectifiedRepresentation.rb +1 -0
  86. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_georeferenceableRepresentation.rb +1 -0
  87. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_gridRepresentation.rb +1 -0
  88. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_nominalResolution.rb +31 -0
  89. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_onlineResource.rb +6 -3
  90. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processReport.rb +31 -0
  91. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb +5 -0
  92. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processing.rb +37 -0
  93. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb +7 -2
  94. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_vectorRepresentation.rb +1 -0
  95. data/lib/adiwg/mdtranslator_cli.rb +1 -1
  96. metadata +45 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4c28a9de2c4b82b2f0b46f4de13a87b8de286d98
4
- data.tar.gz: af96ef12d442a941918a23842bd74aa027d0d1a2
2
+ SHA256:
3
+ metadata.gz: 67548c26ee946f10c11bb16593fea2bff705209467ffd4fbe9b9ce5db971803e
4
+ data.tar.gz: c4c6850208bbf1e47621c741777862cc6f30c2f6668d1753309c4f7397618311
5
5
  SHA512:
6
- metadata.gz: f428c56a2f93748c0482746b31278bbacd995080416a6c28e3aa195c1ca16b30a02a73ee3a1a1b7e45037f8f4fa28ee0db3735dc630903af85a6cedf58253ad4
7
- data.tar.gz: 1a8b0cc95da21914bab8eae81d2b9f55b962984cc583e76fc49472ca8c14b1b0d3d9b0e3d16ef9f1c3b27986eadd954edc78e341b25228eb7a73de85e1f4f7b9
6
+ metadata.gz: 76385a2877ccbb04739c2aac4a2526912f97d1d3a3863c9779ff948f447b5434f34d68030ad2a143466ac2fa804887d1edd60b56587e14b3a069545651fb52fb
7
+ data.tar.gz: 53326a9899e781aaa171bbaa25a18a6d0e736d3d615bb1f6f24c7818a65885b42cb3345bfb37d4d2f5155727cb3aee6660e56088b31ce8303999dac4ad2f8634
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
@@ -2,6 +2,14 @@
2
2
  require 'bundler/gem_tasks'
3
3
  require 'rake/testtask'
4
4
 
5
+ # Rake::TestTask.new do |t|
6
+ # t.libs << 'test'
7
+ # t.test_files = FileList[
8
+ # 'test/writers/iso19115-2/tc*.rb'
9
+ # ]
10
+ # t.verbose = true
11
+ # end
12
+
5
13
  Rake::TestTask.new do |t|
6
14
  t.libs << 'test'
7
15
  t.test_files = FileList[
@@ -18,19 +26,8 @@ Rake::TestTask.new do |t|
18
26
  'test/translator/tc*.rb'
19
27
  ]
20
28
  t.verbose = true
29
+ t.warning = false
21
30
  end
22
31
 
23
32
  desc 'Run tests'
24
33
  task :default => :test
25
-
26
- # 'test/readers/fgdc/tc*.rb',
27
- # 'test/readers/mdJson/tc*.rb',
28
- # 'test/readers/sbJson/tc*.rb',
29
- # 'test/writers/fgdc/tc*.rb',
30
- # 'test/writers/html/tc*.rb',
31
- # 'test/writers/iso19110/tc*.rb',
32
- # 'test/writers/iso19115-1/tc*.rb',
33
- # 'test/writers/iso19115-2/tc*.rb',
34
- # 'test/writers/mdJson/tc*.rb',
35
- # 'test/writers/sbJson/tc*.rb',
36
- # 'test/translator/tc*.rb'
@@ -34,8 +34,8 @@ 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.6"
38
- spec.add_runtime_dependency "adiwg-mdcodes", "~> 2.7"
37
+ spec.add_runtime_dependency "adiwg-mdjson_schemas", "2.8.0.pre.beta"
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"
41
41
  spec.add_runtime_dependency "coderay", "~> 1.1"
@@ -0,0 +1,108 @@
1
+ {
2
+ "acquisition": [
3
+ {
4
+ "plan": [
5
+ {
6
+ "planId": "plan ID",
7
+ "planType": "MI_GeometryTypeCode",
8
+ "status": "MD_ProgressCode",
9
+ "citation": {},
10
+ "planOperation": ["operationId"],
11
+ "satisfiedRequirement": ["requirementId"]
12
+ }
13
+ ],
14
+ "requirement": [
15
+ {
16
+ "requirementId": "requirement ID",
17
+ "citation": {},
18
+ "identifier": {},
19
+ "requestor": [],
20
+ "recipient": [],
21
+ "priority": "MI_PriorityCode",
22
+ "requestedDate": {
23
+ "requestedDateOfCollection": "2019-06-10T16:01:00",
24
+ "latestAcceptableDate": "2019-06-13:T16:02:00"
25
+ },
26
+ "expiryDate": "2019-06-10T15:50:00",
27
+ "satisfiedPlan": ["planId"]
28
+ }
29
+ ],
30
+ "objective": [
31
+ {
32
+ "objectiveId": "objective ID",
33
+ "identifier": [],
34
+ "priority": "objective priority",
35
+ "objectiveType": ["MI_ObjectiveTypeCode"],
36
+ "function": ["objective function one"],
37
+ "extent": [],
38
+ "objectiveOccurrence": ["eventId"],
39
+ "pass": ["passId"],
40
+ "sensingInstrument": ["instrumentId"]
41
+ }
42
+ ],
43
+ "platform": [
44
+ {
45
+ "platformId": "platform ID",
46
+ "citation": {},
47
+ "identifier": {},
48
+ "description": "platform description",
49
+ "sponsor": [],
50
+ "instrument": ["instrumentId"]
51
+ }
52
+ ],
53
+ "instrument": [
54
+ {
55
+ "instrumentId": "instrument ID",
56
+ "citation": [],
57
+ "identifier": {},
58
+ "instrumentType": "instrument type",
59
+ "description": "instrument description",
60
+ "mountedOn": "platformId"
61
+ }
62
+ ],
63
+ "operation": [
64
+ {
65
+ "operationId": "operation ID",
66
+ "description": "operation description",
67
+ "citation": {},
68
+ "identifier": {},
69
+ "status": "MD_ProgressCode",
70
+ "operationType": "MI_OperationTypeCode",
71
+ "objective": ["objectiveId"],
72
+ "parentOperation": "operationId",
73
+ "childOperation": ["operationId"],
74
+ "plan": "planId",
75
+ "platform": ["platformId"],
76
+ "significantEvent": ["eventId"]
77
+ }
78
+ ],
79
+ "event": [
80
+ {
81
+ "eventId": "event ID",
82
+ "identifier": {},
83
+ "trigger": "MI_TriggerCode",
84
+ "context": "MI_ContextCode",
85
+ "sequence": "MI_SequenceCode",
86
+ "time": "2019-06-10T16:07:00",
87
+ "expectedObjective": ["objectiveId"],
88
+ "relatedPass": "passId",
89
+ "relatedSensor": ["instrumentId"]
90
+ }
91
+ ],
92
+ "pass": [
93
+ {
94
+ "passId": "pass ID",
95
+ "identifier": {},
96
+ "extent": {},
97
+ "relatedEvent": ["eventId"]
98
+ }
99
+ ],
100
+ "environment": {
101
+ "averageAirTemperature": 9.9,
102
+ "maxRelativeHumidity": 9.9,
103
+ "maxAltitude": 9.9,
104
+ "meteorologicalConditions": "meteorological conditions"
105
+ }
106
+ }
107
+ ]
108
+ }
@@ -154,7 +154,138 @@ class InternalMetadata
154
154
  end
155
155
 
156
156
 
157
- # contacts--------------------------------
157
+ # acquisition ----------------------------
158
+ def newAcquisition
159
+ {
160
+ plans: [],
161
+ requirements: [],
162
+ objectives: [],
163
+ platforms: [],
164
+ instruments: [],
165
+ operations: [],
166
+ events: [],
167
+ passes: [],
168
+ environment: {}
169
+ }
170
+ end
171
+
172
+ def newEnvironment
173
+ {
174
+ averageAirTemperature: nil,
175
+ maxRelativeHumidity: nil,
176
+ maxAltitude: nil,
177
+ meteorologicalConditions: nil
178
+ }
179
+ end
180
+
181
+ def newEvent
182
+ {
183
+ eventId: nil,
184
+ trigger: nil,
185
+ context: nil,
186
+ sequence: nil,
187
+ dateTime: nil,
188
+ expectedObjectives: [],
189
+ relatedPass: nil,
190
+ relatedSensors: []
191
+ }
192
+ end
193
+
194
+ def newInstrument
195
+ {
196
+ instrumentId: nil,
197
+ citation: {},
198
+ identifier: {},
199
+ instrumentType: nil,
200
+ description: nil,
201
+ mountedOn: nil
202
+ }
203
+ end
204
+
205
+ def newObjective
206
+ {
207
+ objectiveId: nil,
208
+ identifiers: [],
209
+ priority: nil,
210
+ objectiveTypes: [],
211
+ functions: [],
212
+ extents: [],
213
+ occurrences: [],
214
+ passes: [],
215
+ sensingInstruments: []
216
+ }
217
+ end
218
+
219
+ def newPass
220
+ {
221
+ passId: nil,
222
+ identifier: {},
223
+ extent: {},
224
+ relatedEvents: []
225
+ }
226
+ end
227
+
228
+ def newPlan
229
+ {
230
+ planId: nil,
231
+ planType: nil,
232
+ status: nil,
233
+ citation: {},
234
+ planOperations: [],
235
+ satisfiedRequirements: []
236
+ }
237
+ end
238
+
239
+ def newOperation
240
+ {
241
+ operationId: nil,
242
+ citation: {},
243
+ identifier: {},
244
+ status: nil,
245
+ operationType: nil,
246
+ objectives: [],
247
+ parentOperations: nil,
248
+ childOperations: [],
249
+ plan: nil,
250
+ platforms: [],
251
+ significantEvents: []
252
+ }
253
+ end
254
+
255
+ def newRequirement
256
+ {
257
+ requirementId: nil,
258
+ citation: {},
259
+ identifier: {},
260
+ requestors: [],
261
+ recipients: [],
262
+ priority: nil,
263
+ requestedDate: {},
264
+ expiryDate: nil,
265
+ satisfiedPlans: []
266
+ }
267
+ end
268
+
269
+ def newPlatform
270
+ {
271
+ platformId: nil,
272
+ citation: {},
273
+ identifier: {},
274
+ description: nil,
275
+ sponsors: [],
276
+ instruments: []
277
+ }
278
+ end
279
+
280
+ def newRequestedDate
281
+ {
282
+ requestedDateCollection: nil,
283
+ latestAcceptableDate: nil
284
+ }
285
+ end
286
+
287
+
288
+ # contacts -------------------------------
158
289
  def newAddress
159
290
  {
160
291
  addressTypes: [],
@@ -180,8 +311,9 @@ class InternalMetadata
180
311
  eMailList: [],
181
312
  onlineResources: [],
182
313
  hoursOfService: [],
314
+ externalIdentifiers: [],
183
315
  contactInstructions: nil,
184
- contactType: nil
316
+ contactType: nil,
185
317
  }
186
318
  end
187
319
 
@@ -255,10 +387,12 @@ class InternalMetadata
255
387
  def newOnlineResource
256
388
  {
257
389
  olResURI: nil,
258
- olResProtocol: nil,
259
390
  olResName: nil,
260
391
  olResDesc: nil,
261
- olResFunction: nil
392
+ olResFunction: nil,
393
+ olResApplicationProfile: nil,
394
+ olResProtocol: nil,
395
+ olResProtocolRequest: nil
262
396
  }
263
397
  end
264
398
 
@@ -359,6 +493,7 @@ class InternalMetadata
359
493
  maxValue: nil,
360
494
  units: nil,
361
495
  scaleFactor: nil,
496
+ rangeElementDescriptions: [],
362
497
  offset: nil,
363
498
  meanValue: nil,
364
499
  numberOfValues: nil,
@@ -495,6 +630,90 @@ class InternalMetadata
495
630
  end
496
631
 
497
632
 
633
+ # data quality ---------------------------
634
+ def newDataQuality
635
+ {
636
+ scope: {},
637
+ standaloneReport: {},
638
+ reports: []
639
+ }
640
+ end
641
+
642
+ def newConformanceResult
643
+ {
644
+ dateTime: nil,
645
+ scope: {},
646
+ specification: {},
647
+ explanation: nil,
648
+ pass: false
649
+ }
650
+ end
651
+
652
+ def newDescriptiveResult
653
+ {
654
+ dateTime: nil,
655
+ scope: {},
656
+ statement: nil
657
+ }
658
+ end
659
+
660
+ def newEvaluationMethod
661
+ {
662
+ type: nil,
663
+ dateTime: [],
664
+ description: nil,
665
+ evaluationProcedure: {},
666
+ referenceDocuments: [],
667
+ evaluationMethodType: nil,
668
+ deductiveSource: 'deductive source',
669
+ samplingScheme: 'sampling scheme',
670
+ lotDescription: 'lot description',
671
+ samplingRatio: 'sampling ratio'
672
+ }
673
+ end
674
+
675
+ def newQuantitativeResult
676
+ {
677
+ dateTime: nil,
678
+ scope: {},
679
+ values: [],
680
+ valueUnits: nil,
681
+ valueRecordType: nil
682
+ }
683
+ end
684
+
685
+ def newQualityMeasure
686
+ {
687
+ identifier: {},
688
+ nameOfMeasure: [],
689
+ description: nil
690
+ }
691
+ end
692
+
693
+ def newReport
694
+ {
695
+ type: nil,
696
+ dateTime: [],
697
+ standaloneQualityReportDetails: nil,
698
+ qualityMeasure: {},
699
+ evaluationMethod: {},
700
+ quantitativeResults: [],
701
+ descriptiveResults: [],
702
+ conformanceResults: [],
703
+ derivedElementReports: [],
704
+ relatedElementReports: []
705
+ }
706
+ end
707
+
708
+ def newStandaloneReport
709
+ {
710
+ reportReference: {},
711
+ abstract: nil,
712
+ elementReports: []
713
+ }
714
+ end
715
+
716
+
498
717
  # date-time ------------------------------
499
718
  def newDate
500
719
  {
@@ -709,6 +928,46 @@ class InternalMetadata
709
928
  }
710
929
  end
711
930
 
931
+ def newAlgorithm
932
+ {
933
+ citation: {},
934
+ description: nil
935
+ }
936
+ end
937
+
938
+ def newDataSource
939
+ {
940
+ sourceId: nil,
941
+ description: nil,
942
+ sourceCitation: {},
943
+ metadataCitations: [],
944
+ spatialResolution: {},
945
+ referenceSystem: {},
946
+ sourceSteps: [],
947
+ scope: {},
948
+ processedLevel: {},
949
+ resolution: {}
950
+ }
951
+ end
952
+
953
+ def newNominalResolution
954
+ {
955
+ scanningResolution: {},
956
+ groundResolution: {}
957
+ }
958
+ end
959
+
960
+ def newProcessing
961
+ {
962
+ identifier: {},
963
+ softwareReference: {},
964
+ procedureDescription: nil,
965
+ documentation: [],
966
+ runtimeParameters: nil,
967
+ algorithms: []
968
+ }
969
+ end
970
+
712
971
  def newProcessStep
713
972
  {
714
973
  stepId: nil,
@@ -716,23 +975,20 @@ class InternalMetadata
716
975
  rationale: nil,
717
976
  timePeriod: {},
718
977
  processors: [],
719
- references: [],
720
978
  stepSources: [],
721
979
  stepProducts: [],
722
- scope: {}
980
+ references: [],
981
+ scope: {},
982
+ processingInformation: {},
983
+ reports: []
723
984
  }
724
985
  end
725
986
 
726
- def newDataSource
987
+ def newProcessStepReport
727
988
  {
728
- sourceId: nil,
989
+ name: nil,
729
990
  description: nil,
730
- sourceCitation: {},
731
- metadataCitation: [],
732
- spatialResolution: {},
733
- referenceSystem: {},
734
- sourceSteps: [],
735
- scope: {}
991
+ fileType: nil
736
992
  }
737
993
  end
738
994
 
@@ -927,7 +1183,8 @@ class InternalMetadata
927
1183
  numberOfDimensions: nil,
928
1184
  dimension: [],
929
1185
  cellGeometry: nil,
930
- transformationParameterAvailable: false
1186
+ transformationParameterAvailable: false,
1187
+ scope: []
931
1188
  }
932
1189
  end
933
1190
 
@@ -944,7 +1201,8 @@ class InternalMetadata
944
1201
  def newVectorInfo
945
1202
  {
946
1203
  topologyLevel: nil,
947
- vectorObject: []
1204
+ vectorObject: [],
1205
+ scope: []
948
1206
  }
949
1207
  end
950
1208
 
@@ -964,7 +1222,8 @@ class InternalMetadata
964
1222
  centerPoint: [],
965
1223
  pointInPixel: nil,
966
1224
  transformationDimensionDescription: nil,
967
- transformationDimensionMapping: nil
1225
+ transformationDimensionMapping: nil,
1226
+ scope: []
968
1227
  }
969
1228
  end
970
1229
 
@@ -975,7 +1234,8 @@ class InternalMetadata
975
1234
  orientationParameterAvailable: false,
976
1235
  orientationParameterDescription: nil,
977
1236
  georeferencedParameter: nil,
978
- parameterCitation: []
1237
+ parameterCitation: [],
1238
+ scope: []
979
1239
  }
980
1240
  end
981
1241
 
@@ -0,0 +1,64 @@
1
+ {
2
+ "dataQuality": [
3
+ {
4
+ "scope": {},
5
+ "standaloneQualityReport": {
6
+ "reportReference": {},
7
+ "abstract": "stand alone abstract",
8
+ "elementReport": []
9
+ },
10
+ "report": [
11
+ {
12
+ "type": "quality report type - enumerated",
13
+ "dateTime": ["2019-06-11T08:10:00"],
14
+ "standaloneQualityReportDetails": "standalone details",
15
+ "qualityMeasure": {
16
+ "identifier": {},
17
+ "name": ["name of measure"],
18
+ "description": "measure description"
19
+ },
20
+ "evaluationMethod": {
21
+ "type": "evaluation method type - enumerated",
22
+ "dateTime": ["2019-06-11T08:35:00"],
23
+ "methodDescription": "evaluation method description",
24
+ "evaluationProcedure": {},
25
+ "referenceDocument": [],
26
+ "evaluationMethodType": "DQ_EvaluationMethodTypeCode",
27
+ "deductiveSource": "deductive source",
28
+ "samplingScheme": "sampling scheme",
29
+ "lotDescription": "lot description",
30
+ "samplingRatio": "sampling ratio"
31
+ },
32
+ "quantitativeResult": [
33
+ {
34
+ "dateTime": "2019-06-11T09:00:00",
35
+ "scope": {},
36
+ "value": [9.99, 9.0],
37
+ "valueUnits": "value units",
38
+ "valueRecordType": "value record type"
39
+ }
40
+ ],
41
+ "descriptiveResult": [
42
+ {
43
+ "dateTime": "2019-06-11T09:00:00",
44
+ "scope": {},
45
+ "statement": "descriptive result statement"
46
+ }
47
+ ],
48
+ "conformanceResult": [
49
+ {
50
+ "dateTime": "2019-06-11T09:00:00",
51
+ "scope": {},
52
+ "specification": {},
53
+ "explanation": "conformance result explanation",
54
+ "pass": false
55
+ }
56
+ ],
57
+ "coverageResult": ["drop this class"],
58
+ "derivedElementReport": [],
59
+ "relatedElementReport": []
60
+ }
61
+ ]
62
+ }
63
+ ]
64
+ }
@@ -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')