Sha256: 03861033e7b18cdf58aba6339fefd39306280492b3954c5392dd7e0fa05782e9

Contents?: true

Size: 878 Bytes

Versions: 4

Compression:

Stored size: 878 Bytes

Contents

# ISO <<CodeLists>> gmd:MD_MediumFormatCode

# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# 	Stan Smith 2013-09-24 original script
#   Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class MD_MediumFormatCode

	def initialize(xml)
		@xml = xml
	end

	def writeXML(codeName)
		case(codeName)
			when 'cpio' then codeID = '001'
			when 'tar' then codeID = '002'
			when 'highSierra' then codeID = '003'
			when 'iso9660' then codeID = '004'
			when 'iso9660RockRidge' then codeID = '005'
			when 'iso9660AppleHFS' then codeID = '006'
			else
				codeID = 'non-ISO codeName'
		end

		# write xml
		@xml.tag!('gmd:MD_MediumFormatCode',{:codeList=>'http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_MediumFormatCode',
										    :codeListValue=>"#{codeName}",
										    :codeSpace=>"#{codeID}"})
	end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
adiwg-mdtranslator-0.10.2 lib/adiwg/mdtranslator/writers/iso/codelists/code_mediumFormat.rb
adiwg-mdtranslator-0.9.0 lib/adiwg/mdtranslator/writers/iso19115_2/codelists/code_mediumFormat.rb
adiwg-mdtranslator-0.8.6 lib/adiwg/mdtranslator/writers/iso19115_2/codelists/code_mediumFormat.rb
adiwg-mdtranslator-0.8.5 lib/adiwg/mdtranslator/writers/iso19115_2/codelists/code_mediumFormat.rb