Sha256: be75485ea86eba6b587b383b1992b8e2411e1a1da49e82fceb3feefb5c1561ec

Contents?: true

Size: 1.11 KB

Versions: 4

Compression:

Stored size: 1.11 KB

Contents

# ISO <<CodeLists>> gmd:MD_MaintenanceFrequencyCode

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

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

	def writeXML(codeName)
		case(codeName)
			when 'continual' then codeID = '001'
			when 'daily' then codeID = '002'
			when 'weekly' then codeID = '003'
			when 'fortnightly' then codeID = '004'
			when 'monthly' then codeID = '005'
			when 'quarterly' then codeID = '006'
			when 'biannually' then codeID = '007'
			when 'annually' then codeID = '008'
			when 'asNeeded' then codeID = '009'
			when 'irregular' then codeID = '010'
			when 'notPlanned' then codeID = '011'
			when 'unknown' then codeID = '012'
			else
				codeID = 'non-ISO codeName'
		end

		# write xml
		@xml.tag!('gmd:MD_MaintenanceFrequencyCode',{:codeList=>'http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_MaintenanceFrequencyCode',
											 :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_maintenanceFrequency.rb
adiwg-mdtranslator-0.9.0 lib/adiwg/mdtranslator/writers/iso19115_2/codelists/code_maintenanceFrequency.rb
adiwg-mdtranslator-0.8.6 lib/adiwg/mdtranslator/writers/iso19115_2/codelists/code_maintenanceFrequency.rb
adiwg-mdtranslator-0.8.5 lib/adiwg/mdtranslator/writers/iso19115_2/codelists/code_maintenanceFrequency.rb