Sha256: 84a2298baa842e61db14f21768f9c157e1b79cde9acec0954df29c6a9f840030

Contents?: true

Size: 1.71 KB

Versions: 13

Compression:

Stored size: 1.71 KB

Contents

require_relative '../iso19115_3_writer'
require_relative 'class_format'

module ADIWG
   module Mdtranslator
      module Writers
         module Iso19115_3

            class QualityResultFile

               def initialize(xml, hResponseObj)
                  @xml = xml
                  @hResponseObj = hResponseObj
                  @NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_3
               end

               def writeXML(hResultFile, inContext = nil)

                  # classes used
                  formatClass = MD_Format.new(@xml, @hResponseObj)

                  @xml.tag!('mdq:QualityResultFile') do

                     unless hResultFile[:fileName].nil?
                        @xml.tag!('mdq:fileName') do
                           @xml.tag!('gcx:FileName', hResultFile[:fileName])
                        end
                     end

                     unless hResultFile[:fileType].nil?
                        @xml.tag!('mdq:fileType') do
                           @xml.tag!('gcx:MimeFileType', {:type => hResultFile[:fileType]})
                        end
                     end

                     unless hResultFile[:fileDescription].nil?
                        @xml.tag!('mdq:fileDescription') do
                            @xml.tag!('gco:CharacterString', hResultFile[:fileDescription])
                        end
                     end

                     unless hResultFile[:fileFormat].empty?
                        @xml.tag!('mdq:fileFormat') do
                           formatClass.writeXML(hResultFile[:fileFormat], inContext)
                        end
                     end

                  end 
               end # writeXML
            end 

         end
      end
   end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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