Sha256: ed1b9111e0d405cb09b571a2139ea34cfb06e797ed863fad8352c8c88a02cb38

Contents?: true

Size: 1001 Bytes

Versions: 7

Compression:

Stored size: 1001 Bytes

Contents

# ISO <<Class>> MD_Identifier
# writer
# output for ISO 19115-2 XML

# History:
# 	Stan Smith 2014-05-16 original script
#   Stan Smith 2014-05-28 revised for json schema 0.5.0
#   Stan Smith 2014-07-08 modify require statements to function in RubyGem structure

require 'class_citation'

class MD_Identifier

	def initialize(xml)
		@xml = xml
	end

	def writeXML(hResID)

		# the authority for the identifier is a citation block

		# classes used in MD_Metadata
		citationClass = CI_Citation.new(@xml)

		@xml.tag!('gmd:MD_Identifier') do

			# identifier - authority
			hCitation = hResID[:identifierCitation]
			if !hCitation.empty?
				@xml.tag!('gmd:authority') do
					citationClass.writeXML(hCitation)
				end
			elsif $showAllTags
				@xml.tag!('gmd:authority')
			end

			# identity - code - required
			s = hResID[:identifier]
			if !s.nil?
				@xml.tag!('gmd:code') do
					@xml.tag!('gco:CharacterString', s)
				end
			elsif $showAllTags
				@xml.tag!('gmd:code')
			end

		end

	end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
adiwg-mdtranslator-0.10.2 lib/adiwg/mdtranslator/writers/iso/classes/class_identifier.rb
adiwg-mdtranslator-0.9.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_identifier.rb
adiwg-mdtranslator-0.8.6 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_identifier.rb
adiwg-mdtranslator-0.8.5 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_identifier.rb
adiwg-mdtranslator-0.8.2 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_identifier.rb
adiwg-mdtranslator-0.8.1 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_identifier.rb
adiwg-mdtranslator-0.8.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_identifier.rb