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
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# File 'lib/adiwg/mdtranslator/readers/fgdc/modules/module_lineage.rb', line 21
def self.unpack(xLineage, hResponseObj)
intMetadataClass = InternalMetadata.new
hLineage = intMetadataClass.newLineage
unless xLineage.empty?
axMethods = xLineage.xpath('./method')
unless axMethods.empty?
Method.unpack(hLineage, axMethods, hResponseObj)
end
if axMethods.empty?
hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: BIO lineage methodology section is missing'
end
axSource = xLineage.xpath('./srcinfo')
unless axSource.empty?
axSource.each do |xSource|
hSource = Source.unpack(xSource, hResponseObj)
hLineage[:dataSources] << hSource
end
end
axProcess = xLineage.xpath('./procstep')
unless axProcess.empty?
axProcess.each do |xProcess|
hProcess = Process.unpack(xProcess, hLineage, hResponseObj)
hLineage[:processSteps] << hProcess
end
end
if axProcess.empty?
hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: lineage process step section is missing'
end
return hLineage
end
return nil
end
|