Class: ADIWG::Mdtranslator::Writers::Fgdc::Description

Inherits:
Object
  • Object
show all
Defined in:
lib/adiwg/mdtranslator/writers/fgdc/classes/class_description.rb

Instance Method Summary collapse

Constructor Details

#initialize(xml, hResponseObj) ⇒ Description



17
18
19
20
21
# File 'lib/adiwg/mdtranslator/writers/fgdc/classes/class_description.rb', line 17

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

Instance Method Details

#writeXML(hResourceInfo) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/adiwg/mdtranslator/writers/fgdc/classes/class_description.rb', line 23

def writeXML(hResourceInfo)
   
   # description 1.2.1 (abstract) - abstract (required)
   # <- hResourceInfo[:abstract] (required)
   unless hResourceInfo[:abstract].nil?
      @xml.tag!('abstract', hResourceInfo[:abstract])
   end
   if hResourceInfo[:abstract].nil?
      @NameSpace.issueWarning(60,'abstract', 'identification section')
   end

   # description 1.2.2 (purpose) - purpose (required)
   # <- hResourceInfo[:purpose] (required)
   unless hResourceInfo[:purpose].nil?
      @xml.tag!('purpose', hResourceInfo[:purpose])
   end
   if hResourceInfo[:purpose].nil?
      @NameSpace.issueWarning(61,'purpose', 'identification section')
   end

   # description 1.2.3 (supplinf) - supplemental information
   # <- hResourceInfo[:supplementalInfo]
   unless hResourceInfo[:supplementalInfo].nil?
      @xml.tag!('supplinf', hResourceInfo[:supplementalInfo])
   end

end