adiwg-mdtranslator 2.16.1 → 2.18.0rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -2
- data/Rakefile +1 -0
- data/adiwg-mdtranslator.gemspec +1 -1
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +8 -3
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_attribute.rb +6 -2
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_attribute.rb +12 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_contact.rb +11 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_georectifiedRepresentation.rb +9 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_georeferenceableRepresentation.rb +9 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_gridRepresentation.rb +10 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_processStep.rb +3 -14
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_processing.rb +4 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_rangeElementDescription.rb +38 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_vectorRepresentation.rb +10 -0
- data/lib/adiwg/mdtranslator/version.rb +3 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_algorithm.rb +48 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_attribute.rb +12 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_georectifiedRepresentation.rb +12 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_georeferenceableRepresentation.rb +13 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_gridRepresentation.rb +13 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_nominalResolution.rb +51 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_processReport.rb +47 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_processStep.rb +35 -8
- data/lib/adiwg/mdtranslator/writers/html/sections/html_processing.rb +89 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_rangeElementDescription.rb +40 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_source.rb +25 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_vectorRepresentation.rb +13 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_algorithm.rb +61 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_georectified.rb +9 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_georeferenceable.rb +10 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_grid.rb +11 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_identifier.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_individual.rb +22 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_leProcessStep.rb +167 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_leSource.rb +150 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_liProcessStep.rb +130 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_liSource.rb +126 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_lineage.rb +5 -4
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb +61 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_organization.rb +22 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_partyIdentifier.rb +92 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processReport.rb +66 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processStep.rb +22 -101
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processing.rb +110 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_rangeElementDescription.rb +45 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_sampleDimension.rb +8 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb +19 -95
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_vectorRepresentation.rb +9 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/iso19115_1_writer_messages_eng.yml +11 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_algorithm.rb +61 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_leProcessStep.rb +153 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_leSource.rb +134 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_liProcessStep.rb +126 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_liSource.rb +114 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_lineage.rb +13 -11
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb +61 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_processReport.rb +66 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_processStep.rb +22 -96
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_processing.rb +110 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_source.rb +20 -82
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_taxonomy.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer_messages_eng.yml +9 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_attribute.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_georectifiedRepresentation.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_georeferenceableRepresentation.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_gridRepresentation.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb +0 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processing.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_vectorRepresentation.rb +1 -0
- metadata +36 -12
@@ -0,0 +1,47 @@
|
|
1
|
+
# HTML writer
|
2
|
+
# process step report
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2019-09-24 original script
|
6
|
+
|
7
|
+
module ADIWG
|
8
|
+
module Mdtranslator
|
9
|
+
module Writers
|
10
|
+
module Html
|
11
|
+
|
12
|
+
class Html_ProcessStepReport
|
13
|
+
|
14
|
+
def initialize(html)
|
15
|
+
@html = html
|
16
|
+
end
|
17
|
+
|
18
|
+
def writeHtml(hReport)
|
19
|
+
|
20
|
+
# process step report - name
|
21
|
+
unless hReport[:name].nil?
|
22
|
+
@html.em('Name: ')
|
23
|
+
@html.text!(hReport[:name])
|
24
|
+
@html.br
|
25
|
+
end
|
26
|
+
|
27
|
+
# process step report - description
|
28
|
+
unless hReport[:description].nil?
|
29
|
+
@html.em('Description: ')
|
30
|
+
@html.text!(hReport[:description])
|
31
|
+
@html.br
|
32
|
+
end
|
33
|
+
|
34
|
+
# process step report - file type
|
35
|
+
unless hReport[:fileType].nil?
|
36
|
+
@html.em('File Type: ')
|
37
|
+
@html.text!(hReport[:fileType])
|
38
|
+
@html.br
|
39
|
+
end
|
40
|
+
|
41
|
+
end # writeHtml
|
42
|
+
end # Html_ProcessStepReport
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -2,9 +2,10 @@
|
|
2
2
|
# process step
|
3
3
|
|
4
4
|
# History:
|
5
|
-
# Stan Smith
|
6
|
-
# Stan Smith 2017-
|
7
|
-
# Stan Smith
|
5
|
+
# Stan Smith 2019-09-24 add support for LE_ProcessStep
|
6
|
+
# Stan Smith 2017-08-30 add support for process step sources
|
7
|
+
# Stan Smith 2017-04-03 refactor for mdTranslator 2.0
|
8
|
+
# Stan Smith 2015-07-16 refactor to remove global namespace $HtmlNS
|
8
9
|
# Stan Smith 2015-03-27 original script
|
9
10
|
|
10
11
|
require_relative 'html_temporalExtent'
|
@@ -12,6 +13,8 @@ require_relative 'html_responsibility'
|
|
12
13
|
require_relative 'html_citation'
|
13
14
|
require_relative 'html_scope'
|
14
15
|
require_relative 'html_source'
|
16
|
+
require_relative 'html_processing'
|
17
|
+
require_relative 'html_processReport'
|
15
18
|
|
16
19
|
module ADIWG
|
17
20
|
module Mdtranslator
|
@@ -27,11 +30,13 @@ module ADIWG
|
|
27
30
|
def writeHtml(hStep)
|
28
31
|
|
29
32
|
# classes used
|
30
|
-
temporalClass =
|
33
|
+
temporalClass = Html_TimePeriod.new(@html)
|
31
34
|
responsibilityClass = Html_Responsibility.new(@html)
|
32
35
|
citationClass = Html_Citation.new(@html)
|
33
36
|
scopeClass = Html_Scope.new(@html)
|
34
37
|
sourceClass = Html_Source.new(@html)
|
38
|
+
processingClass = Html_Processing.new(@html)
|
39
|
+
reportClass = Html_ProcessStepReport.new(@html)
|
35
40
|
|
36
41
|
# process step - id
|
37
42
|
unless hStep[:stepId].nil?
|
@@ -58,10 +63,12 @@ module ADIWG
|
|
58
63
|
|
59
64
|
# process step - time period {timePeriod}
|
60
65
|
unless hStep[:timePeriod].empty?
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
66
|
+
@html.details do
|
67
|
+
@html.summary('Time Period', {'class' => 'h5'})
|
68
|
+
@html.section(:class => 'block') do
|
69
|
+
temporalClass.writeHtml(hStep[:timePeriod])
|
70
|
+
end
|
71
|
+
end
|
65
72
|
end
|
66
73
|
|
67
74
|
# process step - references [] {citation}
|
@@ -135,6 +142,26 @@ module ADIWG
|
|
135
142
|
end
|
136
143
|
end
|
137
144
|
|
145
|
+
# process step - processing information {processingInformation}
|
146
|
+
unless hStep[:processingInformation].empty?
|
147
|
+
@html.details do
|
148
|
+
@html.summary('Processing Information', {'class' => 'h5'})
|
149
|
+
@html.section(:class => 'block') do
|
150
|
+
processingClass.writeHtml(hStep[:processingInformation])
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# process step - report [] {processStepReport}
|
156
|
+
hStep[:reports].each do |hReport|
|
157
|
+
@html.details do
|
158
|
+
@html.summary(hReport[:name], {'class' => 'h5'})
|
159
|
+
@html.section(:class => 'block') do
|
160
|
+
reportClass.writeHtml(hReport)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
138
165
|
end # writeHtml
|
139
166
|
end # Html_ProcessStep
|
140
167
|
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# HTML writer
|
2
|
+
# processing
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2019-09-24 original script
|
6
|
+
|
7
|
+
require_relative 'html_identifier'
|
8
|
+
require_relative 'html_citation'
|
9
|
+
require_relative 'html_algorithm'
|
10
|
+
|
11
|
+
module ADIWG
|
12
|
+
module Mdtranslator
|
13
|
+
module Writers
|
14
|
+
module Html
|
15
|
+
|
16
|
+
class Html_Processing
|
17
|
+
|
18
|
+
def initialize(html)
|
19
|
+
@html = html
|
20
|
+
end
|
21
|
+
|
22
|
+
def writeHtml(hProcessing)
|
23
|
+
|
24
|
+
# classes used
|
25
|
+
identifierClass = Html_Identifier.new(@html)
|
26
|
+
citationClass = Html_Citation.new(@html)
|
27
|
+
algorithmClass = Html_Algorithm.new(@html)
|
28
|
+
|
29
|
+
# processing - procedure description
|
30
|
+
unless hProcessing[:procedureDescription].nil?
|
31
|
+
@html.em(' Procedure Description: ')
|
32
|
+
@html.text!(hProcessing[:procedureDescription])
|
33
|
+
@html.br
|
34
|
+
end
|
35
|
+
|
36
|
+
# processing - identifier {identifier}
|
37
|
+
unless hProcessing[:identifier].empty?
|
38
|
+
@html.details do
|
39
|
+
@html.summary('Identifier', {'class' => 'h5'})
|
40
|
+
@html.section(:class => 'block') do
|
41
|
+
identifierClass.writeHtml(hProcessing[:identifier])
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# processing - software reference {citation}
|
47
|
+
unless hProcessing[:softwareReference].empty?
|
48
|
+
@html.details do
|
49
|
+
@html.summary('Software Reference', {'class' => 'h5'})
|
50
|
+
@html.section(:class => 'block') do
|
51
|
+
citationClass.writeHtml(hProcessing[:softwareReference])
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# processing - runtime parameters
|
57
|
+
unless hProcessing[:runtimeParameters].nil?
|
58
|
+
@html.em(' Runtime Parameters: ')
|
59
|
+
@html.text!(hProcessing[:runtimeParameters])
|
60
|
+
@html.br
|
61
|
+
end
|
62
|
+
|
63
|
+
# processing - documentation [] {citation}
|
64
|
+
hProcessing[:documentation].each do |hCitation|
|
65
|
+
@html.details do
|
66
|
+
@html.summary('Documentation', {'class' => 'h5'})
|
67
|
+
@html.section(:class => 'block') do
|
68
|
+
citationClass.writeHtml(hCitation)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# processing - algorithm [] {algorithm}
|
74
|
+
hProcessing[:algorithms].each do |hAlgorithm|
|
75
|
+
@html.details do
|
76
|
+
@html.summary('Algorithm', {'class' => 'h5'})
|
77
|
+
@html.section(:class => 'block') do
|
78
|
+
algorithmClass.writeHtml(hAlgorithm)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
end # writeHtml
|
84
|
+
end # Html_Processing
|
85
|
+
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# HTML writer
|
2
|
+
# range element description
|
3
|
+
|
4
|
+
module ADIWG
|
5
|
+
module Mdtranslator
|
6
|
+
module Writers
|
7
|
+
module Html
|
8
|
+
|
9
|
+
class Html_RangeElementDescription
|
10
|
+
|
11
|
+
def initialize(html)
|
12
|
+
@html = html
|
13
|
+
end
|
14
|
+
|
15
|
+
def writeHtml(red)
|
16
|
+
unless red[:name].nil?
|
17
|
+
@html.em('Name:')
|
18
|
+
@html.text!(red[:name])
|
19
|
+
@html.br
|
20
|
+
end
|
21
|
+
|
22
|
+
unless red[:definition].nil?
|
23
|
+
@html.em('Definition:')
|
24
|
+
@html.text!(red[:definition])
|
25
|
+
@html.br
|
26
|
+
end
|
27
|
+
|
28
|
+
red[:rangeElements].each do |hRangeElement|
|
29
|
+
@html.em('Range Element:')
|
30
|
+
@html.text!(hRangeElement)
|
31
|
+
end
|
32
|
+
|
33
|
+
@html.br
|
34
|
+
end # writeHtml
|
35
|
+
end # Html_RangeElementDescription
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
# source
|
3
3
|
|
4
4
|
# History:
|
5
|
+
# Stan Smith 2019-09-24 add support for LE_Source
|
5
6
|
# Stan Smith 2017-04-03 refactored for mdTranslator 2.0
|
6
7
|
# Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
|
7
8
|
# Stan Smith 2015-03-27 original script
|
@@ -11,6 +12,8 @@ require_relative 'html_spatialResolution'
|
|
11
12
|
require_relative 'html_spatialReference'
|
12
13
|
require_relative 'html_processStep'
|
13
14
|
require_relative 'html_scope'
|
15
|
+
require_relative 'html_identifier'
|
16
|
+
require_relative 'html_nominalResolution'
|
14
17
|
|
15
18
|
module ADIWG
|
16
19
|
module Mdtranslator
|
@@ -31,6 +34,8 @@ module ADIWG
|
|
31
34
|
referenceClass = Html_SpatialReference.new(@html)
|
32
35
|
stepClass = Html_ProcessStep.new(@html)
|
33
36
|
scopeClass = Html_Scope.new(@html)
|
37
|
+
identifierClass = Html_Identifier.new(@html)
|
38
|
+
nominalClass = Html_NominalResolution.new(@html)
|
34
39
|
|
35
40
|
# source - source ID
|
36
41
|
unless hSource[:sourceId].nil?
|
@@ -121,6 +126,26 @@ module ADIWG
|
|
121
126
|
end
|
122
127
|
end
|
123
128
|
|
129
|
+
# source - processed level {identifier}
|
130
|
+
unless hSource[:processedLevel].empty?
|
131
|
+
@html.details do
|
132
|
+
@html.summary('Processed Level', {'class' => 'h5'})
|
133
|
+
@html.section(:class => 'block') do
|
134
|
+
identifierClass.writeHtml(hSource[:processedLevel])
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
# source - resolution {nominal resolution}
|
140
|
+
unless hSource[:resolution].empty?
|
141
|
+
@html.details do
|
142
|
+
@html.summary('Nominal Resolution', {'class' => 'h5'})
|
143
|
+
@html.section(:class => 'block') do
|
144
|
+
nominalClass.writeHtml(hSource[:resolution])
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
124
149
|
end # writeHtml
|
125
150
|
end # Html_Source
|
126
151
|
|
@@ -6,6 +6,7 @@
|
|
6
6
|
# Stan Smith 2017-03-28 original script
|
7
7
|
|
8
8
|
require_relative 'html_vectorObject'
|
9
|
+
require_relative 'html_scope'
|
9
10
|
|
10
11
|
module ADIWG
|
11
12
|
module Mdtranslator
|
@@ -22,6 +23,18 @@ module ADIWG
|
|
22
23
|
|
23
24
|
# classes used
|
24
25
|
objectClass = Html_VectorObject.new(@html)
|
26
|
+
scopeClass = Html_Scope.new(@html)
|
27
|
+
|
28
|
+
# vector representation - scope
|
29
|
+
hVector[:scope].each do |scope|
|
30
|
+
@html.details do
|
31
|
+
@html.summary('Scope ', 'class' => 'h5')
|
32
|
+
@html.section(:class => 'block') do
|
33
|
+
scopeClass.writeHtml(hVector[:scope])
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
25
38
|
|
26
39
|
# vector representation - topology level
|
27
40
|
unless hVector[:topologyLevel].nil?
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# ISO <<Class>> LE_Algorithm
|
2
|
+
# 19115-1 writer output in XML
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 201-09-27 original script.
|
6
|
+
|
7
|
+
require_relative '../iso19115_1_writer'
|
8
|
+
require_relative 'class_citation'
|
9
|
+
|
10
|
+
module ADIWG
|
11
|
+
module Mdtranslator
|
12
|
+
module Writers
|
13
|
+
module Iso19115_1
|
14
|
+
|
15
|
+
class LE_Algorithm
|
16
|
+
|
17
|
+
def initialize(xml, hResponseObj)
|
18
|
+
@xml = xml
|
19
|
+
@hResponseObj = hResponseObj
|
20
|
+
@NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_1
|
21
|
+
end
|
22
|
+
|
23
|
+
def writeXML(hAlgorithm, inContext = nil)
|
24
|
+
|
25
|
+
# classes used
|
26
|
+
citationClass = CI_Citation.new(@xml, @hResponseObj)
|
27
|
+
|
28
|
+
outContext = 'algorithm'
|
29
|
+
outContext = inContext + ' ' + outContext unless inContext.nil?
|
30
|
+
|
31
|
+
@xml.tag!('mrl:LE_Algorithm') do
|
32
|
+
|
33
|
+
# algorithm - citation {CI_Citation} (required)
|
34
|
+
hCitation = hAlgorithm[:citation]
|
35
|
+
unless hCitation.empty?
|
36
|
+
@xml.tag!('mrl:citation') do
|
37
|
+
citationClass.writeXML(hCitation, outContext)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
if hCitation.empty?
|
41
|
+
@NameSpace.issueWarning(420, 'mrl:citation', outContext)
|
42
|
+
end
|
43
|
+
|
44
|
+
# algorithm - description (required)
|
45
|
+
unless hAlgorithm[:description].nil?
|
46
|
+
@xml.tag!('mrl:description') do
|
47
|
+
@xml.tag!('gco:CharacterString', hAlgorithm[:description])
|
48
|
+
end
|
49
|
+
end
|
50
|
+
if hAlgorithm[:description].nil?
|
51
|
+
@NameSpace.issueWarning(421, 'mrl:description', outContext)
|
52
|
+
end
|
53
|
+
|
54
|
+
end # mrl:LE_Algorithm tag
|
55
|
+
end # writeXML
|
56
|
+
end # LE_Algorithm class
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -7,6 +7,7 @@
|
|
7
7
|
require_relative '../iso19115_1_writer'
|
8
8
|
require_relative 'class_grid'
|
9
9
|
require_relative 'class_point'
|
10
|
+
require_relative 'class_scope'
|
10
11
|
|
11
12
|
module ADIWG
|
12
13
|
module Mdtranslator
|
@@ -26,12 +27,20 @@ module ADIWG
|
|
26
27
|
# classes used
|
27
28
|
gridClass = Grid.new(@xml, @hResponseObj)
|
28
29
|
pointClass = Point.new(@xml, @hResponseObj)
|
30
|
+
scopeClass = MD_Scope.new(@xml, @hResponseObj)
|
31
|
+
|
29
32
|
|
30
33
|
outContext = 'georectified representation'
|
31
34
|
outContext = inContext + ' georectified representation' unless inContext.nil?
|
32
35
|
|
33
36
|
@xml.tag!('msr:MD_Georectified') do
|
34
37
|
|
38
|
+
hGeoRec[:scope].each do |scope|
|
39
|
+
@xml.tag!('msr:scope') do
|
40
|
+
scopeClass.writeXML(scope, inContext)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
35
44
|
# georectified - add grid info
|
36
45
|
hGrid = hGeoRec[:gridRepresentation]
|
37
46
|
gridClass.writeXML(hGrid, outContext)
|
@@ -7,6 +7,7 @@
|
|
7
7
|
require_relative '../iso19115_1_writer'
|
8
8
|
require_relative 'class_grid'
|
9
9
|
require_relative 'class_citation'
|
10
|
+
require_relative 'class_scope'
|
10
11
|
|
11
12
|
module ADIWG
|
12
13
|
module Mdtranslator
|
@@ -26,12 +27,21 @@ module ADIWG
|
|
26
27
|
# classes used
|
27
28
|
gridClass = Grid.new(@xml, @hResponseObj)
|
28
29
|
citationClass = CI_Citation.new(@xml, @hResponseObj)
|
30
|
+
scopeClass = MD_Scope.new(@xml, @hResponseObj)
|
31
|
+
|
29
32
|
|
30
33
|
outContext = 'georeferenceable representation'
|
31
34
|
outContext = inContext + ' georeferenceable representation' unless inContext.nil?
|
32
35
|
|
33
36
|
@xml.tag!('msr:MD_Georeferenceable') do
|
34
37
|
|
38
|
+
# georeferenceable - scope
|
39
|
+
hGeoRef[:scope].each do |scope|
|
40
|
+
@xml.tag!('msr:scope') do
|
41
|
+
scopeClass.writeXML(scope, inContext)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
35
45
|
# georeferenceable - add grid info (required)
|
36
46
|
hGrid = hGeoRef[:gridRepresentation]
|
37
47
|
gridClass.writeXML(hGrid, outContext)
|
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
require_relative '../iso19115_1_writer'
|
8
8
|
require_relative 'class_dimension'
|
9
|
+
require_relative 'class_scope'
|
9
10
|
|
10
11
|
module ADIWG
|
11
12
|
module Mdtranslator
|
@@ -25,7 +26,15 @@ module ADIWG
|
|
25
26
|
# classes used
|
26
27
|
codelistClass = MD_Codelist.new(@xml, @hResponseObj)
|
27
28
|
dimensionClass = MD_Dimension.new(@xml, @hResponseObj)
|
28
|
-
|
29
|
+
scopeClass = MD_Scope.new(@xml, @hResponseObj)
|
30
|
+
|
31
|
+
# grid - scope
|
32
|
+
hGrid[:scope].each do |scope|
|
33
|
+
@xml.tag!('msr:scope') do
|
34
|
+
scopeClass.writeXML(scope, inContext)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
29
38
|
# grid - number of dimensions (required)
|
30
39
|
unless hGrid[:numberOfDimensions].nil?
|
31
40
|
@xml.tag!('msr:numberOfDimensions') do
|
@@ -62,6 +71,7 @@ module ADIWG
|
|
62
71
|
@xml.tag!('gco:Boolean', hGrid[:transformationParameterAvailable])
|
63
72
|
end
|
64
73
|
|
74
|
+
|
65
75
|
end # writeXML
|
66
76
|
end # Grid class
|
67
77
|
|
@@ -32,12 +32,12 @@ module ADIWG
|
|
32
32
|
|
33
33
|
# identifier - authority {CI_Citation}
|
34
34
|
hCitation = hIdentifier[:citation]
|
35
|
-
unless hCitation.empty?
|
35
|
+
unless hCitation.nil? || hCitation.empty?
|
36
36
|
@xml.tag!('mcc:authority') do
|
37
37
|
citationClass.writeXML(hCitation, outContext)
|
38
38
|
end
|
39
39
|
end
|
40
|
-
if hCitation.empty? && @hResponseObj[:writerShowTags]
|
40
|
+
if hCitation.nil? || hCitation.empty? && @hResponseObj[:writerShowTags]
|
41
41
|
@xml.tag!('mcc:authority')
|
42
42
|
end
|
43
43
|
|
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
require_relative '../iso19115_1_writer'
|
8
8
|
require_relative 'class_contact'
|
9
|
+
require_relative 'class_partyIdentifier'
|
9
10
|
|
10
11
|
module ADIWG
|
11
12
|
module Mdtranslator
|
@@ -24,6 +25,7 @@ module ADIWG
|
|
24
25
|
|
25
26
|
# classes used
|
26
27
|
contactClass = CI_Contact.new(@xml, @hResponseObj)
|
28
|
+
identifierClass = MD_PartyIdentifier.new(@xml, @hResponseObj)
|
27
29
|
|
28
30
|
outContext = 'individual contact'
|
29
31
|
outContext = inContext + ' individual contact' unless inContext.nil?
|
@@ -70,6 +72,26 @@ module ADIWG
|
|
70
72
|
@xml.tag!('cit:positionName')
|
71
73
|
end
|
72
74
|
|
75
|
+
# individual - party identifier
|
76
|
+
if hContact[:externalIdentifier] && hContact[:externalIdentifier].length > 0
|
77
|
+
hContact[:externalIdentifier].each do |identifier|
|
78
|
+
@xml.tag!('cit:partyIdentifier') do
|
79
|
+
identifierClass.writeXML(identifier);
|
80
|
+
end
|
81
|
+
end
|
82
|
+
else
|
83
|
+
if hContact[:contactId] &&
|
84
|
+
hContact[:contactId].is_a?(Hash)
|
85
|
+
@xml.tag!('cit:partyIdentifier') do
|
86
|
+
identifierClass.writeXML(hContact[:contactId]);
|
87
|
+
end
|
88
|
+
elsif hContact[:contactId].is_a?(String)
|
89
|
+
@xml.tag!('cit:partyIdentifier') do
|
90
|
+
identifierClass.writeXML({ identifier: hContact[:contactId] })
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
73
95
|
end
|
74
96
|
end
|
75
97
|
if hContact.empty?
|