class ADIWG::Mdtranslator::Writers::Html::Html_SpatialRepresentation

Public Class Methods

new(html) click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_spatialRepresentation.rb, line 19
def initialize(html)
   @html = html
end

Public Instance Methods

writeHtml(hRepresentation) click to toggle source
# File lib/adiwg/mdtranslator/writers/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.details do
         @html.summary('Grid Representation ', 'class' => 'h5')
         @html.section(:class => 'block') do
            gridClass.writeHtml(hRepresentation[:gridRepresentation])
         end
      end
   end

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

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

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

end