Sha256: bfd88ef095837e0848e27a62649c8c5dd657b9afb330354dd6977462b2a1e521
Contents?: true
Size: 1.69 KB
Versions: 42
Compression:
Stored size: 1.69 KB
Contents
# sbJson 1.0 writer # History: # Stan Smith 2017-05-22 original script require_relative 'sbJson_codelists' module ADIWG module Mdtranslator module Writers module SbJson module Rights def self.build(aConstraints, aDistributionInfo) rights = '' aConstraints.each do |hConstraint| if hConstraint[:type] = 'legal' unless hConstraint[:legalConstraint].empty? # map legal constraint usage restriction codes hConstraint[:legalConstraint][:useCodes].each do |code| codeDef = Codelists.get_code_definition('iso_restriction', code) unless codeDef.nil? rights += code + ' - ' + codeDef + '; ' end end # map other legal constraints hConstraint[:legalConstraint][:otherCons].each do |con| rights += con + '; ' end end end end aDistributionInfo.each do |hDistribution| unless hDistribution[:liabilityStatement].nil? rights += hDistribution[:liabilityStatement] + '; ' end end # clean off last semicolon if rights.length > 2 rights = rights[0...-2] end rights end end end end end end
Version data entries
42 entries across 42 versions & 1 rubygems