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,48 @@
1
+ # HTML writer
2
+ # additional documentation
3
+
4
+ # History:
5
+ # Stan Smith 2015-08-21 original script
6
+
7
+ require_relative 'html_citation'
8
+
9
+ module ADIWG
10
+ module Mdtranslator
11
+ module Writers
12
+ module Html
13
+
14
+ class MdHtmlAdditionalDocumentation
15
+ def initialize(html)
16
+ @html = html
17
+ end
18
+
19
+ def writeHtml(hAddDoc)
20
+
21
+ # classes used
22
+ htmlCitation = MdHtmlCitation.new(@html)
23
+
24
+ # additional documentation - resource type
25
+ s = hAddDoc[:resourceType]
26
+ if !s.nil?
27
+ @html.em('Resource type: ')
28
+ @html.text!(s)
29
+ @html.br
30
+ end
31
+
32
+ # additional documentation - citation
33
+ hCitation = hAddDoc[:citation]
34
+ if !hCitation.empty?
35
+ @html.em('Citation: ')
36
+ @html.section(:class=>'block') do
37
+ htmlCitation.writeHtml(hCitation)
38
+ end
39
+ end
40
+
41
+ end # writeHtml
42
+
43
+ end # class
44
+
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,73 @@
1
+ # HTML writer
2
+ # associated resource
3
+
4
+ # History:
5
+ # Stan Smith 2015-08-21 original script
6
+
7
+ require_relative 'html_citation'
8
+
9
+ module ADIWG
10
+ module Mdtranslator
11
+ module Writers
12
+ module Html
13
+
14
+ class MdHtmlAssociatedResource
15
+ def initialize(html)
16
+ @html = html
17
+ end
18
+
19
+ def writeHtml(hAssRes)
20
+
21
+ # classes used
22
+ htmlCitation = MdHtmlCitation.new(@html)
23
+
24
+ # associated resource - resource type
25
+ s = hAssRes[:resourceType]
26
+ if !s.nil?
27
+ @html.em('Resource type: ')
28
+ @html.text!(s)
29
+ @html.br
30
+ end
31
+
32
+ # associated resource - association type
33
+ s = hAssRes[:associationType]
34
+ if !s.nil?
35
+ @html.em('Association type: ')
36
+ @html.text!(s)
37
+ @html.br
38
+ end
39
+
40
+ # associated resource - initiative type
41
+ s = hAssRes[:initiativeType]
42
+ if !s.nil?
43
+ @html.em('Initiative type: ')
44
+ @html.text!(s)
45
+ @html.br
46
+ end
47
+
48
+ # associated resource - citation
49
+ hCitation = hAssRes[:resourceCitation]
50
+ if !hCitation.empty?
51
+ @html.em('Resource citation: ')
52
+ @html.section(:class=>'block') do
53
+ htmlCitation.writeHtml(hCitation)
54
+ end
55
+ end
56
+
57
+ # associated resource - metadata citation
58
+ hCitation = hAssRes[:metadataCitation]
59
+ if !hCitation.empty?
60
+ @html.em('Metadata citation: ')
61
+ @html.section(:class=>'block') do
62
+ htmlCitation.writeHtml(hCitation)
63
+ end
64
+ end
65
+
66
+ end # writeHtml
67
+
68
+ end # class
69
+
70
+ end
71
+ end
72
+ end
73
+ end
@@ -4,15 +4,15 @@
4
4
  # History:
5
5
  # Stan Smith 2015-03-23 original script
6
6
  # Stan Smith 2014-04-10 add open and close buttons
7
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
8
+ # Stan Smith 2015-07-20 moved mdTranslator logo to html_inlineCss.css
7
9
 
8
- require 'html_metadataInfo'
9
- require 'html_resourceInfo'
10
- require 'html_dataDictionary'
11
- require 'html_citation'
12
- require 'html_responsibleParty'
13
- require 'html_orderProcess'
14
- require 'html_format'
15
- require 'html_transferOption'
10
+ require_relative 'html_metadataInfo'
11
+ require_relative 'html_resourceInfo'
12
+ require_relative 'html_dataDictionary'
13
+ require_relative 'html_distributor'
14
+ require_relative 'html_associatedResource'
15
+ require_relative 'html_additionalDocumentation'
16
16
 
17
17
  module ADIWG
18
18
  module Mdtranslator
@@ -28,30 +28,23 @@ module ADIWG
28
28
  @html.body do
29
29
 
30
30
  # classes used
31
- htmlMetaInfo = $HtmlNS::MdHtmlMetadataInfo.new(@html)
32
- htmlResInfo = $HtmlNS::MdHtmlResourceInfo.new(@html)
33
- htmlDataD = $HtmlNS::MdHtmlDataDictionary.new(@html)
34
- htmlCitation = $HtmlNS::MdHtmlCitation.new(@html)
35
- htmlResParty = $HtmlNS::MdHtmlResponsibleParty.new(@html)
36
- htmlOrderProc = $HtmlNS::MdHtmlOrderProcess.new(@html)
37
- htmlFormat = $HtmlNS::MdHtmlFormat.new(@html)
38
- htmlTranOpt = $HtmlNS::MdHtmlTransferOption.new(@html)
31
+ htmlMetaInfo = MdHtmlMetadataInfo.new(@html)
32
+ htmlResInfo = MdHtmlResourceInfo.new(@html)
33
+ htmlDataD = MdHtmlDataDictionary.new(@html)
34
+ htmlDist = MdHtmlDistributor.new(@html)
35
+ htmlAssRes = MdHtmlAssociatedResource.new(@html)
36
+ htmlAddDoc = MdHtmlAdditionalDocumentation.new(@html)
39
37
 
40
38
  # make sections of the internal data store more accessible
41
39
  hMetadata = intObj[:metadata]
42
- hMetaInfo = hMetadata[:metadataInfo]
43
40
  aDataDict = intObj[:dataDictionary]
41
+
42
+ hMetaInfo = intObj[:metadata][:metadataInfo]
44
43
  aDistributor = intObj[:metadata][:distributorInfo]
45
44
  aAssRes = intObj[:metadata][:associatedResources]
46
45
  aAddDocs = intObj[:metadata][:additionalDocuments]
47
46
 
48
- # set page title with logo
49
- # read logo from file
50
- path = File.join(File.dirname(__FILE__), 'logo150.txt')
51
- file = File.open(path, 'r')
52
- logo = file.read
53
- file.close
54
-
47
+ # set page title and logo
55
48
  # side navigation
56
49
  @html.div('id'=>'sideNav') do
57
50
  # add top anchor and button
@@ -64,7 +57,8 @@ module ADIWG
64
57
 
65
58
  # main header
66
59
  @html.h2('id'=>'mainHeader') do
67
- @html.img('width'=>'150', 'height'=>'39', 'title'=>'', 'alt'=>'', 'src'=>logo)
60
+ # added blank to span tag to force builder to create closing tag
61
+ @html.span('','id'=>'logo')
68
62
  @html.span('Metadata Report')
69
63
  @html.span('HTML','class'=>'version')
70
64
  end
@@ -77,36 +71,66 @@ module ADIWG
77
71
  @html.h3('Page Index')
78
72
  @html.a('Metadata Information Section','href'=>'#metadataInfo')
79
73
  @html.section(:class=>'block') do
80
- @html.a('Metadata Identifier', 'href'=>'#metadata-identifier')
81
- @html.br
82
- @html.a('Metadata Record Information', 'href'=>'#metadata-recordInfo')
83
- @html.br
84
- @html.a('Parent Metadata Citation', 'href'=>'#metadata-parentInfo')
74
+ if !hMetaInfo.empty?
75
+ unless hMetaInfo[:metadataId].empty?
76
+ @html.a('Metadata Identifier', 'href'=>'#metadata-identifier')
77
+ @html.br
78
+ end
79
+ @html.a('Metadata Record Information', 'href'=>'#metadata-recordInfo')
80
+ unless hMetaInfo[:parentMetadata].empty?
81
+ @html.br
82
+ @html.a('Parent Metadata Citation', 'href'=>'#metadata-parentInfo')
83
+ end
84
+ end
85
85
  end
86
- @html.br
87
86
  @html.a('Resource Information Section','href'=>'#resourceInfo')
88
87
  @html.section(:class=>'block') do
89
88
  @html.a('Resource Identification', 'href'=>'#resourceInfo-general')
90
89
  @html.br
91
90
  @html.a('Contacts', 'href'=>'#resourceInfo-contacts')
92
- @html.br
93
- @html.a('Keywords', 'href'=>'#resourceInfo-keywords')
94
- @html.br
95
- @html.a('Taxonomy', 'href'=>'#resourceInfo-taxonomy')
96
- @html.br
97
- @html.a('Spatial Reference', 'href'=>'#resourceInfo-spatialRef')
98
- @html.br
99
- @html.a('Extents (Geographic, Temporal, & Vertical Space)', 'href'=>'#resourceInfo-extents')
100
- @html.br
101
- @html.a('Data Quality', 'href'=>'#resourceInfo-dataQuality')
102
- @html.br
103
- @html.a('Constraints', 'href'=>'#resourceInfo-constraints')
104
- @html.br
105
- @html.a('Maintenance Information', 'href'=>'#resourceInfo-maintInfo')
91
+ unless hMetadata[:resourceInfo][:descriptiveKeywords].empty?
92
+ @html.br
93
+ @html.a('Keywords', 'href'=>'#resourceInfo-keywords')
94
+ end
95
+ unless hMetadata[:resourceInfo][:taxonomy].empty?
96
+ @html.br
97
+ @html.a('Taxonomy', 'href'=>'#resourceInfo-taxonomy')
98
+ end
99
+ unless hMetadata[:resourceInfo][:spatialReferenceSystem].empty? &&
100
+ hMetadata[:resourceInfo][:spatialRepresentationTypes].empty? &&
101
+ hMetadata[:resourceInfo][:spatialResolutions].empty?
102
+ @html.br
103
+ @html.a('Spatial Reference', 'href'=>'#resourceInfo-spatialRef')
104
+ end
105
+ unless hMetadata[:resourceInfo][:extents].empty?
106
+ @html.br
107
+ @html.a('Extents (Geographic, Temporal, & Vertical Space)', 'href'=>'#resourceInfo-extents')
108
+ end
109
+ unless hMetadata[:resourceInfo][:gridInfo].empty?
110
+ @html.br
111
+ @html.a('Grid Information', 'href'=>'#resourceInfo-gridInfo')
112
+ end
113
+ unless hMetadata[:resourceInfo][:coverageInfo].empty?
114
+ @html.br
115
+ @html.a('Coverage Information', 'href'=>'#resourceInfo-coverageInfo')
116
+ end
117
+ unless hMetadata[:resourceInfo][:dataQualityInfo].empty?
118
+ @html.br
119
+ @html.a('Data Quality', 'href'=>'#resourceInfo-dataQuality')
120
+ end
121
+ unless hMetadata[:resourceInfo][:useConstraints].empty? &&
122
+ hMetadata[:resourceInfo][:legalConstraints].empty? &&
123
+ hMetadata[:resourceInfo][:securityConstraints].empty?
124
+ @html.br
125
+ @html.a('Constraints', 'href'=>'#resourceInfo-constraints')
126
+ end
127
+ unless hMetadata[:resourceInfo][:resourceMaint].empty?
128
+ @html.br
129
+ @html.a('Maintenance Information', 'href'=>'#resourceInfo-maintInfo')
130
+ end
106
131
  @html.br
107
132
  @html.a('Other Resource Information', 'href'=>'#resourceInfo-other')
108
133
  end
109
- @html.br
110
134
  @html.a('Data Dictionary Section','href'=>'#dataDictionary')
111
135
  @html.br
112
136
  @html.a('Resource Distribution Section','href'=>'#resourceDistribution')
@@ -133,12 +157,11 @@ module ADIWG
133
157
  @html.h2('Metadata Information', 'id'=>'metadataInfo')
134
158
  if !hMetaInfo.empty?
135
159
  @html.section(:class=>'block') do
136
- htmlMetaInfo.writeHtml(hMetaInfo)
160
+ htmlMetaInfo.writeHtml(hMetaInfo)
137
161
  end
138
162
  end
139
163
  @html.hr
140
164
 
141
-
142
165
  # resource information section
143
166
  @html.h2('Resource Information', 'id'=>'resourceInfo')
144
167
  @html.section(:class=>'block') do
@@ -168,37 +191,21 @@ module ADIWG
168
191
  @html.h2('Resource Distribution', 'id'=>'resourceDistribution')
169
192
  aDistributor.each do |hDistributor|
170
193
  @html.section(:class=>'block') do
194
+
195
+ # get distributor name from contact orgName
196
+ contId = hDistributor[:distContact][:contactId]
197
+ hCont = ADIWG::Mdtranslator::Writers::Html::MdHtmlWriter.getContact(contId)
198
+ distName = hCont[:orgName]
199
+ if distName.nil?
200
+ distName = 'Other'
201
+ end
171
202
  @html.details do
172
- @html.summary('Distributor', {'class'=>'h4'})
203
+ @html.summary(distName, {'class'=>'h3'})
173
204
  @html.section(:class=>'block') do
174
-
175
- # resource distribution - distributor - required
176
- @html.em('Distributor contact: ')
177
- hResParty = hDistributor[:distContact]
178
- @html.section(:class=>'block') do
179
- htmlResParty.writeHtml(hResParty)
180
- end
181
-
182
- # resource distribution - order process
183
- hDistributor[:distOrderProc].each do |hOrder|
184
- @html.em('Order Process: ')
185
- @html.section(:class=>'block') do
186
- htmlOrderProc.writeHtml(hOrder)
187
- end
188
- end
189
-
190
- # resource distribution - resource format
191
- hDistributor[:distFormat].each do |hFormat|
192
- htmlFormat.writeHtml(hFormat)
193
- end
194
-
195
- # resource distribution - transfer options
196
- hDistributor[:distTransOption].each do |hTransOption|
197
- htmlTranOpt.writeHtml(hTransOption)
198
- end
199
-
205
+ htmlDist.writeHtml(hDistributor)
200
206
  end
201
207
  end
208
+
202
209
  end
203
210
  end
204
211
  @html.hr
@@ -219,48 +226,7 @@ module ADIWG
219
226
  @html.details do
220
227
  @html.summary(sTitle, {'class'=>'h4'})
221
228
  @html.section(:class=>'block') do
222
-
223
- # associated resource - resource type
224
- s = hAssRes[:resourceType]
225
- if !s.nil?
226
- @html.em('Resource type: ')
227
- @html.text!(s)
228
- @html.br
229
- end
230
-
231
- # associated resource - association type
232
- s = hAssRes[:associationType]
233
- if !s.nil?
234
- @html.em('Association type: ')
235
- @html.text!(s)
236
- @html.br
237
- end
238
-
239
- # associated resource - initiative type
240
- s = hAssRes[:initiativeType]
241
- if !s.nil?
242
- @html.em('Initiative type: ')
243
- @html.text!(s)
244
- @html.br
245
- end
246
-
247
- # associated resource - citation
248
- if !hCitation.empty?
249
- @html.em('Resource citation: ')
250
- @html.section(:class=>'block') do
251
- htmlCitation.writeHtml(hCitation)
252
- end
253
- end
254
-
255
- # associated resource - metadata citation
256
- hCitation = hAssRes[:metadataCitation]
257
- if !hCitation.empty?
258
- @html.em('Metadata citation: ')
259
- @html.section(:class=>'block') do
260
- htmlCitation.writeHtml(hCitation)
261
- end
262
- end
263
-
229
+ htmlAssRes.writeHtml(hAssRes)
264
230
  end
265
231
  end
266
232
 
@@ -278,24 +244,7 @@ module ADIWG
278
244
  @html.details do
279
245
  @html.summary(sTitle, {'class'=>'h4'})
280
246
  @html.section(:class=>'block') do
281
-
282
- # additional documentation - resource type
283
- s = hAddDoc[:resourceType]
284
- if !s.nil?
285
- @html.em('Resource type: ')
286
- @html.text!(s)
287
- @html.br
288
- end
289
-
290
- # additional documentation - citation
291
- hCitation = hAddDoc[:citation]
292
- if !hCitation.empty?
293
- @html.em('Citation: ')
294
- @html.section(:class=>'block') do
295
- htmlCitation.writeHtml(hCitation)
296
- end
297
- end
298
-
247
+ htmlAddDoc.writeHtml(hAddDoc)
299
248
  end
300
249
  end
301
250
 
@@ -3,11 +3,13 @@
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
7
+ # Stan Smith 2015-08-26 added alternate title
6
8
 
7
- require 'html_dateTime'
8
- require 'html_resourceId'
9
- require 'html_responsibleParty'
10
- require 'html_onlineResource'
9
+ require_relative 'html_dateTime'
10
+ require_relative 'html_resourceId'
11
+ require_relative 'html_responsibleParty'
12
+ require_relative 'html_onlineResource'
11
13
 
12
14
  module ADIWG
13
15
  module Mdtranslator
@@ -22,16 +24,24 @@ module ADIWG
22
24
  def writeHtml(hCitation)
23
25
 
24
26
  # classes used
25
- htmlDateTime = $HtmlNS::MdHtmlDateTime.new(@html)
26
- htmlResId = $HtmlNS::MdHtmlResourceId.new(@html)
27
- htmlResParty = $HtmlNS::MdHtmlResponsibleParty.new(@html)
28
- htmlOlRes = $HtmlNS::MdHtmlOnlineResource.new(@html)
27
+ htmlDateTime = MdHtmlDateTime.new(@html)
28
+ htmlResId = MdHtmlResourceId.new(@html)
29
+ htmlResParty = MdHtmlResponsibleParty.new(@html)
30
+ htmlOlRes = MdHtmlOnlineResource.new(@html)
29
31
 
30
32
  # citation - title - required
31
33
  @html.em('Title: ')
32
34
  @html.text!(hCitation[:citTitle])
33
35
  @html.br
34
36
 
37
+ # citation - alternate title
38
+ s = hCitation[:citAltTitle]
39
+ if s
40
+ @html.em('Alternate title: ')
41
+ @html.text!(s)
42
+ @html.br
43
+ end
44
+
35
45
  # citation - date
36
46
  aDates = hCitation[:citDate]
37
47
  aDates.each do |hDatetime|