Sha256: 81f9dc5f1a588176c7eba86b9b18f33cc4a87a618825643fcc311ec19bd0f7b9
Contents?: true
Size: 1.99 KB
Versions: 45
Compression:
Stored size: 1.99 KB
Contents
# Reader - fgdc to internal data structure # unpack fgdc security # History: # Stan Smith 2017-08-25 original script require 'nokogiri' require 'adiwg/mdtranslator/internal/internal_metadata_obj' module ADIWG module Mdtranslator module Readers module Fgdc module Security def self.unpack(xSecurity, hResponseObj) # instance classes needed in script intMetadataClass = InternalMetadata.new hConstraint = intMetadataClass.newConstraint hConstraint[:type] = 'security' hSecurity = intMetadataClass.newSecurityConstraint # series 1.12.1 (secsys) - security system name (required) system = xSecurity.xpath('./secsys').text hSecurity[:classSystem] = system unless system.empty? if system.empty? hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: security system name is missing' end # series 1.12.2 (secclass) - security classification (required) secClass = xSecurity.xpath('./secclass').text hSecurity[:classCode] = secClass unless secClass.empty? if secClass.empty? hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: security classification is missing' end # series 1.12.3 (sechandl) - security handling instructions (required) secHand = xSecurity.xpath('./sechandl').text hSecurity[:handling] = secHand unless secHand.empty? if secHand.empty? hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: security handling instructions are missing' end hConstraint[:securityConstraint] = hSecurity return hConstraint end end end end end end
Version data entries
45 entries across 45 versions & 1 rubygems