class ADIWG::Mdtranslator::Writers::Iso19115_1::MD_Band
Public Class Methods
new(xml, hResponseObj)
click to toggle source
# File lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_mdBand.rb, line 16 def initialize(xml, hResponseObj) @xml = xml @hResponseObj = hResponseObj end
Public Instance Methods
writeXML(hAttribute)
click to toggle source
# File lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_mdBand.rb, line 21 def writeXML(hAttribute) # classes used uomClass = UnitsOfMeasure.new(@xml, @hResponseObj) # mdBand - bound max {real} unless hAttribute[:boundMax].nil? @xml.tag!('mrc:boundMax') do @xml.tag!('gco:Real', hAttribute[:boundMax]) end end if hAttribute[:boundMax].nil? && @hResponseObj[:writerShowTags] @xml.tag!('mrc:boundMax') end # mdBand - bound min {real} unless hAttribute[:boundMin].nil? @xml.tag!('mrc:boundMin') do @xml.tag!('gco:Real', hAttribute[:boundMin]) end end if hAttribute[:boundMin].nil? && @hResponseObj[:writerShowTags] @xml.tag!('mrc:boundMin') end # mdBand - units {gml:unitsOfMeasure} unless hAttribute[:boundUnits].nil? @xml.tag!('mrc:boundUnits') do uomClass.writeUnits(hAttribute[:boundUnits]) end end if hAttribute[:boundUnits].nil? && @hResponseObj[:writerShowTags] @xml.tag!('mrc:boundUnits') end # mdBand - peak response {real} unless hAttribute[:peakResponse].nil? @xml.tag!('mrc:peakResponse') do @xml.tag!('gco:Real', hAttribute[:peakResponse]) end end if hAttribute[:peakResponse].nil? && @hResponseObj[:writerShowTags] @xml.tag!('mrc:peakResponse') end # mdBand - tone gradation {integer} unless hAttribute[:toneGradations].nil? @xml.tag!('mrc:toneGradation') do @xml.tag!('gco:Integer', hAttribute[:toneGradations]) end end if hAttribute[:toneGradations].nil? && @hResponseObj[:writerShowTags] @xml.tag!('mrc:toneGradation') end end