Sha256: db55175c69ed46e5b7209fdee3b2053a820b435a01d016daa08957606703c92b

Contents?: true

Size: 1.63 KB

Versions: 38

Compression:

Stored size: 1.63 KB

Contents

# FGDC <<Class>> EntityOverview
# FGDC CSDGM writer output in XML

# History:
#  Stan Smith 2018-02-26 refactored error and warning messaging
#  Stan Smith 2018-01-22 original script

require_relative '../fgdc_writer'

module ADIWG
   module Mdtranslator
      module Writers
         module Fgdc

            class EntityOverview

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

               def writeXML(hEntity, inContext = nil)
                  
                  # entity overview 5.2.1 (eaover) - entity and attribute overview (required)
                  # <- entity.definition
                  unless hEntity[:entityDefinition].nil?
                     @xml.tag!('eaover', hEntity[:entityDefinition])
                  end
                  if hEntity[:entityDefinition].nil?
                     @NameSpace.issueWarning(100, 'eaover', inContext)
                  end

                  # entity overview 5.2.2 (eadetcit) - entity and attribute detail citation []
                  # <- entity.entityReferences[]
                  hEntity[:entityReferences].each do |hCitation|
                     unless hCitation.empty?
                        @xml.tag!('eadetcit', hCitation[:title])
                     end
                  end
                  if hEntity[:entityReferences].empty? && @hResponseObj[:writerShowTags]
                     @xml.tag!('eadetcit')
                  end

               end # writeXML
            end # EntityOverview

         end
      end
   end
end

Version data entries

38 entries across 38 versions & 1 rubygems

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