adiwg-mdtranslator 2.20.0.pre.beta.3 → 2.21.0.pre.beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +1 -1
  3. data/Gemfile.lock +12 -10
  4. data/README.md +0 -21
  5. data/Rakefile +0 -1
  6. data/adiwg-mdtranslator.gemspec +2 -2
  7. data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +45 -7
  8. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_dataQuality.rb +103 -59
  9. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_acquisition.rb +133 -0
  10. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_conformanceResult.rb +5 -0
  11. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_coverageResult.rb +4 -0
  12. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataQuality.rb +7 -0
  13. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_descriptiveResult.rb +4 -0
  14. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_environment.rb +47 -0
  15. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_event.rb +88 -0
  16. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_instrument.rb +73 -0
  17. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_instrumentationEvent.rb +77 -0
  18. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_instrumentationEventList.rb +62 -0
  19. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_metadata.rb +11 -0
  20. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_objective.rb +104 -0
  21. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_operation.rb +119 -0
  22. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_pass.rb +53 -0
  23. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_plan.rb +80 -0
  24. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_platform.rb +87 -0
  25. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb +4 -0
  26. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_requestedDate.rb +51 -0
  27. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_requirement.rb +98 -0
  28. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_revision.rb +50 -0
  29. data/lib/adiwg/mdtranslator/version.rb +1 -1
  30. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_dataQuality.rb +101 -31
  31. data/lib/adiwg/mdtranslator/writers/html/sections/html_acquisition.rb +199 -0
  32. data/lib/adiwg/mdtranslator/writers/html/sections/html_body.rb +19 -0
  33. data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQuality.rb +17 -1
  34. data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQualityReport.rb +28 -0
  35. data/lib/adiwg/mdtranslator/writers/html/sections/html_environment.rb +58 -0
  36. data/lib/adiwg/mdtranslator/writers/html/sections/html_event.rb +121 -0
  37. data/lib/adiwg/mdtranslator/writers/html/sections/html_instrument.rb +98 -0
  38. data/lib/adiwg/mdtranslator/writers/html/sections/html_instrumentationEvent.rb +84 -0
  39. data/lib/adiwg/mdtranslator/writers/html/sections/html_instrumentationEventList.rb +90 -0
  40. data/lib/adiwg/mdtranslator/writers/html/sections/html_objective.rb +155 -0
  41. data/lib/adiwg/mdtranslator/writers/html/sections/html_operation.rb +178 -0
  42. data/lib/adiwg/mdtranslator/writers/html/sections/html_pass.rb +72 -0
  43. data/lib/adiwg/mdtranslator/writers/html/sections/html_plan.rb +93 -0
  44. data/lib/adiwg/mdtranslator/writers/html/sections/html_platform.rb +117 -0
  45. data/lib/adiwg/mdtranslator/writers/html/sections/html_requestedDate.rb +33 -0
  46. data/lib/adiwg/mdtranslator/writers/html/sections/html_requirement.rb +139 -0
  47. data/lib/adiwg/mdtranslator/writers/html/sections/html_revision.rb +55 -0
  48. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_dataIdentification.rb +29 -0
  49. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_dataQualityReport.rb +1 -1
  50. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_gcoDateTime.rb +10 -1
  51. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_acquisition.rb +42 -0
  52. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_conformanceResult.rb +6 -5
  53. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageResult.rb +1 -0
  54. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_descriptiveResult.rb +1 -0
  55. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_environment.rb +28 -0
  56. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_event.rb +37 -0
  57. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_instrument.rb +35 -0
  58. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_instrumentationEvent.rb +30 -0
  59. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_instrumentationEventList.rb +32 -0
  60. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb +2 -0
  61. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_objective.rb +37 -0
  62. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_onlineResource.rb +1 -1
  63. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_operation.rb +34 -0
  64. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_pass.rb +30 -0
  65. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_plan.rb +32 -0
  66. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_platform.rb +35 -0
  67. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_quantitativeResult.rb +6 -5
  68. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requestedDate.rb +26 -0
  69. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requirement.rb +36 -0
  70. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_resourceInfo.rb +1 -1
  71. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_revision.rb +28 -0
  72. data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_citation.rb +9 -26
  73. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQuality.rb +1 -1
  74. data/lib/adiwg/mdtranslator_cli.rb +1 -1
  75. metadata +48 -39
  76. data/DCAT-US.md +0 -67
  77. data/lib/adiwg/mdtranslator/writers/dcat_us/dcat_us_writer.rb +0 -98
  78. data/lib/adiwg/mdtranslator/writers/dcat_us/readme.md +0 -10
  79. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_access_level.rb +0 -55
  80. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_access_url.rb +0 -17
  81. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_accrualPeriodicity.rb +0 -45
  82. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_bureau_code.rb +0 -33
  83. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_contact_point.rb +0 -29
  84. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_dcat_us.rb +0 -104
  85. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_described_by.rb +0 -29
  86. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_described_by_type.rb +0 -33
  87. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_description.rb +0 -19
  88. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_distribution.rb +0 -59
  89. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_download_url.rb +0 -17
  90. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_identifier.rb +0 -29
  91. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_is_part_of.rb +0 -27
  92. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_issued.rb +0 -19
  93. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_keyword.rb +0 -19
  94. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_landing_page.rb +0 -27
  95. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_language.rb +0 -23
  96. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_license.rb +0 -18
  97. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_media_type.rb +0 -17
  98. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_modified.rb +0 -29
  99. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_primaryITInvestmentUII.rb +0 -19
  100. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_program_code.rb +0 -33
  101. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_publisher.rb +0 -74
  102. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_references.rb +0 -50
  103. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_rights.rb +0 -32
  104. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_spatial.rb +0 -32
  105. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_system_of_records.rb +0 -28
  106. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_temporal.rb +0 -40
  107. data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_theme.rb +0 -28
  108. data/lib/adiwg/mdtranslator/writers/dcat_us/version.rb +0 -14
@@ -13,6 +13,7 @@ require_relative 'mdJson_associatedResource'
13
13
  require_relative 'mdJson_additionalDocumentation'
14
14
  require_relative 'mdJson_funding'
15
15
  require_relative 'mdJson_dataQuality'
16
+ require_relative 'mdJson_acquisition'
16
17
 
17
18
  module ADIWG
18
19
  module Mdtranslator
@@ -34,6 +35,7 @@ module ADIWG
34
35
  json.associatedResource @Namespace.json_map(hMetadata[:associatedResources], AssociatedResource)
35
36
  json.additionalDocumentation @Namespace.json_map(hMetadata[:additionalDocuments], AdditionalDocument)
36
37
  json.funding @Namespace.json_map(hMetadata[:funding], Funding)
38
+ json.acquisition @Namespace.json_map(hMetadata[:acquisitions], Acquisition)
37
39
  end
38
40
 
39
41
  end # build
@@ -0,0 +1,37 @@
1
+ require 'jbuilder'
2
+ require_relative 'mdJson_identifier'
3
+ require_relative 'mdJson_extent'
4
+ require_relative 'mdJson_event'
5
+ require_relative 'mdJson_pass'
6
+ require_relative 'mdJson_instrument'
7
+
8
+ module ADIWG
9
+ module Mdtranslator
10
+ module Writers
11
+ module MdJson
12
+
13
+ module Objective
14
+
15
+ @Namespace = ADIWG::Mdtranslator::Writers::MdJson
16
+
17
+ def self.build(hObjective)
18
+
19
+ Jbuilder.new do |json|
20
+ json.objectiveId hObjective[:objectiveId]
21
+ json.identifier @Namespace.json_map(hObjective[:identifiers], Identifier)
22
+ json.priority hObjective[:priority] unless hObjective[:priority].nil?
23
+ json.objectiveType hObjective[:objectiveTypes] unless hObjective[:objectiveTypes].empty?
24
+ json.function hObjective[:functions] unless hObjective[:functions].empty?
25
+ json.extent @Namespace.json_map(hObjective[:extents], Extent) unless hObjective[:extents].empty?
26
+ json.objectiveOccurence @Namespace.json_map(hObjective[:occurrences], Event) unless hObjective[:occurrences].empty?
27
+ json.pass @Namespace.json_map(hObjective[:passes], Pass) unless hObjective[:passes].empty?
28
+ json.sensingInstrument @Namespace.json_map(hObjective[:sensingInstruments], Instrument) unless hObjective[:sensingInstruments].empty?
29
+ end
30
+
31
+ end
32
+ end # Objective
33
+
34
+ end
35
+ end
36
+ end
37
+ 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]
22
23
  json.description hOlRes[:olResDesc]
23
24
  json.function hOlRes[:olResFunction]
24
25
  json.applicationProfile hOlRes[:olResApplicationProfile]
25
- json.protocol hOlRes[:olResProtocol]
26
26
  json.protocolRequest hOlRes[:olResProtocolRequest]
27
27
  end
28
28
 
@@ -0,0 +1,34 @@
1
+ require 'jbuilder'
2
+
3
+ module ADIWG
4
+ module Mdtranslator
5
+ module Writers
6
+ module MdJson
7
+
8
+ module Operation
9
+
10
+ @Namespace = ADIWG::Mdtranslator::Writers::MdJson
11
+
12
+ def self.build(hOperation)
13
+
14
+ Jbuilder.new do |json|
15
+ json.operationId hOperation[:operationId]
16
+ json.description hOperation[:description] unless hOperation[:description].nil?
17
+ json.citation Citation.build(hOperation[:citation]) unless hOperation[:citation].empty?
18
+ json.identifier Identifier.build(hOperation[:identifier])
19
+ json.status hOperation[:status]
20
+ json.operationType hOperation[:operationType] unless hOperation[:operationType].nil?
21
+ json.objective @Namespace.json_map(hOperation[:objectives], Objective) unless hOperation[:objectives].empty?
22
+ json.parentOperation Operation.build(hOperation[:parentOperation]) unless hOperation[:parentOperation].empty?
23
+ json.childOperation @Namespace.json_map(hOperation[:childOperations], Operation) unless hOperation[:childOperations].empty?
24
+ json.plan Plan.build(hOperation[:plan]) unless hOperation[:plan].empty?
25
+ json.platform @Namespace.json_map(hOperation[:platforms], Platform) unless hOperation[:platforms].empty?
26
+ json.significantEvent @Namespace.json_map(hOperation[:significantEvents], Event) unless hOperation[:significantEvents].empty?
27
+ end
28
+
29
+ end
30
+ end # Operation
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,30 @@
1
+ require 'jbuilder'
2
+ require_relative 'mdJson_identifier'
3
+ require_relative 'mdJson_extent'
4
+ require_relative 'mdJson_event'
5
+
6
+ module ADIWG
7
+ module Mdtranslator
8
+ module Writers
9
+ module MdJson
10
+
11
+ module Pass
12
+
13
+ @Namespace = ADIWG::Mdtranslator::Writers::MdJson
14
+
15
+ def self.build(hPass)
16
+
17
+ Jbuilder.new do |json|
18
+ json.passId hPass[:passId]
19
+ json.identifier Identifier.build(hPass[:identifier])
20
+ json.extent Extent.build(hPass[:extent]) unless hPass[:extent].empty?
21
+ json.relatedEvent @Namespace.json_map(hPass[:relatedEvents], Event) unless hPass[:relatedEvents].empty?
22
+ end
23
+
24
+ end
25
+ end # Pass
26
+
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,32 @@
1
+ require 'jbuilder'
2
+ require_relative 'mdJson_citation'
3
+ require_relative 'mdJson_operation'
4
+ require_relative 'mdJson_requirement'
5
+
6
+ module ADIWG
7
+ module Mdtranslator
8
+ module Writers
9
+ module MdJson
10
+
11
+ module Plan
12
+
13
+ @Namespace = ADIWG::Mdtranslator::Writers::MdJson
14
+
15
+ def self.build(hPlan)
16
+
17
+ Jbuilder.new do |json|
18
+ json.planId hPlan[:planId]
19
+ json.planType hPlan[:planType] unless hPlan[:planType].nil?
20
+ json.status hPlan[:status]
21
+ json.citation Citation.build(hPlan[:citation])
22
+ json.planOperation @Namespace.json_map(hPlan[:operations], Operation)
23
+ json.satisfiedRequirement @Namespace.json_map(hPlan[:satisfiedRequirements], Requirement)
24
+
25
+ end
26
+
27
+ end
28
+ end # Plan
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,35 @@
1
+ require 'jbuilder'
2
+ require_relative 'mdJson_citation'
3
+ require_relative 'mdJson_identifier'
4
+ require_relative 'mdJson_responsibleParty'
5
+ require_relative 'mdJson_instrument'
6
+ require_relative 'mdJson_instrumentationEventList'
7
+
8
+ module ADIWG
9
+ module Mdtranslator
10
+ module Writers
11
+ module MdJson
12
+
13
+ module Platform
14
+
15
+ @Namespace = ADIWG::Mdtranslator::Writers::MdJson
16
+
17
+ def self.build(hPlatform)
18
+
19
+ Jbuilder.new do |json|
20
+ json.platformId hPlatform[:platformId]
21
+ json.citation Citation.build(hPlatform[:citation]) unless hPlatform[:citation].empty?
22
+ json.identifier Identifier.build(hPlatform[:identifier])
23
+ json.description hPlatform[:description]
24
+ json.sponsor @Namespace.json_map(hPlatform[:sponsors], ResponsibleParty) unless hPlatform[:sponsors].empty?
25
+ json.instrument @Namespace.json_map(hPlatform[:instruments], Instrument)
26
+ json.history @Namespace.json_map(hPlatform[:history], InstrumentationEventList) unless hPlatform[:history].empty?
27
+ end
28
+
29
+ end
30
+ end # Platform
31
+
32
+ end
33
+ end
34
+ end
35
+ end
@@ -9,11 +9,12 @@ 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]) if hResult[:scope]
14
- json.value hResult[:values]
15
- json.valueUnits hResult[:valueUnits]
16
- json.valueRecordType hResult[:valueRecordType]
12
+ json.dateTime hResult[:dateTime] unless hResult[:dateTime].nil?
13
+ json.scope Scope.build(hResult[:scope]) unless hResult[:scope].empty?
14
+ json.name hResult[:name] unless hResult[:name].nil?
15
+ json.value hResult[:values] unless hResult[:values].empty?
16
+ json.valueUnits hResult[:valueUnits] unless hResult[:valueUnits].nil?
17
+ json.valueRecordType hResult[:valueRecordType] unless hResult[:valueRecordType].nil?
17
18
  end
18
19
  end
19
20
  end
@@ -0,0 +1,26 @@
1
+ require 'jbuilder'
2
+ require_relative 'mdJson_dateTime'
3
+
4
+ module ADIWG
5
+ module Mdtranslator
6
+ module Writers
7
+ module MdJson
8
+
9
+ module RequestedDate
10
+
11
+ @Namespace = ADIWG::Mdtranslator::Writers::MdJson
12
+
13
+ def self.build(hRequestedDate)
14
+
15
+ Jbuilder.new do |json|
16
+ json.requestedDateOfCollection DateTime.build(hRequestedDate[:requestedDateOfCollection])
17
+ json.latestAcceptableDate DateTime.build(hRequestedDate[:latestAcceptableDate])
18
+ end
19
+
20
+ end
21
+ end # Requested Date
22
+
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,36 @@
1
+ require 'jbuilder'
2
+ require_relative 'mdJson_citation'
3
+ require_relative 'mdJson_identifier'
4
+ require_relative 'mdJson_responsibleParty'
5
+ require_relative 'mdJson_requestedDate'
6
+ require_relative 'mdJson_plan'
7
+
8
+ module ADIWG
9
+ module Mdtranslator
10
+ module Writers
11
+ module MdJson
12
+
13
+ module Requirement
14
+
15
+ @Namespace = ADIWG::Mdtranslator::Writers::MdJson
16
+
17
+ def self.build(hRequirement)
18
+
19
+ Jbuilder.new do |json|
20
+ json.requirementId hRequirement[:requirementId]
21
+ json.citation Citation.build(hRequirement[:citation])
22
+ json.identifier Identifier.build(hRequirement[:identifier])
23
+ json.requestor @Namespace.json_map(hRequirement[:requestors], ResponsibleParty)
24
+ json.recipient @Namespace.json_map(hRequirement[:recipients], ResponsibleParty)
25
+ json.priority hRequirement[:priority]
26
+ json.requestedDate RequestedDate.build(hRequirement[:requestedDate])
27
+ json.expiryDate hRequirement[:expiryDate]
28
+ json.satisfiedPlan @Namespace.json_map(hRequirement[:satisfiedPlans], Plan)
29
+ end
30
+
31
+ end
32
+ end # Requirement
33
+ end
34
+ end
35
+ end
36
+ end
@@ -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.credit hResInfo[:credits] unless hResInfo[:credits].empty?
46
45
  json.timePeriod TimePeriod.build(hResInfo[:timePeriod]) unless hResInfo[:timePeriod].empty?
46
+ json.credit hResInfo[:credits] unless hResInfo[:credits].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)
@@ -0,0 +1,28 @@
1
+ require 'jbuilder'
2
+ require_relative 'mdJson_responsibleParty'
3
+ require_relative 'mdJson_dateTime'
4
+
5
+ module ADIWG
6
+ module Mdtranslator
7
+ module Writers
8
+ module MdJson
9
+
10
+ module Revision
11
+
12
+ @Namespace = ADIWG::Mdtranslator::Writers::MdJson
13
+
14
+ def self.build(hRevision)
15
+
16
+ Jbuilder.new do |json|
17
+ json.description hRevision[:description]
18
+ json.responsibleParty @Namespace.json_map(hRevision[:responsibleParties], ResponsibleParty)
19
+ json.dateInfo @Namespace.json_map(hRevision[:dateInfo], DateTime)
20
+ end
21
+
22
+ end
23
+ end # Revision
24
+
25
+ end
26
+ end
27
+ end
28
+ end
@@ -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[]}
20
15
  def self.build(hCitation)
21
16
 
22
17
  citation = ''
23
18
 
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,32 +45,15 @@ 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
- citation += hContact[:name] + '(' + sbRole + '), '
48
+ if sbRole.downcase == 'author'
49
+ citation += hContact[:name] + ', '
50
+ end
49
51
  end
50
52
  end
51
53
  end
52
54
 
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
-
62
55
  # 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
56
+ citation += hCitation[:title]
74
57
 
75
58
  citation
76
59
 
@@ -62,7 +62,7 @@ module ADIWG
62
62
  hDataQuality[:report].each do |report|
63
63
  @html.div(:class =>'block') do
64
64
  @html.div do
65
- @html.h5('Report', {'class' => 'h5'})
65
+ @html.h5(report[:type], {'class' => 'h5'})
66
66
  dataQualityReportClass.writeHtml(report)
67
67
  end
68
68
  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 dcat_us}
42
+ :enum => %w{fgdc html iso19110 iso19115_1 iso19115_2 iso19115_3 mdJson sbJson simple_html }
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',