class ADIWG::Mdtranslator::Writers::Html::Html_GeoreferenceableRepresentation

Public Class Methods

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

Public Instance Methods

writeHtml(hGeoreferenceable) click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_georeferenceableRepresentation.rb, line 22
def writeHtml(hGeoreferenceable)

   # classes used
   gridClass = Html_GridRepresentation.new(@html)
   citationClass = Html_Citation.new(@html)
   scopeClass = Html_Scope.new(@html)

   # georeferenceable representation - scope
   hGeoreferenceable[:scope].each do |scope|
      @html.details do
         @html.summary('Scope ', 'class' => 'h5')
         @html.section(:class => 'block') do
            scopeClass.writeHtml(hGeoreferenceable[:scope])
         end
      end
   end


   # georeferenceable representation - grid {gridRepresentation}
   unless hGeoreferenceable[:gridRepresentation].empty?
      @html.details do
         @html.summary('Grid Information ', 'class' => 'h5')
         @html.section(:class => 'block') do
            gridClass.writeHtml(hGeoreferenceable[:gridRepresentation])
         end
      end
   end

   # georeferenceable representation - control point available {Boolean}
   @html.em('Control Point Available: ')
   @html.text!(hGeoreferenceable[:controlPointAvailable].to_s)
   @html.br

   # georeferenceable representation - orientation parameter available {Boolean}
   @html.em('Orientation Parameter Available: ')
   @html.text!(hGeoreferenceable[:orientationParameterAvailable].to_s)
   @html.br

   # georeferenceable representation - orientation parameter description
   unless hGeoreferenceable[:orientationParameterDescription].nil?
      @html.em('Orientation Parameter Description: ')
      @html.section(:class => 'block') do
         @html.text!(hGeoreferenceable[:orientationParameterDescription])
      end
   end

   # georeferenceable representation - georeferenced parameter
   unless hGeoreferenceable[:georeferencedParameter].nil?
      @html.em('Georeferenced Parameter: ')
      @html.text!(hGeoreferenceable[:georeferencedParameter])
      @html.br
   end

   # georeferenceable representation - parameter citation {citation}
   hGeoreferenceable[:parameterCitation].each do |hCitation|
      @html.details do
         @html.summary('Parameter Citation ', 'class' => 'h5')
         @html.section(:class => 'block') do
            citationClass.writeHtml(hCitation)
         end
      end
   end

end