Sha256: 52abdfb39417205c227736e6855948ff92f006c85bc475ffbe9d237504168253

Contents?: true

Size: 1.57 KB

Versions: 11

Compression:

Stored size: 1.57 KB

Contents

# unpack data quality
# Reader - ADIwg JSON V1 to internal data structure

# History:
# 	Stan Smith 2013-11-26 original script
#   Stan Smith 2014-07-03 resolve require statements using Mdtranslator.reader_module
#   Stan Smith 2014-12-15 refactored to handle namespacing readers and writers

require $ReaderNS.readerModule('module_lineage')

module ADIWG
    module Mdtranslator
        module Readers
            module MdJson

                module DataQuality

                    def self.unpack(hDataQual)

                        # instance classes needed in script
                        intMetadataClass = InternalMetadata.new
                        intDataQual = intMetadataClass.newDataQuality

                        # data quality - scope
                        if hDataQual.has_key?('scope')
                            s = hDataQual['scope']
                            if s != ''
                                intDataQual[:dataScope] = s
                            end
                        end

                        # data quality - report
                        # on hold

                        # data quality - lineage
                        if hDataQual.has_key?('lineage')
                            hLineage = hDataQual['lineage']
                            unless hLineage.empty?
                                intDataQual[:dataLineage] = $ReaderNS::Lineage.unpack(hLineage)
                            end
                        end

                        return intDataQual
                    end

                end

            end
        end
    end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
adiwg-mdtranslator-1.2.1 lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_dataQuality.rb
adiwg-mdtranslator-1.2.0 lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_dataQuality.rb
adiwg-mdtranslator-1.1.1 lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_dataQuality.rb
adiwg-mdtranslator-1.1.0 lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_dataQuality.rb
adiwg-mdtranslator-1.0.0 lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_dataQuality.rb
adiwg-mdtranslator-1.0.0rc4 lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_dataQuality.rb
adiwg-mdtranslator-1.0.0rc3 lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_dataQuality.rb
adiwg-mdtranslator-1.0.0rc2 lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_dataQuality.rb
adiwg-mdtranslator-1.0.0rc1 lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_dataQuality.rb
adiwg-mdtranslator-0.12.1 lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_dataQuality.rb
adiwg-mdtranslator-0.12.0 lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_dataQuality.rb