Sha256: 6421d679c07ab2928b0b2ec57a5df88cb22e4288f20cd3852cf00a21d53e50ab

Contents?: true

Size: 914 Bytes

Versions: 4

Compression:

Stored size: 914 Bytes

Contents

# ISO <<CodeLists>> gmd:MD_SpatialRepresentationTypeCode

# 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_SpatialRepresentationTypeCode
	def initialize(xml)
		@xml = xml
	end

	def writeXML(codeName)
		case(codeName)
			when 'vector' then codeID = '001'
			when 'grid' then codeID = '002'
			when 'textTable' then codeID = '003'
			when 'tin' then codeID = '004'
			when 'stereoModel' then codeID = '005'
			when 'video' then codeID = '006'
			else
				codeID = 'non-ISO codeName'
		end

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