Sha256: 881a4c96e5fef6ca97e6f75c6a746d975976fde2eb6f7c24780bf6b54adb07de

Contents?: true

Size: 1016 Bytes

Versions: 7

Compression:

Stored size: 1016 Bytes

Contents

# ISO <<Class>> DQ_DataQuality
# writer output in XML

# History:
# 	Stan Smith 2013-11-20 original script
#   Stan Smith 2014-07-09 modify require statements to function in RubyGem structure

require 'code_scope'
require 'class_lineage'

class DQ_DataQuality

	def initialize(xml)
		@xml = xml
	end

	def writeXML(hDataQ)

		# classes used
		scopeCode = MD_ScopeCode.new(@xml)
		lineClass = LI_Lineage.new(@xml)

		@xml.tag!('gmd:DQ_DataQuality') do

			# data quality - scope - required
			s = hDataQ[:dataScope]
			if s.nil?
				@xml.tag!('gmd:scope',{'gco:nilReason'=>'missing'})
			else
				@xml.tag!('gmd:scope') do
					@xml.tag!('gmd:DQ_Scope') do
						@xml.tag!('gmd:level') do
							scopeCode.writeXML(s)
						end
					end
				end
			end

			# date quality - report

			# data quality - lineage
			hLineage = hDataQ[:dataLineage]
			if !hLineage.empty?
				@xml.tag!('gmd:lineage') do
					lineClass.writeXML(hLineage)
				end
			elsif $showAllTags
				@xml.tag!('gmd:lineage')
			end

		end

	end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
adiwg-mdtranslator-0.10.2 lib/adiwg/mdtranslator/writers/iso/classes/class_dataQuality.rb
adiwg-mdtranslator-0.9.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataQuality.rb
adiwg-mdtranslator-0.8.6 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataQuality.rb
adiwg-mdtranslator-0.8.5 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataQuality.rb
adiwg-mdtranslator-0.8.2 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataQuality.rb
adiwg-mdtranslator-0.8.1 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataQuality.rb
adiwg-mdtranslator-0.8.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataQuality.rb