Class: DQ_DataQuality
- Inherits:
-
Object
- Object
- DQ_DataQuality
- Defined in:
- lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataQuality.rb
Instance Method Summary collapse
-
#initialize(xml) ⇒ DQ_DataQuality
constructor
A new instance of DQ_DataQuality.
- #writeXML(hDataQ) ⇒ Object
Constructor Details
#initialize(xml) ⇒ DQ_DataQuality
Returns a new instance of DQ_DataQuality.
13 14 15 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataQuality.rb', line 13 def initialize(xml) @xml = xml end |
Instance Method Details
#writeXML(hDataQ) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataQuality.rb', line 17 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 |