class ADIWG::Mdtranslator::Writers::Iso19115_2::MD_VectorSpatialRepresentation
Public Class Methods
new(xml, hResponseObj)
click to toggle source
# File lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb, line 17 def initialize(xml, hResponseObj) @xml = xml @hResponseObj = hResponseObj end
Public Instance Methods
writeXML(hVector)
click to toggle source
# File lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb, line 22 def writeXML(hVector) # classes used codelistClass = MD_Codelist.new(@xml, @hResponseObj) geoObjClass = MD_GeometricObjects.new(@xml, @hResponseObj) @xml.tag!('gmd:MD_VectorSpatialRepresentation') do # vector representation - topology level s = hVector[:topologyLevel] unless s.nil? @xml.tag!('gmd:topologyLevel') do codelistClass.writeXML('gmd', 'iso_topologyLevel', s) end end if s.nil? && @hResponseObj[:writerShowTags] @xml.tag!('gmd:topologyLevel') end # vector representation - geometric objects [{MD_GeometricObjects}] aGeoObjs = hVector[:vectorObject] aGeoObjs.each do |hGeoObj| @xml.tag!('gmd:geometricObjects') do geoObjClass.writeXML(hGeoObj) end end if aGeoObjs.empty? && @hResponseObj[:writerShowTags] @xml.tag!('gmd:geometricObjects') end end # gmd:MD_VectorSpatialRepresentation tag end