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
@@ -0,0 +1,71 @@
1
+ # HTML writer
2
+ # dimension information
3
+
4
+ # History:
5
+ # Stan Smith 2015-07-31 original script
6
+
7
+ module ADIWG
8
+ module Mdtranslator
9
+ module Writers
10
+ module Html
11
+
12
+ class MdHtmlDimension
13
+ def initialize(html)
14
+ @html = html
15
+ end
16
+
17
+ def writeHtml(hDim)
18
+
19
+ # dimension information - dimension type
20
+ @html.em('Type of dimension: ')
21
+ @html.text!(hDim[:dimensionType])
22
+ @html.br
23
+
24
+ # dimension information - dimension type
25
+ s = hDim[:dimensionTitle]
26
+ if !s.nil?
27
+ @html.em('Axis title: ')
28
+ @html.text!(s)
29
+ @html.br
30
+ end
31
+
32
+ # dimension information - dimension description
33
+ s = hDim[:dimensionDescription]
34
+ if !s.nil?
35
+ @html.em('Axis description: ')
36
+ @html.text!(s)
37
+ @html.br
38
+ end
39
+
40
+ # dimension information - dimension size
41
+ s = hDim[:dimensionSize]
42
+ if !s.nil?
43
+ @html.em('Number of elements along Axis: ')
44
+ @html.text!(s.to_s)
45
+ @html.br
46
+ end
47
+
48
+ # dimension information - dimension resolution
49
+ s = hDim[:resolution]
50
+ if !s.nil?
51
+ @html.em('Resolution of the grid: ')
52
+ @html.text!(s.to_s)
53
+ @html.br
54
+ end
55
+
56
+ # dimension information - resolution units of measure
57
+ s = hDim[:resolutionUnits]
58
+ if !s.nil?
59
+ @html.em('Resolution units of measure: ')
60
+ @html.text!(s)
61
+ @html.br
62
+ end
63
+
64
+ end # writeHtml
65
+
66
+ end # class
67
+
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,62 @@
1
+ # HTML writer
2
+ # resource distributor
3
+
4
+ # History:
5
+ # Stan Smith 2015-08-21 original script
6
+
7
+ require_relative 'html_responsibleParty'
8
+ require_relative 'html_orderProcess'
9
+ require_relative 'html_format'
10
+ require_relative 'html_transferOption'
11
+
12
+ module ADIWG
13
+ module Mdtranslator
14
+ module Writers
15
+ module Html
16
+
17
+ class MdHtmlDistributor
18
+ def initialize(html)
19
+ @html = html
20
+ end
21
+
22
+ def writeHtml(hDistributor)
23
+
24
+ # classes used
25
+ htmlResParty = MdHtmlResponsibleParty.new(@html)
26
+ htmlOrderProc = MdHtmlOrderProcess.new(@html)
27
+ htmlFormat = MdHtmlFormat.new(@html)
28
+ htmlTranOpt = MdHtmlTransferOption.new(@html)
29
+
30
+ # resource distribution - distributor - required
31
+ @html.em('Distributor contact: ')
32
+ hResParty = hDistributor[:distContact]
33
+ @html.section(:class=>'block') do
34
+ htmlResParty.writeHtml(hResParty)
35
+ end
36
+
37
+ # resource distribution - order process
38
+ hDistributor[:distOrderProcs].each do |hOrder|
39
+ @html.em('Order Process: ')
40
+ @html.section(:class=>'block') do
41
+ htmlOrderProc.writeHtml(hOrder)
42
+ end
43
+ end
44
+
45
+ # resource distribution - resource format
46
+ hDistributor[:distFormats].each do |hFormat|
47
+ htmlFormat.writeHtml(hFormat)
48
+ end
49
+
50
+ # resource distribution - transfer options
51
+ hDistributor[:distTransOptions].each do |hTransOption|
52
+ htmlTranOpt.writeHtml(hTransOption)
53
+ end
54
+
55
+ end # writeHtml
56
+
57
+ end # class
58
+
59
+ end
60
+ end
61
+ end
62
+ end
@@ -3,8 +3,9 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-26 original script
6
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
6
7
 
7
- require 'html_domainMember'
8
+ require_relative 'html_domainMember'
8
9
 
9
10
  module ADIWG
10
11
  module Mdtranslator
@@ -19,7 +20,7 @@ module ADIWG
19
20
  def writeHtml(hDomain)
20
21
 
21
22
  # classes used
22
- htmlDomMem = $HtmlNS::MdHtmlDomainMember.new(@html)
23
+ htmlDomMem = MdHtmlDomainMember.new(@html)
23
24
 
24
25
  # domain - user assigned domain id
25
26
  s = hDomain[:domainId]
@@ -3,9 +3,10 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-26 original script
6
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
6
7
 
7
- require 'html_entityIndex'
8
- require 'html_entityAttribute'
8
+ require_relative 'html_entityIndex'
9
+ require_relative 'html_entityAttribute'
9
10
 
10
11
  module ADIWG
11
12
  module Mdtranslator
@@ -20,8 +21,8 @@ module ADIWG
20
21
  def writeHtml(hEntity)
21
22
 
22
23
  # classes used
23
- htmlEntIndex = $HtmlNS::MdHtmlEntityIndex.new(@html)
24
- htmlEntAttrib = $HtmlNS::MdHtmlEntityAttribute.new(@html)
24
+ htmlEntIndex = MdHtmlEntityIndex.new(@html)
25
+ htmlEntAttrib = MdHtmlEntityAttribute.new(@html)
25
26
 
26
27
  # entity - user assigned entity id
27
28
  s = hEntity[:entityId]
@@ -3,10 +3,11 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-31 original script
6
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
6
7
 
7
- require 'html_geographicElement'
8
- require 'html_temporalElement'
9
- require 'html_verticalElement'
8
+ require_relative 'html_geographicElement'
9
+ require_relative 'html_temporalElement'
10
+ require_relative 'html_verticalElement'
10
11
 
11
12
  module ADIWG
12
13
  module Mdtranslator
@@ -21,9 +22,9 @@ module ADIWG
21
22
  def writeHtml(hExtent, extNum)
22
23
 
23
24
  # classes used
24
- htmlGeoEle = $HtmlNS::MdHtmlGeographicElement.new(@html)
25
- htmlTempEle = $HtmlNS::MdHtmlTemporalElement.new(@html)
26
- htmlVertEle = $HtmlNS::MdHtmlVerticalElement.new(@html)
25
+ htmlGeoEle = MdHtmlGeographicElement.new(@html)
26
+ htmlTempEle = MdHtmlTemporalElement.new(@html)
27
+ htmlVertEle = MdHtmlVerticalElement.new(@html)
27
28
 
28
29
  aGeoEle = hExtent[:extGeoElements]
29
30
  aTempEle = hExtent[:extTempElements]
@@ -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 compression method element
6
7
 
7
8
  module ADIWG
8
9
  module Mdtranslator
@@ -16,7 +17,7 @@ module ADIWG
16
17
 
17
18
  def writeHtml(hFormat)
18
19
 
19
- # resource format - format name
20
+ # resource format - format name, version, compression method
20
21
  s = hFormat[:formatName]
21
22
  if !s.nil?
22
23
  @html.em('Resource format: ')
@@ -26,6 +27,11 @@ module ADIWG
26
27
  @html.em('Version: ')
27
28
  @html.text!(s)
28
29
  end
30
+ s = hFormat[:compressionMethod]
31
+ if !s.nil?
32
+ @html.em('Compression: ')
33
+ @html.text!(s)
34
+ end
29
35
  @html.br
30
36
  end
31
37
 
@@ -3,11 +3,11 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-31 original script
6
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
6
7
 
7
- require 'adiwg/mdtranslator/internal/module_geoFormat'
8
- require 'html_temporalElement'
9
- require 'html_verticalElement'
10
- require 'html_resourceId'
8
+ require_relative 'html_temporalElement'
9
+ require_relative 'html_verticalElement'
10
+ require_relative 'html_resourceId'
11
11
 
12
12
  module ADIWG
13
13
  module Mdtranslator
@@ -22,9 +22,9 @@ module ADIWG
22
22
  def writeHtml(hGeoEle, geoPre)
23
23
 
24
24
  # classes used
25
- htmlTempEle = $HtmlNS::MdHtmlTemporalElement.new(@html)
26
- htmlVertEle = $HtmlNS::MdHtmlVerticalElement.new(@html)
27
- htmlResID = $HtmlNS::MdHtmlResourceId.new(@html)
25
+ htmlTempEle = MdHtmlTemporalElement.new(@html)
26
+ htmlVertEle = MdHtmlVerticalElement.new(@html)
27
+ htmlResID = MdHtmlResourceId.new(@html)
28
28
 
29
29
  # geographic element - element ID
30
30
  s = hGeoEle[:elementId]
@@ -0,0 +1,65 @@
1
+ # HTML writer
2
+ # grid information
3
+
4
+ # History:
5
+ # Stan Smith 2015-07-31 original script
6
+
7
+ require_relative 'html_dimension'
8
+
9
+ module ADIWG
10
+ module Mdtranslator
11
+ module Writers
12
+ module Html
13
+
14
+ class MdHtmlGridInfo
15
+ def initialize(html)
16
+ @html = html
17
+ end
18
+
19
+ def writeHtml(hGrid)
20
+
21
+ # classes used
22
+ htmlDim = MdHtmlDimension.new(@html)
23
+
24
+ # grid information - number of dimensions - required
25
+ @html.em('Number of dimensions: ')
26
+ @html.text!(hGrid[:dimensions].to_s)
27
+ @html.br
28
+
29
+ # grid information - cell geometry
30
+ s = hGrid[:dimensionGeometry]
31
+ if !s.nil?
32
+ @html.em('Cell Geometry: ')
33
+ @html.text!(s)
34
+ @html.br
35
+ end
36
+
37
+ # grid information - transformation parameters available
38
+ @html.em('Transformation parameters available: ')
39
+ s = hGrid[:dimensionTransformParams]
40
+ if s
41
+ @html.text!('true')
42
+ else
43
+ @html.text!('false')
44
+ end
45
+ @html.br
46
+
47
+ # grid information - dimensions
48
+ aDims = hGrid[:dimensionInfo]
49
+ aDims.each do |hDim|
50
+ @html.details do
51
+ @html.summary('Dimension', {'class'=>'h4'})
52
+ @html.section(:class=>'block') do
53
+ htmlDim.writeHtml(hDim)
54
+ end
55
+ end
56
+ end
57
+
58
+ end # writeHtml
59
+
60
+ end # class
61
+
62
+ end
63
+ end
64
+ end
65
+ end
@@ -4,6 +4,8 @@
4
4
  # History:
5
5
  # Stan Smith 2015-03-23 original script
6
6
  # Stan Smith 2015-04-07 added metadata tag to head
7
+ # Stan Smith 2015-07-17 added support for user supplied css
8
+ # Stan Smith 2015-07-20 moved mdTranslator logo to html_inlineCss.css
7
9
 
8
10
  module ADIWG
9
11
  module Mdtranslator
@@ -11,14 +13,19 @@ module ADIWG
11
13
  module Html
12
14
 
13
15
  class MdHtmlHead
14
- def initialize(html)
16
+ def initialize(html, paramsObj)
15
17
  @html = html
18
+ @paramsObj = paramsObj
16
19
  end
17
20
 
18
21
  def writeHtml()
19
22
  @html.head do
20
- @html.meta({'http-equiv'=>'Content-Type','content'=>'text/html; charset=utf-8'})
21
- @html.title('ADIWG mdTranslator HTML writer output')
23
+ @html.meta({'http-equiv'=>'Content-Type', 'content'=>'text/html; charset=utf-8'})
24
+ @html.title('HTML Metadata report')
25
+ @html.meta('name'=>'generator', 'content'=>'constructed using ADIwg mdTranslator tools available at https://github.com/adiwg ')
26
+ @html.meta('name'=>'description', 'content'=>'mdTranslator software is an open-source project of the Alaska Data Integration working group (ADIwg). Alaska Data Integration working group is not responsible for the content of this metadata record')
27
+ @html.meta('name'=>'keywords', 'content'=>'metadata, ADIwg, mdTranslator')
28
+ @html.comment!('metadata record generated ' + Time.now.to_s)
22
29
 
23
30
  # add inline css
24
31
  # read css from file
@@ -31,6 +38,14 @@ module ADIWG
31
38
  @html.text!(css)
32
39
  end
33
40
 
41
+ # append user supplied css
42
+ if @paramsObj[:cssLink]
43
+ @html.link('rel'=>'stylesheet', 'href'=> @paramsObj[:cssLink])
44
+ end
45
+ if @paramsObj[:css]
46
+ @html.style(@paramsObj[:css])
47
+ end
48
+
34
49
  # add inline javascript
35
50
  # read javascript from file
36
51
  path = File.join(File.dirname(__FILE__), 'html_headScript.js')
@@ -0,0 +1,120 @@
1
+ # HTML writer
2
+ # image information
3
+
4
+ # History:
5
+ # Stan Smith 2015-08-21 original script
6
+
7
+ require_relative 'html_resourceId'
8
+
9
+ module ADIWG
10
+ module Mdtranslator
11
+ module Writers
12
+ module Html
13
+
14
+ class MdHtmlImageInfo
15
+ def initialize(html)
16
+ @html = html
17
+ end
18
+
19
+ def writeHtml(hImage)
20
+
21
+ # classes used
22
+ htmlResId = MdHtmlResourceId.new(@html)
23
+
24
+ # image information - illumination elevation angle
25
+ s = hImage[:illuminationElevationAngle]
26
+ if !s.nil?
27
+ @html.em('Illumination elevation angle: ')
28
+ @html.text!(s.to_s)
29
+ @html.br
30
+ end
31
+
32
+ # image information - illumination azimuth angle
33
+ s = hImage[:illuminationAzimuthAngle]
34
+ if !s.nil?
35
+ @html.em('Illumination azimuth angle: ')
36
+ @html.text!(s.to_s)
37
+ @html.br
38
+ end
39
+
40
+ # image information - image condition
41
+ s = hImage[:imageCondition]
42
+ if !s.nil?
43
+ @html.em('Image condition: ')
44
+ @html.text!(s)
45
+ @html.br
46
+ end
47
+
48
+ # image information - image quality
49
+ hIdentifier = hImage[:imageQuality]
50
+ if !hIdentifier.empty?
51
+ @html.em('Image quality: ')
52
+ @html.section(:class=>'block') do
53
+ htmlResId.writeHtml(hIdentifier)
54
+ end
55
+ end
56
+
57
+ # image information - cloud cover percentage
58
+ s = hImage[:cloudCoverPercent]
59
+ if !s.nil?
60
+ @html.em('Cloud cover percentage: ')
61
+ @html.text!(s.to_s)
62
+ @html.br
63
+ end
64
+
65
+ # image information - compression generation quantity
66
+ s = hImage[:compressionQuantity]
67
+ if !s.nil?
68
+ @html.em('Compression generation quantity: ')
69
+ @html.text!(s.to_s)
70
+ @html.br
71
+ end
72
+
73
+ # image information - triangulation information available
74
+ s = hImage[:triangulationInfo]
75
+ if !s.nil?
76
+ @html.em('Triangulation information available: ')
77
+ @html.text!(s.to_s)
78
+ @html.br
79
+ end
80
+
81
+ # image information - radiometric calibration information available
82
+ s = hImage[:radiometricCalibrationInfo]
83
+ if !s.nil?
84
+ @html.em('Radiometric calibration available: ')
85
+ @html.text!(s.to_s)
86
+ @html.br
87
+ end
88
+
89
+ # image information - camera calibration information available
90
+ s = hImage[:cameraCalibrationInfo]
91
+ if !s.nil?
92
+ @html.em('Camera calibration information available: ')
93
+ @html.text!(s.to_s)
94
+ @html.br
95
+ end
96
+
97
+ # image information - film distortion information available
98
+ s = hImage[:filmDistortionInfo]
99
+ if !s.nil?
100
+ @html.em('Film distortion information available: ')
101
+ @html.text!(s.to_s)
102
+ @html.br
103
+ end
104
+
105
+ # image information - lens distortion information available
106
+ s = hImage[:lensDistortionInfo]
107
+ if !s.nil?
108
+ @html.em('Lens distortion information available: ')
109
+ @html.text!(s.to_s)
110
+ @html.br
111
+ end
112
+
113
+ end # writeHtml
114
+
115
+ end # class
116
+
117
+ end
118
+ end
119
+ end
120
+ end