Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_SpatialRepresentation

Inherits:
Object
  • Object
show all
Defined in:
lib/adiwg/mdtranslator/writers/simple_html/sections/html_spatialRepresentation.rb

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ Html_SpatialRepresentation



19
20
21
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_spatialRepresentation.rb', line 19

def initialize(html)
   @html = html
end

Instance Method Details

#writeHtml(hRepresentation) ⇒ 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_spatialRepresentation.rb', line 23

def writeHtml(hRepresentation)

   # classes used
   gridClass = Html_GridRepresentation.new(@html)
   vectorClass = Html_VectorRepresentation.new(@html)
   georectifiedClass = Html_GeorectifiedRepresentation.new(@html)
   georeferenceableClass = Html_GeoreferenceableRepresentation.new(@html)

   # spatial Representation - grid {gridRepresentation}
   unless hRepresentation[:gridRepresentation].empty?
      @html.div do
         @html.div('Grid Representation ', 'class' => 'h5')
         @html.div(:class => 'block') do
            gridClass.writeHtml(hRepresentation[:gridRepresentation])
         end
      end
   end

   # spatial Representation - vector {vectorRepresentation}
   unless hRepresentation[:vectorRepresentation].empty?
      @html.div do
         @html.div('Vector Representation ', 'class' => 'h5')
         @html.div(:class => 'block') do
            vectorClass.writeHtml(hRepresentation[:vectorRepresentation])
         end
      end
   end

   # spatial Representation - georectified {georectifiedRepresentation}
   unless hRepresentation[:georectifiedRepresentation].empty?
      @html.div do
         @html.div('Georectified Representation ', 'class' => 'h5')
         @html.div(:class => 'block') do
            georectifiedClass.writeHtml(hRepresentation[:georectifiedRepresentation])
         end
      end
   end

   # spatial Representation - georeferenceable {georeferenceableRepresentation}
   unless hRepresentation[:georeferenceableRepresentation].empty?
      @html.div do
         @html.div('Georeferenceable Representation ', 'class' => 'h5')
         @html.div(:class => 'block') do
            georeferenceableClass.writeHtml(hRepresentation[:georeferenceableRepresentation])
         end
      end
   end

end