Sha256: cd0535004053a8922652f5eb8f1d9fcd6d1bddc1c825fbb2fc993d14d9a06a15

Contents?: true

Size: 1.79 KB

Versions: 28

Compression:

Stored size: 1.79 KB

Contents

# mdJson 2.0 writer - source

# History:
#  Stan Smith 2019-09-24 support for LE_Source
#  Stan Smith 2017-03-19 original script

require 'jbuilder'
require_relative 'mdJson_citation'
require_relative 'mdJson_spatialResolution'
require_relative 'mdJson_spatialReference'
require_relative 'mdJson_processStep'
require_relative 'mdJson_scope'
require_relative 'mdJson_identifier'
require_relative 'mdJson_nominalResolution'

module ADIWG
   module Mdtranslator
      module Writers
         module MdJson

            module Source

               @Namespace = ADIWG::Mdtranslator::Writers::MdJson

               def self.build(hSource)

                  Jbuilder.new do |json|
                     json.sourceId hSource[:sourceId]
                     json.description hSource[:description]
                     json.sourceCitation Citation.build(hSource[:sourceCitation]) unless hSource[:sourceCitation].empty?
                     json.metadataCitation @Namespace.json_map(hSource[:metadataCitations], Citation)
                     json.spatialResolution SpatialResolution.build(hSource[:spatialResolution]) unless hSource[:spatialResolution].empty?
                     json.referenceSystem SpatialReference.build(hSource[:referenceSystem]) unless hSource[:referenceSystem].empty?
                     json.sourceProcessStep @Namespace.json_map(hSource[:sourceSteps], ProcessStep)
                     json.scope Scope.build(hSource[:scope]) unless hSource[:scope].empty?
                     json.processedLevel Identifier.build(hSource[:processedLevel]) unless hSource[:processedLevel].empty?
                     json.resolution NominalResolution.build(hSource[:resolution]) unless hSource[:resolution].empty?
                  end

               end # build
            end # Source

         end
      end
   end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.31 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb