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
@@ -2,21 +2,23 @@
2
2
  # writer output in XML
3
3
 
4
4
  # History:
5
- # Stan Smith 2013-09-25 original script
5
+ # Stan Smith 2013-09-25 original script.
6
6
  # Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
7
7
  # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
8
-
9
- require 'module_dateTimeFun'
8
+ # Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
9
+ # Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
10
+ # Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
10
11
 
11
12
  module ADIWG
12
13
  module Mdtranslator
13
14
  module Writers
14
- module Iso
15
+ module Iso19115_2
15
16
 
16
17
  class MD_StandardOrderProcess
17
18
 
18
- def initialize(xml)
19
+ def initialize(xml, responseObj)
19
20
  @xml = xml
21
+ @responseObj = responseObj
20
22
  end
21
23
 
22
24
  def writeXML(orderProcess)
@@ -31,7 +33,7 @@ module ADIWG
31
33
  @xml.tag!('gmd:fees') do
32
34
  @xml.tag!('gco:CharacterString', s)
33
35
  end
34
- elsif $showAllTags
36
+ elsif @responseObj[:writerShowTags]
35
37
  @xml.tag!('gmd:fees')
36
38
  end
37
39
 
@@ -49,7 +51,7 @@ module ADIWG
49
51
  @xml.tag!('gco:DateTime', dateTimeStr)
50
52
  end
51
53
  end
52
- elsif $showAllTags
54
+ elsif @responseObj[:writerShowTags]
53
55
  @xml.tag!('gmd:plannedAvailableDateTime')
54
56
  end
55
57
 
@@ -59,7 +61,7 @@ module ADIWG
59
61
  @xml.tag!('gmd:orderingInstructions') do
60
62
  @xml.tag!('gco:CharacterString', s)
61
63
  end
62
- elsif $showAllTags
64
+ elsif @responseObj[:writerShowTags]
63
65
  @xml.tag!('gmd:orderingInstructions')
64
66
  end
65
67
 
@@ -69,7 +71,7 @@ module ADIWG
69
71
  @xml.tag!('gmd:turnaround') do
70
72
  @xml.tag!('gco:CharacterString', s)
71
73
  end
72
- elsif $showAllTags
74
+ elsif @responseObj[:writerShowTags]
73
75
  @xml.tag!('gmd:turnaround')
74
76
  end
75
77
 
@@ -2,18 +2,22 @@
2
2
  # writer output in XML
3
3
 
4
4
  # History:
5
- # Stan Smith 2013-11-19 original script
5
+ # Stan Smith 2013-11-19 original script.
6
6
  # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
7
+ # Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
8
+ # Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
9
+ # Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
7
10
 
8
11
  module ADIWG
9
12
  module Mdtranslator
10
13
  module Writers
11
- module Iso
14
+ module Iso19115_2
12
15
 
13
16
  class MD_TaxonCl
14
17
 
15
- def initialize(xml)
18
+ def initialize(xml, responseObj)
16
19
  @xml = xml
20
+ @responseObj = responseObj
17
21
  end
18
22
 
19
23
  def writeXML(aTaxonCl)
@@ -29,7 +33,7 @@ module ADIWG
29
33
  @xml.tag!('gmd:common') do
30
34
  @xml.tag!('gco:CharacterString', s)
31
35
  end
32
- elsif $showAllTags
36
+ elsif @responseObj[:writerShowTags]
33
37
  @xml.tag!('gmd:common')
34
38
  end
35
39
 
@@ -2,33 +2,37 @@
2
2
  # writer output in XML
3
3
 
4
4
  # History:
5
- # Stan Smith 2013-11-19 original script
5
+ # Stan Smith 2013-11-19 original script.
6
6
  # Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
7
7
  # Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
8
+ # Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
9
+ # Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
10
+ # Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
8
11
 
9
- require 'class_citation'
10
- require 'class_responsibleParty'
11
- require 'class_vouchers'
12
- require 'class_taxonClassification'
12
+ require_relative 'class_citation'
13
+ require_relative 'class_responsibleParty'
14
+ require_relative 'class_vouchers'
15
+ require_relative 'class_taxonClassification'
13
16
 
14
17
  module ADIWG
15
18
  module Mdtranslator
16
19
  module Writers
17
- module Iso
20
+ module Iso19115_2
18
21
 
19
22
  class MD_TaxonSys
20
23
 
21
- def initialize(xml)
24
+ def initialize(xml, responseObj)
22
25
  @xml = xml
26
+ @responseObj = responseObj
23
27
  end
24
28
 
25
29
  def writeXML(hTaxonSys)
26
30
 
27
31
  # classes used
28
- citationClass = $IsoNS::CI_Citation.new(@xml)
29
- rPartyClass = $IsoNS::CI_ResponsibleParty.new(@xml)
30
- tVoucherClass = $IsoNS::MD_Vouchers.new(@xml)
31
- tClassClass = $IsoNS::MD_TaxonCl.new(@xml)
32
+ citationClass = CI_Citation.new(@xml, @responseObj)
33
+ rPartyClass = CI_ResponsibleParty.new(@xml, @responseObj)
34
+ tVoucherClass = MD_Vouchers.new(@xml, @responseObj)
35
+ tClassClass = MD_TaxonCl.new(@xml, @responseObj)
32
36
 
33
37
  @xml.tag!('gmd:MD_TaxonSys') do
34
38
 
@@ -50,7 +54,7 @@ module ADIWG
50
54
  @xml.tag!('gmd:taxongen') do
51
55
  @xml.tag!('gco:CharacterString', s)
52
56
  end
53
- elsif $showAllTags
57
+ elsif @responseObj[:writerShowTags]
54
58
  @xml.tag!('gmd:taxongen')
55
59
  end
56
60
 
@@ -65,7 +69,7 @@ module ADIWG
65
69
  rPartyClass.writeXML(rParty)
66
70
  end
67
71
  end
68
- elsif $showAllTags
72
+ elsif @responseObj[:writerShowTags]
69
73
  @xml.tag!('gmd:obs')
70
74
  end
71
75
 
@@ -85,7 +89,7 @@ module ADIWG
85
89
  @xml.tag!('gmd:voucher') do
86
90
  tVoucherClass.writeXML(hTaxVoucher)
87
91
  end
88
- elsif $showAllTags
92
+ elsif @responseObj[:writerShowTags]
89
93
  @xml.tag!('gmd:voucher')
90
94
  end
91
95
 
@@ -0,0 +1,92 @@
1
+ # ISO <<Class>> CI_Telephone
2
+ # writer output in XML
3
+
4
+ # History:
5
+ # Stan Smith 2013-08-12 original script.
6
+ # Stan Smith 2014-05-14 reorganized for JSON schema 0.4.0
7
+ # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
8
+ # Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
9
+ # Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
10
+ # Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
11
+
12
+ module ADIWG
13
+ module Mdtranslator
14
+ module Writers
15
+ module Iso19115_2
16
+
17
+ class CI_Telephone
18
+
19
+ def initialize(xml, responseObj)
20
+ @xml = xml
21
+ @responseObj = responseObj
22
+ end
23
+
24
+ def writeXML(aPhones)
25
+
26
+ # ISO requires phones to be in proper order (voice, fax)
27
+ # Need to count phones of each type to be able to include empty tag
28
+ voiceCount = 0
29
+ faxCount = 0
30
+ aPhones.each do |hPhone|
31
+ if hPhone[:phoneServiceType].nil?
32
+ hPhone[:phoneServiceType] = 'voice'
33
+ end
34
+ if hPhone[:phoneServiceType] == 'voice'
35
+ voiceCount += 1
36
+ end
37
+ if hPhone[:phoneServiceType] == 'fax'
38
+ faxCount += 1
39
+ end
40
+ end
41
+
42
+ @xml.tag!('gmd:CI_Telephone') do
43
+
44
+ # phone - voice phones
45
+ if voiceCount > 0
46
+ aPhones.each do |hPhone|
47
+ if hPhone[:phoneServiceType] == 'voice'
48
+ pName = hPhone[:phoneName]
49
+ pNumber = hPhone[:phoneNumber]
50
+ if pName.nil?
51
+ s = pNumber
52
+ else
53
+ s = pName + ': ' + pNumber
54
+ end
55
+ @xml.tag!('gmd:voice') do
56
+ @xml.tag!('gco:CharacterString', s)
57
+ end
58
+ end
59
+ end
60
+ elsif @responseObj[:writerShowTags]
61
+ @xml.tag!('gmd:voice')
62
+ end
63
+
64
+ # phone - fax phones
65
+ if faxCount > 0
66
+ aPhones.each do |hPhone|
67
+ if hPhone[:phoneServiceType] == 'fax'
68
+ pName = hPhone[:phoneName]
69
+ pNumber = hPhone[:phoneNumber]
70
+ if pName.nil?
71
+ s = pNumber
72
+ else
73
+ s = pName + ': ' + pNumber
74
+ end
75
+ @xml.tag!('gmd:facsimile') do
76
+ @xml.tag!('gco:CharacterString', s)
77
+ end
78
+ end
79
+ end
80
+ elsif @responseObj[:writerShowTags]
81
+ @xml.tag!('gmd:facsimile')
82
+ end
83
+ end
84
+
85
+ end
86
+
87
+ end
88
+
89
+ end
90
+ end
91
+ end
92
+ end
@@ -6,27 +6,31 @@
6
6
  # Stan Smith 2014-06-03 add support for date as time instant
7
7
  # Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
8
8
  # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
9
+ # Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
10
+ # Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
11
+ # Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
9
12
 
10
- require 'class_timeInstant'
11
- require 'class_timePeriod'
13
+ require_relative 'class_timeInstant'
14
+ require_relative 'class_timePeriod'
12
15
 
13
16
  module ADIWG
14
17
  module Mdtranslator
15
18
  module Writers
16
- module Iso
19
+ module Iso19115_2
17
20
 
18
21
  class EX_TemporalExtent
19
22
 
20
- def initialize(xml)
23
+ def initialize(xml, responseObj)
21
24
  @xml = xml
25
+ @responseObj = responseObj
22
26
  end
23
27
 
24
28
  def writeXML(hTempEle)
25
29
 
26
30
  # classes used
27
31
  intMetadataClass = InternalMetadata.new
28
- timeInstClass = $IsoNS::TimeInstant.new(@xml)
29
- timePeriodClass = $IsoNS::TimePeriod.new(@xml)
32
+ timeInstClass = TimeInstant.new(@xml, @responseObj)
33
+ timePeriodClass = TimePeriod.new(@xml, @responseObj)
30
34
 
31
35
  @xml.tag!('gmd:EX_TemporalExtent') do
32
36
 
@@ -2,29 +2,30 @@
2
2
  # writer output in XML
3
3
 
4
4
  # History:
5
- # Stan Smith 2013-11-04 original script
5
+ # Stan Smith 2013-11-04 original script.
6
6
  # Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
7
7
  # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
8
-
9
- require 'module_dateTimeFun'
8
+ # Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
9
+ # Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
10
10
 
11
11
  module ADIWG
12
12
  module Mdtranslator
13
13
  module Writers
14
- module Iso
14
+ module Iso19115_2
15
15
 
16
16
  class TimeInstant
17
17
 
18
- def initialize(xml)
18
+ def initialize(xml, responseObj)
19
19
  @xml = xml
20
+ @responseObj = responseObj
20
21
  end
21
22
 
22
23
  def writeXML(hTempI)
23
24
 
24
25
  timeID = hTempI[:timeId]
25
26
  if timeID.nil?
26
- $idCount = $idCount.succ
27
- timeID = 'timeInstant' + $idCount
27
+ @responseObj[:writerMissingIdCount] = @responseObj[:writerMissingIdCount].succ
28
+ timeID = 'timeInstant' + @responseObj[:writerMissingIdCount]
28
29
  end
29
30
 
30
31
  @xml.tag!('gml:TimeInstant', {'gml:id' => timeID}) do
@@ -33,7 +34,7 @@ module ADIWG
33
34
  s = hTempI[:description]
34
35
  if !s.nil?
35
36
  @xml.tag!('gml:description', s)
36
- elsif $showAllTags
37
+ elsif @responseObj[:writerShowTags]
37
38
  @xml.tag!('gml:description')
38
39
  end
39
40
 
@@ -2,29 +2,31 @@
2
2
  # writer output in XML
3
3
 
4
4
  # History:
5
- # Stan Smith 2013-11-04 original script
5
+ # Stan Smith 2013-11-04 original script.
6
6
  # Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
7
7
  # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
8
-
9
- require 'module_dateTimeFun'
8
+ # Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
9
+ # Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
10
+ # Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
10
11
 
11
12
  module ADIWG
12
13
  module Mdtranslator
13
14
  module Writers
14
- module Iso
15
+ module Iso19115_2
15
16
 
16
17
  class TimePeriod
17
18
 
18
- def initialize(xml)
19
+ def initialize(xml, responseObj)
19
20
  @xml = xml
21
+ @responseObj = responseObj
20
22
  end
21
23
 
22
24
  def writeXML(hTempP)
23
25
 
24
26
  timeID = hTempP[:timeId]
25
27
  if timeID.nil?
26
- $idCount = $idCount.succ
27
- timeID = 'timePeriod' + $idCount
28
+ @responseObj[:writerMissingIdCount] = @responseObj[:writerMissingIdCount].succ
29
+ timeID = 'timePeriod' + @responseObj[:writerMissingIdCount]
28
30
  end
29
31
 
30
32
  @xml.tag!('gml:TimePeriod', {'gml:id' => timeID}) do
@@ -33,7 +35,7 @@ module ADIWG
33
35
  s = hTempP[:description]
34
36
  if !s.nil?
35
37
  @xml.tag!('gml:description', s)
36
- elsif $showAllTags
38
+ elsif @responseObj[:writerShowTags]
37
39
  @xml.tag!('gml:description')
38
40
  end
39
41
 
@@ -2,23 +2,23 @@
2
2
  # writer output in XML
3
3
 
4
4
  # History:
5
- # Stan Smith 2014-12-03 original script
6
- # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
5
+ # Stan Smith 2015-08-27 copied from 19110 writer
7
6
 
8
- require 'class_baseUnit'
9
- require 'class_conventionalUnit'
10
- require 'class_derivedUnit'
11
- require 'class_definitionUnit'
7
+ require_relative 'class_baseUnit'
8
+ require_relative 'class_conventionalUnit'
9
+ require_relative 'class_derivedUnit'
10
+ require_relative 'class_definitionUnit'
12
11
 
13
12
  module ADIWG
14
13
  module Mdtranslator
15
14
  module Writers
16
- module Iso
15
+ module Iso19115_2
17
16
 
18
17
  class UnitsOfMeasure
19
18
 
20
- def initialize(xml)
19
+ def initialize(xml, responseObj)
21
20
  @xml = xml
21
+ @responseObj = responseObj
22
22
  end
23
23
 
24
24
  def writeUnits(unit)
@@ -65,7 +65,7 @@ module ADIWG
65
65
  hBase[:catalogSymbol] = 'deg'
66
66
  hBase[:unitsSystem] = 'http://www.opengis.net/def/uom/OGC/1.0/degree'
67
67
 
68
- baseClass = BaseUnit.new(@xml)
68
+ baseClass = BaseUnit.new(@xml, @responseObj)
69
69
  baseClass.writeXML(hBase)
70
70
 
71
71
  when 'm', 'meter', 'meters', 'metre'
@@ -73,7 +73,7 @@ module ADIWG
73
73
  hBase[:name] = 'meter'
74
74
  hBase[:catalogSymbol] = 'm'
75
75
 
76
- baseClass = BaseUnit.new(@xml)
76
+ baseClass = BaseUnit.new(@xml, @responseObj)
77
77
  baseClass.writeXML(hBase)
78
78
 
79
79
  when 'kg', 'kilogram', 'kilograms'
@@ -81,7 +81,7 @@ module ADIWG
81
81
  hBase[:name] = 'kilogram'
82
82
  hBase[:catalogSymbol] = 'kg'
83
83
 
84
- baseClass = BaseUnit.new(@xml)
84
+ baseClass = BaseUnit.new(@xml, @responseObj)
85
85
  baseClass.writeXML(hBase)
86
86
 
87
87
  when 's', 'second', 'seconds'
@@ -89,7 +89,7 @@ module ADIWG
89
89
  hBase[:name] = 'second'
90
90
  hBase[:catalogSymbol] = 'd'
91
91
 
92
- baseClass = BaseUnit.new(@xml)
92
+ baseClass = BaseUnit.new(@xml, @responseObj)
93
93
  baseClass.writeXML(hBase)
94
94
 
95
95
  when 'A', 'ampere', 'amperes'
@@ -97,7 +97,7 @@ module ADIWG
97
97
  hBase[:name] = 'ampere'
98
98
  hBase[:catalogSymbol] = 'A'
99
99
 
100
- baseClass = BaseUnit.new(@xml)
100
+ baseClass = BaseUnit.new(@xml, @responseObj)
101
101
  baseClass.writeXML(hBase)
102
102
 
103
103
  when 'K', 'kelvin'
@@ -105,7 +105,7 @@ module ADIWG
105
105
  hBase[:name] = 'kelvin'
106
106
  hBase[:catalogSymbol] = 'K'
107
107
 
108
- baseClass = BaseUnit.new(@xml)
108
+ baseClass = BaseUnit.new(@xml, @responseObj)
109
109
  baseClass.writeXML(hBase)
110
110
 
111
111
  when 'mol', 'mole', 'moles'
@@ -113,7 +113,7 @@ module ADIWG
113
113
  hBase[:name] = 'mole'
114
114
  hBase[:catalogSymbol] = 'mol'
115
115
 
116
- baseClass = BaseUnit.new(@xml)
116
+ baseClass = BaseUnit.new(@xml, @responseObj)
117
117
  baseClass.writeXML(hBase)
118
118
 
119
119
  when 'cd', 'candela', 'candelas'
@@ -121,7 +121,7 @@ module ADIWG
121
121
  hBase[:name] = 'candela'
122
122
  hBase[:catalogSymbol] = 'cd'
123
123
 
124
- baseClass = BaseUnit.new(@xml)
124
+ baseClass = BaseUnit.new(@xml, @responseObj)
125
125
  baseClass.writeXML(hBase)
126
126
 
127
127
  when 'ft', 'foot', 'feet'
@@ -131,7 +131,7 @@ module ADIWG
131
131
  hConvent[:preferredUnit] = 'meter'
132
132
  hConvent[:factor] = 3.280839
133
133
 
134
- convClass = ConventionalUnit.new(@xml)
134
+ convClass = ConventionalUnit.new(@xml, @responseObj)
135
135
  convClass.writeXML(hConvent)
136
136
 
137
137
  when 'in', 'inch', 'inches'
@@ -141,7 +141,7 @@ module ADIWG
141
141
  hConvent[:preferredUnit] = 'meter'
142
142
  hConvent[:factor] = 0.0254
143
143
 
144
- convClass = ConventionalUnit.new(@xml)
144
+ convClass = ConventionalUnit.new(@xml, @responseObj)
145
145
  convClass.writeXML(hConvent)
146
146
 
147
147
  when 'mm', 'millimeter', 'millimeters'
@@ -151,7 +151,30 @@ module ADIWG
151
151
  hConvent[:preferredUnit] = 'meter'
152
152
  hConvent[:factor] = 0.001
153
153
 
154
- convClass = ConventionalUnit.new(@xml)
154
+ convClass = ConventionalUnit.new(@xml, @responseObj)
155
+ convClass.writeXML(hConvent)
156
+
157
+ when 'micrometer','micrometers'
158
+ micro = "\u00b5"
159
+ s = micro.encode('utf-8')
160
+ s += 'm'
161
+ hConvent[:identifier] = 'meter'
162
+ hConvent[:name] = 'micrometer'
163
+ hConvent[:catalogSymbol] = s
164
+ hConvent[:preferredUnit] = 'meter'
165
+ hConvent[:factor] = 0.000001
166
+
167
+ convClass = ConventionalUnit.new(@xml, @responseObj)
168
+ convClass.writeXML(hConvent)
169
+
170
+ when 'nm', 'nanometer', 'nanometers'
171
+ hConvent[:identifier] = 'meter'
172
+ hConvent[:name] = 'nanometer'
173
+ hConvent[:catalogSymbol] = 'nm'
174
+ hConvent[:preferredUnit] = 'meter'
175
+ hConvent[:factor] = 0.000000001
176
+
177
+ convClass = ConventionalUnit.new(@xml, @responseObj)
155
178
  convClass.writeXML(hConvent)
156
179
 
157
180
  when 'degC', 'centigrade', 'degreesC', 'Celsius'
@@ -164,7 +187,7 @@ module ADIWG
164
187
  hConvent[:c] = 1
165
188
  hConvent[:d] = 0
166
189
 
167
- convClass = ConventionalUnit.new(@xml)
190
+ convClass = ConventionalUnit.new(@xml, @responseObj)
168
191
  convClass.writeXML(hConvent)
169
192
 
170
193
  when 'degF', 'degreesF', 'Fahrenheit'
@@ -177,7 +200,7 @@ module ADIWG
177
200
  hConvent[:c] = 9
178
201
  hConvent[:d] = 0
179
202
 
180
- convClass = ConventionalUnit.new(@xml)
203
+ convClass = ConventionalUnit.new(@xml, @responseObj)
181
204
  convClass.writeXML(hConvent)
182
205
 
183
206
  when 'mph', 'miles per hour'
@@ -190,7 +213,7 @@ module ADIWG
190
213
  hConvent[:c] = 0
191
214
  hConvent[:d] = 3600.0
192
215
 
193
- convClass = ConventionalUnit.new(@xml)
216
+ convClass = ConventionalUnit.new(@xml, @responseObj)
194
217
  convClass.writeXML(hConvent)
195
218
 
196
219
  when 'kph', 'kilometers per hour'
@@ -203,7 +226,7 @@ module ADIWG
203
226
  hConvent[:c] = 0
204
227
  hConvent[:d] = 3600
205
228
 
206
- convClass = ConventionalUnit.new(@xml)
229
+ convClass = ConventionalUnit.new(@xml, @responseObj)
207
230
  convClass.writeXML(hConvent)
208
231
 
209
232
  when 'density'
@@ -217,11 +240,11 @@ module ADIWG
217
240
  unitTerms << {'uom' => 'm', 'exponent' => '-3'}
218
241
  hDerived[:derivationUnitTerm] = unitTerms
219
242
 
220
- dervClass = DerivedUnit.new(@xml)
243
+ dervClass = DerivedUnit.new(@xml, @responseObj)
221
244
  dervClass.writeXML(hDerived)
222
245
 
223
246
  else
224
- defnClass = UnitDefinition.new(@xml)
247
+ defnClass = UnitDefinition.new(@xml, @responseObj)
225
248
  defnClass.writeXML(unit)
226
249
 
227
250
  end