adiwg-mdtranslator 2.19.0.pre.beta.31 → 2.20.0.pre.beta.3
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 +41 -31
- data/README.md +21 -0
- data/Rakefile +1 -0
- data/adiwg-mdtranslator.gemspec +2 -2
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_dataQuality.rb +58 -92
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_conformanceResult.rb +0 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_coverageResult.rb +0 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataQuality.rb +0 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_descriptiveResult.rb +0 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb +0 -4
- 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 +115 -133
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_spatialDomain.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQuality.rb +1 -17
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQualityReport.rb +0 -28
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_dataIdentification.rb +0 -29
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_dataQualityReport.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_gcoDateTime.rb +1 -10
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_mdMetadata.rb +0 -27
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_timePeriod.rb +6 -2
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_conformanceResult.rb +5 -6
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageResult.rb +0 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_descriptiveResult.rb +0 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_onlineResource.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_quantitativeResult.rb +5 -6
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_resourceInfo.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_citation.rb +26 -9
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_allocation.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_citation.rb +8 -8
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQuality.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQualityReport.rb +3 -3
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geographicExtent.rb +1 -1
- 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_releasability.rb +1 -1
- 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_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 +39 -8
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_enumerationList.rb +0 -52
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_extension.rb +0 -208
@@ -31,7 +31,7 @@ module ADIWG
|
|
31
31
|
# spatial Representation - grid {gridRepresentation}
|
32
32
|
unless hRepresentation[:gridRepresentation].empty?
|
33
33
|
@html.div do
|
34
|
-
@html.
|
34
|
+
@html.div('Grid Representation ', 'class' => 'h5')
|
35
35
|
@html.div(:class => 'block') do
|
36
36
|
gridClass.writeHtml(hRepresentation[:gridRepresentation])
|
37
37
|
end
|
@@ -41,7 +41,7 @@ module ADIWG
|
|
41
41
|
# spatial Representation - vector {vectorRepresentation}
|
42
42
|
unless hRepresentation[:vectorRepresentation].empty?
|
43
43
|
@html.div do
|
44
|
-
@html.
|
44
|
+
@html.div('Vector Representation ', 'class' => 'h5')
|
45
45
|
@html.div(:class => 'block') do
|
46
46
|
vectorClass.writeHtml(hRepresentation[:vectorRepresentation])
|
47
47
|
end
|
@@ -51,7 +51,7 @@ module ADIWG
|
|
51
51
|
# spatial Representation - georectified {georectifiedRepresentation}
|
52
52
|
unless hRepresentation[:georectifiedRepresentation].empty?
|
53
53
|
@html.div do
|
54
|
-
@html.
|
54
|
+
@html.div('Georectified Representation ', 'class' => 'h5')
|
55
55
|
@html.div(:class => 'block') do
|
56
56
|
georectifiedClass.writeHtml(hRepresentation[:georectifiedRepresentation])
|
57
57
|
end
|
@@ -61,7 +61,7 @@ module ADIWG
|
|
61
61
|
# spatial Representation - georeferenceable {georeferenceableRepresentation}
|
62
62
|
unless hRepresentation[:georeferenceableRepresentation].empty?
|
63
63
|
@html.div do
|
64
|
-
@html.
|
64
|
+
@html.div('Georeferenceable Representation ', 'class' => 'h5')
|
65
65
|
@html.div(:class => 'block') do
|
66
66
|
georeferenceableClass.writeHtml(hRepresentation[:georeferenceableRepresentation])
|
67
67
|
end
|
@@ -106,7 +106,7 @@ module ADIWG
|
|
106
106
|
@html.div(:class => 'block') do
|
107
107
|
hTaxonomy[:observers].each do |hObserver|
|
108
108
|
@html.div do
|
109
|
-
@html.
|
109
|
+
@html.div(hObserver[:roleName], 'class' => 'h5')
|
110
110
|
@html.div(:class => 'block') do
|
111
111
|
responsibilityClass.writeHtml(hObserver)
|
112
112
|
end
|
@@ -66,7 +66,7 @@ module ADIWG
|
|
66
66
|
# time instant - identifier {identifier}
|
67
67
|
unless hInstant[:identifier].empty?
|
68
68
|
@html.div do
|
69
|
-
@html.
|
69
|
+
@html.div('Identifier', 'class' => 'h5')
|
70
70
|
@html.div(:class => 'block') do
|
71
71
|
identifierClass.writeHtml(hInstant[:identifier])
|
72
72
|
end
|
@@ -70,7 +70,7 @@ module ADIWG
|
|
70
70
|
# time period - start geologic age {geologic age}
|
71
71
|
unless hPeriod[:startGeologicAge].empty?
|
72
72
|
@html.div do
|
73
|
-
@html.
|
73
|
+
@html.div('Starting Geologic Age', 'class' => 'h5')
|
74
74
|
@html.div(:class => 'block') do
|
75
75
|
geoAgeClass.writeHtml(hPeriod[:startGeologicAge])
|
76
76
|
end
|
@@ -80,7 +80,7 @@ module ADIWG
|
|
80
80
|
# time period - end geologic age {geologic age}
|
81
81
|
unless hPeriod[:endGeologicAge].empty?
|
82
82
|
@html.div do
|
83
|
-
@html.
|
83
|
+
@html.div('Ending Geologic Age', 'class' => 'h5')
|
84
84
|
@html.div(:class => 'block') do
|
85
85
|
geoAgeClass.writeHtml(hPeriod[:endGeologicAge])
|
86
86
|
end
|
@@ -90,7 +90,7 @@ module ADIWG
|
|
90
90
|
# time period - identifier {identifier}
|
91
91
|
unless hPeriod[:identifier].empty?
|
92
92
|
@html.div do
|
93
|
-
@html.
|
93
|
+
@html.div('Identifier', 'class' => 'h5')
|
94
94
|
@html.div(:class => 'block') do
|
95
95
|
identifierClass.writeHtml(hPeriod[:identifier])
|
96
96
|
end
|
@@ -100,7 +100,7 @@ module ADIWG
|
|
100
100
|
# time period - time interval
|
101
101
|
unless hPeriod[:timeInterval].empty?
|
102
102
|
@html.div do
|
103
|
-
@html.
|
103
|
+
@html.div('Time Interval', 'class' => 'h5')
|
104
104
|
@html.div(:class => 'block') do
|
105
105
|
intervalClass.writeHtml(hPeriod[:timeInterval])
|
106
106
|
end
|
@@ -110,7 +110,7 @@ module ADIWG
|
|
110
110
|
# time period - duration
|
111
111
|
unless hPeriod[:duration].empty?
|
112
112
|
@html.div do
|
113
|
-
@html.
|
113
|
+
@html.div('Duration', 'class' => 'h5')
|
114
114
|
@html.div(:class => 'block') do
|
115
115
|
durationClass.writeHtml(hPeriod[:duration])
|
116
116
|
end
|
@@ -68,7 +68,7 @@ module ADIWG
|
|
68
68
|
# transfer options - transfer frequency {duration}
|
69
69
|
unless hOption[:transferFrequency].empty?
|
70
70
|
@html.div do
|
71
|
-
@html.
|
71
|
+
@html.div('Transfer Frequency', 'class' => 'h5')
|
72
72
|
@html.div(:class => 'block') do
|
73
73
|
durationClass.writeHtml(hOption[:transferFrequency])
|
74
74
|
end
|
@@ -78,7 +78,7 @@ module ADIWG
|
|
78
78
|
# transfer options - distribution formats [] {format}
|
79
79
|
hOption[:distributionFormats].each do |hFormat|
|
80
80
|
@html.div do
|
81
|
-
@html.
|
81
|
+
@html.div('Distribution Format Option', 'class' => 'h5')
|
82
82
|
@html.div(:class => 'block') do
|
83
83
|
formatClass.writeHtml(hFormat)
|
84
84
|
end
|
@@ -37,7 +37,7 @@ module ADIWG
|
|
37
37
|
# resource usage - temporal extent
|
38
38
|
unless hUsage[:temporalExtents].empty?
|
39
39
|
@html.div do
|
40
|
-
@html.
|
40
|
+
@html.div('Times and Periods of Usage', 'class' => 'h5')
|
41
41
|
@html.div(:class => 'block') do
|
42
42
|
hUsage[:temporalExtents].each do |hTemporal|
|
43
43
|
temporalClass.writeHtml(hTemporal)
|
@@ -49,7 +49,7 @@ module ADIWG
|
|
49
49
|
# resource usage - limitation
|
50
50
|
unless hUsage[:userLimitation].nil? && hUsage[:limitationResponses].empty?
|
51
51
|
@html.div do
|
52
|
-
@html.
|
52
|
+
@html.div('User Defined Limitations', 'class' => 'h5')
|
53
53
|
@html.div(:class => 'block') do
|
54
54
|
|
55
55
|
# user limitation
|
@@ -75,7 +75,7 @@ module ADIWG
|
|
75
75
|
# resource usage - documented issue
|
76
76
|
unless hUsage[:identifiedIssue].empty?
|
77
77
|
@html.div do
|
78
|
-
@html.
|
78
|
+
@html.div('Cited Issue', 'class' => 'h5')
|
79
79
|
@html.div(:class => 'block') do
|
80
80
|
citationClass.writeHtml(hUsage[:identifiedIssue])
|
81
81
|
end
|
@@ -85,7 +85,7 @@ module ADIWG
|
|
85
85
|
# resource usage - additional documentation
|
86
86
|
hUsage[:additionalDocumentation].each do |hCitation|
|
87
87
|
@html.div do
|
88
|
-
@html.
|
88
|
+
@html.div('Additional Documentation', 'class' => 'h5')
|
89
89
|
@html.div(:class => 'block') do
|
90
90
|
citationClass.writeHtml(hCitation)
|
91
91
|
end
|
@@ -99,7 +99,7 @@ module ADIWG
|
|
99
99
|
@html.div(:class => 'block') do
|
100
100
|
hUsage[:userContacts].each do |hContact|
|
101
101
|
@html.div do
|
102
|
-
@html.
|
102
|
+
@html.div(hContact[:roleName], 'class' => 'h5')
|
103
103
|
@html.div(:class => 'block') do
|
104
104
|
responsibilityClass.writeHtml(hContact)
|
105
105
|
end
|
@@ -28,7 +28,7 @@ module ADIWG
|
|
28
28
|
# vector representation - scope
|
29
29
|
hVector[:scope].each do |scope|
|
30
30
|
@html.div do
|
31
|
-
@html.
|
31
|
+
@html.div('Scope ', 'class' => 'h5')
|
32
32
|
@html.div(:class => 'block') do
|
33
33
|
scopeClass.writeHtml(hVector[:scope])
|
34
34
|
end
|
@@ -46,7 +46,7 @@ module ADIWG
|
|
46
46
|
# vector representation - vector object []
|
47
47
|
hVector[:vectorObject].each do |hObject|
|
48
48
|
@html.div do
|
49
|
-
@html.
|
49
|
+
@html.div('Vector Object ', 'class' => 'h5')
|
50
50
|
@html.div(:class => 'block') do
|
51
51
|
objectClass.writeHtml(hObject)
|
52
52
|
end
|
@@ -39,7 +39,7 @@ and to choose the level of validation for mdJson input files.
|
|
39
39
|
:enum => %w{mdJson sbJson fgdc}, :required => true
|
40
40
|
method_option :writer, :aliases => '-w',
|
41
41
|
:desc => 'Writer to create your output metadata file, leave blank to validate input only',
|
42
|
-
:enum => %w{fgdc html iso19110 iso19115_1 iso19115_2 iso19115_3 mdJson sbJson simple_html }
|
42
|
+
:enum => %w{fgdc html iso19110 iso19115_1 iso19115_2 iso19115_3 mdJson sbJson simple_html dcat_us}
|
43
43
|
method_option :validate, :aliases => '-v', :desc => 'Specify level of validation to be performed',
|
44
44
|
:enum => %w{none normal strict}, :default => 'normal'
|
45
45
|
method_option :forceValid, :aliases => '-f', :desc => 'Insert tags for required elements missing from input',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adiwg-mdtranslator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.20.0.pre.beta.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stan Smith
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-05-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -129,28 +129,28 @@ dependencies:
|
|
129
129
|
requirements:
|
130
130
|
- - '='
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: 2.9.
|
132
|
+
version: 2.9.3.pre.beta.0
|
133
133
|
type: :runtime
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - '='
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 2.9.
|
139
|
+
version: 2.9.3.pre.beta.0
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: adiwg-mdcodes
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
144
|
- - '='
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version: 2.
|
146
|
+
version: 2.9.4.pre.beta.0
|
147
147
|
type: :runtime
|
148
148
|
prerelease: false
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
151
|
- - '='
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version: 2.
|
153
|
+
version: 2.9.4.pre.beta.0
|
154
154
|
- !ruby/object:Gem::Dependency
|
155
155
|
name: jbuilder
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,6 +232,7 @@ files:
|
|
232
232
|
- ".jsbeautifyrc"
|
233
233
|
- ".travis.yml"
|
234
234
|
- CHANGELOG.md
|
235
|
+
- DCAT-US.md
|
235
236
|
- Gemfile
|
236
237
|
- Gemfile.lock
|
237
238
|
- LICENSE.txt
|
@@ -474,6 +475,38 @@ files:
|
|
474
475
|
- lib/adiwg/mdtranslator/readers/sbJson/sbJson_reader.rb
|
475
476
|
- lib/adiwg/mdtranslator/readers/sbJson/version.rb
|
476
477
|
- lib/adiwg/mdtranslator/version.rb
|
478
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/dcat_us_writer.rb
|
479
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/readme.md
|
480
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_access_level.rb
|
481
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_access_url.rb
|
482
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_accrualPeriodicity.rb
|
483
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_bureau_code.rb
|
484
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_contact_point.rb
|
485
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_dcat_us.rb
|
486
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_described_by.rb
|
487
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_described_by_type.rb
|
488
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_description.rb
|
489
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_distribution.rb
|
490
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_download_url.rb
|
491
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_identifier.rb
|
492
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_is_part_of.rb
|
493
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_issued.rb
|
494
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_keyword.rb
|
495
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_landing_page.rb
|
496
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_language.rb
|
497
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_license.rb
|
498
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_media_type.rb
|
499
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_modified.rb
|
500
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_primaryITInvestmentUII.rb
|
501
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_program_code.rb
|
502
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_publisher.rb
|
503
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_references.rb
|
504
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_rights.rb
|
505
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_spatial.rb
|
506
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_system_of_records.rb
|
507
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_temporal.rb
|
508
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_theme.rb
|
509
|
+
- lib/adiwg/mdtranslator/writers/dcat_us/version.rb
|
477
510
|
- lib/adiwg/mdtranslator/writers/fgdc/classes/class_address.rb
|
478
511
|
- lib/adiwg/mdtranslator/writers/fgdc/classes/class_attribute.rb
|
479
512
|
- lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
|
@@ -789,8 +822,6 @@ files:
|
|
789
822
|
- lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_distribution.rb
|
790
823
|
- lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_distributor.rb
|
791
824
|
- lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_email.rb
|
792
|
-
- lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_enumerationList.rb
|
793
|
-
- lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_extension.rb
|
794
825
|
- lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_extent.rb
|
795
826
|
- lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_feature.rb
|
796
827
|
- lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_featureCatalog.rb
|
@@ -1,52 +0,0 @@
|
|
1
|
-
# ISO <<CodeLists>> Enumerations
|
2
|
-
# 19115-2 writer output in XML
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2016-12-12 refactored for mdTranslator/mdJson 2.0
|
6
|
-
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
7
|
-
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
8
|
-
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
9
|
-
# Stan Smith 2015-06-12 refactored to use mdCodes gem for codelist contents
|
10
|
-
# Stan Smith 2014-12-15 replaced NOAA CT_CodelistCatalogue with mdTranslator CT_CodelistCatalogue
|
11
|
-
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
12
|
-
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered
|
13
|
-
# Stan Smith 2013-08-09 original script
|
14
|
-
|
15
|
-
require 'adiwg-mdcodes'
|
16
|
-
|
17
|
-
module ADIWG
|
18
|
-
module Mdtranslator
|
19
|
-
module Writers
|
20
|
-
module Iso19115_3
|
21
|
-
|
22
|
-
class MD_EnumerationList
|
23
|
-
|
24
|
-
def initialize(xml, responseObj)
|
25
|
-
@xml = xml
|
26
|
-
@hResponseObj = responseObj
|
27
|
-
end
|
28
|
-
|
29
|
-
def writeXML(codeList, codeName)
|
30
|
-
|
31
|
-
# get requested codelist from the adiwg-mdcodes gem
|
32
|
-
mdCodelist = ADIWG::Mdcodes.getCodelistDetail(codeList)
|
33
|
-
|
34
|
-
sourceName = mdCodelist['sourceName']
|
35
|
-
codelist = mdCodelist['codelist']
|
36
|
-
|
37
|
-
# search the codelist for a matching codeName
|
38
|
-
# only valid enumeration values can be written in ISO
|
39
|
-
codelist.each do |code|
|
40
|
-
if code['codeName'] == codeName
|
41
|
-
@xml.tag!('gmd:' + "#{sourceName}", codeName)
|
42
|
-
break
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
end # writeXML
|
47
|
-
end # MD_EnumerationList class
|
48
|
-
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,208 +0,0 @@
|
|
1
|
-
# ISO <<Class>> MD_MetadataExtensionInformation
|
2
|
-
# 19115-2 writer output in XML
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2019-03-22 replaced Enumeration class with method
|
6
|
-
# Stan Smith 2018-04-09 add error and warning messaging
|
7
|
-
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
8
|
-
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
9
|
-
# Stan Smith 2015-06-22 replace global ($response) with passed in object (hResponseObj)
|
10
|
-
# Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
|
11
|
-
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
12
|
-
# Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
|
13
|
-
# Stan Smith 2013-11-22 original script.
|
14
|
-
|
15
|
-
require 'adiwg/mdtranslator/internal/module_codelistFun'
|
16
|
-
require_relative '../iso19115_3_writer'
|
17
|
-
require_relative 'class_codelist'
|
18
|
-
require_relative 'class_enumerationList'
|
19
|
-
require_relative 'class_onlineResource'
|
20
|
-
|
21
|
-
module ADIWG
|
22
|
-
module Mdtranslator
|
23
|
-
module Writers
|
24
|
-
module Iso19115_3
|
25
|
-
|
26
|
-
class MD_MetadataExtensionInformation
|
27
|
-
|
28
|
-
def initialize(xml, hResponseObj)
|
29
|
-
@xml = xml
|
30
|
-
@hResponseObj = hResponseObj
|
31
|
-
@NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_3
|
32
|
-
end
|
33
|
-
|
34
|
-
def writeXML(hExtension)
|
35
|
-
|
36
|
-
# classes used
|
37
|
-
codelistClass = MD_Codelist.new(@xml, @hResponseObj)
|
38
|
-
olResClass = CI_OnlineResource.new(@xml, @hResponseObj)
|
39
|
-
|
40
|
-
outContext = 'extension information'
|
41
|
-
outContext = 'extension name ' + hExtension[:name] unless hExtension[:name].nil?
|
42
|
-
|
43
|
-
@xml.tag!('gmd:MD_MetadataExtensionInformation') do
|
44
|
-
|
45
|
-
# metadata extension - online resource {CI_OnLineResource}
|
46
|
-
hOLResource = hExtension[:onLineResource]
|
47
|
-
unless hOLResource.empty?
|
48
|
-
@xml.tag!('gmd:extensionOnLineResource') do
|
49
|
-
olResClass.writeXML(hOLResource, outContext)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
if hOLResource.empty? && @hResponseObj[:writerShowTags]
|
53
|
-
@xml.tag!('gmd:extensionOnLineResource')
|
54
|
-
end
|
55
|
-
|
56
|
-
# metadata extension = extended element information
|
57
|
-
@xml.tag!('gmd:extendedElementInformation') do
|
58
|
-
@xml.tag!('gmd:MD_ExtendedElementInformation') do
|
59
|
-
|
60
|
-
# extended element info - name (required)
|
61
|
-
s = hExtension[:name]
|
62
|
-
unless s.nil?
|
63
|
-
@xml.tag!('gmd:name') do
|
64
|
-
@xml.tag!('gco:CharacterString', s)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
if s.nil?
|
68
|
-
@NameSpace.issueWarning(100, 'gmd:name')
|
69
|
-
end
|
70
|
-
|
71
|
-
# extended element info - short name
|
72
|
-
s = hExtension[:shortName]
|
73
|
-
unless s.nil?
|
74
|
-
@xml.tag!('gmd:shortName') do
|
75
|
-
@xml.tag!('gco:CharacterString', s)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
if s.nil? && @hResponseObj[:writerShowTags]
|
79
|
-
@xml.tag!('gmd:shortName')
|
80
|
-
end
|
81
|
-
|
82
|
-
# extended element info - definition (required)
|
83
|
-
s = hExtension[:definition]
|
84
|
-
unless s.nil?
|
85
|
-
@xml.tag!('gmd:definition') do
|
86
|
-
@xml.tag!('gco:CharacterString', s)
|
87
|
-
end
|
88
|
-
end
|
89
|
-
if s.nil?
|
90
|
-
@NameSpace.issueWarning(101, 'gmd:definition', outContext)
|
91
|
-
end
|
92
|
-
|
93
|
-
# extended element info - obligation {MD_ObligationCode}
|
94
|
-
obligation = hExtension[:obligation]
|
95
|
-
unless obligation.nil?
|
96
|
-
if CodelistFun.validateItem('iso_obligation', obligation)
|
97
|
-
@xml.tag!('gmd:obligation') do
|
98
|
-
@xml.tag!('gmd:MD_ObligationCode', obligation)
|
99
|
-
end
|
100
|
-
else
|
101
|
-
@NameSpace.issueWarning(380, 'gmd:obligation', "#{obligation}")
|
102
|
-
end
|
103
|
-
end
|
104
|
-
if obligation.nil? && @hResponseObj[:writerShowTags]
|
105
|
-
@xml.tag!('gmd:obligation')
|
106
|
-
end
|
107
|
-
|
108
|
-
# extended element info - data type (required)
|
109
|
-
s = hExtension[:dataType]
|
110
|
-
unless s.nil?
|
111
|
-
@xml.tag!('gmd:dataType') do
|
112
|
-
codelistClass.writeXML('gmd', 'iso_entityClass', s)
|
113
|
-
end
|
114
|
-
end
|
115
|
-
if s.nil?
|
116
|
-
@NameSpace.issueWarning(102, 'gmd:dataType', outContext)
|
117
|
-
end
|
118
|
-
|
119
|
-
# extended element info - maximum occurrence
|
120
|
-
s = hExtension[:maxOccurrence]
|
121
|
-
unless s.nil?
|
122
|
-
@xml.tag!('gmd:maximumOccurrence') do
|
123
|
-
@xml.tag!('gco:CharacterString', s)
|
124
|
-
end
|
125
|
-
end
|
126
|
-
if s.nil? && @hResponseObj[:writerShowTags]
|
127
|
-
@xml.tag!('gmd:maximumOccurrence')
|
128
|
-
end
|
129
|
-
|
130
|
-
# extended element info - parent entity [] (required)
|
131
|
-
aParents = hExtension[:parentEntities]
|
132
|
-
aParents.each do |parent|
|
133
|
-
@xml.tag!('gmd:parentEntity') do
|
134
|
-
@xml.tag!('gco:CharacterString', parent)
|
135
|
-
end
|
136
|
-
end
|
137
|
-
if aParents.empty?
|
138
|
-
@NameSpace.issueWarning(103, 'gmd:parentEntity', outContext)
|
139
|
-
end
|
140
|
-
|
141
|
-
# extended element info - rule
|
142
|
-
s = hExtension[:rule]
|
143
|
-
unless s.nil?
|
144
|
-
@xml.tag!('gmd:rule') do
|
145
|
-
@xml.tag!('gco:CharacterString', s)
|
146
|
-
end
|
147
|
-
end
|
148
|
-
if s.nil?
|
149
|
-
@NameSpace.issueWarning(104, 'gmd:rule', outContext)
|
150
|
-
end
|
151
|
-
|
152
|
-
# extended element info - rationale []
|
153
|
-
aRations = hExtension[:rationales]
|
154
|
-
aRations.each do |ration|
|
155
|
-
@xml.tag!('gmd:rationale') do
|
156
|
-
@xml.tag!('gco:CharacterString', ration)
|
157
|
-
end
|
158
|
-
end
|
159
|
-
if aRations.empty? && @hResponseObj[:writerShowTags]
|
160
|
-
@xml.tag!('gmd:rationale')
|
161
|
-
end
|
162
|
-
|
163
|
-
# extended element info - source [] (required)
|
164
|
-
# only allowing 1 for now
|
165
|
-
role = hExtension[:sourceRole]
|
166
|
-
unless role.nil?
|
167
|
-
@xml.tag!('gmd:source') do
|
168
|
-
@xml.tag!('gmd:CI_ResponsibleParty') do
|
169
|
-
orgName = hExtension[:sourceOrganization]
|
170
|
-
unless orgName.nil?
|
171
|
-
@xml.tag!('gmd:organisationName') do
|
172
|
-
@xml.tag!('gco:CharacterString', orgName)
|
173
|
-
end
|
174
|
-
end
|
175
|
-
uri = hExtension[:sourceURI]
|
176
|
-
unless uri.nil?
|
177
|
-
@xml.tag!('gmd:contactInfo') do
|
178
|
-
@xml.tag!('gmd:CI_Contact') do
|
179
|
-
@xml.tag!('gmd:onlineResource') do
|
180
|
-
@xml.tag!('gmd:CI_OnlineResource') do
|
181
|
-
@xml.tag!('gmd:linkage') do
|
182
|
-
@xml.tag!('gmd:URL', uri)
|
183
|
-
end
|
184
|
-
end
|
185
|
-
end
|
186
|
-
end
|
187
|
-
end
|
188
|
-
end
|
189
|
-
@xml.tag!('gmd:role') do
|
190
|
-
codelistClass.writeXML('gmd', 'iso_role', role)
|
191
|
-
end
|
192
|
-
end
|
193
|
-
end
|
194
|
-
end
|
195
|
-
if role.nil?
|
196
|
-
@NameSpace.issueWarning(105, 'gmd:source', outContext)
|
197
|
-
end
|
198
|
-
|
199
|
-
end # gmd:MD_ExtendedElementInformation tag
|
200
|
-
end # gmd:extendedElementInformation
|
201
|
-
end # gmd:MD_MetadataExtensionInformation
|
202
|
-
end # writeXML
|
203
|
-
end # MD_MetadataExtensionInformation class
|
204
|
-
|
205
|
-
end
|
206
|
-
end
|
207
|
-
end
|
208
|
-
end
|