class ADIWG::Mdtranslator::Writers::Fgdc::EntityOverview

Public Class Methods

new(xml, hResponseObj) click to toggle source
# File lib/adiwg/mdtranslator/writers/fgdc/classes/class_entityOverview.rb, line 17
def initialize(xml, hResponseObj)
   @xml = xml
   @hResponseObj = hResponseObj
   @NameSpace = ADIWG::Mdtranslator::Writers::Fgdc
end

Public Instance Methods

writeXML(hEntity, inContext = nil) click to toggle source
# File lib/adiwg/mdtranslator/writers/fgdc/classes/class_entityOverview.rb, line 23
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