Class: LI_Lineage
- Inherits:
-
Object
- Object
- LI_Lineage
- Defined in:
- lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_lineage.rb
Instance Method Summary collapse
-
#initialize(xml) ⇒ LI_Lineage
constructor
A new instance of LI_Lineage.
- #writeXML(hLineage) ⇒ Object
Constructor Details
#initialize(xml) ⇒ LI_Lineage
Returns a new instance of LI_Lineage.
13 14 15 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_lineage.rb', line 13 def initialize(xml) @xml = xml end |
Instance Method Details
#writeXML(hLineage) ⇒ Object
17 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 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_lineage.rb', line 17 def writeXML(hLineage) # classes used sourceClass = LI_Source.new(@xml) pStepClass = LI_ProcessStep.new(@xml) @xml.tag!('gmd:LI_Lineage') do # lineage - statement s = hLineage[:statement] if !s.nil? @xml.tag!('gmd:statement') do @xml.tag!('gco:CharacterString',s) end elsif $showAllTags @xml.tag!('gmd:statement') end # lineage - processing steps aProcSteps = hLineage[:processSteps] if !aProcSteps.empty? aProcSteps.each do |pStep| @xml.tag!('gmd:processStep') do pStepClass.writeXML(pStep) end end elsif $showAllTags @xml.tag!('gmd:processStep') end # lineage - data sources aSources = hLineage[:dataSources] if !aSources.empty? aSources.each do |hSource| @xml.tag!('gmd:source') do sourceClass.writeXML(hSource) end end elsif $showAllTags @xml.tag!('gmd:source') end end end |