Sha256: a42d58b62a0c5dbdc4a37469df284f3d214cb1ce55c2bbff6a3505343e487085

Contents?: true

Size: 1.41 KB

Versions: 16

Compression:

Stored size: 1.41 KB

Contents

# ISO <<Class>> DerivedUnit
# writer output in XML

# History:
# 	Stan Smith 2015-08-27 copied from 19110 writer

module ADIWG
    module Mdtranslator
        module Writers
            module Iso19115_2

                class DerivedUnit

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

                    def writeXML(hDerived)

                        # create and identity for the unit
                        @responseObj[:writerMissingIdCount] = @responseObj[:writerMissingIdCount].succ
                        unitID = 'unit' + @responseObj[:writerMissingIdCount]
                        @xml.tag!('gml:DerivedUnit', {'gml:id' => unitID}) do
                            @xml.tag!('gml:identifier', {'codeSpace' => hDerived[:codeSpace]}, hDerived[:identifier])
                            @xml.tag!('gml:name', hDerived[:name])
                            @xml.tag!('gml:remarks', hDerived[:remarks])
                            @xml.tag!('gml:catalogSymbol', hDerived[:catalogSymbol])
                            aTerms = hDerived[:derivationUnitTerm]
                            aTerms.each do |term|
                                @xml.tag!('gml:derivationUnitTerm', term)
                            end
                        end

                    end

                end

            end
        end
    end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
adiwg-mdtranslator-1.4.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta14 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta13 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta12 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta11 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta10 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta9 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta8 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta7 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta6 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta5 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta4 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta3 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta2 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.4.0.beta1 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-1.3.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb