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
@@ -185,13 +185,6 @@ module ADIWG
|
|
185
185
|
end
|
186
186
|
end
|
187
187
|
end
|
188
|
-
|
189
|
-
# Name
|
190
|
-
unless result[:name].nil?
|
191
|
-
@html.em('Name: ')
|
192
|
-
@html.text!(result[:name])
|
193
|
-
@html.br
|
194
|
-
end
|
195
188
|
|
196
189
|
# Specification (citation)
|
197
190
|
unless result[:specification].empty?
|
@@ -249,13 +242,6 @@ module ADIWG
|
|
249
242
|
end
|
250
243
|
end
|
251
244
|
|
252
|
-
# Name
|
253
|
-
unless result[:name].nil?
|
254
|
-
@html.em('Name: ')
|
255
|
-
@html.text!(result[:name])
|
256
|
-
@html.br
|
257
|
-
end
|
258
|
-
|
259
245
|
# SpatialRepresentationType
|
260
246
|
unless result[:spatialRepresentationType].nil?
|
261
247
|
@html.em('Spatial Representation Type: ')
|
@@ -331,13 +317,6 @@ module ADIWG
|
|
331
317
|
end
|
332
318
|
end
|
333
319
|
end
|
334
|
-
|
335
|
-
# Name
|
336
|
-
unless result[:name].nil?
|
337
|
-
@html.em('Name: ')
|
338
|
-
@html.text!(result[:name])
|
339
|
-
@html.br
|
340
|
-
end
|
341
320
|
|
342
321
|
# Statement
|
343
322
|
unless result[:statement].nil?
|
@@ -373,13 +352,6 @@ module ADIWG
|
|
373
352
|
end
|
374
353
|
end
|
375
354
|
end
|
376
|
-
|
377
|
-
# Name
|
378
|
-
unless result[:name].nil?
|
379
|
-
@html.em('Name: ')
|
380
|
-
@html.text!(result[:name])
|
381
|
-
@html.br
|
382
|
-
end
|
383
355
|
|
384
356
|
# Value
|
385
357
|
unless result[:values].empty?
|
@@ -277,33 +277,6 @@ module ADIWG
|
|
277
277
|
|
278
278
|
# data identification - resource constraints [] {MD_Constraints}
|
279
279
|
aConstraint = hResource[:constraints]
|
280
|
-
legalConstraint = aConstraint.find { |hCon| hCon[:type] == 'legal' }
|
281
|
-
# handle distribution liability statements - add to legal constraint -> other constraints
|
282
|
-
aDistInfo = hMetadata[:distributorInfo]
|
283
|
-
liabilityStatements = []
|
284
|
-
aDistInfo.each do |hDistribution|
|
285
|
-
unless hDistribution.empty?
|
286
|
-
unless hDistribution[:liabilityStatement].nil?
|
287
|
-
liabilityStatements << hDistribution[:liabilityStatement]
|
288
|
-
end
|
289
|
-
end
|
290
|
-
end
|
291
|
-
if liabilityStatements.any?
|
292
|
-
# Create a new legal constraint if it doesn't exist
|
293
|
-
unless legalConstraint
|
294
|
-
legalConstraint = {
|
295
|
-
type: 'legal',
|
296
|
-
legalConstraint: {
|
297
|
-
otherCons: []
|
298
|
-
}
|
299
|
-
}
|
300
|
-
aConstraint << legalConstraint
|
301
|
-
end
|
302
|
-
liabilityStatements.each do |liabilityStatement|
|
303
|
-
legalConstraint[:legalConstraint][:otherCons] << liabilityStatement
|
304
|
-
end
|
305
|
-
end
|
306
|
-
|
307
280
|
aConstraint.each do |hCon|
|
308
281
|
@xml.tag!('mri:resourceConstraints') do
|
309
282
|
constraintClass.writeXML(hCon, 'resource information')
|
@@ -313,8 +286,6 @@ module ADIWG
|
|
313
286
|
@xml.tag!('mri:resourceConstraints')
|
314
287
|
end
|
315
288
|
|
316
|
-
# data identification - resource constraints {} from distribution liability statement
|
317
|
-
|
318
289
|
# data identification - associated resource [] {MD_AssociatedResource}
|
319
290
|
aAssocRes.each do |hAssocRes|
|
320
291
|
@xml.tag!('mri:associatedResource') do
|
@@ -34,7 +34,7 @@ module ADIWG
|
|
34
34
|
citationClass = CI_Citation.new(@xml, @hResponseObj)
|
35
35
|
|
36
36
|
@xml.tag!('mdq:report') do
|
37
|
-
@xml.tag!("mdq
|
37
|
+
@xml.tag!("mdq:DQ_#{hReport[:type]}") do
|
38
38
|
|
39
39
|
# standaloneQualityReportDetails
|
40
40
|
unless hReport[:standaloneQualityReportDetails].nil?
|
@@ -24,16 +24,7 @@ module ADIWG
|
|
24
24
|
# date - date (required)
|
25
25
|
unless date.nil?
|
26
26
|
case dateRes
|
27
|
-
when 'Y'
|
28
|
-
dateStr = AdiwgDateTimeFun.stringDateFromDateTime(date, 'Y')
|
29
|
-
@xml.tag!('gco:Date', dateStr)
|
30
|
-
when 'YM'
|
31
|
-
dateStr = AdiwgDateTimeFun.stringDateFromDateTime(date, 'YM')
|
32
|
-
@xml.tag!('gco:Date', dateStr)
|
33
|
-
when 'YMD'
|
34
|
-
dateStr = AdiwgDateTimeFun.stringDateFromDateTime(date, 'YMD')
|
35
|
-
@xml.tag!('gco:Date', dateStr)
|
36
|
-
when 'YMDh', 'YMDhm', 'YMDhms'
|
27
|
+
when 'Y', 'YM', 'YMD', 'YMDh', 'YMDhm', 'YMDhms'
|
37
28
|
dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(date, 'YMDhms')
|
38
29
|
@xml.tag!('gco:DateTime', dateStr)
|
39
30
|
when 'YMDhZ', 'YMDhmZ', 'YMDhmsZ'
|
@@ -26,7 +26,6 @@ require_relative 'class_maintenance'
|
|
26
26
|
require_relative 'class_spatialRepresentation'
|
27
27
|
require_relative 'class_referenceSystem'
|
28
28
|
require_relative 'class_featureCatalog'
|
29
|
-
require_relative 'class_extension'
|
30
29
|
|
31
30
|
module ADIWG
|
32
31
|
module Mdtranslator
|
@@ -63,7 +62,6 @@ module ADIWG
|
|
63
62
|
representationClass = SpatialRepresentation.new(@xml, @hResponseObj)
|
64
63
|
referenceSystemClass = MD_ReferenceSystem.new(@xml, @hResponseObj)
|
65
64
|
mdCatalogClass = MD_FeatureCatalogue.new(@xml, @hResponseObj)
|
66
|
-
extensionClass = MD_MetadataExtensionInformation.new(@xml, @hResponseObj)
|
67
65
|
|
68
66
|
# create shortcuts to sections of internal object
|
69
67
|
hMetadata = intObj[:metadata]
|
@@ -293,31 +291,6 @@ module ADIWG
|
|
293
291
|
@xml.tag!('mdb:referenceSystemInfo')
|
294
292
|
end
|
295
293
|
|
296
|
-
taxonomyArray = hResInfo[:taxonomy]
|
297
|
-
unless taxonomyArray.empty?
|
298
|
-
# metadata information - metadata extension info
|
299
|
-
# add biological profile to all metadata records
|
300
|
-
intBio = intMetadataClass.newMetadataExtension
|
301
|
-
intBio[:name] = 'Taxonomy System'
|
302
|
-
intBio[:shortName] = 'TaxonSys'
|
303
|
-
intBio[:definition] = 'Documentation of taxonomic sources, procedures, and treatments'
|
304
|
-
intBio[:obligation] = 'optional'
|
305
|
-
intBio[:dataType] = 'class'
|
306
|
-
intBio[:maxOccurrence] = '1'
|
307
|
-
intBio[:parentEntities] << 'MD_Identification'
|
308
|
-
intBio[:rule] = 'New Metadata section as a class to MD_Identification'
|
309
|
-
intBio[:rationales] << 'The set of data elements contained within this class element ' +
|
310
|
-
'represents an attempt to provide better documentation of ' +
|
311
|
-
'taxonomic sources, procedures, and treatments.'
|
312
|
-
intBio[:sourceOrganization] = 'National Biological Information Infrastructure'
|
313
|
-
intBio[:sourceURI] = 'https://www2.usgs.gov/core_science_systems/Access/p1111-1.html'
|
314
|
-
intBio[:sourceRole] = 'author'
|
315
|
-
|
316
|
-
@xml.tag!('gmd:metadataExtensionInfo') do
|
317
|
-
extensionClass.writeXML(intBio)
|
318
|
-
end
|
319
|
-
end
|
320
|
-
|
321
294
|
# ###################### Begin Data Identification #####################
|
322
295
|
|
323
296
|
# metadata information - data identification info - required
|
@@ -65,7 +65,9 @@ module ADIWG
|
|
65
65
|
# if empty add indeterminatePosition="unknown"
|
66
66
|
unless hPeriod[:startDateTime].empty?
|
67
67
|
hDateTime = hPeriod[:startDateTime]
|
68
|
-
|
68
|
+
dateTime = hDateTime[:dateTime]
|
69
|
+
timeResolution = hDateTime[:dateResolution]
|
70
|
+
dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(dateTime, timeResolution)
|
69
71
|
@xml.tag!('gml:beginPosition', dateStr)
|
70
72
|
end
|
71
73
|
if hPeriod[:startDateTime].empty?
|
@@ -77,7 +79,9 @@ module ADIWG
|
|
77
79
|
# if empty add indeterminatePosition="unknown"
|
78
80
|
unless hPeriod[:endDateTime].empty?
|
79
81
|
hDateTime = hPeriod[:endDateTime]
|
80
|
-
|
82
|
+
dateTime = hDateTime[:dateTime]
|
83
|
+
timeResolution = hDateTime[:dateResolution]
|
84
|
+
dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(dateTime, timeResolution)
|
81
85
|
@xml.tag!('gml:endPosition', dateStr)
|
82
86
|
end
|
83
87
|
if hPeriod[:endDateTime].empty?
|
@@ -10,12 +10,11 @@ module ADIWG
|
|
10
10
|
module ConformanceResult
|
11
11
|
def self.build(hConformanceResult)
|
12
12
|
Jbuilder.new do |json|
|
13
|
-
json.dateTime hConformanceResult[:dateTime]
|
14
|
-
json.scope Scope.build(hConformanceResult[:scope])
|
15
|
-
json.
|
16
|
-
json.
|
17
|
-
json.
|
18
|
-
json.pass hConformanceResult[:pass] unless hConformanceResult[:pass].nil?
|
13
|
+
json.dateTime hConformanceResult[:dateTime]
|
14
|
+
json.scope Scope.build(hConformanceResult[:scope])
|
15
|
+
json.specification Citation.build(hConformanceResult[:specification])
|
16
|
+
json.explanation hConformanceResult[:explanation]
|
17
|
+
json.pass hConformanceResult[:pass]
|
19
18
|
end
|
20
19
|
end
|
21
20
|
end
|
@@ -15,7 +15,6 @@ module ADIWG
|
|
15
15
|
Jbuilder.new do |json|
|
16
16
|
json.dateTime hCoverageResult[:dateTime]
|
17
17
|
json.scope Scope.build(hCoverageResult[:scope]) unless hCoverageResult[:scope].empty?
|
18
|
-
json.name hCoverageResult[:name] unless hCoverageResult[:name].nil?
|
19
18
|
json.spatialRepresentationType hCoverageResult[:spatialRepresentationType]
|
20
19
|
json.spatialRepresentation SpatialRepresentation.build(hCoverageResult[:spatialRepresentation]) unless hCoverageResult[:spatialRepresentation].empty?
|
21
20
|
json.resultContentDescription CoverageDescription.build(hCoverageResult[:resultContentDescription]) unless hCoverageResult[:resultContentDescription].empty?
|
@@ -11,7 +11,6 @@ module ADIWG
|
|
11
11
|
Jbuilder.new do |json|
|
12
12
|
json.dateTime hResult[:dateTime] unless hResult[:dateTime].nil?
|
13
13
|
json.scope Scope.build(hResult[:scope]) unless hResult[:scope].empty?
|
14
|
-
json.name hResult[:name] unless hResult[:name].nil?
|
15
14
|
json.statement hResult[:statement] unless hResult[:statement].nil?
|
16
15
|
end
|
17
16
|
end
|
@@ -19,10 +19,10 @@ module ADIWG
|
|
19
19
|
Jbuilder.new do |json|
|
20
20
|
json.uri hOlRes[:olResURI]
|
21
21
|
json.name hOlRes[:olResName]
|
22
|
-
json.protocol hOlRes[:olResProtocol]
|
23
22
|
json.description hOlRes[:olResDesc]
|
24
23
|
json.function hOlRes[:olResFunction]
|
25
24
|
json.applicationProfile hOlRes[:olResApplicationProfile]
|
25
|
+
json.protocol hOlRes[:olResProtocol]
|
26
26
|
json.protocolRequest hOlRes[:olResProtocolRequest]
|
27
27
|
end
|
28
28
|
|
@@ -9,12 +9,11 @@ module ADIWG
|
|
9
9
|
module QuantitativeResult
|
10
10
|
def self.build(hResult)
|
11
11
|
Jbuilder.new do |json|
|
12
|
-
json.dateTime hResult[:dateTime]
|
13
|
-
json.scope Scope.build(hResult[:scope])
|
14
|
-
json.
|
15
|
-
json.
|
16
|
-
json.
|
17
|
-
json.valueRecordType hResult[:valueRecordType] unless hResult[:valueRecordType].nil?
|
12
|
+
json.dateTime hResult[:dateTime]
|
13
|
+
json.scope Scope.build(hResult[:scope]) if hResult[:scope]
|
14
|
+
json.value hResult[:values]
|
15
|
+
json.valueUnits hResult[:valueUnits]
|
16
|
+
json.valueRecordType hResult[:valueRecordType]
|
18
17
|
end
|
19
18
|
end
|
20
19
|
end
|
@@ -42,8 +42,8 @@ module ADIWG
|
|
42
42
|
json.abstract hResInfo[:abstract]
|
43
43
|
json.shortAbstract hResInfo[:shortAbstract]
|
44
44
|
json.purpose hResInfo[:purpose]
|
45
|
-
json.timePeriod TimePeriod.build(hResInfo[:timePeriod]) unless hResInfo[:timePeriod].empty?
|
46
45
|
json.credit hResInfo[:credits] unless hResInfo[:credits].empty?
|
46
|
+
json.timePeriod TimePeriod.build(hResInfo[:timePeriod]) unless hResInfo[:timePeriod].empty?
|
47
47
|
json.status hResInfo[:status] unless hResInfo[:status].empty?
|
48
48
|
json.pointOfContact @Namespace.json_map(hResInfo[:pointOfContacts], ResponsibleParty)
|
49
49
|
json.spatialReferenceSystem @Namespace.json_map(hResInfo[:spatialReferenceSystems], SpatialReference)
|
@@ -12,15 +12,15 @@ module ADIWG
|
|
12
12
|
|
13
13
|
module Citation
|
14
14
|
|
15
|
+
# build from citation as follows ...
|
16
|
+
# names, [] {citation.responsibleParty[]}
|
17
|
+
# dates(type), [] {citation.dates[]}
|
18
|
+
# title, {citation.title}
|
19
|
+
# uri, [] {citation.onlineResource[]}
|
15
20
|
def self.build(hCitation)
|
16
21
|
|
17
22
|
citation = ''
|
18
23
|
|
19
|
-
if hCitation[:otherDetails].length > 0
|
20
|
-
citation = hCitation[:otherDetails][0]
|
21
|
-
return citation
|
22
|
-
end
|
23
|
-
|
24
24
|
# names
|
25
25
|
aParties = []
|
26
26
|
hCitation[:responsibleParties].each do |hResponsibility|
|
@@ -45,15 +45,32 @@ module ADIWG
|
|
45
45
|
unless hContact[:name].nil?
|
46
46
|
sbRole = Codelists.codelist_adiwg2sb('role_adiwg2sb', hParty[:role])
|
47
47
|
sbRole = sbRole.nil? ? hParty[:role] : sbRole
|
48
|
-
|
49
|
-
citation += hContact[:name] + ', '
|
50
|
-
end
|
48
|
+
citation += hContact[:name] + '(' + sbRole + '), '
|
51
49
|
end
|
52
50
|
end
|
53
51
|
end
|
54
52
|
|
53
|
+
# dates
|
54
|
+
hCitation[:dates].each do |hDate|
|
55
|
+
dateStr = AdiwgDateTimeFun.stringDateFromDateObject(hDate)
|
56
|
+
dateType = Codelists.codelist_adiwg2sb('date_adiwg2sb', hDate[:dateType])
|
57
|
+
unless dateType.nil?
|
58
|
+
citation += dateStr + '(' + dateType + '), '
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
55
62
|
# title
|
56
|
-
citation += hCitation[:title]
|
63
|
+
citation += hCitation[:title] + ', '
|
64
|
+
|
65
|
+
# uri
|
66
|
+
hCitation[:onlineResources].each do |hOnline|
|
67
|
+
citation += hOnline[:olResURI] + ', '
|
68
|
+
end
|
69
|
+
|
70
|
+
# clean off last comma
|
71
|
+
if citation.length > 0
|
72
|
+
citation = citation[0...-2]
|
73
|
+
end
|
57
74
|
|
58
75
|
citation
|
59
76
|
|
@@ -90,7 +90,7 @@ module ADIWG
|
|
90
90
|
# allocation - online resource [] {onlineResource}
|
91
91
|
hAllocation[:onlineResources].each do |hOnline|
|
92
92
|
@html.div do
|
93
|
-
@html.
|
93
|
+
@html.div('Online Resource', {'class' => 'h5'})
|
94
94
|
@html.div(:class => 'block') do
|
95
95
|
onlineClass.writeHtml(hOnline)
|
96
96
|
end
|
@@ -147,14 +147,14 @@ module ADIWG
|
|
147
147
|
end
|
148
148
|
end
|
149
149
|
|
150
|
-
# citation - other
|
151
|
-
unless hCitation[:
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
end
|
150
|
+
# citation - other div []
|
151
|
+
# unless hCitation[:otherdiv].empty?
|
152
|
+
# hCitation[:otherdiv].each do |detail|
|
153
|
+
# @html.em('Other div: ')
|
154
|
+
# @html.text!(detail)
|
155
|
+
# @html.br
|
156
|
+
# end
|
157
|
+
# end
|
158
158
|
|
159
159
|
end # writeHtml
|
160
160
|
end # Html_Citation
|
@@ -262,7 +262,7 @@ module ADIWG
|
|
262
262
|
# ResultContentDescription
|
263
263
|
unless result[:resultContentDescription].empty?
|
264
264
|
@html.div do
|
265
|
-
@html.
|
265
|
+
@html.div('Result Content Description', {'class' => 'h5'})
|
266
266
|
@html.div(:class => 'block') do
|
267
267
|
coverageInfoClass.writeHtml(result[:resultContentDescription])
|
268
268
|
end
|
@@ -272,7 +272,7 @@ module ADIWG
|
|
272
272
|
# ResourceFormat
|
273
273
|
unless result[:resourceFormat].empty?
|
274
274
|
@html.div do
|
275
|
-
@html.
|
275
|
+
@html.div('Resource Format', {'class' => 'h5'})
|
276
276
|
@html.div(:class => 'block') do
|
277
277
|
formatClass.writeHtml(result[:resourceFormat])
|
278
278
|
end
|
@@ -282,7 +282,7 @@ module ADIWG
|
|
282
282
|
# ResultFile
|
283
283
|
unless result[:resultFile].empty?
|
284
284
|
@html.div do
|
285
|
-
@html.
|
285
|
+
@html.div('Result File', {'class' => 'h5'})
|
286
286
|
@html.div(:class => 'block') do
|
287
287
|
resultFileClass.writeHtml(result[:resultFile])
|
288
288
|
end
|
@@ -82,7 +82,7 @@ module ADIWG
|
|
82
82
|
# geographic extent - identifier {identifier}
|
83
83
|
unless hExtent[:identifier].empty?
|
84
84
|
@html.div do
|
85
|
-
@html.
|
85
|
+
@html.div('Identifier', 'class' => 'h5')
|
86
86
|
@html.div(:class => 'block') do
|
87
87
|
identifierClass.writeHtml(hExtent[:identifier])
|
88
88
|
end
|
@@ -41,7 +41,7 @@ module ADIWG
|
|
41
41
|
# lineage - scope
|
42
42
|
unless hLineage[:resourceScope].empty?
|
43
43
|
@html.div do
|
44
|
-
@html.
|
44
|
+
@html.div('Scope', {'class' => 'h5'})
|
45
45
|
@html.div(:class => 'block') do
|
46
46
|
scopeClass.writeHtml(hLineage[:resourceScope])
|
47
47
|
end
|
@@ -51,7 +51,7 @@ module ADIWG
|
|
51
51
|
# lineage - citation
|
52
52
|
hLineage[:lineageCitation].each do |hCitation|
|
53
53
|
@html.div do
|
54
|
-
@html.
|
54
|
+
@html.div('Citation', {'class' => 'h5'})
|
55
55
|
@html.div(:class => 'block') do
|
56
56
|
citationClass.writeHtml(hCitation)
|
57
57
|
end
|
@@ -61,7 +61,7 @@ module ADIWG
|
|
61
61
|
# lineage - data sources
|
62
62
|
hLineage[:dataSources].each do |hsource|
|
63
63
|
@html.div do
|
64
|
-
@html.
|
64
|
+
@html.div('Data Source', {'class' => 'h5'})
|
65
65
|
@html.div(:class => 'block') do
|
66
66
|
sourceClass.writeHtml(hsource)
|
67
67
|
end
|
@@ -71,7 +71,7 @@ module ADIWG
|
|
71
71
|
# lineage - process steps
|
72
72
|
hLineage[:processSteps].each do |hStep|
|
73
73
|
@html.div do
|
74
|
-
@html.
|
74
|
+
@html.div('Process Step', {'class' => 'h5'})
|
75
75
|
@html.div(:class => 'block') do
|
76
76
|
stepClass.writeHtml(hStep)
|
77
77
|
end
|
@@ -47,11 +47,11 @@ module ADIWG
|
|
47
47
|
# maintenance - scopes [] {scope}
|
48
48
|
unless hMaint[:scopes].empty?
|
49
49
|
@html.div do
|
50
|
-
@html.
|
50
|
+
@html.div('Maintenance Scopes', {'class' => 'h5'})
|
51
51
|
@html.div(:class => 'block') do
|
52
52
|
hMaint[:scopes].each do |hScope|
|
53
53
|
@html.div do
|
54
|
-
@html.
|
54
|
+
@html.div(hScope[:scopeCode], 'class' => 'h5')
|
55
55
|
@html.div(:class => 'block') do
|
56
56
|
scopeClass.writeHtml(hScope)
|
57
57
|
end
|
@@ -64,11 +64,11 @@ module ADIWG
|
|
64
64
|
# maintenance - contacts [] {responsibility}
|
65
65
|
unless hMaint[:contacts].empty?
|
66
66
|
@html.div do
|
67
|
-
@html.
|
67
|
+
@html.div('Maintenance Contacts', {'class' => 'h5'})
|
68
68
|
@html.div(:class => 'block') do
|
69
69
|
hMaint[:contacts].each do |hContact|
|
70
70
|
@html.div do
|
71
|
-
@html.
|
71
|
+
@html.div(hContact[:roleName], 'class' => 'h5')
|
72
72
|
@html.div(:class => 'block') do
|
73
73
|
responsibilityClass.writeHtml(hContact)
|
74
74
|
end
|
@@ -29,7 +29,7 @@ module ADIWG
|
|
29
29
|
# medium - specification {citation}
|
30
30
|
unless hMedium[:mediumSpecification].empty?
|
31
31
|
@html.div do
|
32
|
-
@html.
|
32
|
+
@html.div('Medium Specification', {'class' => 'h5'})
|
33
33
|
@html.div(:class => 'block') do
|
34
34
|
citationClass.writeHtml(hMedium[:mediumSpecification])
|
35
35
|
end
|
@@ -74,7 +74,7 @@ module ADIWG
|
|
74
74
|
# medium - identifier {identifier}
|
75
75
|
unless hMedium[:identifier].empty?
|
76
76
|
@html.div do
|
77
|
-
@html.
|
77
|
+
@html.div('Identifier for the Medium', {'class' => 'h5'})
|
78
78
|
@html.div(:class => 'block') do
|
79
79
|
identifierClass.writeHtml(hMedium[:identifier])
|
80
80
|
end
|
@@ -76,7 +76,7 @@ module ADIWG
|
|
76
76
|
# default metadata locales {locale}
|
77
77
|
unless hMetaInfo[:defaultMetadataLocale].empty?
|
78
78
|
@html.div do
|
79
|
-
@html.
|
79
|
+
@html.div('Default Locale', {'class' => 'h5'})
|
80
80
|
@html.div(:class => 'block') do
|
81
81
|
localeClass.writeHtml(hMetaInfo[:defaultMetadataLocale])
|
82
82
|
end
|
@@ -86,7 +86,7 @@ module ADIWG
|
|
86
86
|
# other metadata locales [] {locale}
|
87
87
|
hMetaInfo[:otherMetadataLocales].each do |hLocale|
|
88
88
|
@html.div do
|
89
|
-
@html.
|
89
|
+
@html.div('Other Locale', {'class' => 'h5'})
|
90
90
|
@html.div(:class => 'block') do
|
91
91
|
localeClass.writeHtml(hLocale)
|
92
92
|
end
|
@@ -104,7 +104,7 @@ module ADIWG
|
|
104
104
|
@html.div(:class => 'block') do
|
105
105
|
hMetaInfo[:metadataContacts].each do |hResponsibility|
|
106
106
|
@html.div do
|
107
|
-
@html.
|
107
|
+
@html.div(hResponsibility[:roleName], 'class' => 'h5')
|
108
108
|
@html.div(:class => 'block') do
|
109
109
|
responsibilityClass.writeHtml(hResponsibility)
|
110
110
|
end
|
@@ -179,7 +179,7 @@ module ADIWG
|
|
179
179
|
@html.div(:class => 'block') do
|
180
180
|
hMetaInfo[:alternateMetadataReferences].each do |hCitation|
|
181
181
|
@html.div do
|
182
|
-
@html.
|
182
|
+
@html.div(hCitation[:title], 'class' => 'h5')
|
183
183
|
@html.div(:class => 'block') do
|
184
184
|
citationClass.writeHtml(hCitation)
|
185
185
|
@html.br
|
@@ -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.div(hAddressee[:roleName], 'class' => 'h5')
|
48
48
|
@html.div(:class => 'block') do
|
49
49
|
responsibilityClass.writeHtml(hAddressee)
|
50
50
|
end
|
@@ -154,7 +154,7 @@ module ADIWG
|
|
154
154
|
hResource[:graphicOverviews].each do |hGraphic|
|
155
155
|
counter += 1
|
156
156
|
@html.div do
|
157
|
-
@html.
|
157
|
+
@html.div('Overview '+counter.to_s, 'class' => 'h5')
|
158
158
|
@html.div(:class => 'block') do
|
159
159
|
graphicClass.writeHtml(hGraphic)
|
160
160
|
end
|
@@ -173,7 +173,7 @@ module ADIWG
|
|
173
173
|
# contacts - responsibility
|
174
174
|
hResource[:pointOfContacts].each do |hContact|
|
175
175
|
@html.div do
|
176
|
-
@html.
|
176
|
+
@html.div(hContact[:roleName], 'class' => 'h5')
|
177
177
|
@html.div(:class => 'block') do
|
178
178
|
responsibilityClass.writeHtml(hContact)
|
179
179
|
end
|
@@ -183,7 +183,7 @@ module ADIWG
|
|
183
183
|
# contacts - credits
|
184
184
|
unless hResource[:credits].empty?
|
185
185
|
@html.div do
|
186
|
-
@html.
|
186
|
+
@html.div('Other Credits', 'class' => 'h5')
|
187
187
|
@html.div(:class => 'block') do
|
188
188
|
hResource[:credits].each do |credit|
|
189
189
|
@html.em('Credit: ')
|
@@ -216,7 +216,7 @@ module ADIWG
|
|
216
216
|
unless hResource[:temporalResolutions].empty?
|
217
217
|
hResource[:temporalResolutions].each do |hResolution|
|
218
218
|
@html.div do
|
219
|
-
@html.
|
219
|
+
@html.div('Resolution', 'class' => 'h5')
|
220
220
|
@html.div(:class => 'block') do
|
221
221
|
durationClass.writeHtml(hResolution)
|
222
222
|
end
|
@@ -347,7 +347,7 @@ module ADIWG
|
|
347
347
|
hResource[:taxonomy].each do |hTaxonomy|
|
348
348
|
counter += 1
|
349
349
|
@html.div do
|
350
|
-
@html.
|
350
|
+
@html.div('Taxonomic Structure '+counter.to_s, 'class' => 'h5')
|
351
351
|
@html.div(:class => 'block') do
|
352
352
|
taxonomyClass.writeHtml(hTaxonomy)
|
353
353
|
end
|
@@ -27,7 +27,7 @@ module ADIWG
|
|
27
27
|
hResponsibility[:parties].each do |hParty|
|
28
28
|
hContact = Html_Document.getContact(hParty[:contactId])
|
29
29
|
@html.div do
|
30
|
-
@html.
|
30
|
+
@html.div(hContact[:name], 'class' => 'h5')
|
31
31
|
@html.div(:class => 'block') do
|
32
32
|
|
33
33
|
# party - contact ID
|