adiwg-mdtranslator 2.20.0.pre.beta.3 → 2.21.0.pre.beta.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -1
- data/Gemfile.lock +12 -10
- data/README.md +0 -21
- data/Rakefile +0 -1
- data/adiwg-mdtranslator.gemspec +2 -2
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +45 -7
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_dataQuality.rb +103 -59
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_acquisition.rb +133 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_conformanceResult.rb +5 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_coverageResult.rb +4 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataQuality.rb +7 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_descriptiveResult.rb +4 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_environment.rb +47 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_event.rb +88 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_instrument.rb +73 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_instrumentationEvent.rb +77 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_instrumentationEventList.rb +62 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_metadata.rb +11 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_objective.rb +104 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_operation.rb +119 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_pass.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_plan.rb +80 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_platform.rb +87 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb +4 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_requestedDate.rb +51 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_requirement.rb +98 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_revision.rb +50 -0
- data/lib/adiwg/mdtranslator/version.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_dataQuality.rb +101 -31
- data/lib/adiwg/mdtranslator/writers/html/sections/html_acquisition.rb +199 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_body.rb +19 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQuality.rb +17 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQualityReport.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_environment.rb +58 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_event.rb +121 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_instrument.rb +98 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_instrumentationEvent.rb +84 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_instrumentationEventList.rb +90 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_objective.rb +155 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_operation.rb +178 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_pass.rb +72 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_plan.rb +93 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_platform.rb +117 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_requestedDate.rb +33 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_requirement.rb +139 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_revision.rb +55 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_dataIdentification.rb +29 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_dataQualityReport.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_gcoDateTime.rb +10 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_acquisition.rb +42 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_conformanceResult.rb +6 -5
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageResult.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_descriptiveResult.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_environment.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_event.rb +37 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_instrument.rb +35 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_instrumentationEvent.rb +30 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_instrumentationEventList.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb +2 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_objective.rb +37 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_onlineResource.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_operation.rb +34 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_pass.rb +30 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_plan.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_platform.rb +35 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_quantitativeResult.rb +6 -5
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requestedDate.rb +26 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requirement.rb +36 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_resourceInfo.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_revision.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_citation.rb +9 -26
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQuality.rb +1 -1
- data/lib/adiwg/mdtranslator_cli.rb +1 -1
- metadata +48 -39
- data/DCAT-US.md +0 -67
- data/lib/adiwg/mdtranslator/writers/dcat_us/dcat_us_writer.rb +0 -98
- data/lib/adiwg/mdtranslator/writers/dcat_us/readme.md +0 -10
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_access_level.rb +0 -55
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_access_url.rb +0 -17
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_accrualPeriodicity.rb +0 -45
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_bureau_code.rb +0 -33
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_contact_point.rb +0 -29
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_dcat_us.rb +0 -104
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_described_by.rb +0 -29
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_described_by_type.rb +0 -33
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_description.rb +0 -19
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_distribution.rb +0 -59
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_download_url.rb +0 -17
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_identifier.rb +0 -29
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_is_part_of.rb +0 -27
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_issued.rb +0 -19
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_keyword.rb +0 -19
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_landing_page.rb +0 -27
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_language.rb +0 -23
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_license.rb +0 -18
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_media_type.rb +0 -17
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_modified.rb +0 -29
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_primaryITInvestmentUII.rb +0 -19
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_program_code.rb +0 -33
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_publisher.rb +0 -74
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_references.rb +0 -50
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_rights.rb +0 -32
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_spatial.rb +0 -32
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_system_of_records.rb +0 -28
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_temporal.rb +0 -40
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_theme.rb +0 -28
- data/lib/adiwg/mdtranslator/writers/dcat_us/version.rb +0 -14
@@ -0,0 +1,199 @@
|
|
1
|
+
require_relative 'html_scope'
|
2
|
+
require_relative 'html_plan'
|
3
|
+
require_relative 'html_requirement'
|
4
|
+
require_relative 'html_objective'
|
5
|
+
require_relative 'html_platform'
|
6
|
+
require_relative 'html_instrument'
|
7
|
+
require_relative 'html_operation'
|
8
|
+
require_relative 'html_event'
|
9
|
+
require_relative 'html_pass'
|
10
|
+
require_relative 'html_environment'
|
11
|
+
|
12
|
+
module ADIWG
|
13
|
+
module Mdtranslator
|
14
|
+
module Writers
|
15
|
+
module Html
|
16
|
+
class Html_Acquisition
|
17
|
+
def initialize(html)
|
18
|
+
@html = html
|
19
|
+
end
|
20
|
+
|
21
|
+
def writeHtml(hAcquisition)
|
22
|
+
scopeClass = Html_Scope.new(@html)
|
23
|
+
planClass = Html_Plan.new(@html)
|
24
|
+
requirementClass = Html_Requirement.new(@html)
|
25
|
+
objectiveClass = Html_Objective.new(@html)
|
26
|
+
platformClass = Html_Platform.new(@html)
|
27
|
+
instrumentClass = Html_Instrument.new(@html)
|
28
|
+
operationClass = Html_Operation.new(@html)
|
29
|
+
eventClass = Html_Event.new(@html)
|
30
|
+
passClass = Html_Pass.new(@html)
|
31
|
+
environmentClass = Html_Environment.new(@html)
|
32
|
+
|
33
|
+
# scope
|
34
|
+
unless hAcquisition[:scope].empty?
|
35
|
+
@html.section(:class => 'block') do
|
36
|
+
@html.details do
|
37
|
+
@html.summary('Scope', {'class' => 'h4'})
|
38
|
+
@html.section(:class => 'block') do
|
39
|
+
scopeClass.writeHtml(hAcquisition[:scope])
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# plan
|
46
|
+
unless hAcquisition[:plans].empty?
|
47
|
+
@html.section(:class => 'block') do
|
48
|
+
@html.details do
|
49
|
+
@html.summary('Plans', {'class' => 'h4'})
|
50
|
+
hAcquisition[:plans].each do |plan|
|
51
|
+
@html.section(:class => 'block') do
|
52
|
+
@html.details do
|
53
|
+
@html.summary('Plan', {'class' => 'h5'})
|
54
|
+
planClass.writeHtml(plan)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# requirement
|
63
|
+
unless hAcquisition[:requirements].empty?
|
64
|
+
@html.section(:class => 'block') do
|
65
|
+
@html.details do
|
66
|
+
@html.summary('Requirements', {'class' => 'h4'})
|
67
|
+
hAcquisition[:requirements].each do |requirement|
|
68
|
+
@html.section(:class => 'block') do
|
69
|
+
@html.details do
|
70
|
+
@html.summary('Requirement', {'class' => 'h5'})
|
71
|
+
requirementClass.writeHtml(requirement)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# objective
|
80
|
+
unless hAcquisition[:objectives].empty?
|
81
|
+
@html.section(:class => 'block') do
|
82
|
+
@html.details do
|
83
|
+
@html.summary('Objectives', {'class' => 'h4'})
|
84
|
+
hAcquisition[:objectives].each do |objective|
|
85
|
+
@html.section(:class => 'block') do
|
86
|
+
@html.details do
|
87
|
+
@html.summary('Objective', {'class' => 'h5'})
|
88
|
+
objectiveClass.writeHtml(objective)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
|
97
|
+
# platform
|
98
|
+
unless hAcquisition[:platforms].empty?
|
99
|
+
@html.section(:class => 'block') do
|
100
|
+
@html.details do
|
101
|
+
@html.summary('Platforms', {'class' => 'h4'})
|
102
|
+
hAcquisition[:platforms].each do |platform|
|
103
|
+
@html.section(:class => 'block') do
|
104
|
+
@html.details do
|
105
|
+
@html.summary('Platform', {'class' => 'h5'})
|
106
|
+
platformClass.writeHtml(platform)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
# Instrument
|
115
|
+
unless hAcquisition[:instruments].empty?
|
116
|
+
@html.section(:class => 'block') do
|
117
|
+
@html.details do
|
118
|
+
@html.summary('Instruments', {'class' => 'h4'})
|
119
|
+
hAcquisition[:instruments].each do |instrument|
|
120
|
+
@html.section(:class => 'block') do
|
121
|
+
@html.details do
|
122
|
+
@html.summary('Instrument', {'class' => 'h5'})
|
123
|
+
instrumentClass.writeHtml(instrument)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# operation
|
132
|
+
unless hAcquisition[:operations].empty?
|
133
|
+
@html.section(:class => 'block') do
|
134
|
+
@html.details do
|
135
|
+
@html.summary('Operations', {'class' => 'h4'})
|
136
|
+
hAcquisition[:operations].each do |operation|
|
137
|
+
@html.section(:class => 'block') do
|
138
|
+
@html.details do
|
139
|
+
@html.summary('Operation', {'class' => 'h5'})
|
140
|
+
operationClass.writeHtml(operation)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# Event
|
149
|
+
unless hAcquisition[:events].empty?
|
150
|
+
@html.section(:class => 'block') do
|
151
|
+
@html.details do
|
152
|
+
@html.summary('Events', {'class' => 'h4'})
|
153
|
+
hAcquisition[:events].each do |event|
|
154
|
+
@html.section(:class => 'block') do
|
155
|
+
@html.details do
|
156
|
+
@html.summary('Event', {'class' => 'h5'})
|
157
|
+
eventClass.writeHtml(event)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# Pass
|
166
|
+
unless hAcquisition[:passes].empty?
|
167
|
+
@html.section(:class => 'block') do
|
168
|
+
@html.details do
|
169
|
+
@html.summary('Passes', {'class' => 'h4'})
|
170
|
+
hAcquisition[:passes].each do |pass|
|
171
|
+
@html.section(:class => 'block') do
|
172
|
+
@html.details do
|
173
|
+
@html.summary('Pass', {'class' => 'h5'})
|
174
|
+
passClass.writeHtml(pass)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Environment
|
183
|
+
unless hAcquisition[:environment].empty?
|
184
|
+
@html.section(:class => 'block') do
|
185
|
+
@html.details do
|
186
|
+
@html.summary('Environment', {'class' => 'h4'})
|
187
|
+
@html.section(:class => 'block') do
|
188
|
+
environmentClass.writeHtml(hAcquisition[:environment])
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
@@ -20,6 +20,7 @@ require_relative 'html_additionalDocumentation'
|
|
20
20
|
require_relative 'html_funding'
|
21
21
|
require_relative 'html_dataDictionary'
|
22
22
|
require_relative 'html_metadataRepository'
|
23
|
+
require_relative 'html_acquisition'
|
23
24
|
|
24
25
|
module ADIWG
|
25
26
|
module Mdtranslator
|
@@ -47,6 +48,7 @@ module ADIWG
|
|
47
48
|
fundingClass = Html_Funding.new(@html)
|
48
49
|
dictionaryClass = Html_DataDictionary.new(@html)
|
49
50
|
repositoryClass = Html_Repository.new(@html)
|
51
|
+
acquisitionClass = Html_Acquisition.new(@html)
|
50
52
|
|
51
53
|
# make sections of the internal data store convenient
|
52
54
|
hSchema = intObj[:schema]
|
@@ -61,6 +63,7 @@ module ADIWG
|
|
61
63
|
aFunding = intObj[:metadata][:funding]
|
62
64
|
aDictionaries = intObj[:dataDictionaries]
|
63
65
|
aRepositories = intObj[:metadataRepositories]
|
66
|
+
aAcquisitions = intObj[:metadata][:acquisitions]
|
64
67
|
|
65
68
|
# set page title and logo
|
66
69
|
# side navigation
|
@@ -72,6 +75,7 @@ module ADIWG
|
|
72
75
|
@html.a(' Metadata', {'href' => '#body-metadataInfo', 'class' => 'btn navBtn', 'id' => 'metadataButton'})
|
73
76
|
@html.a(' Resource', {'href' => '#body-resourceInfo', 'class' => 'btn navBtn', 'id' => 'resourceButton'})
|
74
77
|
@html.a(' Quality', {'href' => '#body-dataQuality', 'class' => 'btn navBtn', 'id' => 'qualityButton'})
|
78
|
+
@html.a(' Acquistion', {'href' => '#body-acquisition', 'class' => 'btn navBtn', 'id' => 'acquisitionButton'})
|
75
79
|
@html.a(' Lineage', {'href' => '#body-lineage', 'class' => 'btn navBtn', 'id' => 'lineageButton'})
|
76
80
|
@html.a(' Distribution', {'href' => '#body-distribution', 'class' => 'btn navBtn', 'id' => 'distributionButton'})
|
77
81
|
@html.a(' Associated', {'href' => '#body-associatedResource', 'class' => 'btn navBtn', 'id' => 'associatedButton'})
|
@@ -215,6 +219,21 @@ module ADIWG
|
|
215
219
|
end
|
216
220
|
end
|
217
221
|
|
222
|
+
# acquisition section
|
223
|
+
unless aAcquisitions.empty?
|
224
|
+
@html.details do
|
225
|
+
@html.summary('Acquisition', {'id' => 'body-acquisition', 'class' => 'h2'})
|
226
|
+
aAcquisitions.each do |hAcquisition|
|
227
|
+
@html.section(:class => 'block') do
|
228
|
+
@html.details do
|
229
|
+
@html.summary('Acquisition', {'class' => 'h3'})
|
230
|
+
acquisitionClass.writeHtml(hAcquisition)
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
218
237
|
# associated resource section
|
219
238
|
unless aAssociated.empty?
|
220
239
|
@html.details do
|
@@ -16,6 +16,22 @@ module ADIWG
|
|
16
16
|
scopeClass = Html_Scope.new(@html)
|
17
17
|
dataQualityReportClass = Html_DataQualityReport.new(@html)
|
18
18
|
|
19
|
+
# system identifier
|
20
|
+
unless hDataQuality[:systemIdentifier].nil?
|
21
|
+
systemIdentifier = hDataQuality[:systemIdentifier]
|
22
|
+
@html.section(:class => 'block') do
|
23
|
+
@html.details do
|
24
|
+
@html.summary('System Identifier', {'class' => 'h4'})
|
25
|
+
@html.em('UUID: ')
|
26
|
+
@html.text!(systemIdentifier[:uid])
|
27
|
+
@html.br
|
28
|
+
@html.em('Label:')
|
29
|
+
@html.text!(systemIdentifier[:label])
|
30
|
+
@html.br
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
19
35
|
# scope
|
20
36
|
unless hDataQuality[:scope].empty?
|
21
37
|
@html.section(:class => 'block') do
|
@@ -64,7 +80,7 @@ module ADIWG
|
|
64
80
|
hDataQuality[:report].each do |report|
|
65
81
|
@html.section(:class => 'block') do
|
66
82
|
@html.details do
|
67
|
-
@html.summary(
|
83
|
+
@html.summary(report[:type], {'class' => 'h5'})
|
68
84
|
dataQualityReportClass.writeHtml(report)
|
69
85
|
end
|
70
86
|
end
|
@@ -185,6 +185,13 @@ module ADIWG
|
|
185
185
|
end
|
186
186
|
end
|
187
187
|
end
|
188
|
+
|
189
|
+
# Name
|
190
|
+
unless result[:name].nil?
|
191
|
+
@html.em('Name: ')
|
192
|
+
@html.text!(result[:name])
|
193
|
+
@html.br
|
194
|
+
end
|
188
195
|
|
189
196
|
# Specification (citation)
|
190
197
|
unless result[:specification].empty?
|
@@ -242,6 +249,13 @@ module ADIWG
|
|
242
249
|
end
|
243
250
|
end
|
244
251
|
|
252
|
+
# Name
|
253
|
+
unless result[:name].nil?
|
254
|
+
@html.em('Name: ')
|
255
|
+
@html.text!(result[:name])
|
256
|
+
@html.br
|
257
|
+
end
|
258
|
+
|
245
259
|
# SpatialRepresentationType
|
246
260
|
unless result[:spatialRepresentationType].nil?
|
247
261
|
@html.em('Spatial Representation Type: ')
|
@@ -317,6 +331,13 @@ module ADIWG
|
|
317
331
|
end
|
318
332
|
end
|
319
333
|
end
|
334
|
+
|
335
|
+
# Name
|
336
|
+
unless result[:name].nil?
|
337
|
+
@html.em('Name: ')
|
338
|
+
@html.text!(result[:name])
|
339
|
+
@html.br
|
340
|
+
end
|
320
341
|
|
321
342
|
# Statement
|
322
343
|
unless result[:statement].nil?
|
@@ -352,6 +373,13 @@ module ADIWG
|
|
352
373
|
end
|
353
374
|
end
|
354
375
|
end
|
376
|
+
|
377
|
+
# Name
|
378
|
+
unless result[:name].nil?
|
379
|
+
@html.em('Name: ')
|
380
|
+
@html.text!(result[:name])
|
381
|
+
@html.br
|
382
|
+
end
|
355
383
|
|
356
384
|
# Value
|
357
385
|
unless result[:values].empty?
|
@@ -0,0 +1,58 @@
|
|
1
|
+
module ADIWG
|
2
|
+
module Mdtranslator
|
3
|
+
module Writers
|
4
|
+
module Html
|
5
|
+
class Html_Environment
|
6
|
+
def initialize(html)
|
7
|
+
@html = html
|
8
|
+
end
|
9
|
+
|
10
|
+
def writeHtml(hEnvironment)
|
11
|
+
# averageAirTemperature
|
12
|
+
unless hEnvironment[:averageAirTemperature].nil?
|
13
|
+
@html.em('Average Air Temperature: ')
|
14
|
+
@html.text!(hEnvironment[:averageAirTemperature].to_s)
|
15
|
+
@html.br
|
16
|
+
end
|
17
|
+
|
18
|
+
# maxRelativeHumidity
|
19
|
+
unless hEnvironment[:maxRelativeHumidity].nil?
|
20
|
+
@html.em('Maximum Relative Humidity: ')
|
21
|
+
@html.text!(hEnvironment[:maxRelativeHumidity].to_s)
|
22
|
+
@html.br
|
23
|
+
end
|
24
|
+
|
25
|
+
# maxAltitude
|
26
|
+
unless hEnvironment[:maxAltitude].nil?
|
27
|
+
@html.em('Maximum Altitude: ')
|
28
|
+
@html.text!(hEnvironment[:maxAltitude].to_s)
|
29
|
+
@html.br
|
30
|
+
end
|
31
|
+
|
32
|
+
# meteorologicalConditions
|
33
|
+
unless hEnvironment[:meteorologicalConditions].nil?
|
34
|
+
@html.em('Meteorological Conditions: ')
|
35
|
+
@html.text!(hEnvironment[:meteorologicalConditions])
|
36
|
+
@html.br
|
37
|
+
end
|
38
|
+
|
39
|
+
# solarAzimuth
|
40
|
+
unless hEnvironment[:solarAzimuth].nil?
|
41
|
+
@html.em('Solar Azimuth: ')
|
42
|
+
@html.text!(hEnvironment[:solarAzimuth].to_s)
|
43
|
+
@html.br
|
44
|
+
end
|
45
|
+
|
46
|
+
# solarElevation
|
47
|
+
unless hEnvironment[:solarElevation].nil?
|
48
|
+
@html.em('Solar Elevation: ')
|
49
|
+
@html.text!(hEnvironment[:solarElevation].to_s)
|
50
|
+
@html.br
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,121 @@
|
|
1
|
+
require_relative 'html_pass'
|
2
|
+
require_relative 'html_instrument'
|
3
|
+
require_relative 'html_extent'
|
4
|
+
require_relative 'html_identifier'
|
5
|
+
|
6
|
+
module ADIWG
|
7
|
+
module Mdtranslator
|
8
|
+
module Writers
|
9
|
+
module Html
|
10
|
+
class Html_Event
|
11
|
+
def initialize(html)
|
12
|
+
@html = html
|
13
|
+
end
|
14
|
+
|
15
|
+
def writeHtml(hEvent)
|
16
|
+
passClass = Html_Pass.new(@html)
|
17
|
+
instrumentClass = Html_Instrument.new(@html)
|
18
|
+
extentClass = Html_Extent.new(@html)
|
19
|
+
identifierClass = Html_Identifier.new(@html)
|
20
|
+
|
21
|
+
# eventId
|
22
|
+
unless hEvent[:eventId].nil?
|
23
|
+
@html.em('Event ID: ')
|
24
|
+
@html.text!(hEvent[:eventId])
|
25
|
+
@html.br
|
26
|
+
end
|
27
|
+
|
28
|
+
# identifier
|
29
|
+
unless hEvent[:identifier].empty?
|
30
|
+
@html.section(:class => 'block') do
|
31
|
+
@html.details do
|
32
|
+
@html.summary('Identifier', {'class' => 'h4'})
|
33
|
+
@html.section(:class => 'block') do
|
34
|
+
identifierClass.writeHtml(hEvent[:identifier])
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# trigger
|
41
|
+
unless hEvent[:trigger].nil?
|
42
|
+
@html.em('Trigger: ')
|
43
|
+
@html.text!(hEvent[:trigger])
|
44
|
+
@html.br
|
45
|
+
end
|
46
|
+
|
47
|
+
# context
|
48
|
+
unless hEvent[:context].nil?
|
49
|
+
@html.em('Context: ')
|
50
|
+
@html.text!(hEvent[:context])
|
51
|
+
@html.br
|
52
|
+
end
|
53
|
+
|
54
|
+
# sequence
|
55
|
+
unless hEvent[:sequence].nil?
|
56
|
+
@html.em('Sequence: ')
|
57
|
+
@html.text!(hEvent[:sequence])
|
58
|
+
@html.br
|
59
|
+
end
|
60
|
+
|
61
|
+
# time
|
62
|
+
unless hEvent[:dateTime].nil? || hEvent[:dateTime].empty?
|
63
|
+
@html.em('Datetime: ')
|
64
|
+
@html.section(:class => 'block') do
|
65
|
+
@html.text!.writeHtml(hEvent[:dateTime][:dateTime].to_s)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# expectedObjective
|
70
|
+
unless hEvent[:expectedObjectives].empty?
|
71
|
+
@html.section(:class => 'block') do
|
72
|
+
@html.details do
|
73
|
+
@html.summary('Expected Objective', {'class' => 'h4'})
|
74
|
+
hEvent[:expectedObjectives].each do |objective|
|
75
|
+
@html.section(:class => 'block') do
|
76
|
+
@html.details do
|
77
|
+
@html.summary('Objective', {'class' => 'h5'})
|
78
|
+
objectiveClass.writeHtml(objective)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# relatedPass
|
87
|
+
unless hEvent[:relatedPass].empty?
|
88
|
+
@html.section(:class => 'block') do
|
89
|
+
@html.details do
|
90
|
+
@html.summary('Related Pass', {'class' => 'h4'})
|
91
|
+
@html.section(:class => 'block') do
|
92
|
+
passClass.writeHtml(hEvent[:relatedPass])
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
#relatedSensor
|
99
|
+
unless hEvent[:relatedSensors].empty?
|
100
|
+
@html.section(:class => 'block') do
|
101
|
+
@html.details do
|
102
|
+
@html.summary('Related Sensors', {'class' => 'h4'})
|
103
|
+
hEvent[:relatedSensors].each do |instrument|
|
104
|
+
@html.section(:class => 'block') do
|
105
|
+
@html.details do
|
106
|
+
@html.summary('Instrument', {'class' => 'h5'})
|
107
|
+
instrumentClass.writeHtml(instrument)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
end # writeHtml
|
116
|
+
end # Html_Event
|
117
|
+
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
require_relative 'html_identifier'
|
2
|
+
require_relative 'html_platform'
|
3
|
+
require_relative 'html_instrumentationEventList'
|
4
|
+
|
5
|
+
module ADIWG
|
6
|
+
module Mdtranslator
|
7
|
+
module Writers
|
8
|
+
module Html
|
9
|
+
class Html_Instrument
|
10
|
+
def initialize(html)
|
11
|
+
@html = html
|
12
|
+
end
|
13
|
+
|
14
|
+
def writeHtml(hInstrument)
|
15
|
+
identifierClass = Html_Identifier.new(@html)
|
16
|
+
platformClass = Html_Platform.new(@html)
|
17
|
+
instrumentationEventListClass = Html_InstrumentationEventList.new(@html)
|
18
|
+
|
19
|
+
# instrumentId
|
20
|
+
unless hInstrument[:instrumentId].nil?
|
21
|
+
@html.em('Instrument ID: ')
|
22
|
+
@html.text!(hInstrument[:instrumentId])
|
23
|
+
@html.br
|
24
|
+
end
|
25
|
+
|
26
|
+
# identifier
|
27
|
+
unless hInstrument[:identifier].empty?
|
28
|
+
@html.section(:class => 'block') do
|
29
|
+
@html.details do
|
30
|
+
@html.summary('Identifier', {'class' => 'h4'})
|
31
|
+
@html.section(:class => 'block') do
|
32
|
+
identifierClass.writeHtml(hInstrument[:identifier])
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# instrumentType
|
39
|
+
unless hInstrument[:instrumentType].nil?
|
40
|
+
@html.em('Instrument Type: ')
|
41
|
+
@html.text!(hInstrument[:instrumentType])
|
42
|
+
@html.br
|
43
|
+
end
|
44
|
+
|
45
|
+
# description
|
46
|
+
unless hInstrument[:description].nil?
|
47
|
+
@html.em('Description: ')
|
48
|
+
@html.text!(hInstrument[:description])
|
49
|
+
@html.br
|
50
|
+
end
|
51
|
+
|
52
|
+
# mountedOn
|
53
|
+
unless hInstrument[:mountedOn].empty?
|
54
|
+
@html.section(:class => 'block') do
|
55
|
+
@html.details do
|
56
|
+
@html.summary('Mounted On', {'class' => 'h4'})
|
57
|
+
@html.section(:class => 'block') do
|
58
|
+
platformClass.writeHtml(hInstrument[:mountedOn])
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# history
|
65
|
+
unless hInstrument[:histories].empty?
|
66
|
+
@html.section(:class => 'block') do
|
67
|
+
@html.details do
|
68
|
+
@html.summary('Histories', {'class' => 'h4'})
|
69
|
+
hInstrument[:histories].each do |instrumentationEventList|
|
70
|
+
@html.section(:class => 'block') do
|
71
|
+
@html.details do
|
72
|
+
@html.summary('Instrumentation Event List', {'class' => 'h5'})
|
73
|
+
instrumentationEventListClass.writeHtml(instrumentationEventList)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# hostId
|
82
|
+
unless hInstrument[:hostId].empty?
|
83
|
+
@html.section(:class => 'block') do
|
84
|
+
@html.details do
|
85
|
+
@html.summary('Host ID', {'class' => 'h4'})
|
86
|
+
@html.section(:class => 'block') do
|
87
|
+
identifierClass.writeHtml(hInstrument[:hostId])
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
end # writeHtml
|
94
|
+
end # Html_Instrument
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|