Class: MD_Identifier
- Inherits:
-
Object
- Object
- MD_Identifier
- Defined in:
- lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_identifier.rb
Instance Method Summary collapse
-
#initialize(xml) ⇒ MD_Identifier
constructor
A new instance of MD_Identifier.
- #writeXML(hResID) ⇒ Object
Constructor Details
#initialize(xml) ⇒ MD_Identifier
Returns a new instance of MD_Identifier.
14 15 16 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_identifier.rb', line 14 def initialize(xml) @xml = xml end |
Instance Method Details
#writeXML(hResID) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_identifier.rb', line 18 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 |