Sha256: d289bc4fcab82b055661ce1e52a130b8b3a03790bff0d4e2d255b218d17fabfe

Contents?: true

Size: 1.49 KB

Versions: 29

Compression:

Stored size: 1.49 KB

Contents

# ISO <<Class>> MD_Constraints
# 19115-2 writer output in XML

# History:
#  Stan Smith 2016-12-13 refactored for mdTranslator/mdJson 2.0
#  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 (hResponseObj)
#  Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
# 	Stan Smith 2013-10-31 original script

module ADIWG
   module Mdtranslator
      module Writers
         module Iso19115_2

            class MD_Constraints

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

               def writeXML(hConstraint)

                  @xml.tag!('gmd:MD_Constraints') do

                     # use constraints - use limitation []
                     aCons = hConstraint[:useLimitation]
                     aCons.each do |useCon|
                        @xml.tag!('gmd:useLimitation') do
                           @xml.tag!('gco:CharacterString', useCon)
                        end
                     end
                     if aCons.empty?
                        @xml.tag!('gmd:useLimitation') && @hResponseObj[:writerShowTags]
                     end

                  end # gmd:MD_Constraints tag
               end # writeXML
            end # MD_Constraints class

         end
      end
   end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.31 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb