Sha256: dadb5be10f4591a420c1c714051f48bf4615b85bb1b6606ce47faf0e9d3fafc3

Contents?: true

Size: 1.24 KB

Versions: 7

Compression:

Stored size: 1.24 KB

Contents

# Reader - fgdc to internal data structure
# unpack fgdc entity and attribute overview

# History:
#  Stan Smith 2017-09-06 original script

require 'uuidtools'
require 'nokogiri'
require 'adiwg/mdtranslator/internal/internal_metadata_obj'

module ADIWG
   module Mdtranslator
      module Readers
         module Fgdc

            module EntityOverview

               def self.unpack(xOverview, hResponseObj)

                  # instance classes needed in script
                  intMetadataClass = InternalMetadata.new
                  hEntity = intMetadataClass.newEntity
                  hEntity[:entityId] = UUIDTools::UUID.random_create.to_s
                  hEntity[:entityCode] = 'overview'

                  # entity attribute 5.2.1 (eaover) - entity attribute overview
                  # -> dataDictionary.entities.entityDefinition
                  definition = xOverview.xpath('./eaover').text
                  unless definition.empty?
                     hEntity[:entityDefinition] = definition
                  end

                  # entity attribute 5.2.2 (eadetcit) - entity attribute detail citation []
                  # -> not mapped

                  return hEntity

               end

            end

         end
      end
   end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.4.0 lib/adiwg/mdtranslator/readers/fgdc/modules/module_entityOverview.rb
adiwg-mdtranslator-2.3.5 lib/adiwg/mdtranslator/readers/fgdc/modules/module_entityOverview.rb
adiwg-mdtranslator-2.3.4 lib/adiwg/mdtranslator/readers/fgdc/modules/module_entityOverview.rb
adiwg-mdtranslator-2.3.3 lib/adiwg/mdtranslator/readers/fgdc/modules/module_entityOverview.rb
adiwg-mdtranslator-2.3.2 lib/adiwg/mdtranslator/readers/fgdc/modules/module_entityOverview.rb
adiwg-mdtranslator-2.3.1 lib/adiwg/mdtranslator/readers/fgdc/modules/module_entityOverview.rb
adiwg-mdtranslator-2.3.0 lib/adiwg/mdtranslator/readers/fgdc/modules/module_entityOverview.rb