Sha256: 4e5604be5c946e1bdd4442f2583fbf34ef4d87d5d237c4e73733d1ca93170e45
Contents?: true
Size: 1.42 KB
Versions: 18
Compression:
Stored size: 1.42 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) 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 # clean off last semicolon if rights.length > 2 rights = rights[0...-2] end rights end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems