lib/adiwg/mdtranslator/writers/html/sections/html_body.rb in adiwg-mdtranslator-2.18.0rc3 vs lib/adiwg/mdtranslator/writers/html/sections/html_body.rb in adiwg-mdtranslator-2.18.0rc4
- old
+ new
@@ -10,10 +10,11 @@
# Stan Smith 2015-03-23 original script
require_relative 'html_contact'
require_relative 'html_metadataInfo'
require_relative 'html_resourceInfo'
+require_relative 'html_dataQuality'
require_relative 'html_lineage'
require_relative 'html_distribution'
require_relative 'html_associatedResource'
require_relative 'html_additionalDocumentation'
require_relative 'html_funding'
@@ -36,10 +37,11 @@
# classes used
metaInfoClass = Html_MetadataInfo.new(@html)
contactClass = Html_Contact.new(@html)
resourceClass = Html_ResourceInfo.new(@html)
+ dataQualityClass = Html_DataQuality.new(@html)
lineageClass = Html_Lineage.new(@html)
distributionClass = Html_Distribution.new(@html)
associatedClass = Html_AssociatedResource.new(@html)
additionalClass = Html_AdditionalDocumentation.new(@html)
fundingClass = Html_Funding.new(@html)
@@ -49,10 +51,11 @@
# make sections of the internal data store convenient
hSchema = intObj[:schema]
aContacts = intObj[:contacts]
hMetaInfo = intObj[:metadata][:metadataInfo]
hResourceInfo = intObj[:metadata][:resourceInfo]
+ aDataQuality = intObj[:metadata][:dataQuality]
aLineage = intObj[:metadata][:lineageInfo]
aDistribution = intObj[:metadata][:distributorInfo]
aAssociated = intObj[:metadata][:associatedResources]
aAdditional = intObj[:metadata][:additionalDocuments]
aFunding = intObj[:metadata][:funding]
@@ -156,9 +159,20 @@
@html.summary('Resource Information', {'id' => 'body-resourceInfo', 'class' => 'h2'})
@html.section(:class => 'block') do
resourceClass.writeHtml(hResourceInfo)
end
@html.hr
+ end
+ end
+
+ unless aDataQuality.nil? || aDataQuality.empty?
+ @html.details do
+ @html.summary('Data Quality', {'id' => 'body-dataQuality', 'class' => 'h2'})
+ aDataQuality.each do |hDataQuality|
+ @html.section(:class => 'block') do
+ dataQualityClass.writeHtml(hDataQuality)
+ end
+ end
end
end
# lineage section
unless aLineage.empty?