Sha256: 7de0f370a5f1118344e11848dfa980d3a0340d8ce4c579c8a6d0696fdbaec28b

Contents?: true

Size: 842 Bytes

Versions: 3

Compression:

Stored size: 842 Bytes

Contents

# ISO <<CodeLists>> gmd:MD_ClassificationCode

# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# 	Stan Smith 2013-10-21 original script

class DS_AssociationTypeCode
	def initialize(xml)
		@xml = xml
	end

	def writeXML(codeName)
		case(codeName)
			when 'crossReference' then codeID = '001'
			when 'largerWorkCitation' then codeID = '002'
			when 'partOfSeamlessDatabase' then codeID = '003'
			when 'source' then codeID = '004'
			when 'stereoMate' then codeID = '005'
			else
				codeName = 'INVALID ASSOCIATION TYPE CODE'
				codeID = '999'
		end

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

end





Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
adiwg-mdtranslator-0.8.2 lib/adiwg/mdtranslator/writers/iso19115_2/codelists/code_associationType.rb
adiwg-mdtranslator-0.8.1 lib/adiwg/mdtranslator/writers/iso19115_2/codelists/code_associationType.rb
adiwg-mdtranslator-0.8.0 lib/adiwg/mdtranslator/writers/iso19115_2/codelists/code_associationType.rb