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
@@ -0,0 +1,40 @@
1
+ # HTML writer
2
+ # resource format
3
+
4
+ # History:
5
+ # Stan Smith 2015-03-24 original script
6
+
7
+ module ADIWG
8
+ module Mdtranslator
9
+ module Writers
10
+ module Simple_html
11
+
12
+ class MdHtmlResourceFormat
13
+ def initialize(html)
14
+ @html = html
15
+ end
16
+
17
+ def writeHtml(hResFormat)
18
+
19
+ # resource format - name - required
20
+ unless hResFormat[:formatName].nil?
21
+ @html.em('Resource Format: ')
22
+ @html.text!(hResFormat[:formatName])
23
+ end
24
+
25
+ # resource format - version
26
+ unless !hResFormat[:formatVersion].nil?
27
+ @html.em(' Version: ')
28
+ @html.text!(hResFormat[:formatVersion])
29
+ end
30
+
31
+ @html.br
32
+
33
+ end # writeHtml
34
+
35
+ end # class
36
+
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,485 @@
1
+ # HTML writer
2
+ # resource information
3
+
4
+ # History:
5
+ # Stan Smith 2018-10-17 refactor for mdJson schema 2.6.0
6
+ # Stan Smith 2018-04-06 changed taxonomy to an array
7
+ # Stan Smith 2017-05-19 removed iso topicCategory (now presented as keywords)
8
+ # Stan Smith 2017-03-25 refactored for mdTranslator 2.0
9
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
10
+ # Stan Smith 2015-03-24 original script
11
+
12
+ require_relative 'html_resourceType'
13
+ require_relative 'html_citation'
14
+ require_relative 'html_usage'
15
+ require_relative 'html_responsibility'
16
+ require_relative 'html_temporalExtent'
17
+ require_relative 'html_duration'
18
+ require_relative 'html_spatialReference'
19
+ require_relative 'html_spatialRepresentation'
20
+ require_relative 'html_spatialResolution'
21
+ require_relative 'html_keyword'
22
+ require_relative 'html_taxonomy'
23
+ require_relative 'html_graphic'
24
+ require_relative 'html_constraint'
25
+ require_relative 'html_coverageInfo'
26
+ require_relative 'html_locale'
27
+ require_relative 'html_format'
28
+ require_relative 'html_maintenance'
29
+ # require_relative 'html_extent'
30
+
31
+ module ADIWG
32
+ module Mdtranslator
33
+ module Writers
34
+ module Simple_html
35
+
36
+ class Html_ResourceInfo
37
+
38
+ def initialize(html)
39
+ @html = html
40
+ end
41
+
42
+ def writeHtml(hResource)
43
+
44
+ # classes used
45
+ typeClass = Html_ResourceType.new(@html)
46
+ citationClass = Html_Citation.new(@html)
47
+ usageClass = Html_Usage.new(@html)
48
+ responsibilityClass = Html_Responsibility.new(@html)
49
+ temporalClass = Html_TemporalExtent.new(@html)
50
+ durationClass = Html_Duration.new(@html)
51
+ referenceClass = Html_SpatialReference.new(@html)
52
+ representationClass = Html_SpatialRepresentation.new(@html)
53
+ resolutionClass = Html_SpatialResolution.new(@html)
54
+ keywordClass = Html_Keyword.new(@html)
55
+ taxonomyClass = Html_Taxonomy.new(@html)
56
+ graphicClass = Html_Graphic.new(@html)
57
+ constraintClass = Html_Constraint.new(@html)
58
+ coverageClass = Html_CoverageInfo.new(@html)
59
+ localeClass = Html_Locale.new(@html)
60
+ formatClass = Html_Format.new(@html)
61
+ maintenanceClass = Html_Maintenance.new(@html)
62
+ # extentClass = Html_Extent.new(@html)
63
+
64
+ # resource - type [] {resourceType}
65
+ hResource[:resourceTypes].each do |hType|
66
+ typeClass.writeHtml(hType)
67
+ end
68
+
69
+ # resource - status [] {statusCode}
70
+ hResource[:status].each do |status|
71
+ @html.em('Status:')
72
+ @html.text!(status)
73
+ @html.br
74
+ end
75
+
76
+ # resource - citation {citation}
77
+ unless hResource[:citation].empty?
78
+ @html.div do
79
+ @html.h3('Citation', {'id' => 'resourceInfo-citation', 'class' => 'h3'})
80
+ @html.div(:class => 'block') do
81
+ citationClass.writeHtml(hResource[:citation])
82
+ end
83
+ end
84
+ end
85
+
86
+ # resource - abstract
87
+ unless hResource[:abstract].nil? && hResource[:shortAbstract].nil?
88
+ @html.div do
89
+ @html.h3('Abstract', {'id' => 'resourceInfo-abstract', 'class' => 'h3'})
90
+ @html.div(:class => 'block') do
91
+
92
+ # short abstract
93
+ unless hResource[:shortAbstract].nil?
94
+ @html.em('Short Abstract:')
95
+ @html.div(:class => 'block') do
96
+ @html.text!(hResource[:shortAbstract])
97
+ end
98
+ @html.br
99
+ end
100
+
101
+ # full abstract
102
+ unless hResource[:abstract].nil?
103
+ @html.em('Full Abstract:')
104
+ @html.div(:class => 'block') do
105
+ @html.text!(hResource[:abstract])
106
+ end
107
+ @html.br
108
+
109
+ end
110
+
111
+ end
112
+ end
113
+ end
114
+
115
+ # resource - purpose
116
+ unless hResource[:purpose].nil? && hResource[:resourceUsages].empty?
117
+ @html.div do
118
+ @html.h3('Purpose, Usage, and Limitations', {'id' => 'resourceInfo-purpose', 'class' => 'h3'})
119
+ @html.div(:class => 'block') do
120
+
121
+ # purpose
122
+ unless hResource[:purpose].nil?
123
+ @html.em('Purpose:')
124
+ @html.div(:class => 'block') do
125
+ @html.text!(hResource[:purpose])
126
+ end
127
+ @html.br
128
+ end
129
+
130
+ # usage and limitation
131
+ unless hResource[:resourceUsages].empty?
132
+ counter = 0
133
+ hResource[:resourceUsages].each do |hUsage|
134
+ counter += 1
135
+ @html.div do
136
+ @html.div('Usage and Limitation '+counter.to_s, {'class' => 'h5'})
137
+ @html.div(:class => 'block') do
138
+ usageClass.writeHtml(hUsage)
139
+ end
140
+ end
141
+ end
142
+ end
143
+
144
+ end
145
+ end
146
+ end
147
+
148
+ # resource - graphic overview [] {graphicOverview}
149
+ unless hResource[:graphicOverviews].empty?
150
+ @html.div do
151
+ @html.h3('Graphic Overviews', {'id' => 'resourceInfo-overview', 'class' => 'h3'})
152
+ @html.div(:class => 'block') do
153
+ counter = 0
154
+ hResource[:graphicOverviews].each do |hGraphic|
155
+ counter += 1
156
+ @html.div do
157
+ @html.div('Overview '+counter.to_s, 'class' => 'h5')
158
+ @html.div(:class => 'block') do
159
+ graphicClass.writeHtml(hGraphic)
160
+ end
161
+ end
162
+ end
163
+ end
164
+ end
165
+ end
166
+
167
+ # resource - point of contact [] {responsibility}
168
+ unless hResource[:pointOfContacts].empty? && hResource[:credits].empty?
169
+ @html.div do
170
+ @html.h3('Resource Contacts', {'id' => 'resourceInfo-contacts', 'class' => 'h3'})
171
+ @html.div(:class => 'block') do
172
+
173
+ # contacts - responsibility
174
+ hResource[:pointOfContacts].each do |hContact|
175
+ @html.div do
176
+ @html.div(hContact[:roleName], 'class' => 'h5')
177
+ @html.div(:class => 'block') do
178
+ responsibilityClass.writeHtml(hContact)
179
+ end
180
+ end
181
+ end
182
+
183
+ # contacts - credits
184
+ unless hResource[:credits].empty?
185
+ @html.div do
186
+ @html.div('Other Credits', 'class' => 'h5')
187
+ @html.div(:class => 'block') do
188
+ hResource[:credits].each do |credit|
189
+ @html.em('Credit: ')
190
+ @html.text!(credit)
191
+ @html.br
192
+ end
193
+ end
194
+ end
195
+ end
196
+
197
+ end
198
+ end
199
+ end
200
+
201
+ # resource - temporal information
202
+ unless hResource[:timePeriod].empty? && hResource[:temporalResolutions].empty?
203
+ @html.div do
204
+ @html.h3('Temporal Information', {'id' => 'resourceInfo-temporal', 'class' => 'h3'})
205
+ @html.div(:class => 'block') do
206
+
207
+ # time period {timePeriod}
208
+ unless hResource[:timePeriod].empty?
209
+ temporalObj = {}
210
+ temporalObj[:timeInstant] = {}
211
+ temporalObj[:timePeriod] = hResource[:timePeriod]
212
+ temporalClass.writeHtml(temporalObj)
213
+ end
214
+
215
+ # temporal resolution [] {resolution}
216
+ unless hResource[:temporalResolutions].empty?
217
+ hResource[:temporalResolutions].each do |hResolution|
218
+ @html.div do
219
+ @html.div('Resolution', 'class' => 'h5')
220
+ @html.div(:class => 'block') do
221
+ durationClass.writeHtml(hResolution)
222
+ end
223
+ end
224
+ end
225
+ end
226
+
227
+ end
228
+ end
229
+ end
230
+
231
+ # resource - spatial information
232
+ unless hResource[:spatialReferenceSystems].empty? &&
233
+ hResource[:spatialRepresentationTypes].empty?
234
+ hResource[:spatialRepresentations].empty?
235
+ hResource[:spatialResolutions].empty?
236
+ @html.div do
237
+ @html.h3('Spatial Information', {'id' => 'resourceInfo-spatial', 'class' => 'h3'})
238
+ @html.div(:class => 'block') do
239
+
240
+ # representation type [] {spatialRepresentation}
241
+ hResource[:spatialRepresentationTypes].each do |hRepType|
242
+ @html.em('Spatial Representation Type: ')
243
+ @html.text!(hRepType)
244
+ @html.br
245
+ end
246
+
247
+ # spatial resolution [] {resolution}
248
+ unless hResource[:spatialResolutions].empty?
249
+ @html.div do
250
+ @html.div('Spatial Resolutions', {'class' => 'h5'})
251
+ @html.div(:class => 'block') do
252
+
253
+ # keep like resolution types together
254
+ # find all scale factors
255
+ hResource[:spatialResolutions].each do |hResolution|
256
+ unless hResolution[:scaleFactor].nil?
257
+ resolutionClass.writeHtml(hResolution)
258
+ end
259
+ end
260
+
261
+ # find all measures
262
+ hResource[:spatialResolutions].each do |hResolution|
263
+ unless hResolution[:measure].empty?
264
+ resolutionClass.writeHtml(hResolution)
265
+ end
266
+ end
267
+
268
+ # find all coordinate resolutions
269
+ hResource[:spatialResolutions].each do |hResolution|
270
+ unless hResolution[:coordinateResolution].empty?
271
+ resolutionClass.writeHtml(hResolution)
272
+ end
273
+ end
274
+
275
+ # find all bearing distance resolutions
276
+ hResource[:spatialResolutions].each do |hResolution|
277
+ unless hResolution[:bearingDistanceResolution].empty?
278
+ resolutionClass.writeHtml(hResolution)
279
+ end
280
+ end
281
+
282
+ # find all geographic resolutions
283
+ hResource[:spatialResolutions].each do |hResolution|
284
+ unless hResolution[:geographicResolution].empty?
285
+ resolutionClass.writeHtml(hResolution)
286
+ end
287
+ end
288
+
289
+ end
290
+ end
291
+ end
292
+
293
+ # reference system [] {spatialReference}
294
+ hResource[:spatialReferenceSystems].each do |hRefSystem|
295
+ @html.div do
296
+ @html.div('Spatial Reference System', {'class' => 'h5'})
297
+ @html.div(:class => 'block') do
298
+ referenceClass.writeHtml(hRefSystem)
299
+ end
300
+ end
301
+ end
302
+
303
+ # spatial representation [] {spatialRepresentation}
304
+ hResource[:spatialRepresentations].each do |hRepresentation|
305
+ representationClass.writeHtml(hRepresentation)
306
+ end
307
+
308
+ end
309
+ end
310
+ end
311
+
312
+ # # resource - extent [] {extent}
313
+ # unless hResource[:extents].empty?
314
+ # @html.div do
315
+ # @html.h3('Spatial, Temporal, and Vertical Extents', {'id' => 'resourceInfo-extent', 'class' => 'h3'})
316
+ # @html.div(:class => 'block') do
317
+ # hResource[:extents].each do |hExtent|
318
+ # @html.div do
319
+ # @html.h5('Extent', {'class' => 'h5'})
320
+ # @html.div(:class => 'block') do
321
+ # extentClass.writeHtml(hExtent)
322
+ # end
323
+ # end
324
+ # end
325
+ # end
326
+ # end
327
+ # end
328
+
329
+ # resource - keywords [] {keyword}
330
+ unless hResource[:keywords].empty?
331
+ @html.div do
332
+ @html.h3('Keywords', {'id' => 'resourceInfo-keyword', 'class' => 'h3'})
333
+ @html.div(:class => 'block') do
334
+ hResource[:keywords].each do |hKeyword|
335
+ keywordClass.writeHtml(hKeyword)
336
+ end
337
+ end
338
+ end
339
+ end
340
+
341
+ # resource - taxonomy {taxonomy}
342
+ unless hResource[:taxonomy].empty?
343
+ @html.div do
344
+ @html.h3('Taxonomy', {'id' => 'resourceInfo-taxonomy', 'class' => 'h3'})
345
+ @html.div(:class => 'block') do
346
+ counter = 0
347
+ hResource[:taxonomy].each do |hTaxonomy|
348
+ counter += 1
349
+ @html.div do
350
+ @html.div('Taxonomic Structure '+counter.to_s, 'class' => 'h5')
351
+ @html.div(:class => 'block') do
352
+ taxonomyClass.writeHtml(hTaxonomy)
353
+ end
354
+ end
355
+ end
356
+ end
357
+ end
358
+ end
359
+
360
+ # resource - constraints [] {constraint}
361
+ unless hResource[:constraints].empty?
362
+ @html.div do
363
+ @html.h3('Constraints', {'id' => 'resourceInfo-constraint', 'class' => 'h3'})
364
+ @html.div(:class => 'block') do
365
+ hResource[:constraints].each do |hConstraint|
366
+ @html.div do
367
+ @html.div(hConstraint[:type].capitalize+' Constraint', {'class' => 'h5'})
368
+ @html.div(:class => 'block') do
369
+ constraintClass.writeHtml(hConstraint)
370
+ end
371
+ end
372
+ end
373
+ end
374
+ end
375
+ end
376
+
377
+ # resource - coverage description [] {coverageInfo}
378
+ unless hResource[:coverageDescriptions].empty?
379
+ @html.div do
380
+ @html.h3('Coverage Description', {'id' => 'resourceInfo-Coverage', 'class' => 'h3'})
381
+ @html.div(:class => 'block') do
382
+ hResource[:coverageDescriptions].each do |hCoverage|
383
+ @html.div do
384
+ @html.div(hCoverage[:coverageName], {'class' => 'h5'})
385
+ @html.div(:class => 'block') do
386
+ coverageClass.writeHtml(hCoverage)
387
+ end
388
+ end
389
+ end
390
+ end
391
+ end
392
+ end
393
+
394
+ # resource - locale
395
+ unless hResource[:defaultResourceLocale].empty? && hResource[:otherResourceLocales].empty?
396
+ @html.div do
397
+ @html.h3('Resource Locales', {'id' => 'resourceInfo-locale', 'class' => 'h3'})
398
+ @html.div(:class => 'block') do
399
+
400
+ # default resource locales {locale}
401
+ unless hResource[:defaultResourceLocale].empty?
402
+ @html.div do
403
+ @html.div('Default Locale', {'class' => 'h5'})
404
+ @html.div(:class => 'block') do
405
+ localeClass.writeHtml(hResource[:defaultResourceLocale])
406
+ end
407
+ end
408
+ end
409
+
410
+ # other resource locales [] {locale}
411
+ hResource[:otherResourceLocales].each do |hLocale|
412
+ @html.div do
413
+ @html.div('Other Locale', {'class' => 'h5'})
414
+ @html.div(:class => 'block') do
415
+ localeClass.writeHtml(hLocale)
416
+ end
417
+ end
418
+ end
419
+
420
+ end
421
+ end
422
+ end
423
+
424
+ # resource - formats [] {format}
425
+ unless hResource[:resourceFormats].empty?
426
+ @html.div do
427
+ @html.h3('Resource Formats', {'id' => 'resourceInfo-format', 'class' => 'h3'})
428
+ @html.div(:class => 'block') do
429
+ hResource[:resourceFormats].each do |hFormat|
430
+ @html.div do
431
+ @html.h5('Format', {'class' => 'h5'})
432
+ @html.div(:class => 'block') do
433
+ formatClass.writeHtml(hFormat)
434
+ end
435
+ end
436
+ end
437
+ end
438
+ end
439
+ end
440
+
441
+ # resource - supplemental information
442
+ unless hResource[:resourceMaintenance].empty? &&
443
+ hResource[:environmentDescription].nil? &&
444
+ hResource[:supplementalInfo].nil?
445
+ @html.div do
446
+ @html.h3('Supplemental Information', {'id' => 'resourceInfo-supplemental', 'class' => 'h3'})
447
+ @html.div(:class => 'block') do
448
+
449
+ # supplemental - maintenance [] {maintenance}
450
+ hResource[:resourceMaintenance].each do |hMaint|
451
+ @html.div do
452
+ @html.div('Resource Maintenance', {'class' => 'h5'})
453
+ @html.div(:class => 'block') do
454
+ maintenanceClass.writeHtml(hMaint)
455
+ end
456
+ end
457
+ end
458
+
459
+ # supplemental - environment description
460
+ unless hResource[:environmentDescription].nil?
461
+ @html.em('Environment Description:')
462
+ @html.div(:class => 'block') do
463
+ @html.text!(hResource[:environmentDescription])
464
+ end
465
+ end
466
+
467
+ # supplemental - supplemental information
468
+ unless hResource[:supplementalInfo].nil?
469
+ @html.em('Supplemental Information:')
470
+ @html.div(:class => 'block') do
471
+ @html.text!(hResource[:supplementalInfo])
472
+ end
473
+ end
474
+
475
+ end
476
+ end
477
+ end
478
+
479
+ end # writeHtml
480
+ end # Html_ResourceInfo
481
+
482
+ end
483
+ end
484
+ end
485
+ end
@@ -0,0 +1,38 @@
1
+ # HTML writer
2
+ # resource type
3
+
4
+ # History:
5
+ # Stan Smith 2017-05-24 Fixed problem with nil name
6
+ # Stan Smith 2015-03-25 original script
7
+
8
+ module ADIWG
9
+ module Mdtranslator
10
+ module Writers
11
+ module Simple_html
12
+
13
+ class Html_ResourceType
14
+
15
+ def initialize(html)
16
+ @html = html
17
+ end
18
+
19
+ def writeHtml(hType)
20
+
21
+ # resource type - (required)
22
+ unless hType[:type].nil?
23
+ @html.em('Resource Type: ')
24
+ @html.text!(hType[:type])
25
+ unless hType[:name].nil?
26
+ @html.em(' Name: ')
27
+ @html.text!(hType[:name])
28
+ end
29
+ @html.br
30
+ end
31
+
32
+ end # writeHtml
33
+ end # Html_ResourceType
34
+
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,81 @@
1
+ # HTML writer
2
+ # responsible party
3
+
4
+ # History:
5
+ # Stan Smith 2017-03-23 refactored for mdTranslator 2.0
6
+ # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
7
+ # Stan Smith 2015-03-24 original script
8
+
9
+ # require_relative 'html_extent'
10
+
11
+ module ADIWG
12
+ module Mdtranslator
13
+ module Writers
14
+ module Simple_html
15
+
16
+ class Html_Responsibility
17
+ def initialize(html)
18
+ @html = html
19
+ end
20
+
21
+ def writeHtml(hResponsibility)
22
+
23
+ # classes used
24
+ # extentClass = Html_Extent.new(@html)
25
+
26
+ # responsibility - role parties
27
+ hResponsibility[:parties].each do |hParty|
28
+ hContact = Html_Document.getContact(hParty[:contactId])
29
+ @html.div do
30
+ @html.div(hContact[:name], 'class' => 'h5')
31
+ @html.div(:class => 'block') do
32
+
33
+ # party - contact ID
34
+ @html.em('Contact ID: ')
35
+ @html.a(hContact[:contactId], 'href' => '#CID_'+hContact[:contactId])
36
+ @html.br
37
+
38
+ # party - contact type
39
+ unless hContact[:contactType].nil?
40
+ @html.em('Contact Type: ')
41
+ @html.text!(hContact[:contactType])
42
+ @html.br
43
+ end
44
+
45
+ if hContact[:isOrganization]
46
+ hParty[:organizationMembers].each do |memberId|
47
+ hMemberContact = Html_Document.getContact(memberId)
48
+ @html.em('has Member: ')
49
+ @html.a(hMemberContact[:name], 'href' => '#CID_'+ memberId)
50
+ @html.br
51
+ end
52
+ else
53
+ hMemberContact = Html_Document.getContact(hContact[:contactId])
54
+ unless hMemberContact[:positionName].nil?
55
+ @html.em('Position Name: ')
56
+ @html.text!(hMemberContact[:positionName])
57
+ @html.br
58
+ end
59
+ end
60
+
61
+ end
62
+ end
63
+ end
64
+
65
+ # # responsibility - role extent [] {extent}
66
+ # hResponsibility[:roleExtents].each do |hExtent|
67
+ # @html.div do
68
+ # @html.h5('Extent', {'class' => 'h5'})
69
+ # @html.div(:class => 'block') do
70
+ # extentClass.writeHtml(hExtent)
71
+ # end
72
+ # end
73
+ # end
74
+
75
+ end # writeHtml
76
+ end # Html_Responsibility
77
+
78
+ end
79
+ end
80
+ end
81
+ end