Sha256: 43733650bf4f1d846dd761cd3261878b24518a1761b9419ad3e17c89f427a771
Contents?: true
Size: 1.27 KB
Versions: 16
Compression:
Stored size: 1.27 KB
Contents
# ISO <<Class>> UnitDefinition # writer output in XML # History: # Stan Smith 2014-12-03 original script # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers # Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj) # Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes # Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS module ADIWG module Mdtranslator module Writers module Iso19110 class UnitDefinition def initialize(xml, responseObj) @xml = xml @responseObj = responseObj end def writeXML(unit) # create an identity for the unit @responseObj[:writerMissingIdCount] = @responseObj[:writerMissingIdCount].succ unitID = 'unit' + @responseObj[:writerMissingIdCount] @xml.tag!('gml:UnitDefinition', {'gml:id' => unitID}) do @xml.tag!('gml:identifier', {'codeSpace' => ''}, unit) end end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems