Sha256: cde542fcd9ff060e50ffbcf60095556ff515fc4237f0a492dd64e7037ef3799c

Contents?: true

Size: 1.43 KB

Versions: 34

Compression:

Stored size: 1.43 KB

Contents

# ISO <<Class>> DerivedUnit
# 19115-2 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, hResponseObj)
                        @xml = xml
                        @hResponseObj = hResponseObj
                    end

                    def writeXML(hDerived)

                        # create and identity for the unit
                        @hResponseObj[:writerMissingIdCount] = @hResponseObj[:writerMissingIdCount].succ
                        unitID = 'unit' + @hResponseObj[: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

34 entries across 34 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.1.1 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.1.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.0.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.0.0rc13 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.0.0rc11 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.0.0rc10 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.0.0rc9 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.0.0rc8 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.0.0rc7 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.0.0rc6 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.0.0rc5 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.0.0rc4 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.0.0rc3 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.0.0rc2 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_derivedUnit.rb