adiwg-mdtranslator 2.15.0 → 2.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Rakefile +8 -12
- data/adiwg-mdtranslator.gemspec +2 -2
- data/lib/adiwg/mdtranslator/internal/acquisition.json +108 -0
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +267 -12
- data/lib/adiwg/mdtranslator/internal/qualityReport.json +64 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_entityAttribute.rb +5 -2
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_fgdc.rb +11 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader_messages_eng.yml +15 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_algorithm.rb +65 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_nominalResolution.rb +78 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_onlineResource.rb +25 -10
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_processReport.rb +66 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_processStep.rb +46 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_processing.rb +104 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_source.rb +27 -2
- data/lib/adiwg/mdtranslator/version.rb +4 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_onlineResource.rb +14 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_source.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_fcFeatureCatalogue.rb +20 -15
- data/lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb +4 -4
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_featureCatalog.rb +53 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_mdMetadata.rb +18 -3
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_onlineResource.rb +19 -2
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_onlineResource.rb +26 -20
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_algorithm.rb +31 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_nominalResolution.rb +31 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_onlineResource.rb +6 -3
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processReport.rb +31 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb +6 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processing.rb +37 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb +7 -2
- data/lib/adiwg/mdtranslator_cli.rb +1 -1
- metadata +18 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5648f5e66d246d037e252f21ab96b678acd191582beac5faed22ce1b335d7922
|
4
|
+
data.tar.gz: f0125ed07e0fdfebfbc25b52ebb3144865d863713d09a37d171159fbeb86c6a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d7255a476ebf2e7d3dd60795693523b04f37dd9887ff1fbdee97eb67b5a4954532aa4925f993c64325f19b75e75d19a5226294310b025a9483ea4dd9848a109
|
7
|
+
data.tar.gz: 57d9fdf2c382e1ddf057faea4666c949c54915e7962b45820f5bd0486e8fd1f21274748aeb272a689d56423bc9734d540ddea423f9af061872f0639dd85203a5
|
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[
|
@@ -22,15 +30,3 @@ end
|
|
22
30
|
|
23
31
|
desc 'Run tests'
|
24
32
|
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'
|
data/adiwg-mdtranslator.gemspec
CHANGED
@@ -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.
|
38
|
-
spec.add_runtime_dependency "adiwg-mdcodes", "~> 2.
|
37
|
+
spec.add_runtime_dependency "adiwg-mdjson_schemas", ">= 2.7"
|
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
|
-
#
|
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: [],
|
@@ -255,10 +386,12 @@ class InternalMetadata
|
|
255
386
|
def newOnlineResource
|
256
387
|
{
|
257
388
|
olResURI: nil,
|
258
|
-
olResProtocol: nil,
|
259
389
|
olResName: nil,
|
260
390
|
olResDesc: nil,
|
261
|
-
olResFunction: nil
|
391
|
+
olResFunction: nil,
|
392
|
+
olResApplicationProfile: nil,
|
393
|
+
olResProtocol: nil,
|
394
|
+
olResProtocolRequest: nil
|
262
395
|
}
|
263
396
|
end
|
264
397
|
|
@@ -495,6 +628,90 @@ class InternalMetadata
|
|
495
628
|
end
|
496
629
|
|
497
630
|
|
631
|
+
# data quality ---------------------------
|
632
|
+
def newDataQuality
|
633
|
+
{
|
634
|
+
scope: {},
|
635
|
+
standaloneReport: {},
|
636
|
+
reports: []
|
637
|
+
}
|
638
|
+
end
|
639
|
+
|
640
|
+
def newConformanceResult
|
641
|
+
{
|
642
|
+
dateTime: nil,
|
643
|
+
scope: {},
|
644
|
+
specification: {},
|
645
|
+
explanation: nil,
|
646
|
+
pass: false
|
647
|
+
}
|
648
|
+
end
|
649
|
+
|
650
|
+
def newDescriptiveResult
|
651
|
+
{
|
652
|
+
dateTime: nil,
|
653
|
+
scope: {},
|
654
|
+
statement: nil
|
655
|
+
}
|
656
|
+
end
|
657
|
+
|
658
|
+
def newEvaluationMethod
|
659
|
+
{
|
660
|
+
type: nil,
|
661
|
+
dateTime: [],
|
662
|
+
description: nil,
|
663
|
+
evaluationProcedure: {},
|
664
|
+
referenceDocuments: [],
|
665
|
+
evaluationMethodType: nil,
|
666
|
+
deductiveSource: 'deductive source',
|
667
|
+
samplingScheme: 'sampling scheme',
|
668
|
+
lotDescription: 'lot description',
|
669
|
+
samplingRatio: 'sampling ratio'
|
670
|
+
}
|
671
|
+
end
|
672
|
+
|
673
|
+
def newQuantitativeResult
|
674
|
+
{
|
675
|
+
dateTime: nil,
|
676
|
+
scope: {},
|
677
|
+
values: [],
|
678
|
+
valueUnits: nil,
|
679
|
+
valueRecordType: nil
|
680
|
+
}
|
681
|
+
end
|
682
|
+
|
683
|
+
def newQualityMeasure
|
684
|
+
{
|
685
|
+
identifier: {},
|
686
|
+
nameOfMeasure: [],
|
687
|
+
description: nil
|
688
|
+
}
|
689
|
+
end
|
690
|
+
|
691
|
+
def newReport
|
692
|
+
{
|
693
|
+
type: nil,
|
694
|
+
dateTime: [],
|
695
|
+
standaloneQualityReportDetails: nil,
|
696
|
+
qualityMeasure: {},
|
697
|
+
evaluationMethod: {},
|
698
|
+
quantitativeResults: [],
|
699
|
+
descriptiveResults: [],
|
700
|
+
conformanceResults: [],
|
701
|
+
derivedElementReports: [],
|
702
|
+
relatedElementReports: []
|
703
|
+
}
|
704
|
+
end
|
705
|
+
|
706
|
+
def newStandaloneReport
|
707
|
+
{
|
708
|
+
reportReference: {},
|
709
|
+
abstract: nil,
|
710
|
+
elementReports: []
|
711
|
+
}
|
712
|
+
end
|
713
|
+
|
714
|
+
|
498
715
|
# date-time ------------------------------
|
499
716
|
def newDate
|
500
717
|
{
|
@@ -709,6 +926,46 @@ class InternalMetadata
|
|
709
926
|
}
|
710
927
|
end
|
711
928
|
|
929
|
+
def newAlgorithm
|
930
|
+
{
|
931
|
+
citation: {},
|
932
|
+
description: nil
|
933
|
+
}
|
934
|
+
end
|
935
|
+
|
936
|
+
def newDataSource
|
937
|
+
{
|
938
|
+
sourceId: nil,
|
939
|
+
description: nil,
|
940
|
+
sourceCitation: {},
|
941
|
+
metadataCitations: [],
|
942
|
+
spatialResolution: {},
|
943
|
+
referenceSystem: {},
|
944
|
+
sourceSteps: [],
|
945
|
+
scope: {},
|
946
|
+
processedLevel: {},
|
947
|
+
resolution: {}
|
948
|
+
}
|
949
|
+
end
|
950
|
+
|
951
|
+
def newNominalResolution
|
952
|
+
{
|
953
|
+
scanningResolution: {},
|
954
|
+
groundResolution: {}
|
955
|
+
}
|
956
|
+
end
|
957
|
+
|
958
|
+
def newProcessing
|
959
|
+
{
|
960
|
+
identifier: {},
|
961
|
+
softwareReferences: [],
|
962
|
+
procedureDescription: nil,
|
963
|
+
documentation: [],
|
964
|
+
runtimeParameters: nil,
|
965
|
+
algorithms: []
|
966
|
+
}
|
967
|
+
end
|
968
|
+
|
712
969
|
def newProcessStep
|
713
970
|
{
|
714
971
|
stepId: nil,
|
@@ -719,20 +976,18 @@ class InternalMetadata
|
|
719
976
|
references: [],
|
720
977
|
stepSources: [],
|
721
978
|
stepProducts: [],
|
722
|
-
scope: {}
|
979
|
+
scope: {},
|
980
|
+
output: [],
|
981
|
+
processingInformation: {},
|
982
|
+
reports: []
|
723
983
|
}
|
724
984
|
end
|
725
985
|
|
726
|
-
def
|
986
|
+
def newProcessStepReport
|
727
987
|
{
|
728
|
-
|
988
|
+
name: nil,
|
729
989
|
description: nil,
|
730
|
-
|
731
|
-
metadataCitation: [],
|
732
|
-
spatialResolution: {},
|
733
|
-
referenceSystem: {},
|
734
|
-
sourceSteps: [],
|
735
|
-
scope: {}
|
990
|
+
fileType: nil
|
736
991
|
}
|
737
992
|
end
|
738
993
|
|