Class: ADIWG::Mdtranslator::Writers::Iso19115_2::MD_ReferenceSystem
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Iso19115_2::MD_ReferenceSystem
- Defined in:
- lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_referenceSystem.rb
Instance Method Summary collapse
-
#initialize(xml, hResponseObj) ⇒ MD_ReferenceSystem
constructor
A new instance of MD_ReferenceSystem.
- #writeXML(hSystem) ⇒ Object
Constructor Details
#initialize(xml, hResponseObj) ⇒ MD_ReferenceSystem
Returns a new instance of MD_ReferenceSystem.
26 27 28 29 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_referenceSystem.rb', line 26 def initialize(xml, hResponseObj) @xml = xml @hResponseObj = hResponseObj end |
Instance Method Details
#writeXML(hSystem) ⇒ Object
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 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_referenceSystem.rb', line 31 def writeXML(hSystem) # classes used idClass = RS_Identifier.new(@xml, @hResponseObj) crsClass = MD_CRS.new(@xml, @hResponseObj) # determine reference system class to write if hSystem[:systemParameterSet].empty? refClass = 'gmd:MD_ReferenceSystem' else refClass = 'gmd:MD_CRS' end @xml.tag!(refClass) do # reference system identifier {rsIdentifier} hIdentifier = hSystem[:systemIdentifier] unless hIdentifier.empty? @xml.tag!('gmd:referenceSystemIdentifier') do idClass.writeXML(hIdentifier, 'spatial reference system') end end if hIdentifier.empty? && @hResponseObj[:writerShowTags] @xml.tag!('gmd:referenceSystemIdentifier') end # CRS identifiers and parameters unless hSystem[:systemParameterSet].empty? crsClass.writeXML(hSystem[:systemParameterSet]) end end end |