adiwg-mdtranslator 2.18.2 → 2.19.0.pre.beta.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (249) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +14 -0
  3. data/.gitignore +2 -1
  4. data/Gemfile.lock +86 -0
  5. data/Rakefile +1 -1
  6. data/adiwg-mdtranslator.gemspec +6 -6
  7. data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +27 -11
  8. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_dataQuality.rb +149 -0
  9. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_fgdc.rb +2 -2
  10. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_conformanceResult.rb +1 -1
  11. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_coverageResult.rb +8 -7
  12. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataQuality.rb +4 -4
  13. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataQualityReport.rb +8 -16
  14. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_evaluationMethod.rb +1 -1
  15. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_legalConstraint.rb +8 -8
  16. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_qualityMeasure.rb +34 -0
  17. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_qualityResultFile.rb +72 -0
  18. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_rangeElementDescription.rb +2 -2
  19. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_responsibleParty.rb +1 -1
  20. data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_contact.rb +13 -0
  21. data/lib/adiwg/mdtranslator/version.rb +1 -1
  22. data/lib/adiwg/mdtranslator/writers/fgdc/classes/{class_quality.rb → class_dataQuality.rb} +14 -10
  23. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_fgdc.rb +3 -3
  24. data/lib/adiwg/mdtranslator/writers/html/sections/html_body.rb +5 -1
  25. data/lib/adiwg/mdtranslator/writers/html/sections/html_contact.rb +32 -0
  26. data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQuality.rb +39 -18
  27. data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQualityReport.rb +385 -0
  28. data/lib/adiwg/mdtranslator/writers/html/sections/html_rangeElementDescription.rb +2 -2
  29. data/lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb +60 -0
  30. data/lib/adiwg/mdtranslator/writers/html/sections/html_scope.rb +18 -10
  31. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_additionalDocument.rb +3 -3
  32. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_address.rb +4 -4
  33. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_algorithm.rb +4 -4
  34. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_associatedResource.rb +4 -4
  35. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_attribute.rb +4 -4
  36. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_attributeGroup.rb +4 -4
  37. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_baseUnit.rb +2 -2
  38. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_boundingBox.rb +4 -4
  39. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_browseGraphic.rb +4 -4
  40. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_citation.rb +4 -4
  41. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_codelist.rb +2 -2
  42. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_constraint.rb +4 -4
  43. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_constraintCommon.rb +2 -2
  44. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_contact.rb +3 -3
  45. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_conventionalUnit.rb +2 -2
  46. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_coverageDescription.rb +3 -3
  47. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_dataIdentification.rb +5 -5
  48. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_dataQuality.rb +9 -2
  49. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_dataQualityReport.rb +269 -0
  50. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_date.rb +4 -4
  51. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_definitionUnit.rb +2 -2
  52. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_derivedUnit.rb +2 -2
  53. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_dimension.rb +4 -4
  54. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_distribution.rb +2 -2
  55. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_distributor.rb +4 -4
  56. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_email.rb +2 -2
  57. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_extent.rb +2 -2
  58. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_feature.rb +4 -4
  59. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_featureCatalog.rb +3 -3
  60. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_featureCollection.rb +2 -2
  61. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_featureProperties.rb +2 -2
  62. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_format.rb +4 -4
  63. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_fraction.rb +4 -4
  64. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_gcoDateTime.rb +2 -2
  65. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_geographicElement.rb +4 -4
  66. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_geographicExtent.rb +2 -2
  67. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_geometricObjects.rb +3 -3
  68. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_geometryCollection.rb +4 -4
  69. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_georectified.rb +4 -4
  70. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_georeferenceable.rb +4 -4
  71. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_gmlIdentifier.rb +2 -2
  72. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_grid.rb +4 -4
  73. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_gridRepresentation.rb +1 -1
  74. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_identifier.rb +4 -4
  75. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_imageDescription.rb +2 -2
  76. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_individual.rb +4 -4
  77. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_keyword.rb +4 -4
  78. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_leProcessStep.rb +4 -4
  79. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_leSource.rb +2 -2
  80. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_legalConstraints.rb +3 -3
  81. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_liProcessStep.rb +4 -4
  82. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_liSource.rb +2 -2
  83. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_lineString.rb +2 -2
  84. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_lineage.rb +2 -2
  85. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_locale.rb +4 -4
  86. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_maintenance.rb +4 -4
  87. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_mdBand.rb +2 -2
  88. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_mdMetadata.rb +7 -7
  89. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_measure.rb +4 -4
  90. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_medium.rb +2 -2
  91. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_miBand.rb +2 -2
  92. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_multiLine.rb +2 -2
  93. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_multiPoint.rb +2 -2
  94. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_multiPolygon.rb +2 -2
  95. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_nominalResolution.rb +4 -4
  96. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_onlineResource.rb +4 -4
  97. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_orderProcess.rb +2 -2
  98. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_organization.rb +4 -4
  99. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_partyIdentifier.rb +4 -4
  100. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_phone.rb +3 -3
  101. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_point.rb +2 -2
  102. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_polygon.rb +2 -2
  103. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_processReport.rb +4 -4
  104. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_processStep.rb +2 -2
  105. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_processing.rb +4 -4
  106. data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_qualityResultFile.rb +55 -0
  107. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_rangeDimension.rb +4 -4
  108. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_rangeElementDescription.rb +5 -5
  109. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_referenceSystem.rb +3 -3
  110. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_releasability.rb +2 -2
  111. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_resolution.rb +2 -2
  112. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_responsibility.rb +4 -4
  113. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_sampleDimension.rb +4 -4
  114. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_scope.rb +4 -4
  115. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_scopeDescription.rb +2 -2
  116. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_securityConstraints.rb +4 -4
  117. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_series.rb +2 -2
  118. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_source.rb +2 -2
  119. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_spatialRepresentation.rb +2 -2
  120. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_temporalExtent.rb +2 -2
  121. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_timeInstant.rb +2 -2
  122. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_timePeriod.rb +2 -2
  123. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_transferOptions.rb +2 -2
  124. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_unitsOfMeasure.rb +2 -2
  125. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_usage.rb +4 -4
  126. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_useConstraints.rb +2 -2
  127. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_vectorRepresentation.rb +2 -2
  128. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/classes/class_verticalExtent.rb +4 -4
  129. data/lib/adiwg/mdtranslator/writers/{iso19115_1/iso19115_1_writer.rb → iso19115_3/iso19115_3_writer.rb} +10 -10
  130. data/lib/adiwg/mdtranslator/writers/{iso19115_1/iso19115_1_writer_messages_eng.yml → iso19115_3/iso19115_3_writer_messages_eng.yml} +1 -1
  131. data/lib/adiwg/mdtranslator/writers/{iso19115_1 → iso19115_3}/readme.md +3 -3
  132. data/lib/adiwg/mdtranslator/writers/iso19115_3/version.rb +12 -0
  133. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_allocation.rb +1 -1
  134. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageResult.rb +30 -0
  135. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_dataQuality.rb +3 -1
  136. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_dataQualityReport.rb +12 -10
  137. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_descriptiveResult.rb +3 -3
  138. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_funding.rb +2 -2
  139. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_legalConstraint.rb +1 -1
  140. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb +1 -1
  141. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_qualityMeasure.rb +4 -3
  142. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_qualityResultFile.rb +23 -0
  143. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_standaloneQualityReport.rb +31 -0
  144. data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb +10 -0
  145. data/lib/adiwg/mdtranslator/writers/simple_html/readme.md +19 -0
  146. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_additionalDocumentation.rb +49 -0
  147. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_algorithm.rb +48 -0
  148. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_allocation.rb +114 -0
  149. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_associatedResource.rb +73 -0
  150. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_attribute.rb +201 -0
  151. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_attributeGroup.rb +51 -0
  152. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_bearingDistanceResolution.rb +68 -0
  153. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_body.rb +319 -0
  154. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_boundingBox.rb +69 -0
  155. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_citation.rb +165 -0
  156. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_classedData.rb +50 -0
  157. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_classedDataItem.rb +50 -0
  158. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_constraint.rb +118 -0
  159. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_contact.rb +234 -0
  160. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_coordinateResolution.rb +47 -0
  161. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_coverageInfo.rb +81 -0
  162. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataDictionary.rb +126 -0
  163. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQuality.rb +79 -0
  164. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQualityReport.rb +385 -0
  165. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_date.rb +42 -0
  166. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_datetime.rb +42 -0
  167. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dimension.rb +69 -0
  168. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_distribution.rb +58 -0
  169. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_distributor.rb +66 -0
  170. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_document.rb +63 -0
  171. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_domain.rb +108 -0
  172. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_domainItem.rb +64 -0
  173. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_duration.rb +68 -0
  174. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_entity.rb +169 -0
  175. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_entityAttribute.rb +179 -0
  176. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_entityForeignKey.rb +55 -0
  177. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_entityIndex.rb +50 -0
  178. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_extent.rb +75 -0
  179. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_feature.rb +97 -0
  180. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_featureCollection.rb +82 -0
  181. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_featureProperties.rb +71 -0
  182. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_format.rb +66 -0
  183. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_funding.rb +60 -0
  184. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geodeticParameters.rb +71 -0
  185. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geographicElement.rb +79 -0
  186. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geographicExtent.rb +110 -0
  187. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geographicResolution.rb +47 -0
  188. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geologicAge.rb +71 -0
  189. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geometryCollection.rb +78 -0
  190. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_geometryObject.rb +46 -0
  191. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_georectifiedRepresentation.rb +105 -0
  192. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_georeferenceableRepresentation.rb +91 -0
  193. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_graphic.rb +75 -0
  194. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_gridRepresentation.rb +76 -0
  195. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_head.rb +55 -0
  196. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_identifier.rb +81 -0
  197. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_imageInfo.rb +102 -0
  198. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_inlineCss.css +237 -0
  199. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_keyword.rb +68 -0
  200. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_legalConstraint.rb +49 -0
  201. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_lineage.rb +87 -0
  202. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_locale.rb +47 -0
  203. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_maintenance.rb +96 -0
  204. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_measure.rb +47 -0
  205. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_medium.rb +90 -0
  206. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_metadataInfo.rb +198 -0
  207. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_metadataRepository.rb +56 -0
  208. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_nominalResolution.rb +51 -0
  209. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_obliqueLinePoint.rb +37 -0
  210. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_onlineResource.rb +74 -0
  211. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_orderProcess.rb +62 -0
  212. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_processReport.rb +47 -0
  213. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_processStep.rb +171 -0
  214. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_processing.rb +89 -0
  215. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_projectionParameters.rb +261 -0
  216. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_rangeElementDescription.rb +40 -0
  217. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_referenceSystemParameters.rb +65 -0
  218. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_releasability.rb +63 -0
  219. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_resourceFormat.rb +40 -0
  220. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_resourceInfo.rb +485 -0
  221. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_resourceType.rb +38 -0
  222. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_responsibility.rb +81 -0
  223. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_resultFile.rb +60 -0
  224. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_scope.rb +60 -0
  225. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_scopeDescription.rb +54 -0
  226. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_securityConstraint.rb +57 -0
  227. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_source.rb +155 -0
  228. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_spatialReference.rb +70 -0
  229. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_spatialRepresentation.rb +77 -0
  230. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_spatialResolution.rb +95 -0
  231. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_taxonomy.rb +156 -0
  232. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_taxonomyClass.rb +75 -0
  233. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_temporalExtent.rb +65 -0
  234. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_timeInstant.rb +82 -0
  235. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_timeInterval.rb +40 -0
  236. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_timePeriod.rb +128 -0
  237. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_transferOption.rb +94 -0
  238. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_usage.rb +118 -0
  239. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_vectorObject.rb +40 -0
  240. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_vectorRepresentation.rb +62 -0
  241. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_verticalDatumParameters.rb +70 -0
  242. data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_verticalExtent.rb +62 -0
  243. data/lib/adiwg/mdtranslator/writers/simple_html/simple_html_writer.rb +44 -0
  244. data/lib/adiwg/mdtranslator/writers/simple_html/version.rb +19 -0
  245. data/lib/adiwg/mdtranslator_cli.rb +2 -2
  246. metadata +241 -125
  247. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_quality.rb +0 -181
  248. data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_dataQualityReport.rb +0 -95
  249. data/lib/adiwg/mdtranslator/writers/iso19115_1/version.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb462b0759a76f8884d8cefc07d1372da8a60c589a5cd49e57fce7d3f06f5c00
4
- data.tar.gz: 99ab44ea39cede67c810cc998bcec11e447b8b438f552966ff77ea15e038c405
3
+ metadata.gz: f456de4448d18685a212969b02c6195b206d8e461372b317fce02e0066de15d6
4
+ data.tar.gz: 42027d3093840bbd6a3a896000950bef3145d3518d1a41a372e02fc199f25701
5
5
  SHA512:
6
- metadata.gz: 310393021fe20a36d392a870b3b4edead47f956033db8dc8f7b556bef750338758bf5cfe15d0c06f7c8097fe9a6d2dfaf65469abbc5045517f3823bd48973362
7
- data.tar.gz: 2ad0835b09716d5fbda52c67bb4421b5bd6a29b02845c8d5ef3d18a6b89704408a42d7a2c6d7b442e1f7b92b70c7222ccf24f0db533261a813ffdb0128165f48
6
+ metadata.gz: d7af3c590f3c28b7f49e6192000ee20c289ce0718e644029c04b0b21d8258422dcb3e1d28183ba945bd3dafcf8cd191a3cc33f086a4e4f06b888b21096fd9159
7
+ data.tar.gz: 482f497b01253e0a7376023afafa051b821ed9dec53346a4e5237ae8b40dbfab0d5a9944333b948af56490c4e2e3ed0ae35d39d2485e378a0d6c833e2fd3bade
@@ -0,0 +1,14 @@
1
+ name: Tests
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v4
10
+ - uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
11
+ with:
12
+ ruby-version: "3.1" # Not needed with a .ruby-version file
13
+ - run: bundle install
14
+ - run: bundle exec rake
data/.gitignore CHANGED
@@ -4,7 +4,6 @@
4
4
  .bundle
5
5
  .config
6
6
  .yardoc
7
- Gemfile.lock
8
7
  InstalledFiles
9
8
  _yardoc
10
9
  coverage
@@ -22,3 +21,5 @@ tmp
22
21
  mkmf.log
23
22
  /.idea
24
23
  /.rake_tasks~
24
+ vendor/
25
+ *.DS_Store
data/Gemfile.lock ADDED
@@ -0,0 +1,86 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ adiwg-mdtranslator (2.19.0.pre.beta.7)
5
+ adiwg-mdcodes (= 2.9.2)
6
+ adiwg-mdjson_schemas (= 2.9.1)
7
+ builder (~> 3.2)
8
+ coderay (~> 1.1)
9
+ jbuilder (~> 2.5)
10
+ json (~> 2.0)
11
+ json-schema (~> 2.7)
12
+ kramdown (>= 1.13, < 3.0)
13
+ nokogiri (~> 1.15)
14
+ thor (~> 0.19)
15
+ uuidtools (~> 2.1)
16
+
17
+ GEM
18
+ remote: https://rubygems.org/
19
+ specs:
20
+ actionview (5.2.8.1)
21
+ activesupport (= 5.2.8.1)
22
+ builder (~> 3.1)
23
+ erubi (~> 1.4)
24
+ rails-dom-testing (~> 2.0)
25
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
26
+ activesupport (5.2.8.1)
27
+ concurrent-ruby (~> 1.0, >= 1.0.2)
28
+ i18n (>= 0.7, < 2)
29
+ minitest (~> 5.1)
30
+ tzinfo (~> 1.1)
31
+ addressable (2.8.5)
32
+ public_suffix (>= 2.0.2, < 6.0)
33
+ adiwg-mdcodes (2.9.2)
34
+ json (~> 2.0)
35
+ adiwg-mdjson_schemas (2.9.1)
36
+ builder (3.2.4)
37
+ coderay (1.1.3)
38
+ concurrent-ruby (1.2.2)
39
+ crass (1.0.6)
40
+ erubi (1.12.0)
41
+ i18n (1.14.1)
42
+ concurrent-ruby (~> 1.0)
43
+ jbuilder (2.11.5)
44
+ actionview (>= 5.0.0)
45
+ activesupport (>= 5.0.0)
46
+ json (2.6.3)
47
+ json-schema (2.8.1)
48
+ addressable (>= 2.4)
49
+ kramdown (2.4.0)
50
+ rexml
51
+ loofah (2.21.1)
52
+ crass (~> 1.0.2)
53
+ nokogiri (>= 1.5.9)
54
+ minitest (5.20.0)
55
+ nokogiri (1.15.5-arm64-darwin)
56
+ racc (~> 1.4)
57
+ nokogiri (1.15.5-x86_64-linux)
58
+ racc (~> 1.4)
59
+ public_suffix (4.0.7)
60
+ racc (1.7.3)
61
+ rails-dom-testing (2.1.1)
62
+ activesupport (>= 5.0.0)
63
+ minitest
64
+ nokogiri (>= 1.6)
65
+ rails-html-sanitizer (1.5.0)
66
+ loofah (~> 2.19, >= 2.19.1)
67
+ rake (13.1.0)
68
+ rexml (3.2.5)
69
+ thor (0.20.3)
70
+ thread_safe (0.3.6)
71
+ tzinfo (1.2.11)
72
+ thread_safe (~> 0.1)
73
+ uuidtools (2.2.0)
74
+
75
+ PLATFORMS
76
+ arm64-darwin-22
77
+ x86_64-linux
78
+
79
+ DEPENDENCIES
80
+ adiwg-mdtranslator!
81
+ bundler (~> 2)
82
+ minitest (~> 5)
83
+ rake (~> 13)
84
+
85
+ BUNDLED WITH
86
+ 2.4.21
data/Rakefile CHANGED
@@ -19,8 +19,8 @@ Rake::TestTask.new do |t|
19
19
  'test/writers/fgdc/tc*.rb',
20
20
  'test/writers/html/tc*.rb',
21
21
  'test/writers/iso19110/tc*.rb',
22
- 'test/writers/iso19115-1/tc*.rb',
23
22
  'test/writers/iso19115-2/tc*.rb',
23
+ 'test/writers/iso19115-3/tc*.rb',
24
24
  'test/writers/mdJson/tc*.rb',
25
25
  'test/writers/sbJson/tc*.rb',
26
26
  'test/translator/tc*.rb'
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.required_ruby_version = '>= 2.3'
27
27
 
28
28
  spec.add_development_dependency "bundler", "~> 2"
29
- spec.add_development_dependency "rake", "~> 10"
29
+ spec.add_development_dependency "rake", "~> 13"
30
30
  spec.add_development_dependency "minitest", "~> 5"
31
31
 
32
32
  spec.add_runtime_dependency "json", "~> 2.0"
@@ -34,11 +34,11 @@ Gem::Specification.new do |spec|
34
34
  spec.add_runtime_dependency "thor", "~> 0.19"
35
35
  spec.add_runtime_dependency "uuidtools", "~> 2.1"
36
36
  spec.add_runtime_dependency "json-schema", "~> 2.7"
37
- spec.add_runtime_dependency "adiwg-mdjson_schemas", "~> 2.8"
38
- spec.add_runtime_dependency "adiwg-mdcodes", "~> 2.8"
37
+ spec.add_runtime_dependency "adiwg-mdjson_schemas", "2.9.1"
38
+ spec.add_runtime_dependency "adiwg-mdcodes", "2.9.2"
39
39
  spec.add_runtime_dependency "jbuilder", "~> 2.5"
40
- spec.add_runtime_dependency "kramdown", "~> 1.13"
40
+ spec.add_runtime_dependency "kramdown", ">= 1.13", "< 3.0"
41
41
  spec.add_runtime_dependency "coderay", "~> 1.1"
42
- spec.add_runtime_dependency "nokogiri", "~> 1.7"
42
+ spec.add_runtime_dependency "nokogiri", "~> 1.15"
43
43
 
44
- end
44
+ end
@@ -513,6 +513,14 @@ class InternalMetadata
513
513
  }
514
514
  end
515
515
 
516
+ def newRangeElementDescription
517
+ {
518
+ name: nil,
519
+ definition: nil,
520
+ rangeElement: []
521
+ }
522
+ end
523
+
516
524
  def newImageDescription
517
525
  {
518
526
  illuminationElevationAngle: nil,
@@ -650,13 +658,22 @@ class InternalMetadata
650
658
  }
651
659
  end
652
660
 
661
+ def newQualityResultFile
662
+ {
663
+ fileName: nil,
664
+ fileType: nil,
665
+ fileDescription: nil,
666
+ fileFormat: {}
667
+ }
668
+ end
669
+
653
670
  def newCoverageResult
654
671
  {
655
672
  dateTime: nil,
656
673
  scope: {},
657
- spatialRepresentationType: {},
674
+ spatialRepresentationType: nil,
658
675
  spatialRepresentation: {},
659
- resultContent: [],
676
+ resultContentDescription: {},
660
677
  resourceFormat: {},
661
678
  resultFile: {}
662
679
  }
@@ -705,23 +722,22 @@ class InternalMetadata
705
722
 
706
723
  def newDataQualityReport
707
724
  {
708
- # standaloneQualityReportDetails: nil,
709
- conformanceResult: [],
710
- coverageResult: [],
711
- # derivedElementReport: [],
712
- descriptiveResult: [],
713
- evaluationMethod: {},
725
+ type: nil,
726
+ standaloneQualityReportDetails: nil,
714
727
  qualityMeasure: {},
728
+ evaluationMethod: {},
715
729
  quantitativeResult: [],
716
- # relatedElementReport: []
730
+ descriptiveResult: [],
731
+ conformanceResult: [],
732
+ coverageResult: [],
733
+ derivedElementReport: []
717
734
  }
718
735
  end
719
736
 
720
737
  def newStandaloneReport
721
738
  {
722
- reportReference: {},
723
739
  abstract: nil,
724
- elementReports: []
740
+ reportReference: {},
725
741
  }
726
742
  end
727
743
 
@@ -0,0 +1,149 @@
1
+ # Reader - fgdc to internal data structure
2
+ # unpack fgdc data quality
3
+
4
+ # History:
5
+ # Stan Smith 2017-08-15 original script
6
+
7
+ require 'nokogiri'
8
+ require 'adiwg/mdtranslator/internal/internal_metadata_obj'
9
+ require_relative 'module_lineage'
10
+
11
+ module ADIWG
12
+ module Mdtranslator
13
+ module Readers
14
+ module Fgdc
15
+
16
+ module DataQuality
17
+
18
+ def self.unpack(xDataQual, hMetadata, hDataQuality, hResponseObj)
19
+ intMetadataClass = InternalMetadata.new
20
+
21
+ hDataQuality[:scope] = intMetadataClass.newScope
22
+ hDataQuality[:scope][:scopeCode] = 'tabularDataset'
23
+
24
+ hDataQuality[:systemIdentifier] = {
25
+ uid: UUIDTools::UUID.random_create.to_s,
26
+ label: "CSDGM Data Quality"
27
+ }
28
+
29
+ # data quality 2.1 (attracc) - attribute accuracy
30
+ xAccuracy = xDataQual.xpath('./attracc')
31
+ accuracyReport = xAccuracy.xpath('./attraccr').text
32
+ report = intMetadataClass.newDataQualityReport
33
+ report[:type] = 'NonQuantitativeAttributeAccuracy'
34
+ descriptiveResult = intMetadataClass.newDescriptiveResult
35
+ descriptiveResult[:statement] = accuracyReport
36
+ report[:descriptiveResult] << descriptiveResult
37
+ hDataQuality[:report] << report
38
+
39
+ # data quality 2.1 (qattracc) - Quantitative Attribute Accuracy Assessment
40
+ xQuantitativeAccuracy = xDataQual.xpath('./qattracc')
41
+ unless xQuantitativeAccuracy.xpath('./attraccv').empty?
42
+ value = xQuantitativeAccuracy.xpath('./attraccv').text
43
+ report = intMetadataClass.newDataQualityReport
44
+ report[:type] = 'QuantitativeAttributeAccuracy'
45
+ quantitativeResult = intMetadataClass.newQuantitativeResult
46
+ quantitativeResult[:values] << value
47
+ report[:quantitativeResult] << quantitativeResult
48
+ hDataQuality[:report] << report
49
+ end
50
+
51
+ # data quality 2.2 (logic) - logical consistency (required) (not implemented)
52
+ xLogic = xDataQual.xpath('./logic')
53
+ if xLogic.empty?
54
+ hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: data quality logical consistency section is missing'
55
+ else
56
+ logic = xLogic.text
57
+ report = intMetadataClass.newDataQualityReport
58
+ report[:type] = 'ConceptualConsistency'
59
+ report[:qualityMeasure] = intMetadataClass.newQualityMeasure
60
+ report[:qualityMeasure][:description] = logic
61
+ hDataQuality[:report] << report
62
+ end
63
+
64
+ # data quality 2.3 (complete) - completion report (required)
65
+ xComplete = xDataQual.xpath('./complete')
66
+ if xComplete.empty?
67
+ hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: data quality completion report section is missing'
68
+ else
69
+ complete = xComplete.text
70
+ report = intMetadataClass.newDataQualityReport
71
+ report[:type] = 'CompletenessOmission'
72
+ descriptiveResult = intMetadataClass.newDescriptiveResult
73
+ descriptiveResult[:statement] = complete
74
+ report[:descriptiveResult] << descriptiveResult
75
+ hDataQuality[:report] << report
76
+ end
77
+
78
+ # data quality 2.4 (position) - positional accuracy
79
+ xPositionalAccuracy = xDataQual.xpath('./posacc')
80
+ unless xPositionalAccuracy.empty?
81
+ # horizontal positional accuracy
82
+ xHorizontal = xPositionalAccuracy.xpath('./horizpa')
83
+ unless xHorizontal.empty?
84
+ report = intMetadataClass.newDataQualityReport
85
+ report[:type] = 'AbsoluteExternalPositionalAccuracy'
86
+ unless xHorizontal.xpath('qhorizpa/horizpae').empty?
87
+ report[:qualityMeasure] = intMetadataClass.newQualityMeasure
88
+ report[:qualityMeasure][:description] = xHorizontal.xpath('qhorizpa/horizpae').text
89
+ name = 'Horizontal Positional Accuracy Report'
90
+ report[:qualityMeasure][:nameOfMeasure] << name
91
+ end
92
+ unless xHorizontal.xpath('horizpar').empty?
93
+ report[:evaluationMethod] = intMetadataClass.newEvaluationMethod
94
+ report[:evaluationMethod][:methodDescription] = xHorizontal.xpath('horizpar').text
95
+ end
96
+ unless xHorizontal.xpath('qhorizpa/horizpav').empty?
97
+ quantitativeResult = intMetadataClass.newQuantitativeResult
98
+ value = xHorizontal.xpath('qhorizpa/horizpav').text
99
+ quantitativeResult[:values] << value
100
+ report[:quantitativeResult] << quantitativeResult
101
+ end
102
+ hDataQuality[:report] << report
103
+ end
104
+ # vertical positional accuracy
105
+ xVertical = xPositionalAccuracy.xpath('./vertacc')
106
+ unless xVertical.empty?
107
+ report = intMetadataClass.newDataQualityReport
108
+ report[:type] = 'AbsoluteExternalPositionalAccuracy'
109
+ unless xVertical.xpath('qvertpa/vertacce').empty?
110
+ report[:qualityMeasure] = intMetadataClass.newQualityMeasure
111
+ report[:qualityMeasure][:description] = xVertical.xpath('qvertpa/vertacce').text
112
+ name = 'Vertical Positional Accuracy Report'
113
+ report[:qualityMeasure][:nameOfMeasure] << name
114
+ end
115
+ unless xVertical.xpath('vertaccr').empty?
116
+ report[:evaluationMethod] = intMetadataClass.newEvaluationMethod
117
+ report[:evaluationMethod][:methodDescription] = xVertical.xpath('vertaccr').text
118
+ end
119
+ unless xVertical.xpath('qvertpa/vertaccv').empty?
120
+ quantitativeResult = intMetadataClass.newQuantitativeResult
121
+ value = xVertical.xpath('qvertpa/vertaccv').text
122
+ quantitativeResult[:values] << value
123
+ report[:quantitativeResult] << quantitativeResult
124
+ end
125
+ hDataQuality[:report] << report
126
+ end
127
+ end
128
+
129
+ # data quality 2.5 (lineage) - lineage (required)
130
+ xLineage = xDataQual.xpath('./lineage')
131
+ unless xLineage.empty?
132
+ hLineage = Lineage.unpack(xLineage, hResponseObj)
133
+ unless hLineage.nil?
134
+ hMetadata[:lineageInfo] << hLineage
135
+ end
136
+ end
137
+ if xLineage.nil?
138
+ hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: data quality lineage section is missing'
139
+ end
140
+
141
+ return hDataQuality
142
+ end
143
+
144
+ end
145
+
146
+ end
147
+ end
148
+ end
149
+ end
@@ -10,7 +10,7 @@ require 'uuidtools'
10
10
  require 'adiwg/mdtranslator/internal/internal_metadata_obj'
11
11
  require_relative '../version'
12
12
  require_relative 'module_identification'
13
- require_relative 'module_quality'
13
+ require_relative 'module_dataQuality'
14
14
  require_relative 'module_spatialOrganization'
15
15
  require_relative 'module_spatialReference'
16
16
  require_relative 'module_entityAttribute'
@@ -70,7 +70,7 @@ module ADIWG
70
70
  # metadata (dataqual 2) - data quality
71
71
  xDataQual = xMetadata.xpath('./dataqual')
72
72
  unless xDataQual.empty?
73
- dataQuality = Quality.unpack(xDataQual, hMetadata, hDataQuality, hResponseObj)
73
+ dataQuality = DataQuality.unpack(xDataQual, hMetadata, hDataQuality, hResponseObj)
74
74
  hMetadata[:dataQuality] << dataQuality
75
75
  end
76
76
 
@@ -8,7 +8,7 @@ module ADIWG
8
8
 
9
9
  module ConformanceResult
10
10
 
11
- def self.unpack(hConformanceResult, responseObj, inContext = nil)
11
+ def self.unpack(hConformanceResult, responseObj)
12
12
 
13
13
  intMetadataClass = InternalMetadata.new
14
14
  intConformanceResult = intMetadataClass.newConformanceResult
@@ -1,5 +1,8 @@
1
1
  require_relative 'module_scope'
2
2
  require_relative 'module_spatialRepresentation'
3
+ require_relative 'module_qualityResultFile'
4
+ require_relative 'module_format'
5
+ require_relative 'module_coverageDescription'
3
6
 
4
7
  module ADIWG
5
8
  module Mdtranslator
@@ -7,7 +10,7 @@ module ADIWG
7
10
  module MdJson
8
11
 
9
12
  module CoverageResult
10
- def self.unpack(hResult, responseObj, inContext)
13
+ def self.unpack(hResult, responseObj)
11
14
 
12
15
  intMetadataClass = InternalMetadata.new
13
16
  intResult = intMetadataClass.newCoverageResult
@@ -25,7 +28,6 @@ module ADIWG
25
28
 
26
29
 
27
30
  # spatialRepresentationType
28
- # https://github.com/ISO-TC211/XML/blob/master/standards.iso.org/iso/19115/resources/Codelists/gml/MD_SpatialRepresentationTypeCode.xml
29
31
  if hResult.has_key?('spatialRepresentationType')
30
32
  intResult[:spatialRepresentationType] = hResult['spatialRepresentationType']
31
33
  end
@@ -38,21 +40,20 @@ module ADIWG
38
40
 
39
41
 
40
42
  # resultContent
41
- if hResult.has_key?('resultContent')
42
- intResult[:resultContent] = hResult['resultContent']
43
+ if hResult.has_key?('resultContentDescription')
44
+ intResult[:resultContentDescription] = CoverageDescription.unpack(hResult['resultContentDescription'], responseObj)
43
45
  end
44
46
 
45
47
 
46
48
  # resourceFormat
47
49
  if hResult.has_key?('resourceFormat')
48
- intResult[:resourceFormat] = hResult['resourceFormat']
50
+ intResult[:resourceFormat] = Format.unpack(hResult['resourceFormat'], responseObj)
49
51
  end
50
52
 
51
53
 
52
54
  # resultFile
53
- resultFile
54
55
  if hResult.has_key?('resultFile')
55
- intResult[:resultFile] = hResult['resultFile']
56
+ intResult[:resultFile] = QualiltyResultFile.unpack(hResult['resultFile'], responseObj)
56
57
  end
57
58
 
58
59
  return intResult
@@ -38,11 +38,11 @@ module ADIWG
38
38
  if hDataQuality.has_key?('standaloneQualityReport')
39
39
  hObject = hDataQuality['standaloneQualityReport']
40
40
  unless hObject.empty?
41
- intDataQuality[:standaloneQualityReport] = {}
42
- intDataQuality[:standaloneQualityReport][:abstract] = hObject["abstract"]
41
+ intDataQuality[:standaloneReport] = {}
42
+ intDataQuality[:standaloneReport][:abstract] = hObject["abstract"]
43
43
 
44
- unless hObject["reportRefereence"].nil? || hObject["reportReference"].empty?
45
- intDataQuality[:standaloneQualityReport][:reportReference] = Citation.unpack(hObject["reportReference"], responseObj, inContext)
44
+ unless hObject["reportReference"].nil? || hObject["reportReference"].empty?
45
+ intDataQuality[:standaloneReport][:reportReference] = Citation.unpack(hObject["reportReference"], responseObj, inContext)
46
46
  end
47
47
  end
48
48
  end
@@ -4,6 +4,7 @@ require_relative 'module_coverageResult'
4
4
  require_relative 'module_descriptiveResult'
5
5
  require_relative 'module_quantitativeResult'
6
6
  require_relative 'module_evaluationMethod'
7
+ require_relative 'module_qualityMeasure'
7
8
 
8
9
  module ADIWG
9
10
  module Mdtranslator
@@ -28,6 +29,10 @@ module ADIWG
28
29
 
29
30
  intReport[:type] = hReport["type"]
30
31
 
32
+ if hReport.has_key?('standaloneQualityReportDetails')
33
+ intReport[:standaloneQualityReportDetails] = hReport['standaloneQualityReportDetails']
34
+ end
35
+
31
36
  if hReport.has_key?('conformanceResult')
32
37
  hReport['conformanceResult'].each do |item|
33
38
  hReturn = ConformanceResult.unpack(item, responseObj)
@@ -68,23 +73,10 @@ module ADIWG
68
73
  end
69
74
 
70
75
  if hReport.has_key?('qualityMeasure')
71
- qualityMeasure = hReport['qualityMeasure']
72
- identifier = qualityMeasure['identifier']
73
-
74
- intReport[:qualityMeasure] = {}
75
-
76
- if identifier
77
- intReport[:qualityMeasure][:identifier] = {
78
- identifier: identifier['identifier'],
79
- namespace: identifier['namespace'],
80
- version: identifier['version'],
81
- description: identifier['description']
82
- }
83
- end
76
+ hReturn = QualityMeasure.unpack(hReport['qualityMeasure'], responseObj)
84
77
 
85
- if qualityMeasure
86
- intReport[:qualityMeasure][:name] = qualityMeasure['name']
87
- intReport[:qualityMeasure][:description] = qualityMeasure['description']
78
+ unless hReturn.nil?
79
+ intReport[:qualityMeasure] = hReturn
88
80
  end
89
81
  end
90
82
 
@@ -6,7 +6,7 @@ module ADIWG
6
6
  module MdJson
7
7
 
8
8
  module EvaluationMethod
9
- def self.unpack(hMethod, responseObj, inContext = nil)
9
+ def self.unpack(hMethod, responseObj)
10
10
 
11
11
  intMetadataClass = InternalMetadata.new
12
12
  intMethod = intMetadataClass.newEvaluationMethod
@@ -34,21 +34,21 @@ module ADIWG
34
34
 
35
35
  haveLegal = false
36
36
 
37
- # legal constraint - use constraint []
38
- if hLegalCon.has_key?('useConstraint')
39
- hLegalCon['useConstraint'].each do |item|
37
+ # legal constraint - access constraint []
38
+ if hLegalCon.has_key?('accessConstraint')
39
+ hLegalCon['accessConstraint'].each do |item|
40
40
  unless item == ''
41
- intLegalCon[:useCodes] << item
41
+ intLegalCon[:accessCodes] << item
42
42
  haveLegal = true
43
43
  end
44
44
  end
45
45
  end
46
46
 
47
- # legal constraint - access constraint []
48
- if hLegalCon.has_key?('accessConstraint')
49
- hLegalCon['accessConstraint'].each do |item|
47
+ # legal constraint - use constraint []
48
+ if hLegalCon.has_key?('useConstraint')
49
+ hLegalCon['useConstraint'].each do |item|
50
50
  unless item == ''
51
- intLegalCon[:accessCodes] << item
51
+ intLegalCon[:useCodes] << item
52
52
  haveLegal = true
53
53
  end
54
54
  end
@@ -0,0 +1,34 @@
1
+ require_relative 'module_identifier'
2
+
3
+ module ADIWG
4
+ module Mdtranslator
5
+ module Readers
6
+ module MdJson
7
+
8
+ module QualityMeasure
9
+ def self.unpack(hQualityMeasure, responseObj)
10
+
11
+ intMetadataClass = InternalMetadata.new
12
+ intQualityMeasure = intMetadataClass.newQualityMeasure
13
+
14
+ intQualityMeasure[:description] = hQualityMeasure['description']
15
+
16
+ if hQualityMeasure.has_key?('name')
17
+ intQualityMeasure[:nameOfMeasure] = hQualityMeasure['name']
18
+ end
19
+
20
+ if hQualityMeasure.has_key?('identifier')
21
+ hReturn = Identifier.unpack(hQualityMeasure['identifier'], responseObj)
22
+ unless hReturn.nil?
23
+ intQualityMeasure[:identifier] = hReturn
24
+ end
25
+ end
26
+
27
+ return intQualityMeasure
28
+
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end