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,32 @@
|
|
1
|
+
require 'jbuilder'
|
2
|
+
require_relative 'mdJson_citation'
|
3
|
+
require_relative 'mdJson_operation'
|
4
|
+
require_relative 'mdJson_requirement'
|
5
|
+
|
6
|
+
module ADIWG
|
7
|
+
module Mdtranslator
|
8
|
+
module Writers
|
9
|
+
module MdJson
|
10
|
+
|
11
|
+
module Plan
|
12
|
+
|
13
|
+
@Namespace = ADIWG::Mdtranslator::Writers::MdJson
|
14
|
+
|
15
|
+
def self.build(hPlan)
|
16
|
+
|
17
|
+
Jbuilder.new do |json|
|
18
|
+
json.planId hPlan[:planId]
|
19
|
+
json.planType hPlan[:planType] unless hPlan[:planType].nil?
|
20
|
+
json.status hPlan[:status]
|
21
|
+
json.citation Citation.build(hPlan[:citation])
|
22
|
+
json.planOperation @Namespace.json_map(hPlan[:operations], Operation)
|
23
|
+
json.satisfiedRequirement @Namespace.json_map(hPlan[:satisfiedRequirements], Requirement)
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end # Plan
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'jbuilder'
|
2
|
+
require_relative 'mdJson_citation'
|
3
|
+
require_relative 'mdJson_identifier'
|
4
|
+
require_relative 'mdJson_responsibleParty'
|
5
|
+
require_relative 'mdJson_instrument'
|
6
|
+
require_relative 'mdJson_instrumentationEventList'
|
7
|
+
|
8
|
+
module ADIWG
|
9
|
+
module Mdtranslator
|
10
|
+
module Writers
|
11
|
+
module MdJson
|
12
|
+
|
13
|
+
module Platform
|
14
|
+
|
15
|
+
@Namespace = ADIWG::Mdtranslator::Writers::MdJson
|
16
|
+
|
17
|
+
def self.build(hPlatform)
|
18
|
+
|
19
|
+
Jbuilder.new do |json|
|
20
|
+
json.platformId hPlatform[:platformId]
|
21
|
+
json.citation Citation.build(hPlatform[:citation]) unless hPlatform[:citation].empty?
|
22
|
+
json.identifier Identifier.build(hPlatform[:identifier])
|
23
|
+
json.description hPlatform[:description]
|
24
|
+
json.sponsor @Namespace.json_map(hPlatform[:sponsors], ResponsibleParty) unless hPlatform[:sponsors].empty?
|
25
|
+
json.instrument @Namespace.json_map(hPlatform[:instruments], Instrument)
|
26
|
+
json.history @Namespace.json_map(hPlatform[:history], InstrumentationEventList) unless hPlatform[:history].empty?
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end # Platform
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'jbuilder'
|
2
|
+
require_relative 'mdJson_dateTime'
|
3
|
+
|
4
|
+
module ADIWG
|
5
|
+
module Mdtranslator
|
6
|
+
module Writers
|
7
|
+
module MdJson
|
8
|
+
|
9
|
+
module RequestedDate
|
10
|
+
|
11
|
+
@Namespace = ADIWG::Mdtranslator::Writers::MdJson
|
12
|
+
|
13
|
+
def self.build(hRequestedDate)
|
14
|
+
|
15
|
+
Jbuilder.new do |json|
|
16
|
+
json.requestedDateOfCollection DateTime.build(hRequestedDate[:requestedDateOfCollection])
|
17
|
+
json.latestAcceptableDate DateTime.build(hRequestedDate[:latestAcceptableDate])
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end # Requested Date
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'jbuilder'
|
2
|
+
require_relative 'mdJson_citation'
|
3
|
+
require_relative 'mdJson_identifier'
|
4
|
+
require_relative 'mdJson_responsibleParty'
|
5
|
+
require_relative 'mdJson_requestedDate'
|
6
|
+
require_relative 'mdJson_plan'
|
7
|
+
|
8
|
+
module ADIWG
|
9
|
+
module Mdtranslator
|
10
|
+
module Writers
|
11
|
+
module MdJson
|
12
|
+
|
13
|
+
module Requirement
|
14
|
+
|
15
|
+
@Namespace = ADIWG::Mdtranslator::Writers::MdJson
|
16
|
+
|
17
|
+
def self.build(hRequirement)
|
18
|
+
|
19
|
+
Jbuilder.new do |json|
|
20
|
+
json.requirementId hRequirement[:requirementId]
|
21
|
+
json.citation Citation.build(hRequirement[:citation])
|
22
|
+
json.identifier Identifier.build(hRequirement[:identifier])
|
23
|
+
json.requestor @Namespace.json_map(hRequirement[:requestors], ResponsibleParty)
|
24
|
+
json.recipient @Namespace.json_map(hRequirement[:recipients], ResponsibleParty)
|
25
|
+
json.priority hRequirement[:priority]
|
26
|
+
json.requestedDate RequestedDate.build(hRequirement[:requestedDate])
|
27
|
+
json.expiryDate hRequirement[:expiryDate]
|
28
|
+
json.satisfiedPlan @Namespace.json_map(hRequirement[:satisfiedPlans], Plan)
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end # Requirement
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'jbuilder'
|
2
|
+
require_relative 'mdJson_responsibleParty'
|
3
|
+
require_relative 'mdJson_dateTime'
|
4
|
+
|
5
|
+
module ADIWG
|
6
|
+
module Mdtranslator
|
7
|
+
module Writers
|
8
|
+
module MdJson
|
9
|
+
|
10
|
+
module Revision
|
11
|
+
|
12
|
+
@Namespace = ADIWG::Mdtranslator::Writers::MdJson
|
13
|
+
|
14
|
+
def self.build(hRevision)
|
15
|
+
|
16
|
+
Jbuilder.new do |json|
|
17
|
+
json.description hRevision[:description]
|
18
|
+
json.responsibleParty @Namespace.json_map(hRevision[:responsibleParties], ResponsibleParty)
|
19
|
+
json.dateInfo @Namespace.json_map(hRevision[:dateInfo], DateTime)
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end # Revision
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,195 @@
|
|
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 Simple_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.div do
|
36
|
+
@html.h5('Scope', {'class' => 'h5'})
|
37
|
+
@html.div(:class => 'block') do
|
38
|
+
scopeClass.writeHtml(hDataQuality[:scope])
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# plan
|
44
|
+
unless hAcquisition[:plans].empty?
|
45
|
+
@html.div(:class =>'block') do
|
46
|
+
@html.div do
|
47
|
+
@html.h4('Plans', {'class' => 'h4'})
|
48
|
+
hAcquisition[:plans].each do |plan|
|
49
|
+
@html.div(:class =>'block') do
|
50
|
+
@html.div do
|
51
|
+
@html.h5('Plan', {'class' => 'h5'})
|
52
|
+
planClass.writeHtml(plan)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# requirement
|
61
|
+
unless hAcquisition[:requirements].empty?
|
62
|
+
@html.div(:class =>'block') do
|
63
|
+
@html.div do
|
64
|
+
@html.h4('Requirements', {'class' => 'h4'})
|
65
|
+
hAcquisition[:requirements].each do |requirement|
|
66
|
+
@html.div(:class =>'block') do
|
67
|
+
@html.div do
|
68
|
+
@html.h5('Requirement', {'class' => 'h5'})
|
69
|
+
requirementClass.writeHtml(requirement)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# objective
|
78
|
+
unless hAcquisition[:objectives].empty?
|
79
|
+
@html.div(:class =>'block') do
|
80
|
+
@html.div do
|
81
|
+
@html.h4('Objectives', {'class' => 'h4'})
|
82
|
+
hAcquisition[:objectives].each do |objective|
|
83
|
+
@html.div(:class =>'block') do
|
84
|
+
@html.div do
|
85
|
+
@html.h5('Objective', {'class' => 'h5'})
|
86
|
+
objectiveClass.writeHtml(objective)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
|
95
|
+
# platform
|
96
|
+
unless hAcquisition[:platforms].empty?
|
97
|
+
@html.div(:class =>'block') do
|
98
|
+
@html.div do
|
99
|
+
@html.h4('Platforms', {'class' => 'h4'})
|
100
|
+
hAcquisition[:platforms].each do |platform|
|
101
|
+
@html.div(:class =>'block') do
|
102
|
+
@html.div do
|
103
|
+
@html.h5('Platform', {'class' => 'h5'})
|
104
|
+
platformClass.writeHtml(platform)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# Instrument
|
113
|
+
unless hAcquisition[:instruments].empty?
|
114
|
+
@html.div(:class =>'block') do
|
115
|
+
@html.div do
|
116
|
+
@html.h4('Instrument', {'class' => 'h4'})
|
117
|
+
hAcquisition[:instruments].each do |instrument|
|
118
|
+
@html.div(:class =>'block') do
|
119
|
+
@html.div do
|
120
|
+
@html.h5('Instrument', {'class' => 'h5'})
|
121
|
+
instrumentClass.writeHtml(instrument)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# operation
|
130
|
+
unless hAcquisition[:operations].empty?
|
131
|
+
@html.div(:class =>'block') do
|
132
|
+
@html.div do
|
133
|
+
@html.h4('Operations', {'class' => 'h4'})
|
134
|
+
hAcquisition[:operations].each do |operations|
|
135
|
+
@html.div(:class =>'block') do
|
136
|
+
@html.div do
|
137
|
+
@html.h5('Operation', {'class' => 'h5'})
|
138
|
+
operationClass.writeHtml(operations)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
# Event
|
147
|
+
unless hAcquisition[:events].empty?
|
148
|
+
@html.div(:class =>'block') do
|
149
|
+
@html.div do
|
150
|
+
@html.h4('Events', {'class' => 'h4'})
|
151
|
+
hAcquisition[:events].each do |event|
|
152
|
+
@html.div(:class =>'block') do
|
153
|
+
@html.div do
|
154
|
+
@html.h5('Event', {'class' => 'h5'})
|
155
|
+
eventClass.writeHtml(event)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
# Pass
|
164
|
+
unless hAcquisition[:passes].empty?
|
165
|
+
@html.div(:class =>'block') do
|
166
|
+
@html.div do
|
167
|
+
@html.h4('Passes', {'class' => 'h4'})
|
168
|
+
hAcquisition[:passes].each do |pass|
|
169
|
+
@html.div(:class =>'block') do
|
170
|
+
@html.div do
|
171
|
+
@html.h5('Pass', {'class' => 'h5'})
|
172
|
+
passClass.writeHtml(pass)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# Environment
|
181
|
+
unless hAcquisition[:environment].empty?
|
182
|
+
@html.div do
|
183
|
+
@html.h5('Scope', {'class' => 'h5'})
|
184
|
+
@html.div(:class => 'block') do
|
185
|
+
environmentClass.writeHtml(hAcquisition[:environment])
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
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
|
+
aquisitionClass = 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
|
@@ -78,6 +81,7 @@ module ADIWG
|
|
78
81
|
@html.a(' Dictionary', {'href' => '#body-dataDictionary', 'class' => 'btn navBtn', 'id' => 'dictionaryButton'})
|
79
82
|
@html.a(' Funding', {'href' => '#body-funding', 'class' => 'btn navBtn', 'id' => 'fundingButton'})
|
80
83
|
@html.a(' Repository', {'href' => '#body-repository', 'class' => 'btn navBtn', 'id' => 'repositoryButton'})
|
84
|
+
@html.a(' Acquisition', {'href' => '#body-acquisition', 'class' => 'btn navBtn', 'id' => 'acquisitionButton'})
|
81
85
|
|
82
86
|
end
|
83
87
|
|
@@ -148,8 +152,8 @@ module ADIWG
|
|
148
152
|
unless hResourceInfo.empty?
|
149
153
|
@html.div do
|
150
154
|
@html.h2('Resource Information', {'id' => 'body-resourceInfo', 'class' => 'h2'})
|
151
|
-
|
152
|
-
|
155
|
+
@html.span('', {'style' => 'mso-bookmark:body-resourceInfo'})
|
156
|
+
@html.div(:class => 'block') do
|
153
157
|
resourceClass.writeHtml(hResourceInfo)
|
154
158
|
end
|
155
159
|
@html.hr
|
@@ -298,6 +302,18 @@ module ADIWG
|
|
298
302
|
end
|
299
303
|
end
|
300
304
|
|
305
|
+
unless aAcquisitions.nil? || aAcquisitions.empty?
|
306
|
+
@html.div do
|
307
|
+
@html.h2('Acquisitions', {'id' => 'body-acquisition', 'class' => 'h2'})
|
308
|
+
@html.span('', {'style' => 'mso-bookmark:body-acquisition'})
|
309
|
+
aAcquisitions.each do |hAcquisition|
|
310
|
+
@html.div(:class => 'block') do
|
311
|
+
aquisitionClass.writeHtml(hAcquisition)
|
312
|
+
end
|
313
|
+
end
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
301
317
|
end # body
|
302
318
|
end # writeHtml
|
303
319
|
end # Html_Body
|
@@ -0,0 +1,58 @@
|
|
1
|
+
module ADIWG
|
2
|
+
module Mdtranslator
|
3
|
+
module Writers
|
4
|
+
module Simple_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 Simple_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.div(:class => 'block') do
|
31
|
+
@html.div do
|
32
|
+
@html.summary('Identifier', {'class' => 'h4'})
|
33
|
+
@html.div(: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.div(: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.div(:class => 'block') do
|
72
|
+
@html.div do
|
73
|
+
@html.summary('Expected Objective', {'class' => 'h4'})
|
74
|
+
hEvent[:expectedObjectives].each do |objective|
|
75
|
+
@html.div(:class => 'block') do
|
76
|
+
@html.div 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.div(:class => 'block') do
|
89
|
+
@html.div do
|
90
|
+
@html.summary('Related Pass', {'class' => 'h4'})
|
91
|
+
@html.div(: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.div(:class => 'block') do
|
101
|
+
@html.div do
|
102
|
+
@html.summary('Related Sensors', {'class' => 'h4'})
|
103
|
+
hEvent[:relatedSensors].each do |instrument|
|
104
|
+
@html.div(:class => 'block') do
|
105
|
+
@html.div 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
|