Sha256: 7f3c204a2172da3296d666382d8d2316a9341c92ca2a5bd1cd7b94391d8f3daa

Contents?: true

Size: 1.52 KB

Versions: 32

Compression:

Stored size: 1.52 KB

Contents

# ISO <<Class>> BaseUnit
# 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 BaseUnit

                    def initialize(xml, responseObj)
                        @xml = xml
                        @hResponseObj = responseObj
                    end

                    def writeXML(hBase)

                        # create and identity for the unit
                        @hResponseObj[:writerMissingIdCount] = @hResponseObj[:writerMissingIdCount].succ
                        unitID = 'unit' + @hResponseObj[:writerMissingIdCount]
                        @xml.tag!('gml:BaseUnit', {'gml:id' => unitID}) do
                            @xml.tag!('gml:identifier', {'codeSpace' => hBase[:codeSpace]}, hBase[:identifier])
                            @xml.tag!('gml:name', hBase[:name])
                            @xml.tag!('gml:catalogSymbol', hBase[:catalogSymbol])
                            @xml.tag!('gml:unitsSystem', {'xlink:href' => hBase[:unitsSystem]})
                        end

                    end

                end

            end
        end
    end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.10.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.9.2 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.9.1 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.9.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.8.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.7.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.6.1 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.6.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.5.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.4.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.3.5 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.3.4 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.3.3 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.3.2 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.3.1 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.3.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.2.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.1.2 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.1.1 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb
adiwg-mdtranslator-2.1.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb