Sha256: 5282702ea37f03d6f2e71e54f098b0ab73e12f03151aaa54f1d9703323b5d06e

Contents?: true

Size: 1.18 KB

Versions: 38

Compression:

Stored size: 1.18 KB

Contents

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

# History:
#  Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
#  Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
#  Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
#  Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
# 	Stan Smith 2014-12-03 original script

module ADIWG
   module Mdtranslator
      module Writers
         module Iso19110

            class UnitDefinition

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

               def writeXML(unit)

                  # create an identity for the unit
                  @hResponseObj[:writerMissingIdCount] = @hResponseObj[:writerMissingIdCount].succ
                  unitID = 'unit' + @hResponseObj[:writerMissingIdCount]
                  @xml.tag!('gml:UnitDefinition', {'gml:id' => unitID}) do
                     @xml.tag!('gml:identifier', {'codeSpace' => ''}, unit)
                  end

               end

            end

         end
      end
   end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.18.0rc6 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.18.0rc5 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.18.0rc4 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.18.0rc3 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.18.0rc2 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.18.0rc1 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.17.1 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.16.1 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.15.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.14.2 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.14.1 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.14.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.13.3 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.13.2 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.13.1 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.13.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.12.0 lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb
adiwg-mdtranslator-2.12.0.pre lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb