adiwg-mdtranslator 2.21.0.pre.beta.0 → 2.21.0.pre.beta.1
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/DCAT-US.md +67 -0
- data/Gemfile.lock +5 -5
- data/README.md +21 -0
- data/Rakefile +1 -0
- data/adiwg-mdtranslator.gemspec +2 -2
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +1 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_dataQuality.rb +27 -37
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataDictionary.rb +8 -0
- data/lib/adiwg/mdtranslator/version.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/dcat_us/dcat_us_writer.rb +98 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/readme.md +10 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_access_level.rb +55 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_access_url.rb +17 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_accrualPeriodicity.rb +45 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_bureau_code.rb +33 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_contact_point.rb +29 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_dcat_us.rb +104 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_described_by.rb +29 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_described_by_type.rb +33 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_description.rb +19 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_distribution.rb +59 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_download_url.rb +17 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_identifier.rb +29 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_is_part_of.rb +27 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_issued.rb +19 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_keyword.rb +19 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_landing_page.rb +27 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_language.rb +23 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_license.rb +18 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_media_type.rb +17 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_modified.rb +29 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_primaryITInvestmentUII.rb +19 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_program_code.rb +33 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_publisher.rb +74 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_references.rb +50 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_rights.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_spatial.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_system_of_records.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_temporal.rb +40 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_theme.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/dcat_us/version.rb +14 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_dataQuality.rb +133 -185
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_spatialDomain.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_acquisition.rb +103 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_enumerationList.rb +52 -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_extension.rb +208 -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 +38 -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/iso19115_3/classes/class_timePeriod.rb +2 -6
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_dictionary.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_acquisition.rb +195 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_allocation.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_body.rb +18 -2
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_citation.rb +8 -8
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQualityReport.rb +3 -3
- 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_geographicExtent.rb +1 -1
- 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_lineage.rb +4 -4
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_maintenance.rb +4 -4
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_medium.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_metadataInfo.rb +4 -4
- 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_releasability.rb +1 -1
- 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_resourceInfo.rb +5 -5
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_responsibility.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_revision.rb +55 -0
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_spatialRepresentation.rb +4 -4
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_taxonomy.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_timeInstant.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_timePeriod.rb +5 -5
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_transferOption.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_usage.rb +5 -5
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_vectorRepresentation.rb +2 -2
- data/lib/adiwg/mdtranslator_cli.rb +1 -1
- metadata +69 -6
@@ -0,0 +1,155 @@
|
|
1
|
+
require_relative 'html_identifier'
|
2
|
+
require_relative 'html_extent'
|
3
|
+
require_relative 'html_event'
|
4
|
+
require_relative 'html_pass'
|
5
|
+
require_relative 'html_instrument'
|
6
|
+
|
7
|
+
module ADIWG
|
8
|
+
module Mdtranslator
|
9
|
+
module Writers
|
10
|
+
module Simple_html
|
11
|
+
class Html_Objective
|
12
|
+
def initialize(html)
|
13
|
+
@html = html
|
14
|
+
end
|
15
|
+
|
16
|
+
def writeHtml(hObjective)
|
17
|
+
identifierClass = Html_Identifier.new(@html)
|
18
|
+
extentClass = Html_Extent.new(@html)
|
19
|
+
eventClass = Html_Event.new(@html)
|
20
|
+
passClass = Html_Pass.new(@html)
|
21
|
+
instrumentClass = Html_Instrument.new(@html)
|
22
|
+
|
23
|
+
# objectiveId
|
24
|
+
unless hObjective[:objectiveId].nil?
|
25
|
+
@html.em('Objective ID: ')
|
26
|
+
@html.text!(hObjective[:objectiveId])
|
27
|
+
@html.br
|
28
|
+
end
|
29
|
+
|
30
|
+
# identifier
|
31
|
+
unless hObjective[:identifiers].empty?
|
32
|
+
@html.div(:class => 'block') do
|
33
|
+
@html.div do
|
34
|
+
@html.summary('Identifiers', {'class' => 'h4'})
|
35
|
+
hObjective[:identifiers].each do |identifier|
|
36
|
+
@html.div(:class => 'block') do
|
37
|
+
@html.div do
|
38
|
+
@html.summary('Identifier', {'class' => 'h5'})
|
39
|
+
identifierClass.writeHtml(identifier)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# priority
|
48
|
+
unless hObjective[:priority].nil?
|
49
|
+
@html.em('Priority: ')
|
50
|
+
@html.text!(hObjective[:priority])
|
51
|
+
@html.br
|
52
|
+
end
|
53
|
+
|
54
|
+
# objectiveType
|
55
|
+
unless hObjective[:objectiveTypes].empty?
|
56
|
+
@html.div(:class => 'block') do
|
57
|
+
@html.div do
|
58
|
+
@html.summary('Objective Types', {'class' => 'h4'})
|
59
|
+
hObjective[:objectiveTypes].each do |type|
|
60
|
+
@html.em('Type: ')
|
61
|
+
@html.text!(type)
|
62
|
+
@html.br
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# function
|
69
|
+
unless hObjective[:functions].empty?
|
70
|
+
@html.div(:class => 'block') do
|
71
|
+
@html.div do
|
72
|
+
@html.summary('Functions', {'class' => 'h4'})
|
73
|
+
hObjective[:functions].each do |function|
|
74
|
+
@html.em('Function: ')
|
75
|
+
@html.text!(function)
|
76
|
+
@html.br
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# extent
|
83
|
+
unless hObjective[:extents].empty?
|
84
|
+
@html.div(:class => 'block') do
|
85
|
+
@html.div do
|
86
|
+
@html.summary('Extents', {'class' => 'h4'})
|
87
|
+
hObjective[:extents].each do |extent|
|
88
|
+
@html.div(:class => 'block') do
|
89
|
+
@html.div do
|
90
|
+
@html.summary('Extent', {'class' => 'h5'})
|
91
|
+
extentClass.writeHtml(extent)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# Occurrence
|
100
|
+
unless hObjective[:occurrences].empty?
|
101
|
+
@html.div(:class => 'block') do
|
102
|
+
@html.div do
|
103
|
+
@html.summary('Occurrences', {'class' => 'h4'})
|
104
|
+
hObjective[:occurrences].each do |occurrence|
|
105
|
+
@html.div(:class => 'block') do
|
106
|
+
@html.div do
|
107
|
+
@html.summary('Occurrence', {'class' => 'h5'})
|
108
|
+
eventClass.writeHtml(occurrence)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
# pass
|
117
|
+
unless hObjective[:passes].empty?
|
118
|
+
@html.div(:class => 'block') do
|
119
|
+
@html.div do
|
120
|
+
@html.summary('Passes', {'class' => 'h4'})
|
121
|
+
hObjective[:passes].each do |pass|
|
122
|
+
@html.div(:class => 'block') do
|
123
|
+
@html.div do
|
124
|
+
@html.summary('Pass', {'class' => 'h5'})
|
125
|
+
passClass.writeHtml(pass)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
# sensingInstrument
|
134
|
+
unless hObjective[:sensingInstruments].empty?
|
135
|
+
@html.div(:class => 'block') do
|
136
|
+
@html.div do
|
137
|
+
@html.summary('Sensing Instruments', {'class' => 'h4'})
|
138
|
+
hObjective[:sensingInstruments].each do |instrument|
|
139
|
+
@html.div(:class => 'block') do
|
140
|
+
@html.div do
|
141
|
+
@html.summary('Instrument', {'class' => 'h5'})
|
142
|
+
instrumentClass.writeHtml(instrument)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end # writeHtml
|
150
|
+
|
151
|
+
end # Html_Requirement
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
@@ -0,0 +1,178 @@
|
|
1
|
+
require_relative 'html_citation'
|
2
|
+
require_relative 'html_identifier'
|
3
|
+
require_relative 'html_objective'
|
4
|
+
require_relative 'html_operation'
|
5
|
+
require_relative 'html_plan'
|
6
|
+
require_relative 'html_platform'
|
7
|
+
require_relative 'html_event'
|
8
|
+
|
9
|
+
module ADIWG
|
10
|
+
module Mdtranslator
|
11
|
+
module Writers
|
12
|
+
module Simple_html
|
13
|
+
class Html_Operation
|
14
|
+
def initialize(html)
|
15
|
+
@html = html
|
16
|
+
end
|
17
|
+
|
18
|
+
def writeHtml(hOperation)
|
19
|
+
citationClass = Html_Citation.new(@html)
|
20
|
+
identifierClass = Html_Identifier.new(@html)
|
21
|
+
objectiveClass = Html_Objective.new(@html)
|
22
|
+
operationClass = Html_Operation.new(@html)
|
23
|
+
planClass = Html_Plan.new(@html)
|
24
|
+
platformClass = Html_Platform.new(@html)
|
25
|
+
eventClass = Html_Event.new(@html)
|
26
|
+
|
27
|
+
|
28
|
+
# operationId
|
29
|
+
unless hOperation[:operationId].nil?
|
30
|
+
@html.em('Operation ID: ')
|
31
|
+
@html.text!(hOperation[:operationId])
|
32
|
+
@html.br
|
33
|
+
end
|
34
|
+
|
35
|
+
# description
|
36
|
+
unless hOperation[:description].nil?
|
37
|
+
@html.em('Description: ')
|
38
|
+
@html.text!(hOperation[:description])
|
39
|
+
@html.br
|
40
|
+
end
|
41
|
+
|
42
|
+
# citation
|
43
|
+
unless hOperation[:citation].empty?
|
44
|
+
@html.div(:class => 'block') do
|
45
|
+
@html.div do
|
46
|
+
@html.summary('Citation', {'class' => 'h4'})
|
47
|
+
@html.div(:class => 'block') do
|
48
|
+
citationClass.writeHtml(hOperation[:citation])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# identifier
|
55
|
+
unless hOperation[:identifier].empty?
|
56
|
+
@html.div(:class => 'block') do
|
57
|
+
@html.div do
|
58
|
+
@html.summary('Identifier', {'class' => 'h4'})
|
59
|
+
@html.div(:class => 'block') do
|
60
|
+
identifierClass.writeHtml(hOperation[:identifier])
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# status
|
67
|
+
unless hOperation[:status].nil?
|
68
|
+
@html.em('Status: ')
|
69
|
+
@html.text!(hOperation[:status])
|
70
|
+
@html.br
|
71
|
+
end
|
72
|
+
|
73
|
+
# operationType
|
74
|
+
unless hOperation[:operationType].nil?
|
75
|
+
@html.em('Operation Type: ')
|
76
|
+
@html.text!(hOperation[:operationType])
|
77
|
+
@html.br
|
78
|
+
end
|
79
|
+
|
80
|
+
# objective
|
81
|
+
unless hOperation[:objectives].empty?
|
82
|
+
@html.div(:class => 'block') do
|
83
|
+
@html.div do
|
84
|
+
@html.summary('Objectives', {'class' => 'h4'})
|
85
|
+
hOperation[:objectives].each do |objective|
|
86
|
+
@html.div(:class => 'block') do
|
87
|
+
@html.div do
|
88
|
+
@html.summary('Objective', {'class' => 'h5'})
|
89
|
+
objectiveClass.writeHtml(objective)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# parentOperation
|
98
|
+
unless hOperation[:parentOperation].empty?
|
99
|
+
@html.div(:class => 'block') do
|
100
|
+
@html.div do
|
101
|
+
@html.summary('Parent Operation', {'class' => 'h4'})
|
102
|
+
@html.div(:class => 'block') do
|
103
|
+
operationClass.writeHtml(hOperation[:parentOperation])
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
# childOperation
|
110
|
+
unless hOperation[:childOperations].empty?
|
111
|
+
@html.div(:class => 'block') do
|
112
|
+
@html.div do
|
113
|
+
@html.summary('Child Operations', {'class' => 'h4'})
|
114
|
+
hOperation[:childOperations].each do |operation|
|
115
|
+
@html.div(:class => 'block') do
|
116
|
+
@html.div do
|
117
|
+
@html.summary('Operation', {'class' => 'h5'})
|
118
|
+
operationClass.writeHtml(operation)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
# plan
|
127
|
+
unless hOperation[:plan].empty?
|
128
|
+
@html.div(:class => 'block') do
|
129
|
+
@html.div do
|
130
|
+
@html.summary('Plan', {'class' => 'h4'})
|
131
|
+
@html.div(:class => 'block') do
|
132
|
+
planClass.writeHtml(hOperation[:plan])
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
# platform
|
139
|
+
unless hOperation[:platforms].empty?
|
140
|
+
@html.div(:class => 'block') do
|
141
|
+
@html.div do
|
142
|
+
@html.summary('Platforms', {'class' => 'h4'})
|
143
|
+
hOperation[:platforms].each do |platform|
|
144
|
+
@html.div(:class => 'block') do
|
145
|
+
@html.div do
|
146
|
+
@html.summary('Platform', {'class' => 'h5'})
|
147
|
+
platformClass.writeHtml(platform)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# significantEvent
|
156
|
+
unless hOperation[:significantEvents].empty?
|
157
|
+
@html.div(:class => 'block') do
|
158
|
+
@html.div do
|
159
|
+
@html.summary('Significant Events', {'class' => 'h4'})
|
160
|
+
hOperation[:significantEvents].each do |event|
|
161
|
+
@html.div(:class => 'block') do
|
162
|
+
@html.div do
|
163
|
+
@html.summary('Event', {'class' => 'h5'})
|
164
|
+
eventClass.writeHtml(event)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
end # writeHtml
|
173
|
+
|
174
|
+
end # Html_Operation
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
require_relative 'html_identifier'
|
2
|
+
require_relative 'html_extent'
|
3
|
+
require_relative 'html_event'
|
4
|
+
|
5
|
+
module ADIWG
|
6
|
+
module Mdtranslator
|
7
|
+
module Writers
|
8
|
+
module Simple_html
|
9
|
+
class Html_Pass
|
10
|
+
def initialize(html)
|
11
|
+
@html = html
|
12
|
+
end
|
13
|
+
|
14
|
+
def writeHtml(hPass)
|
15
|
+
identifierClass = Html_Identifier.new(@html)
|
16
|
+
extentClass = Html_Extent.new(@html)
|
17
|
+
eventClass = Html_Event.new(@html)
|
18
|
+
|
19
|
+
# passId
|
20
|
+
unless hPass[:passId].nil?
|
21
|
+
@html.em('Pass ID: ')
|
22
|
+
@html.text!(hPass[:passId])
|
23
|
+
@html.br
|
24
|
+
end
|
25
|
+
|
26
|
+
# identifier
|
27
|
+
unless hPass[:identifier].empty?
|
28
|
+
@html.div(:class => 'block') do
|
29
|
+
@html.div do
|
30
|
+
@html.summary('Identifier', {'class' => 'h4'})
|
31
|
+
@html.div(:class => 'block') do
|
32
|
+
identifierClass.writeHtml(hPass[:identifier])
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# extent
|
39
|
+
unless hPass[:extent].empty?
|
40
|
+
@html.div(:class => 'block') do
|
41
|
+
@html.div do
|
42
|
+
@html.summary('Extent', {'class' => 'h4'})
|
43
|
+
@html.div(:class => 'block') do
|
44
|
+
extentClass.writeHtml(hPass[:extent])
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# relatedEvent
|
51
|
+
unless hPass[:relatedEvents].empty?
|
52
|
+
@html.div(:class => 'block') do
|
53
|
+
@html.div do
|
54
|
+
@html.summary('Related Events', {'class' => 'h4'})
|
55
|
+
hPass[:relatedEvents].each do |event|
|
56
|
+
@html.div(:class => 'block') do
|
57
|
+
@html.div do
|
58
|
+
@html.summary('Event', {'class' => 'h5'})
|
59
|
+
eventClass.writeHtml(event)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
end # writeHtml
|
68
|
+
end # Html_Pass
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
require_relative 'html_citation'
|
2
|
+
require_relative 'html_operation'
|
3
|
+
require_relative 'html_requirement'
|
4
|
+
|
5
|
+
module ADIWG
|
6
|
+
module Mdtranslator
|
7
|
+
module Writers
|
8
|
+
module Simple_html
|
9
|
+
class Html_Plan
|
10
|
+
def initialize(html)
|
11
|
+
@html = html
|
12
|
+
end
|
13
|
+
|
14
|
+
def writeHtml(hPlan)
|
15
|
+
citationClass = Html_Citation.new(@html)
|
16
|
+
operationClass = Html_Operation.new(@html)
|
17
|
+
requirementClass = Html_Requirement.new(@html)
|
18
|
+
planClass = Html_Plan.new(@html)
|
19
|
+
|
20
|
+
# planId
|
21
|
+
unless hPlan[:planId].empty?
|
22
|
+
@html.em('Plan ID: ')
|
23
|
+
@html.text!(hPlan[:planId])
|
24
|
+
@html.br
|
25
|
+
end
|
26
|
+
|
27
|
+
# planType
|
28
|
+
unless hPlan[:planType].empty?
|
29
|
+
@html.em('Type: ')
|
30
|
+
@html.text!(hPlan[:planType])
|
31
|
+
@html.br
|
32
|
+
end
|
33
|
+
|
34
|
+
# status
|
35
|
+
unless hPlan[:status].empty?
|
36
|
+
@html.em('Status: ')
|
37
|
+
@html.text!(hPlan[:status])
|
38
|
+
@html.br
|
39
|
+
end
|
40
|
+
|
41
|
+
# citation
|
42
|
+
unless hPlan[:citation].empty?
|
43
|
+
@html.div(:class => 'block') do
|
44
|
+
@html.div do
|
45
|
+
@html.summary('Citation', {'class' => 'h4'})
|
46
|
+
@html.div(:class => 'block') do
|
47
|
+
citationClass.writeHtml(hPlan[:citation])
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# planOperation
|
54
|
+
unless hPlan[:planOperations].empty?
|
55
|
+
@html.div(:class => 'block') do
|
56
|
+
@html.div do
|
57
|
+
@html.summary('Operations', {'class' => 'h4'})
|
58
|
+
hPlan[:planOperations].each do |operation|
|
59
|
+
@html.div(:class => 'block') do
|
60
|
+
@html.div do
|
61
|
+
@html.summary('Operation', {'class' => 'h5'})
|
62
|
+
operationClass.writeHtml(operation)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# satisfiedRequirement
|
71
|
+
unless hPlan[:satisfiedRequirements].empty?
|
72
|
+
@html.div(:class => 'block') do
|
73
|
+
@html.div do
|
74
|
+
@html.summary('Requirements', {'class' => 'h4'})
|
75
|
+
hPlan[:satisfiedRequirements].each do |requirement|
|
76
|
+
@html.div(:class => 'block') do
|
77
|
+
@html.div do
|
78
|
+
@html.summary('Requirement', {'class' => 'h5'})
|
79
|
+
requirementClass.writeHtml(requirement)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
end # writeHtml
|
88
|
+
|
89
|
+
end # Html_Plan
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,117 @@
|
|
1
|
+
require_relative 'html_identifier'
|
2
|
+
require_relative 'html_citation'
|
3
|
+
require_relative 'html_responsibility'
|
4
|
+
require_relative 'html_instrument'
|
5
|
+
require_relative 'html_instrumentationEventList'
|
6
|
+
|
7
|
+
module ADIWG
|
8
|
+
module Mdtranslator
|
9
|
+
module Writers
|
10
|
+
module Simple_html
|
11
|
+
class Html_Platform
|
12
|
+
def initialize(html)
|
13
|
+
@html = html
|
14
|
+
end
|
15
|
+
|
16
|
+
def writeHtml(hPlatform)
|
17
|
+
identifierClass = Html_Identifier.new(@html)
|
18
|
+
citationClass = Html_Citation.new(@html)
|
19
|
+
responsibilityClass = Html_Responsibility.new(@html)
|
20
|
+
instrumentClass = Html_Instrument.new(@html)
|
21
|
+
instrumentationEventListClass = Html_InstrumentationEventList.new(@html)
|
22
|
+
|
23
|
+
# platformId
|
24
|
+
unless hPlatform[:platformId].nil?
|
25
|
+
@html.em('Platform ID: ')
|
26
|
+
@html.text!(hPlatform[:platformId])
|
27
|
+
@html.br
|
28
|
+
end
|
29
|
+
|
30
|
+
# citation
|
31
|
+
unless hPlatform[:citation].empty?
|
32
|
+
@html.div(:class => 'block') do
|
33
|
+
@html.div do
|
34
|
+
@html.summary('Citation', {'class' => 'h4'})
|
35
|
+
@html.div(:class => 'block') do
|
36
|
+
citationClass.writeHtml(hPlatform[:citation])
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# identifier
|
43
|
+
unless hPlatform[:identifier].empty?
|
44
|
+
@html.div(:class => 'block') do
|
45
|
+
@html.div do
|
46
|
+
@html.summary('Identifier', {'class' => 'h4'})
|
47
|
+
@html.div(:class => 'block') do
|
48
|
+
identifierClass.writeHtml(hPlatform[:identifier])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# description
|
55
|
+
unless hPlatform[:description].nil?
|
56
|
+
@html.em('Description: ')
|
57
|
+
@html.text!(hPlatform[:description])
|
58
|
+
@html.br
|
59
|
+
end
|
60
|
+
|
61
|
+
# sponsor
|
62
|
+
unless hPlatform[:sponsors].empty?
|
63
|
+
@html.div(:class => 'block') do
|
64
|
+
@html.div do
|
65
|
+
@html.summary('Sponsors', {'class' => 'h4'})
|
66
|
+
hPlatform[:sponsors].each do |responsibility|
|
67
|
+
@html.div(:class => 'block') do
|
68
|
+
@html.div do
|
69
|
+
@html.summary('Responsibility', {'class' => 'h5'})
|
70
|
+
responsibilityClass.writeHtml(responsibility)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# instrument
|
79
|
+
unless hPlatform[:instruments].empty?
|
80
|
+
@html.div(:class => 'block') do
|
81
|
+
@html.div do
|
82
|
+
@html.summary('Instruments', {'class' => 'h4'})
|
83
|
+
hPlatform[:instruments].each do |instrument|
|
84
|
+
@html.div(:class => 'block') do
|
85
|
+
@html.div do
|
86
|
+
@html.summary('Instrument', {'class' => 'h5'})
|
87
|
+
instrumentClass.writeHtml(instrument)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
# history
|
96
|
+
unless hPlatform[:history].empty?
|
97
|
+
@html.div(:class => 'block') do
|
98
|
+
@html.div do
|
99
|
+
@html.summary('History', {'class' => 'h4'})
|
100
|
+
hPlatform[:history].each do |instrumentationEventList|
|
101
|
+
@html.div(:class => 'block') do
|
102
|
+
@html.div do
|
103
|
+
@html.summary('Instrumentation Event List', {'class' => 'h5'})
|
104
|
+
instrumentationEventListClass.writeHtml(instrumentationEventList)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
@@ -44,7 +44,7 @@ module ADIWG
|
|
44
44
|
@html.div(:class => 'block') do
|
45
45
|
hRelease[:addressee].each do |hAddressee|
|
46
46
|
@html.div do
|
47
|
-
@html.
|
47
|
+
@html.h5(hAddressee[:roleName], 'class' => 'h5')
|
48
48
|
@html.div(:class => 'block') do
|
49
49
|
responsibilityClass.writeHtml(hAddressee)
|
50
50
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require_relative 'html_datetime'
|
2
|
+
|
3
|
+
module ADIWG
|
4
|
+
module Mdtranslator
|
5
|
+
module Writers
|
6
|
+
module Simple_html
|
7
|
+
class Html_RequestedDate
|
8
|
+
def initialize(html)
|
9
|
+
@html = html
|
10
|
+
end
|
11
|
+
|
12
|
+
def writeHtml(hRequestedDate)
|
13
|
+
datetimeClass = Html_Datetime.new(@html)
|
14
|
+
|
15
|
+
# requestedDateOfCollection
|
16
|
+
unless hRequestedDate[:requestedDateOfCollection].empty?
|
17
|
+
@html.em('Requested Date of Collection: ')
|
18
|
+
@html.text!(hRequestedDate[:requestedDateOfCollection][:dateTime].to_s)
|
19
|
+
@html.br
|
20
|
+
end
|
21
|
+
|
22
|
+
# latestAcceptableDate
|
23
|
+
unless hRequestedDate[:latestAcceptableDate].empty?
|
24
|
+
@html.em('Latest Acceptable Date: ')
|
25
|
+
@html.text!(hRequestedDate[:latestAcceptableDate][:dateTime].to_s)
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|