class ADIWG::Mdtranslator::Writers::Iso19115_2::MD_Band
Public Class Methods
new(xml, hResponseObj)
click to toggle source
# File lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_mdBand.rb, line 17 def initialize(xml, hResponseObj) @xml = xml @hResponseObj = hResponseObj end
Public Instance Methods
writeXML(hAttribute)
click to toggle source
# File lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_mdBand.rb, line 22 def writeXML(hAttribute) # classes used uomClass = UnitsOfMeasure.new(@xml, @hResponseObj) # mdBand - max value s = hAttribute[:maxValue] unless s.nil? @xml.tag!('gmd:maxValue') do @xml.tag!('gco:Real', s) end end if s.nil? && @hResponseObj[:writerShowTags] @xml.tag!('gmd:maxValue') end # mdBand - min value s = hAttribute[:minValue] unless s.nil? @xml.tag!('gmd:minValue') do @xml.tag!('gco:Real', s) end end if s.nil? && @hResponseObj[:writerShowTags] @xml.tag!('gmd:minValue') end # mdBand - units s = hAttribute[:units] unless s.nil? @xml.tag!('gmd:units') do uomClass.writeUnits(s) end end if s.nil? && @hResponseObj[:writerShowTags] @xml.tag!('gmd:units') end # mdBand - peak response s = hAttribute[:peakResponse] unless s.nil? @xml.tag!('gmd:peakResponse') do @xml.tag!('gco:Real', s) end end if s.nil? && @hResponseObj[:writerShowTags] @xml.tag!('gmd:peakResponse') end # mdBand - bits per value s = hAttribute[:bitsPerValue] unless s.nil? @xml.tag!('gmd:bitsPerValue') do @xml.tag!('gco:Integer', s) end end if s.nil? && @hResponseObj[:writerShowTags] @xml.tag!('gmd:bitsPerValue') end # mdBand - tone gradation s = hAttribute[:toneGradations] unless s.nil? @xml.tag!('gmd:toneGradation') do @xml.tag!('gco:Integer', s) end end if s.nil? && @hResponseObj[:writerShowTags] @xml.tag!('gmd:toneGradation') end # mdBand - scale factor s = hAttribute[:scaleFactor] unless s.nil? @xml.tag!('gmd:scaleFactor') do @xml.tag!('gco:Real', s) end end if s.nil? && @hResponseObj[:writerShowTags] @xml.tag!('gmd:scaleFactor') end # mdBand - offset s = hAttribute[:offset] unless s.nil? @xml.tag!('gmd:offset') do @xml.tag!('gco:Real', s) end end if s.nil? && @hResponseObj[:writerShowTags] @xml.tag!('gmd:offset') end end