Class: ADIWG::Mdtranslator::Writers::Iso19115_3::Source
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Iso19115_3::Source
- Defined in:
- lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb
Instance Method Summary collapse
-
#initialize(xml, hResponseObj) ⇒ Source
constructor
A new instance of Source.
- #writeXML(hSource, inContext = nil) ⇒ Object
Constructor Details
#initialize(xml, hResponseObj) ⇒ Source
Returns a new instance of Source.
17 18 19 20 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb', line 17 def initialize(xml, hResponseObj) @xml = xml @hResponseObj = hResponseObj end |
Instance Method Details
#writeXML(hSource, inContext = nil) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_source.rb', line 22 def writeXML(hSource, inContext = nil) # classes used liSourceClass = LI_Source.new(@xml, @hResponseObj) leSourceClass = LE_Source.new(@xml, @hResponseObj) outContext = inContext # use LE_Source if hSource has any ... # processedLevel, resolution useLE = false useLE = true unless hSource[:processedLevel].empty? useLE = true unless hSource[:resolution].empty? if useLE leSourceClass.writeXML(hSource, outContext) else liSourceClass.writeXML(hSource, outContext) end end |