Sha256: 5aa9be5b1c0d249150b4590479dfe5d931e37df8c064693b60dc025ca043b8b3

Contents?: true

Size: 1.31 KB

Versions: 70

Compression:

Stored size: 1.31 KB

Contents

# mdJson 2.0 writer - resource usage

# History:
#   Stan Smith 2017-03-18 refactored for mdJson/mdTranslator 2.0
#   Josh Bradley original script

require 'jbuilder'
require_relative 'mdJson_temporalExtent'
require_relative 'mdJson_citation'
require_relative 'mdJson_responsibleParty'

module ADIWG
   module Mdtranslator
      module Writers
         module MdJson

            module Usage

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

               def self.build(hUsage)

                  Jbuilder.new do |json|
                     json.specificUsage hUsage[:specificUsage]
                     json.temporalExtent @Namespace.json_map(hUsage[:temporalExtents],TemporalExtent)
                     json.userDeterminedLimitation hUsage[:userLimitation]
                     json.limitationResponse hUsage[:limitationResponses] unless hUsage[:limitationResponses].empty?
                     json.documentedIssue Citation.build(hUsage[:identifiedIssue]) unless hUsage[:identifiedIssue].empty?
                     json.additionalDocumentation @Namespace.json_map(hUsage[:additionalDocumentation], Citation)
                     json.userContactInfo @Namespace.json_map(hUsage[:userContacts], ResponsibleParty)
                  end

               end # build
            end # Usage

         end
      end
   end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.9.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.9.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.8.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.7.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.6.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.6.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.5.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.4.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.3.5 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.3.4 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.3.3 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.3.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.3.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.3.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.2.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.1.2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.1.1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.1.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.0.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb
adiwg-mdtranslator-2.0.0rc13 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb