Class: ADIWG::Mdtranslator::Writers::Iso19115_3::MD_Band
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Iso19115_3::MD_Band
- Defined in:
- lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_mdBand.rb
Instance Method Summary collapse
-
#initialize(xml, hResponseObj) ⇒ MD_Band
constructor
A new instance of MD_Band.
- #writeXML(hAttribute) ⇒ Object
Constructor Details
#initialize(xml, hResponseObj) ⇒ MD_Band
Returns a new instance of MD_Band.
16 17 18 19 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_mdBand.rb', line 16 def initialize(xml, hResponseObj) @xml = xml @hResponseObj = hResponseObj end |
Instance Method Details
#writeXML(hAttribute) ⇒ Object
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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_3/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 |