Sha256: e363d5d5038ac9f034a75ac139986384a5cc1c872d8bfdc60591dc913b613c63

Contents?: true

Size: 1.29 KB

Versions: 14

Compression:

Stored size: 1.29 KB

Contents

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

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

module ADIWG
   module Mdtranslator
      module Writers
         module Iso19115_3

            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

14 entries across 14 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.31 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_derivedUnit.rb