adiwg-mdtranslator 2.20.0.pre.beta.10 → 2.21.0.pre.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +46 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_acquisition.rb +133 -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_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/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_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_acquisition.rb +103 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_environment.rb +82 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_event.rb +123 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_instrument.rb +92 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_instrumentationEvent.rb +83 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_instrumentationEventList.rb +73 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_mdMetadata.rb +11 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_objective.rb +121 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_operation.rb +131 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_pass.rb +63 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_plan.rb +76 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_platform.rb +102 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_requestedDate.rb +44 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_requirement.rb +111 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_revision.rb +55 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_acquisition.rb +42 -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_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_requestedDate.rb +26 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requirement.rb +36 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_revision.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_acquisition.rb +195 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_body.rb +18 -2
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_environment.rb +58 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_event.rb +121 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_instrument.rb +98 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_instrumentationEvent.rb +84 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_instrumentationEventList.rb +90 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_objective.rb +155 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_operation.rb +178 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_pass.rb +72 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_plan.rb +93 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_platform.rb +117 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_requestedDate.rb +33 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_requirement.rb +139 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_revision.rb +55 -0
- metadata +72 -2
@@ -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
|
@@ -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
|
@@ -0,0 +1,84 @@
|
|
1
|
+
require_relative 'html_citation'
|
2
|
+
require_relative 'html_extent'
|
3
|
+
require_relative 'html_revision'
|
4
|
+
|
5
|
+
module ADIWG
|
6
|
+
module Mdtranslator
|
7
|
+
module Writers
|
8
|
+
module Html
|
9
|
+
class Html_InstrumentationEvent
|
10
|
+
def initialize(html)
|
11
|
+
@html = html
|
12
|
+
end
|
13
|
+
|
14
|
+
def writeHtml(hInstrumentationEvent)
|
15
|
+
citationClass = Html_Citation.new(@html)
|
16
|
+
extentClass = Html_Extent.new(@html)
|
17
|
+
revisionClass = Html_Revision.new(@html)
|
18
|
+
|
19
|
+
# citation
|
20
|
+
unless hInstrumentationEvent[:citations].empty?
|
21
|
+
@html.section(:class => 'block') do
|
22
|
+
@html.details do
|
23
|
+
@html.summary('Citations', {'class' => 'h4'})
|
24
|
+
hInstrumentationEvent[:citations].each do |citation|
|
25
|
+
@html.section(:class => 'block') do
|
26
|
+
@html.details do
|
27
|
+
@html.summary('Citation', {'class' => 'h5'})
|
28
|
+
citationClass.writeHtml(citation)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# description
|
37
|
+
unless hInstrumentationEvent[:description].nil?
|
38
|
+
@html.em('Description: ')
|
39
|
+
@html.text!(hInstrumentationEvent[:description])
|
40
|
+
@html.br
|
41
|
+
end
|
42
|
+
|
43
|
+
# extent
|
44
|
+
unless hInstrumentationEvent[:extent].empty?
|
45
|
+
@html.section(:class => 'block') do
|
46
|
+
@html.details do
|
47
|
+
@html.summary('Extent', {'class' => 'h4'})
|
48
|
+
@html.section(:class => 'block') do
|
49
|
+
extentClass.writeHtml(hInstrumentationEvent[:extent])
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# eventType
|
56
|
+
unless hInstrumentationEvent[:eventType].nil?
|
57
|
+
@html.em('Event Type: ')
|
58
|
+
@html.text!(hInstrumentationEvent[:eventType])
|
59
|
+
@html.br
|
60
|
+
end
|
61
|
+
|
62
|
+
# revisionHistory
|
63
|
+
unless hInstrumentationEvent[:revisionHistories].empty?
|
64
|
+
@html.section(:class => 'block') do
|
65
|
+
@html.details do
|
66
|
+
@html.summary('Revision History', {'class' => 'h4'})
|
67
|
+
hInstrumentationEvent[:revisionHistories].each do |revision|
|
68
|
+
@html.section(:class => 'block') do
|
69
|
+
@html.details do
|
70
|
+
@html.summary('Revision', {'class' => 'h5'})
|
71
|
+
revisionClass.writeHtml(revision)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|