Sha256: 78f61821ee46d5a8181d34cdf67f2bec13de506b62813e2a407764d5dcd282e1

Contents?: true

Size: 1.2 KB

Versions: 3

Compression:

Stored size: 1.2 KB

Contents

# ISO <<CodeLists>> gmd:MD_ScopeCode

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

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

	def writeXML(codeName)
		case(codeName)
			when 'attribute' then codeID = '001'
			when 'attributeType' then codeID = '002'
			when 'collectionHardware' then codeID = '003'
			when 'collectionSession' then codeID = '004'
			when 'dataset' then codeID = '005'
			when 'series' then codeID = '006'
			when 'nonGeographicDataset' then codeID = '007'
			when 'dimensionGroup' then codeID = '008'
			when 'feature' then codeID = '009'
			when 'featureType' then codeID = '010'
			when 'propertyType' then codeID = '011'
			when 'fieldSession' then codeID = '012'
			when 'software' then codeID = '013'
			when 'service' then codeID = '014'
			when 'model' then codeID = '015'
			when 'tile' then codeID = '016'
			else
				codeName = 'INVALID SCOPE CODE'
				codeID = '999'
		end

		# write xml
		@xml.tag!('gmd:MD_ScopeCode',{:codeList=>'http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode',
									  :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_scope.rb
adiwg-mdtranslator-0.8.1 lib/adiwg/mdtranslator/writers/iso19115_2/codelists/code_scope.rb
adiwg-mdtranslator-0.8.0 lib/adiwg/mdtranslator/writers/iso19115_2/codelists/code_scope.rb