adiwg-mdtranslator 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -7
  3. data/Rakefile +1 -2
  4. data/adiwg-mdtranslator.gemspec +23 -23
  5. data/bin/mdtranslator +187 -155
  6. data/lib/adiwg/mdtranslator.rb +63 -38
  7. data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +123 -5
  8. data/lib/adiwg/mdtranslator/internal/module_coordinates.rb +55 -0
  9. data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +98 -70
  10. data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_validator.rb +13 -11
  11. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_additionalDocumentation.rb +13 -3
  12. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_address.rb +3 -1
  13. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_associatedResource.rb +22 -4
  14. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_boundingBox.rb +3 -1
  15. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_browseGraphic.rb +11 -1
  16. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_citation.rb +28 -9
  17. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_classedData.rb +49 -0
  18. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_classedDataItem.rb +53 -0
  19. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_contacts.rb +14 -12
  20. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_coverageInfo.rb +83 -0
  21. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_coverageItem.rb +136 -0
  22. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_dataDictionary.rb +9 -7
  23. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_dataQuality.rb +17 -3
  24. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_dateTime.rb +3 -1
  25. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_descriptiveKeyword.rb +22 -5
  26. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_dictionaryInfo.rb +18 -3
  27. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_digitalTransferOption.rb +80 -0
  28. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_dimension.rb +81 -0
  29. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_distributionInfo.rb +89 -0
  30. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_distributionOrder.rb +62 -0
  31. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_domain.rb +24 -5
  32. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_domainItem.rb +23 -4
  33. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_entity.rb +26 -7
  34. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_entityAttribute.rb +24 -1
  35. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_entityForeignKey.rb +20 -1
  36. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_entityIndex.rb +20 -1
  37. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_extent.rb +9 -7
  38. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_geoCoordSystem.rb +3 -1
  39. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_geoProperties.rb +9 -7
  40. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_geographicElement.rb +20 -18
  41. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_gridInfo.rb +67 -0
  42. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_imageInfo.rb +119 -0
  43. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_legalConstraint.rb +7 -1
  44. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_lineString.rb +5 -4
  45. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_lineage.rb +11 -5
  46. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_locale.rb +57 -0
  47. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_mdJson.rb +10 -9
  48. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_medium.rb +73 -0
  49. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_metadata.rb +14 -12
  50. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_metadataExtension.rb +3 -1
  51. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_metadataInfo.rb +35 -15
  52. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_onlineResource.rb +7 -1
  53. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_phone.rb +3 -1
  54. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_point.rb +5 -4
  55. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_polygon.rb +5 -4
  56. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_processStep.rb +19 -6
  57. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resolution.rb +7 -1
  58. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceFormat.rb +12 -1
  59. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceIdentifier.rb +30 -5
  60. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceInfo.rb +70 -33
  61. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceMaintenance.rb +5 -3
  62. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceSpecificUsage.rb +5 -3
  63. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_responsibleParty.rb +10 -8
  64. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_securityConstraint.rb +3 -1
  65. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_sensorInfo.rb +69 -0
  66. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_source.rb +11 -5
  67. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_spatialReference.rb +3 -1
  68. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_taxonClass.rb +3 -1
  69. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_taxonomy.rb +11 -9
  70. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_temporalElement.rb +9 -7
  71. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_timeInstant.rb +5 -3
  72. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_timePeriod.rb +6 -4
  73. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_verticalElement.rb +3 -1
  74. data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_voucher.rb +5 -3
  75. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/version.rb +19 -0
  76. data/lib/adiwg/mdtranslator/readers/mdReaders.rb +21 -18
  77. data/lib/adiwg/mdtranslator/version.rb +15 -1
  78. data/lib/adiwg/mdtranslator/writers/html/html_writer.rb +11 -8
  79. data/lib/adiwg/mdtranslator/writers/html/md_html_writer.rb +21 -18
  80. data/lib/adiwg/mdtranslator/writers/html/sections/html_additionalDocumentation.rb +48 -0
  81. data/lib/adiwg/mdtranslator/writers/html/sections/html_associatedResource.rb +73 -0
  82. data/lib/adiwg/mdtranslator/writers/html/sections/html_body.rb +84 -135
  83. data/lib/adiwg/mdtranslator/writers/html/sections/html_citation.rb +18 -8
  84. data/lib/adiwg/mdtranslator/writers/html/sections/html_classedData.rb +50 -0
  85. data/lib/adiwg/mdtranslator/writers/html/sections/html_classedDataItem.rb +50 -0
  86. data/lib/adiwg/mdtranslator/writers/html/sections/html_contact.rb +5 -9
  87. data/lib/adiwg/mdtranslator/writers/html/sections/html_coverageInfo.rb +88 -0
  88. data/lib/adiwg/mdtranslator/writers/html/sections/html_coverageItem.rb +139 -0
  89. data/lib/adiwg/mdtranslator/writers/html/sections/html_dataDictionary.rb +13 -12
  90. data/lib/adiwg/mdtranslator/writers/html/sections/html_dataLineage.rb +5 -4
  91. data/lib/adiwg/mdtranslator/writers/html/sections/html_dataSource.rb +5 -4
  92. data/lib/adiwg/mdtranslator/writers/html/sections/html_dimension.rb +71 -0
  93. data/lib/adiwg/mdtranslator/writers/html/sections/html_distributor.rb +62 -0
  94. data/lib/adiwg/mdtranslator/writers/html/sections/html_domain.rb +3 -2
  95. data/lib/adiwg/mdtranslator/writers/html/sections/html_entity.rb +5 -4
  96. data/lib/adiwg/mdtranslator/writers/html/sections/html_extent.rb +7 -6
  97. data/lib/adiwg/mdtranslator/writers/html/sections/html_format.rb +7 -1
  98. data/lib/adiwg/mdtranslator/writers/html/sections/html_geographicElement.rb +7 -7
  99. data/lib/adiwg/mdtranslator/writers/html/sections/html_gridInfo.rb +65 -0
  100. data/lib/adiwg/mdtranslator/writers/html/sections/html_head.rb +18 -3
  101. data/lib/adiwg/mdtranslator/writers/html/sections/html_imageInfo.rb +120 -0
  102. data/lib/adiwg/mdtranslator/writers/html/sections/html_inlineCss.css +13 -20
  103. data/lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb +3 -2
  104. data/lib/adiwg/mdtranslator/writers/html/sections/html_medium.rb +19 -2
  105. data/lib/adiwg/mdtranslator/writers/html/sections/html_metadataInfo.rb +22 -9
  106. data/lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb +3 -2
  107. data/lib/adiwg/mdtranslator/writers/html/sections/html_processStep.rb +5 -4
  108. data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceContact.rb +3 -2
  109. data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceGeneral.rb +25 -14
  110. data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceId.rb +30 -3
  111. data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceInfo.rb +194 -129
  112. data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceMaint.rb +3 -2
  113. data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceOther.rb +7 -6
  114. data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb +3 -2
  115. data/lib/adiwg/mdtranslator/writers/html/sections/html_responsibleParty.rb +3 -2
  116. data/lib/adiwg/mdtranslator/writers/html/sections/html_sensorInfo.rb +66 -0
  117. data/lib/adiwg/mdtranslator/writers/html/sections/html_taxonomy.rb +7 -6
  118. data/lib/adiwg/mdtranslator/writers/html/sections/html_temporalElement.rb +7 -6
  119. data/lib/adiwg/mdtranslator/writers/html/sections/html_timeInstant.rb +3 -2
  120. data/lib/adiwg/mdtranslator/writers/html/sections/html_timePeriod.rb +3 -2
  121. data/lib/adiwg/mdtranslator/writers/html/sections/html_transferOption.rb +29 -4
  122. data/lib/adiwg/mdtranslator/writers/html/version.rb +17 -0
  123. data/lib/adiwg/mdtranslator/writers/iso19110/class_FCfeatureCatalogue.rb +17 -16
  124. data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_address.rb +12 -8
  125. data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb +42 -0
  126. data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_codelist.rb +8 -3
  127. data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_contact.rb +16 -25
  128. data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_conventionalUnit.rb +68 -0
  129. data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb +39 -0
  130. data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_derivedUnit.rb +46 -0
  131. data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_featureAttribute.rb +17 -14
  132. data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_featureConstraint.rb +6 -2
  133. data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_featureType.rb +16 -12
  134. data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_listedValue.rb +9 -18
  135. data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_multiplicity.rb +8 -4
  136. data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_onlineResource.rb +13 -9
  137. data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_responsibleParty.rb +16 -12
  138. data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_telephone.rb +9 -5
  139. data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_unitsOfMeasure.rb +262 -0
  140. data/lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb +36 -16
  141. data/lib/adiwg/mdtranslator/writers/iso19110/version.rb +14 -0
  142. data/lib/adiwg/mdtranslator/writers/iso19115_2/class_MImetadata.rb +73 -37
  143. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_address.rb +116 -0
  144. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_aggregateInformation.rb +13 -9
  145. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_band.rb +165 -0
  146. data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_baseUnit.rb +6 -6
  147. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_boundingPolygon.rb +14 -10
  148. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_browseGraphic.rb +9 -5
  149. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_citation.rb +31 -16
  150. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_codelist.rb +56 -0
  151. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_contact.rb +87 -0
  152. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_contentInfo.rb +111 -0
  153. data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_conventionalUnit.rb +6 -6
  154. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_dataIdentification.rb +106 -59
  155. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_dataQuality.rb +11 -7
  156. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_date.rb +8 -5
  157. data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_definitionUnit.rb +7 -7
  158. data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_derivedUnit.rb +6 -6
  159. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_digitalTransferOptions.rb +92 -0
  160. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dimension.rb +68 -0
  161. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_distribution.rb +8 -4
  162. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_distributor.rb +44 -22
  163. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_enumerationList.rb +7 -2
  164. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_extent.rb +18 -14
  165. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_format.rb +18 -2
  166. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_geographicBoundingBox.rb +6 -2
  167. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_geographicDescription.rb +8 -4
  168. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_geographicElement.rb +10 -6
  169. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_gridInfo.rb +80 -0
  170. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_identifier.rb +10 -6
  171. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_imageDescription.rb +157 -0
  172. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_keyword.rb +12 -8
  173. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_legalConstraints.rb +12 -8
  174. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_lineString.rb +13 -10
  175. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_lineage.rb +14 -10
  176. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_locale.rb +67 -0
  177. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_maintenanceInformation.rb +12 -8
  178. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_medium.rb +30 -9
  179. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_metadataExtension.rb +19 -15
  180. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_multiGeometry.rb +22 -17
  181. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_onlineResource.rb +94 -0
  182. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_point.rb +12 -9
  183. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_polygon.rb +14 -11
  184. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_processStep.rb +12 -9
  185. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_rangeElementDescription.rb +88 -0
  186. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_referenceSystem.rb +52 -0
  187. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_resolution.rb +6 -2
  188. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_resourceIdentifier.rb +94 -0
  189. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_responsibleParty.rb +106 -0
  190. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_securityConstraints.rb +12 -8
  191. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_source.rb +12 -8
  192. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_standardOrderProcess.rb +11 -9
  193. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_taxonClassification.rb +8 -4
  194. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_taxonSystem.rb +18 -14
  195. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_telephone.rb +92 -0
  196. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_temporalExtent.rb +10 -6
  197. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_timeInstant.rb +9 -8
  198. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_timePeriod.rb +10 -8
  199. data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_unitsOfMeasure.rb +48 -25
  200. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_usage.rb +11 -7
  201. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_useConstraints.rb +6 -2
  202. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_verticalExtent.rb +6 -2
  203. data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_vouchers.rb +8 -4
  204. data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer.rb +32 -19
  205. data/lib/adiwg/mdtranslator/writers/iso19115_2/version.rb +17 -0
  206. data/lib/adiwg/mdtranslator/writers/mdWriters.rb +21 -24
  207. data/test/readers/mdJson/v1/tc_reader_mdjson_additionalDocumentation.rb +116 -0
  208. data/test/readers/mdJson/v1/tc_reader_mdjson_address.rb +111 -0
  209. data/test/readers/mdJson/v1/tc_reader_mdjson_associatedResource.rb +157 -0
  210. data/test/readers/mdJson/v1/tc_reader_mdjson_browseGraphic.rb +119 -0
  211. data/test/readers/mdJson/v1/tc_reader_mdjson_citation.rb +143 -0
  212. data/test/readers/mdJson/v1/tc_reader_mdjson_contact.rb +138 -0
  213. data/test/readers/mdJson/v1/tc_reader_mdjson_dataQuality.rb +111 -0
  214. data/test/readers/mdJson/v1/tc_reader_mdjson_dateTime.rb +159 -0
  215. data/test/readers/mdJson/v1/tc_reader_mdjson_descriptiveKeyword.rb +115 -0
  216. data/test/readers/mdJson/v1/tc_reader_mdjson_dictionaryInfo.rb +121 -0
  217. data/test/readers/mdJson/v1/tc_reader_mdjson_digitalTransferOption.rb +94 -0
  218. data/test/readers/mdJson/v1/tc_reader_mdjson_distributionOrder.rb +103 -0
  219. data/test/readers/mdJson/v1/tc_reader_mdjson_domain.rb +130 -0
  220. data/test/readers/mdJson/v1/tc_reader_mdjson_domainItem.rb +98 -0
  221. data/test/readers/mdJson/v1/tc_reader_mdjson_entity.rb +134 -0
  222. data/test/readers/mdJson/v1/tc_reader_mdjson_entityAttribute.rb +154 -0
  223. data/test/readers/mdJson/v1/tc_reader_mdjson_entityForeignKey.rb +100 -0
  224. data/test/readers/mdJson/v1/tc_reader_mdjson_entityIndex.rb +99 -0
  225. data/test/readers/mdJson/v1/tc_reader_mdjson_legalConstraint.rb +104 -0
  226. data/test/readers/mdJson/v1/tc_reader_mdjson_lineage.rb +117 -0
  227. data/test/readers/mdJson/v1/tc_reader_mdjson_medium.rb +98 -0
  228. data/test/readers/mdJson/v1/tc_reader_mdjson_metadataInfo.rb +141 -0
  229. data/test/readers/mdJson/v1/tc_reader_mdjson_onlineResource.rb +110 -0
  230. data/test/readers/mdJson/v1/tc_reader_mdjson_phone.rb +112 -0
  231. data/test/readers/mdJson/v1/tc_reader_mdjson_processStep.rb +118 -0
  232. data/test/readers/mdJson/v1/tc_reader_mdjson_resolution.rb +77 -0
  233. data/test/readers/mdJson/v1/tc_reader_mdjson_source.rb +117 -0
  234. data/test/readers/mdJson/v1/tc_translation_19110.rb +57 -0
  235. data/test/readers/mdJson/{v1_0/tc_translation.rb → v1/tc_translation_19115_2.rb} +16 -31
  236. data/test/writers/iso19115_2/tc_writer_iso19115_2_address.rb +22 -15
  237. metadata +219 -140
  238. data/lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_coordinates.rb +0 -63
  239. data/lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_distributionInfo.rb +0 -161
  240. data/lib/adiwg/mdtranslator/writers/html/sections/logo150.txt +0 -25
  241. data/lib/adiwg/mdtranslator/writers/iso/classes/class_digitalTransferOptions.rb +0 -62
  242. data/lib/adiwg/mdtranslator/writers/iso/classes/class_genericMetaData.rb +0 -74
  243. data/lib/adiwg/mdtranslator/writers/iso/classes/class_referenceIdentifier.rb +0 -53
  244. data/lib/adiwg/mdtranslator/writers/iso/classes/class_referenceSystem.rb +0 -40
  245. data/test/readers/mdJson/v1_0/tc_reader_mdjson_additionalDocumentation.rb +0 -85
  246. data/test/readers/mdJson/v1_0/tc_reader_mdjson_address.rb +0 -100
  247. data/test/readers/mdJson/v1_0/tc_reader_mdjson_associatedResource.rb +0 -101
  248. data/test/readers/mdJson/v1_0/tc_reader_mdjson_browseGraphic.rb +0 -86
  249. data/test/readers/mdJson/v1_0/tc_reader_mdjson_citation.rb +0 -116
  250. data/test/readers/mdJson/v1_0/tc_reader_mdjson_contact.rb +0 -138
  251. data/test/readers/mdJson/v1_0/tc_reader_mdjson_dictionaryInfo.rb +0 -95
  252. data/test/readers/mdJson/v1_0/tc_reader_mdjson_domain.rb +0 -99
  253. data/test/readers/mdJson/v1_0/tc_reader_mdjson_onlineResource.rb +0 -92
  254. data/test/readers/mdJson/v1_0/tc_reader_mdjson_phone.rb +0 -110
@@ -72,6 +72,7 @@
72
72
 
73
73
  pre, code, kbd, samp { color: #000; font-family: monospace, monospace; _font-family: 'courier new', monospace; font-size: 0.98em; }
74
74
  pre { white-space: pre-wrap; word-wrap: break-word; }
75
+ .pre-line { white-space: pre-line; }
75
76
 
76
77
  b, strong { font-weight: bold; }
77
78
 
@@ -119,24 +120,6 @@
119
120
  h2, h3 { page-break-after: avoid; }
120
121
  }
121
122
 
122
- #mainHeader {
123
- margin: 0 0 1em;
124
- padding-top: 1em;
125
- color: #808080;
126
- text-align: center;
127
- }
128
- #mainHeader .logo{
129
- height: 39px;
130
- width: 150px;
131
- vertical-align: middle;
132
- }
133
- #mainHeader .version {
134
- color: #FF8700;
135
- position: relative;
136
- bottom: 0.6em;
137
- font-size: 0.7em;
138
- font-weight: 500;
139
- }
140
123
  #mainHeader {
141
124
  margin: 0 0 1em;
142
125
  padding-top: 1em;
@@ -217,6 +200,16 @@
217
200
  .icon-caret-right:before {
218
201
  content: "\f0da";
219
202
  }
203
+
204
+ /*** Logo ***/
205
+ span#logo {
206
+ background: url(data:image/png;base64,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) no-repeat left center;
207
+ width: 150px;
208
+ height: 39px;
209
+ display: inline-block;
210
+ vertical-align: middle;
211
+ }
212
+
220
213
  /*** Maps ***/
221
214
  section.extent-section div.map {
222
215
  height: 350px;
@@ -226,11 +219,11 @@
226
219
  position: fixed;
227
220
  right: 10px;
228
221
  bottom: 10px;
229
- z-index: 100;
222
+ z-index: 10000;
230
223
  }
231
224
  div#sideNav * {
232
225
  display: block;
233
226
  }
234
227
  div#sideNav span {
235
228
  margin-top: 4px;
236
- }
229
+ }
@@ -3,8 +3,9 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-23 original script
6
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
6
7
 
7
- require 'html_citation'
8
+ require_relative 'html_citation'
8
9
 
9
10
  module ADIWG
10
11
  module Mdtranslator
@@ -19,7 +20,7 @@ module ADIWG
19
20
  def writeHtml(hKeyList)
20
21
 
21
22
  # classes used
22
- htmlCitation = $HtmlNS::MdHtmlCitation.new(@html)
23
+ htmlCitation = MdHtmlCitation.new(@html)
23
24
 
24
25
  # descriptive keywords - type
25
26
  s = hKeyList[:keywordType]
@@ -3,6 +3,7 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-27 original script
6
+ # Stan Smith 2015-09-21 added medium capacity
6
7
 
7
8
  module ADIWG
8
9
  module Mdtranslator
@@ -17,9 +18,25 @@ module ADIWG
17
18
  def writeHtml(hMedium)
18
19
 
19
20
  # medium - name
20
- s = hMedium[:mediumName]
21
+ s = hMedium[:mediumType]
21
22
  if !s.nil?
22
- @html.em('Medium name: ')
23
+ @html.em('Medium type: ')
24
+ @html.text!(s)
25
+ @html.br
26
+ end
27
+
28
+ # medium - capacity
29
+ s = hMedium[:mediumCapacity]
30
+ if !s.nil?
31
+ @html.em('Medium capacity: ')
32
+ @html.text!(s.to_s)
33
+ @html.br
34
+ end
35
+
36
+ # medium - capacity units
37
+ s = hMedium[:mediumCapacityUnits]
38
+ if !s.nil?
39
+ @html.em('Medium capacity units: ')
23
40
  @html.text!(s)
24
41
  @html.br
25
42
  end
@@ -4,11 +4,12 @@
4
4
  # History:
5
5
  # Stan Smith 2015-03-24 original script
6
6
  # Stan Smith 2016-06-12 added metadata character set
7
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
7
8
 
8
- require 'html_citation'
9
- require 'html_responsibleParty'
10
- require 'html_dateTime'
11
- require 'html_resourceMaint'
9
+ require_relative 'html_citation'
10
+ require_relative 'html_responsibleParty'
11
+ require_relative 'html_dateTime'
12
+ require_relative 'html_resourceMaint'
12
13
 
13
14
  module ADIWG
14
15
  module Mdtranslator
@@ -23,10 +24,10 @@ module ADIWG
23
24
  def writeHtml(hMetaInfo)
24
25
 
25
26
  # classes used
26
- htmlCitation = $HtmlNS::MdHtmlCitation.new(@html)
27
- htmlResParty = $HtmlNS::MdHtmlResponsibleParty.new(@html)
28
- htmlDateTime = $HtmlNS::MdHtmlDateTime.new(@html)
29
- htmlResMaint = $HtmlNS::MdHtmlResourceMaintenance.new(@html)
27
+ htmlCitation = MdHtmlCitation.new(@html)
28
+ htmlResParty = MdHtmlResponsibleParty.new(@html)
29
+ htmlDateTime = MdHtmlDateTime.new(@html)
30
+ htmlResMaint = MdHtmlResourceMaintenance.new(@html)
30
31
 
31
32
  # metadata identifier
32
33
  id = hMetaInfo[:metadataId][:identifier]
@@ -84,6 +85,18 @@ module ADIWG
84
85
  @html.br
85
86
  end
86
87
 
88
+ # metadata locale
89
+ aLocale = hMetaInfo[:metadataLocales]
90
+ aLocale.each do |hLocale|
91
+ @html.em('Metadata language: ')
92
+ @html.text!(hLocale[:languageCode])
93
+ @html.em(' country: ')
94
+ @html.text!(hLocale[:countryCode])
95
+ @html.em(' characterSet encoding: ')
96
+ @html.text!(hLocale[:characterEncoding])
97
+ @html.br
98
+ end
99
+
87
100
  # metadata status
88
101
  s = hMetaInfo[:metadataStatus]
89
102
  if s
@@ -115,7 +128,7 @@ module ADIWG
115
128
 
116
129
  # parent metadata - citation
117
130
  hParent = hMetaInfo[:parentMetadata]
118
- if !hParent.empty?
131
+ unless hParent.empty?
119
132
  @html.details do
120
133
  @html.summary('Parent Metadata Citation', {'id'=>'metadata-parentInfo', 'class'=>'h3'})
121
134
  @html.section(:class=>'block') do
@@ -3,8 +3,9 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-27 original script
6
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
6
7
 
7
- require 'html_dateTime'
8
+ require_relative 'html_dateTime'
8
9
 
9
10
  module ADIWG
10
11
  module Mdtranslator
@@ -19,7 +20,7 @@ module ADIWG
19
20
  def writeHtml(hOrder)
20
21
 
21
22
  # classes used
22
- htmlDateTime = $HtmlNS::MdHtmlDateTime.new(@html)
23
+ htmlDateTime = MdHtmlDateTime.new(@html)
23
24
 
24
25
  # order process - order instructions
25
26
  s = hOrder[:orderInstructions]
@@ -3,9 +3,10 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-27 original script
6
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
6
7
 
7
- require 'html_dateTime'
8
- require 'html_responsibleParty'
8
+ require_relative 'html_dateTime'
9
+ require_relative 'html_responsibleParty'
9
10
 
10
11
  module ADIWG
11
12
  module Mdtranslator
@@ -20,8 +21,8 @@ module ADIWG
20
21
  def writeHtml(hStep)
21
22
 
22
23
  # classes used
23
- htmlDateTime = $HtmlNS::MdHtmlDateTime.new(@html)
24
- htmlResParty = $HtmlNS::MdHtmlResponsibleParty.new(@html)
24
+ htmlDateTime = MdHtmlDateTime.new(@html)
25
+ htmlResParty = MdHtmlResponsibleParty.new(@html)
25
26
 
26
27
  # process step - id
27
28
  s = hStep[:stepId]
@@ -3,8 +3,9 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-24 original script
6
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
6
7
 
7
- require 'html_responsibleParty'
8
+ require_relative 'html_responsibleParty'
8
9
 
9
10
  module ADIWG
10
11
  module Mdtranslator
@@ -19,7 +20,7 @@ module ADIWG
19
20
  def writeHtml(resourceInfo)
20
21
 
21
22
  # classes used
22
- htmlParty = $HtmlNS::MdHtmlResponsibleParty.new(@html)
23
+ htmlParty = MdHtmlResponsibleParty.new(@html)
23
24
 
24
25
  # general - contacts
25
26
  resourceInfo[:pointsOfContact].each do |hResParty|
@@ -3,12 +3,14 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-24 original script
6
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
7
+ # Stan Smith 2015-07-30 added support for locale
6
8
 
7
- require 'html_citation'
8
- require 'html_timePeriod'
9
- require 'html_browseGraphic'
10
- require 'html_resourceFormat'
11
- require 'html_resourceUsage'
9
+ require_relative 'html_citation'
10
+ require_relative 'html_timePeriod'
11
+ require_relative 'html_browseGraphic'
12
+ require_relative 'html_resourceFormat'
13
+ require_relative 'html_resourceUsage'
12
14
 
13
15
  module ADIWG
14
16
  module Mdtranslator
@@ -23,11 +25,11 @@ module ADIWG
23
25
  def writeHtml(resourceInfo)
24
26
 
25
27
  # classes used
26
- htmlCitation = $HtmlNS::MdHtmlCitation.new(@html)
27
- htmlTimeP = $HtmlNS::MdHtmlTimePeriod.new(@html)
28
- htmlBGraph = $HtmlNS::MdHtmlBrowseGraphic.new(@html)
29
- htmlResForm = $HtmlNS::MdHtmlResourceFormat.new(@html)
30
- htmlResUse = $HtmlNS::MdHtmlResourceUsage.new(@html)
28
+ htmlCitation = MdHtmlCitation.new(@html)
29
+ htmlTimeP = MdHtmlTimePeriod.new(@html)
30
+ htmlBGraph = MdHtmlBrowseGraphic.new(@html)
31
+ htmlResForm = MdHtmlResourceFormat.new(@html)
32
+ htmlResUse = MdHtmlResourceUsage.new(@html)
31
33
 
32
34
  # general - title - taken from citation
33
35
  @html.em('Title: ')
@@ -79,6 +81,18 @@ module ADIWG
79
81
  @html.br
80
82
  end
81
83
 
84
+ # resource locale
85
+ aLocale = resourceInfo[:resourceLocales]
86
+ aLocale.each do |hLocale|
87
+ @html.em('Metadata language: ')
88
+ @html.text!(hLocale[:languageCode])
89
+ @html.em(' country: ')
90
+ @html.text!(hLocale[:countryCode])
91
+ @html.em(' characterSet encoding: ')
92
+ @html.text!(hLocale[:characterEncoding])
93
+ @html.br
94
+ end
95
+
82
96
  # general - citation
83
97
  @html.details do
84
98
  @html.summary('Citation', {'id'=>'resourceGen-citation', 'class'=>'h4'})
@@ -90,10 +104,7 @@ module ADIWG
90
104
  # general - abstract - required
91
105
  @html.details do
92
106
  @html.summary('Abstract', {'id'=>'resourceGen-abstract', 'class'=>'h4'})
93
- @html.section(:class=>'block') do
94
- @html.text!(resourceInfo[:abstract])
95
- end
96
- @html.br
107
+ @html.tag!("section",resourceInfo[:abstract], :class=>'block pre-line')
97
108
  end
98
109
 
99
110
  # general - purpose
@@ -3,8 +3,10 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-24 original script
6
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
7
+ # Stan Smith 2015-08-21 expanded to handle RS_Identifier
6
8
 
7
- require 'html_citation'
9
+ require_relative 'html_citation'
8
10
 
9
11
  module ADIWG
10
12
  module Mdtranslator
@@ -19,19 +21,44 @@ module ADIWG
19
21
  def writeHtml(hIdentifier)
20
22
 
21
23
  # classes used
22
- htmlCitation = $HtmlNS::MdHtmlCitation.new(@html)
24
+ htmlCitation = MdHtmlCitation.new(@html)
23
25
 
24
26
  # identifier - required
25
27
  @html.em('Identifier:')
26
28
  @html.text!(hIdentifier[:identifier])
29
+ @html.br
27
30
 
31
+ # identifier - type
28
32
  s = hIdentifier[:identifierType]
29
33
  if !s.nil?
30
34
  @html.em(' Type:')
31
35
  @html.text!(s)
36
+ @html.br
32
37
  end
33
38
 
34
- @html.br
39
+ # identifier - namespace
40
+ s = hIdentifier[:identifierNamespace]
41
+ if !s.nil?
42
+ @html.em(' Namespace:')
43
+ @html.text!(s)
44
+ @html.br
45
+ end
46
+
47
+ # identifier - version
48
+ s = hIdentifier[:identifierVersion]
49
+ if !s.nil?
50
+ @html.em(' Version:')
51
+ @html.text!(s)
52
+ @html.br
53
+ end
54
+
55
+ # identifier - description
56
+ s = hIdentifier[:identifierDescription]
57
+ if !s.nil?
58
+ @html.em(' Description:')
59
+ @html.text!(s)
60
+ @html.br
61
+ end
35
62
 
36
63
  # identifier citation
37
64
  if !hIdentifier[:identifierCitation].empty?
@@ -3,19 +3,22 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-24 original script
6
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
6
7
 
7
- require 'html_resourceGeneral'
8
- require 'html_resourceContact'
9
- require 'html_resourceMaint'
10
- require 'html_keyword'
11
- require 'html_legalConstraint'
12
- require 'html_securityConstraint'
13
- require 'html_taxonomy'
14
- require 'html_spatialReferenceSystem'
15
- require 'html_resolution'
16
- require 'html_dataLineage'
17
- require 'html_extent'
18
- require 'html_resourceOther'
8
+ require_relative 'html_resourceGeneral'
9
+ require_relative 'html_resourceContact'
10
+ require_relative 'html_resourceMaint'
11
+ require_relative 'html_keyword'
12
+ require_relative 'html_legalConstraint'
13
+ require_relative 'html_securityConstraint'
14
+ require_relative 'html_taxonomy'
15
+ require_relative 'html_spatialReferenceSystem'
16
+ require_relative 'html_resolution'
17
+ require_relative 'html_dataLineage'
18
+ require_relative 'html_extent'
19
+ require_relative 'html_resourceOther'
20
+ require_relative 'html_gridInfo'
21
+ require_relative 'html_coverageInfo'
19
22
 
20
23
  module ADIWG
21
24
  module Mdtranslator
@@ -30,18 +33,20 @@ module ADIWG
30
33
  def writeHtml(resourceInfo)
31
34
 
32
35
  # classes used
33
- htmlResGen = $HtmlNS::MdHtmlResourceGeneral.new(@html)
34
- htmlResCon = $HtmlNS::MdHtmlResourceContact.new(@html)
35
- htmlResMaint = $HtmlNS::MdHtmlResourceMaintenance.new(@html)
36
- htmlKeyword = $HtmlNS::MdHtmlKeyword.new(@html)
37
- htmlLegalCon = $HtmlNS::MdHtmlLegalConstraint.new(@html)
38
- htmlSecCon = $HtmlNS::MdHtmlSecurityConstraint.new(@html)
39
- htmlTaxon = $HtmlNS::MdHtmlTaxonomy.new(@html)
40
- htmlSpatialRef = $HtmlNS::MdHtmlSpatialReferenceSystem.new(@html)
41
- htmlResolution = $HtmlNS::MdHtmlResolution.new(@html)
42
- htmlLineage = $HtmlNS::MdHtmlDataLineage.new(@html)
43
- htmlExtent = $HtmlNS::MdHtmlExtent.new(@html)
44
- htmlOther = $HtmlNS::MdHtmlResourceOther.new(@html)
36
+ htmlResGen = MdHtmlResourceGeneral.new(@html)
37
+ htmlResCon = MdHtmlResourceContact.new(@html)
38
+ htmlResMaint = MdHtmlResourceMaintenance.new(@html)
39
+ htmlKeyword = MdHtmlKeyword.new(@html)
40
+ htmlLegalCon = MdHtmlLegalConstraint.new(@html)
41
+ htmlSecCon = MdHtmlSecurityConstraint.new(@html)
42
+ htmlTaxon = MdHtmlTaxonomy.new(@html)
43
+ htmlSpatialRef = MdHtmlSpatialReferenceSystem.new(@html)
44
+ htmlResolution = MdHtmlResolution.new(@html)
45
+ htmlLineage = MdHtmlDataLineage.new(@html)
46
+ htmlExtent = MdHtmlExtent.new(@html)
47
+ htmlOther = MdHtmlResourceOther.new(@html)
48
+ htmlGrid = MdHtmlGridInfo.new(@html)
49
+ htmlCover = MdHtmlCoverageInfo.new(@html)
45
50
 
46
51
  # resource information - general
47
52
  @html.details do
@@ -60,9 +65,9 @@ module ADIWG
60
65
  end
61
66
 
62
67
  # resource information - keywords
63
- @html.details do
64
- @html.summary('Keywords', {'id'=>'resourceInfo-keywords', 'class'=>'h3'})
65
- if !resourceInfo[:descriptiveKeywords].empty?
68
+ unless resourceInfo[:descriptiveKeywords].empty?
69
+ @html.details do
70
+ @html.summary('Keywords', {'id'=>'resourceInfo-keywords', 'class'=>'h3'})
66
71
  @html.section(:class=>'block') do
67
72
  resourceInfo[:descriptiveKeywords].each do |hKeyList|
68
73
  @html.em('List type: ')
@@ -73,10 +78,10 @@ module ADIWG
73
78
  end
74
79
 
75
80
  # resource information - taxonomy
76
- @html.details do
77
- @html.summary('Taxonomy', {'id'=>'resourceInfo-taxonomy', 'class'=>'h3'})
78
- hTaxon = resourceInfo[:taxonomy]
79
- if !hTaxon.empty?
81
+ unless resourceInfo[:taxonomy].empty?
82
+ @html.details do
83
+ @html.summary('Taxonomy', {'id'=>'resourceInfo-taxonomy', 'class'=>'h3'})
84
+ hTaxon = resourceInfo[:taxonomy]
80
85
  @html.section(:class=>'block') do
81
86
  htmlTaxon.writeHtml(hTaxon)
82
87
  end
@@ -84,91 +89,147 @@ module ADIWG
84
89
  end
85
90
 
86
91
  # resource information - spatial reference
87
- @html.details do
88
- @html.summary('Spatial Reference', {'id'=>'resourceInfo-spatialRef', 'class'=>'h3'})
89
- @html.section(:class=>'block') do
92
+ unless resourceInfo[:spatialReferenceSystem].empty? &&
93
+ resourceInfo[:spatialRepresentationTypes].empty? &&
94
+ resourceInfo[:spatialResolutions].empty?
95
+ @html.details do
96
+ @html.summary('Spatial Reference', {'id'=>'resourceInfo-spatialRef', 'class'=>'h3'})
97
+ @html.section(:class=>'block') do
90
98
 
91
- # spatial reference - spatial reference system
92
- hSpatialRef = resourceInfo[:spatialReferenceSystem]
93
- if !hSpatialRef.empty?
94
- @html.details do
95
- @html.summary('Spatial Reference System', {'id'=>'spatialReference-system', 'class'=>'h4'})
96
- @html.section(:class=>'block') do
97
- htmlSpatialRef.writeHtml(hSpatialRef)
99
+ # spatial reference - spatial reference system
100
+ hSpatialRef = resourceInfo[:spatialReferenceSystem]
101
+ if !hSpatialRef.empty?
102
+ @html.details do
103
+ @html.summary('Spatial Reference System', {'id'=>'spatialReference-system', 'class'=>'h4'})
104
+ @html.section(:class=>'block') do
105
+ htmlSpatialRef.writeHtml(hSpatialRef)
106
+ end
98
107
  end
99
108
  end
100
- end
101
109
 
102
- # spatial reference - spatial representation types
103
- aSpatialRep = resourceInfo[:spatialRepresentationTypes]
104
- if !aSpatialRep.empty?
105
- @html.details do
106
- @html.summary('Spatial Representation Type', {'id'=>'spatialReference-representationType', 'class'=>'h4'})
107
- @html.section(:class=>'block') do
108
- @html.em('Types: ')
109
- @html.text!(aSpatialRep.to_s)
110
+ # spatial reference - spatial representation types
111
+ aSpatialRep = resourceInfo[:spatialRepresentationTypes]
112
+ if !aSpatialRep.empty?
113
+ @html.details do
114
+ @html.summary('Spatial Representation Type', {'id'=>'spatialReference-representationType', 'class'=>'h4'})
115
+ @html.section(:class=>'block') do
116
+ @html.em('Types: ')
117
+ @html.text!(aSpatialRep.to_s)
118
+ end
110
119
  end
111
120
  end
112
- end
113
121
 
114
- # spatial reference - spatial resolution
115
- aSpatialRes = resourceInfo[:spatialResolutions]
116
- if !aSpatialRes.empty?
117
- @html.details do
118
- @html.summary('Spatial Resolution', {'id'=>'spatialReference-resolution', 'class'=>'h4'})
119
- @html.section(:class=>'block') do
120
- aSpatialRes.each do |hResolution|
121
- htmlResolution.writeHtml(hResolution)
122
+ # spatial reference - spatial resolution
123
+ aSpatialRes = resourceInfo[:spatialResolutions]
124
+ if !aSpatialRes.empty?
125
+ @html.details do
126
+ @html.summary('Spatial Resolution', {'id'=>'spatialReference-resolution', 'class'=>'h4'})
127
+ @html.section(:class=>'block') do
128
+ aSpatialRes.each do |hResolution|
129
+ htmlResolution.writeHtml(hResolution)
130
+ end
122
131
  end
123
132
  end
124
133
  end
125
- end
126
134
 
135
+ end
127
136
  end
128
137
  end
129
138
 
130
139
  # resource information - extents
131
- @html.details do
132
- @html.summary('Extents (Geographic, Temporal, & Vertical Space)', {'id'=>'resourceInfo-extents', 'class'=>'h3'})
133
- extNum = 0
134
- @html.section(:class=>'block') do
135
- aExtents = resourceInfo[:extents]
136
- aExtents.each do |hExtent|
137
- @html.details do
138
- @html.summary('Extent ' + extNum.to_s, {'class'=>'h4 extent'})
139
- @html.section(:class=>'block extent-section') do
140
- htmlExtent.writeHtml(hExtent, extNum)
141
- extNum += 1
140
+ unless resourceInfo[:extents].empty?
141
+ @html.details do
142
+ @html.summary('Extents (Geographic, Temporal, & Vertical Space)', {'id'=>'resourceInfo-extents', 'class'=>'h3'})
143
+ extNum = 0
144
+ @html.section(:class=>'block') do
145
+ aExtents = resourceInfo[:extents]
146
+ aExtents.each do |hExtent|
147
+ @html.details do
148
+ @html.summary('Extent ' + extNum.to_s, {'class'=>'h4 extent'})
149
+ @html.section(:class=>'block extent-section') do
150
+ htmlExtent.writeHtml(hExtent, extNum)
151
+ extNum += 1
152
+ end
142
153
  end
143
154
  end
144
155
  end
145
156
  end
146
157
  end
147
158
 
148
- # resource information - data quality
149
- @html.details do
150
- @html.summary('Data Quality', {'id'=>'resourceInfo-dataQuality', 'class'=>'h3'})
151
- @html.section(:class=>'block') do
152
- aDataQual = resourceInfo[:dataQualityInfo]
153
- aDataQual.each do |hDataQual|
154
- @html.details do
155
- @html.summary('Quality statement', {'class'=>'h4'})
156
- @html.section(:class=>'block') do
157
-
158
- # data quality - scope
159
- s = hDataQual[:dataScope]
160
- if !s.nil?
161
- @html.em('Scope: ')
162
- @html.text!(s)
163
- @html.br
159
+ # resource information - grid information
160
+ unless resourceInfo[:gridInfo].empty?
161
+ @html.details do
162
+ @html.summary('Grid Information ', {'id'=>'resourceInfo-gridInfo', 'class'=>'h3'})
163
+ @html.section(:class=>'block') do
164
+ aGridInfo = resourceInfo[:gridInfo]
165
+ aGridInfo.each do |hGrid|
166
+ @html.details do
167
+ @html.summary('Grid', {:class=>'h4'})
168
+ @html.section(:class=>'block') do
169
+ htmlGrid.writeHtml(hGrid)
164
170
  end
171
+ end
172
+ end
173
+ end
174
+ end
175
+ end
176
+
177
+ # resource information - coverage information
178
+ unless resourceInfo[:coverageInfo].empty?
179
+ @html.details do
180
+ @html.summary('Coverage Information ', {'id'=>'resourceInfo-coverageInfo', 'class'=>'h3'})
181
+ @html.section(:class=>'block') do
182
+ aCoverage = resourceInfo[:coverageInfo]
183
+ aCoverage.each do |hCover|
165
184
 
166
- # data quality - lineage
167
- hLineage = hDataQual[:dataLineage]
168
- if !hLineage.empty?
169
- htmlLineage.writeHtml(hLineage)
185
+ # get coverage type
186
+ coverType = hCover[:coverageType]
187
+ if coverType.nil?
188
+ coverType = 'Unknown type'
189
+ end
190
+ # get coverage name
191
+ coverName = hCover[:coverageName]
192
+ if coverName.nil?
193
+ coverName = 'Coverage'
194
+ end
195
+ @html.details do
196
+ @html.summary(coverName + ' (' + coverType + ')', {:class=>'h4'})
197
+ @html.section(:class=>'block') do
198
+ htmlCover.writeHtml(hCover)
170
199
  end
200
+ end
201
+
202
+ end
203
+ end
204
+ end
205
+ end
206
+
207
+ # resource information - data quality
208
+ unless resourceInfo[:dataQualityInfo].empty?
209
+ @html.details do
210
+ @html.summary('Data Quality', {'id'=>'resourceInfo-dataQuality', 'class'=>'h3'})
211
+ @html.section(:class=>'block') do
212
+ aDataQual = resourceInfo[:dataQualityInfo]
213
+ aDataQual.each do |hDataQual|
214
+ @html.details do
215
+ @html.summary('Quality statement', {'class'=>'h4'})
216
+ @html.section(:class=>'block') do
217
+
218
+ # data quality - scope
219
+ s = hDataQual[:dataScope]
220
+ if !s.nil?
221
+ @html.em('Scope: ')
222
+ @html.text!(s)
223
+ @html.br
224
+ end
225
+
226
+ # data quality - lineage
227
+ hLineage = hDataQual[:dataLineage]
228
+ if !hLineage.empty?
229
+ htmlLineage.writeHtml(hLineage)
230
+ end
171
231
 
232
+ end
172
233
  end
173
234
  end
174
235
  end
@@ -176,64 +237,68 @@ module ADIWG
176
237
  end
177
238
 
178
239
  # resource information - constraints
179
- @html.details do
180
- @html.summary('Constraints', {'id'=>'resourceInfo-constraints', 'class'=>'h3'})
181
- @html.section(:class=>'block') do
240
+ unless resourceInfo[:useConstraints].empty? &&
241
+ resourceInfo[:legalConstraints].empty? &&
242
+ resourceInfo[:securityConstraints].empty?
243
+ @html.details do
244
+ @html.summary('Constraints', {'id'=>'resourceInfo-constraints', 'class'=>'h3'})
245
+ @html.section(:class=>'block') do
182
246
 
183
- # constraints - use constraints
184
- aUseCons = resourceInfo[:useConstraints]
185
- if !aUseCons.empty?
186
- @html.details do
187
- @html.summary('Usage Constraints', {'class'=>'h4'})
188
- @html.section(:class=>'block') do
189
- aUseCons.each do |uCon|
190
- @html.em('Constraint: ')
191
- @html.text!(uCon)
192
- @html.br
247
+ # constraints - use constraints
248
+ aUseCons = resourceInfo[:useConstraints]
249
+ if !aUseCons.empty?
250
+ @html.details do
251
+ @html.summary('Usage Constraints', {'class'=>'h4'})
252
+ @html.section(:class=>'block') do
253
+ aUseCons.each do |uCon|
254
+ @html.em('Constraint: ')
255
+ @html.text!(uCon)
256
+ @html.br
257
+ end
193
258
  end
194
259
  end
195
260
  end
196
- end
197
261
 
198
- # constraint - legal constraint
199
- aLegalCons = resourceInfo[:legalConstraints]
200
- if !aLegalCons.empty?
201
- @html.details do
202
- @html.summary('Legal Constraints', {'class'=>'h4'})
203
- @html.section(:class=>'block') do
204
- aLegalCons.each do |hLegalCon|
205
- @html.em('Constraint: ')
206
- @html.section(:class=>'block') do
207
- htmlLegalCon.writeHtml(hLegalCon)
262
+ # constraint - legal constraint
263
+ aLegalCons = resourceInfo[:legalConstraints]
264
+ if !aLegalCons.empty?
265
+ @html.details do
266
+ @html.summary('Legal Constraints', {'class'=>'h4'})
267
+ @html.section(:class=>'block') do
268
+ aLegalCons.each do |hLegalCon|
269
+ @html.em('Constraint: ')
270
+ @html.section(:class=>'block') do
271
+ htmlLegalCon.writeHtml(hLegalCon)
272
+ end
208
273
  end
209
274
  end
210
275
  end
211
276
  end
212
- end
213
277
 
214
- # constraint - security
215
- aSecCons = resourceInfo[:securityConstraints]
216
- if !aSecCons.empty?
217
- @html.details do
218
- @html.summary('Security Constraints', {'class'=>'h4'})
219
- @html.section(:class=>'block') do
220
- aSecCons.each do |hSecCon|
221
- @html.em('Constraint: ')
222
- @html.section(:class=>'block') do
223
- htmlSecCon.writeHtml(hSecCon)
278
+ # constraint - security
279
+ aSecCons = resourceInfo[:securityConstraints]
280
+ if !aSecCons.empty?
281
+ @html.details do
282
+ @html.summary('Security Constraints', {'class'=>'h4'})
283
+ @html.section(:class=>'block') do
284
+ aSecCons.each do |hSecCon|
285
+ @html.em('Constraint: ')
286
+ @html.section(:class=>'block') do
287
+ htmlSecCon.writeHtml(hSecCon)
288
+ end
224
289
  end
225
290
  end
226
291
  end
227
292
  end
228
- end
229
293
 
294
+ end
230
295
  end
231
296
  end
232
297
 
233
298
  # resource information - maintenance information
234
- @html.details do
299
+ unless resourceInfo[:resourceMaint].empty?
300
+ @html.details do
235
301
  @html.summary('Maintenance Information', {'id'=>'resourceInfo-maintInfo', 'class'=>'h3'})
236
- if !resourceInfo[:resourceMaint].empty?
237
302
  @html.section(:class=>'block') do
238
303
  resourceInfo[:resourceMaint].each do |hResMaint|
239
304
  @html.em('Resource maintenance: ')