Sha256: f6243488725fde54fcae1493c28f7b4ddef758aa37a20e2c2ffd429d54336d3e

Contents?: true

Size: 1.29 KB

Versions: 15

Compression:

Stored size: 1.29 KB

Contents

# ISO <<Class>> DerivedUnit
# 19115-1 writer output in XML

# History:
# 	Stan Smith 2019-04-08 copied from 19115_2 writer

module ADIWG
   module Mdtranslator
      module Writers
         module Iso19115_1

            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

15 entries across 15 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.18.0rc6 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.18.0rc5 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.18.0rc4 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.18.0rc3 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.18.0rc2 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.18.0rc1 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.17.1 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.16.1 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.15.0 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb