Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_Taxonomy
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Simple_html::Html_Taxonomy
- Defined in:
- lib/adiwg/mdtranslator/writers/simple_html/sections/html_taxonomy.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_Taxonomy
constructor
A new instance of Html_Taxonomy.
- #writeHtml(hTaxonomy) ⇒ Object
Constructor Details
#initialize(html) ⇒ Html_Taxonomy
Returns a new instance of Html_Taxonomy.
21 22 23 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_taxonomy.rb', line 21 def initialize(html) @html = html end |
Instance Method Details
#writeHtml(hTaxonomy) ⇒ Object
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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_taxonomy.rb', line 25 def writeHtml(hTaxonomy) # classes used citationClass = Html_Citation.new(@html) responsibilityClass = Html_Responsibility.new(@html) taxonomicClass = Html_TaxonomyClass.new(@html) # taxonomy - taxonomic general scope unless hTaxonomy[:generalScope].nil? @html.em('General scope: ') @html.div(:class => 'block') do @html.text!(hTaxonomy[:generalScope]) end end # taxonomy - identification procedures unless hTaxonomy[:idProcedure].nil? @html.em('Identification Procedures: ') @html.div(:class => 'block') do @html.text!(hTaxonomy[:idProcedure]) end end # taxonomy - completeness unless hTaxonomy[:idCompleteness].nil? @html.em('Identification Completeness Statement: ') @html.div(:class => 'block') do @html.text!(hTaxonomy[:idCompleteness]) end end # taxonomy - taxonomic classification [] hTaxonomy[:taxonClasses].each do |hClassification| @html.div do @html.div('Taxonomic Classification', {'class' => 'h5'}) @html.div(:class => 'block') do taxonomicClass.writeHtml(hClassification) end end end # taxonomy - taxonomic classification system [] {citation} hTaxonomy[:taxonSystem].each do |hSystem| @html.div do @html.div('Classification System', {'class' => 'h5'}) @html.div(:class => 'block') do # classification system citation @html.div do @html.div(hSystem[:citation][:title], {'class' => 'h5'}) @html.div(:class => 'block') do citationClass.writeHtml(hSystem[:citation]) end end # modifications unless hSystem[:modifications].nil? @html.em('Modifications to Classification System:') @html.div(:class => 'block') do @html.text!(hSystem[:modifications]) end end end end end # taxonomy - identification references hTaxonomy[:idReferences].each do |hReference| @html.div do @html.div('Non-Authoritative Identification Reference', {'class' => 'h5'}) @html.div(:class => 'block') do citationClass.writeHtml(hReference) end end end # taxonomy - observers {responsibility} unless hTaxonomy[:observers].empty? @html.div do @html.div('Observers', {'class' => 'h5'}) @html.div(:class => 'block') do hTaxonomy[:observers].each do |hObserver| @html.div do @html.div(hObserver[:roleName], 'class' => 'h5') @html.div(:class => 'block') do responsibilityClass.writeHtml(hObserver) end end end end end end # taxonomy - voucher [] unless hTaxonomy[:observers].empty? @html.div do @html.div('Specimen Repositories', {'class' => 'h5'}) @html.div(:class => 'block') do hTaxonomy[:vouchers].each do |hVoucher| # voucher - specimen unless hVoucher[:specimen].nil? @html.em('Specimen: ') @html.text!(hVoucher[:specimen]) @html.br end # voucher - repository {responsibility} unless hVoucher[:repository].empty? @html.div(:class => 'block') do @html.div do @html.div(hVoucher[:repository][:roleName], {'class' => 'h5'}) @html.div(:class => 'block') do responsibilityClass.writeHtml(hVoucher[:repository]) end end end end end end end end end |