adiwg-mdtranslator 2.8.0 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/adiwg-mdtranslator.gemspec +1 -1
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +552 -500
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_attribute.rb +1 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_contact.rb +63 -16
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_distribution.rb +7 -16
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_entity.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_entityOverview.rb +1 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_enumerated.rb +7 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_fgdc.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_identification.rb +4 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_metadataInfo.rb +4 -3
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_transferInfo.rb +15 -11
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_constraint.rb +134 -134
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataDictionary.rb +9 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_distribution.rb +52 -36
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_domainItem.rb +65 -51
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_metadataInfo.rb +133 -121
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_resourceInfo.rb +1 -1
- data/lib/adiwg/mdtranslator/version.rb +4 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_attribute.rb +178 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_dataDomain.rb +122 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_dictionary.rb +66 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_digitalForm.rb +81 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_distribution.rb +156 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_entityDetail.rb +78 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_entityOverview.rb +48 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_fgdc.rb +41 -4
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_metadataInfo.rb +215 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_offlineOption.rb +86 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_onlineOption.rb +77 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_orderProcess.rb +100 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_timePeriod.rb +9 -7
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_transferInfo.rb +135 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataDictionary.rb +4 -4
- data/lib/adiwg/mdtranslator/writers/html/sections/html_distribution.rb +18 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_domainItem.rb +18 -3
- data/lib/adiwg/mdtranslator/writers/html/sections/html_metadataInfo.rb +20 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_fcFeatureCatalogue.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_listedValue.rb +14 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataIdentification.rb +21 -2
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_distribution.rb +44 -44
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_legalConstraints.rb +67 -66
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_mdIdentifier.rb +53 -54
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_miMetadata.rb +51 -23
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_dictionary.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_distribution.rb +2 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_domainItem.rb +4 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb +2 -0
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_rights.rb +7 -1
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_sbJson.rb +12 -1
- metadata +16 -4
@@ -2,6 +2,7 @@
|
|
2
2
|
# Reader - ADIwg JSON to internal data structure
|
3
3
|
|
4
4
|
# History:
|
5
|
+
# Stan Smith 2018-01-25 rename dictionaryFormat to dictionaryFunctionalLanguage
|
5
6
|
# Stan Smith 2017-11-09 add dictionary description
|
6
7
|
# Stan Smith 2017-01-20 refactored for mdJson/mdTranslator 2.0
|
7
8
|
# Stan Smith 2015-07-14 refactored to remove global namespace constants
|
@@ -112,11 +113,15 @@ module ADIWG
|
|
112
113
|
end
|
113
114
|
|
114
115
|
# dictionary - dictionary format
|
115
|
-
|
116
|
+
# deprecate dictionaryFormat in favor of dictionaryFunctionalLanguage
|
117
|
+
s = nil
|
118
|
+
if hDictionary.has_key?('dictionaryFunctionalLanguage')
|
119
|
+
s = hDictionary['dictionaryFunctionalLanguage']
|
120
|
+
elsif hDictionary.has_key?('dictionaryFormat')
|
116
121
|
s = hDictionary['dictionaryFormat']
|
117
|
-
|
118
|
-
|
119
|
-
|
122
|
+
end
|
123
|
+
unless s.nil? || s == ''
|
124
|
+
intDictionary[:dictionaryFunctionalLanguage] = s
|
120
125
|
end
|
121
126
|
|
122
127
|
# dictionary - dictionary included with resource
|
@@ -2,55 +2,71 @@
|
|
2
2
|
# Reader - ADIwg JSON to internal data structure
|
3
3
|
|
4
4
|
# History:
|
5
|
-
#
|
5
|
+
# Stan Smith 2018-01-30 add technicalPrerequisite
|
6
|
+
# Stan Smith 2018-01-29 add liabilityStatement
|
7
|
+
# Stan Smith 2016-10-21 original script
|
6
8
|
|
7
9
|
require_relative 'module_distributor'
|
8
10
|
|
9
11
|
module ADIWG
|
10
|
-
|
11
|
-
|
12
|
-
|
12
|
+
module Mdtranslator
|
13
|
+
module Readers
|
14
|
+
module MdJson
|
13
15
|
|
14
|
-
|
16
|
+
module Distribution
|
15
17
|
|
16
|
-
|
18
|
+
def self.unpack(hDistribution, responseObj)
|
17
19
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
20
|
+
# return nil object if input is empty
|
21
|
+
if hDistribution.empty?
|
22
|
+
responseObj[:readerExecutionMessages] << 'Distribution object is empty'
|
23
|
+
responseObj[:readerExecutionPass] = false
|
24
|
+
return nil
|
25
|
+
end
|
24
26
|
|
25
|
-
|
26
|
-
|
27
|
-
|
27
|
+
# instance classes needed in script
|
28
|
+
intMetadataClass = InternalMetadata.new
|
29
|
+
intDistribution = intMetadataClass.newDistribution
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
# distribution - description
|
32
|
+
if hDistribution.has_key?('description')
|
33
|
+
if hDistribution['description'] != ''
|
34
|
+
intDistribution[:description] = hDistribution['description']
|
35
|
+
end
|
36
|
+
end
|
35
37
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
intDistribution[:distributor] << hReturn
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
38
|
+
# distribution - liability statement
|
39
|
+
if hDistribution.has_key?('liabilityStatement')
|
40
|
+
if hDistribution['liabilityStatement'] != ''
|
41
|
+
intDistribution[:liabilityStatement] = hDistribution['liabilityStatement']
|
42
|
+
end
|
43
|
+
end
|
46
44
|
|
47
|
-
|
45
|
+
# distribution - technical prerequisite
|
46
|
+
if hDistribution.has_key?('technicalPrerequisite')
|
47
|
+
if hDistribution['technicalPrerequisite'] != ''
|
48
|
+
intDistribution[:technicalPrerequisite] = hDistribution['technicalPrerequisite']
|
49
|
+
end
|
50
|
+
end
|
48
51
|
|
49
|
-
|
52
|
+
# distribution - distributor [distributor]
|
53
|
+
if hDistribution.has_key?('distributor')
|
54
|
+
aItems = hDistribution['distributor']
|
55
|
+
aItems.each do |item|
|
56
|
+
hReturn = Distributor.unpack(item, responseObj)
|
57
|
+
unless hReturn.nil?
|
58
|
+
intDistribution[:distributor] << hReturn
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
return intDistribution
|
50
64
|
|
51
|
-
|
65
|
+
end
|
52
66
|
|
53
67
|
end
|
54
|
-
|
55
|
-
|
68
|
+
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
56
72
|
end
|
@@ -2,69 +2,83 @@
|
|
2
2
|
# Reader - ADIwg JSON V1 to internal data structure
|
3
3
|
|
4
4
|
# History:
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
5
|
+
# Stan Smith 2018-01-24 add domain item reference
|
6
|
+
# Stan Smith 2016-10-07 refactored for mdJson 2.0
|
7
|
+
# Stan Smith 2015-07-23 added error reporting of missing items
|
8
|
+
# Stan Smith 2015-07-14 refactored to remove global namespace constants
|
9
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
10
|
+
# Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
|
10
11
|
# Stan Smith 2013-12-01 original script
|
11
12
|
|
13
|
+
require_relative 'module_citation'
|
14
|
+
|
12
15
|
module ADIWG
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
+
module Mdtranslator
|
17
|
+
module Readers
|
18
|
+
module MdJson
|
16
19
|
|
17
|
-
|
20
|
+
module DomainItem
|
18
21
|
|
19
|
-
|
22
|
+
def self.unpack(hDomItem, responseObj)
|
20
23
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
# return nil object if input is empty
|
25
|
+
if hDomItem.empty?
|
26
|
+
responseObj[:readerExecutionMessages] << 'Domain Member object is empty'
|
27
|
+
responseObj[:readerExecutionPass] = false
|
28
|
+
return nil
|
29
|
+
end
|
27
30
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
+
# instance classes needed in script
|
32
|
+
intMetadataClass = InternalMetadata.new
|
33
|
+
intItem = intMetadataClass.newDomainItem
|
31
34
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
35
|
+
# data dictionary domain item - name (required)
|
36
|
+
if hDomItem.has_key?('name')
|
37
|
+
intItem[:itemName] = hDomItem['name']
|
38
|
+
end
|
39
|
+
if intItem[:itemName].nil? || intItem[:itemName] == ''
|
40
|
+
responseObj[:readerExecutionMessages] << 'Data Dictionary domain item name is missing'
|
41
|
+
responseObj[:readerExecutionPass] = false
|
42
|
+
return nil
|
43
|
+
end
|
41
44
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
45
|
+
# data dictionary domain item - value (required)
|
46
|
+
if hDomItem.has_key?('value')
|
47
|
+
intItem[:itemValue] = hDomItem['value']
|
48
|
+
end
|
49
|
+
if intItem[:itemValue].nil? || intItem[:itemValue] == ''
|
50
|
+
responseObj[:readerExecutionMessages] << 'Data Dictionary domain item value is missing'
|
51
|
+
responseObj[:readerExecutionPass] = false
|
52
|
+
return nil
|
53
|
+
end
|
51
54
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
55
|
+
# data dictionary domain item - definition (required)
|
56
|
+
if hDomItem.has_key?('definition')
|
57
|
+
intItem[:itemDefinition] = hDomItem['definition']
|
58
|
+
end
|
59
|
+
if intItem[:itemDefinition].nil? || intItem[:itemDefinition] == ''
|
60
|
+
responseObj[:readerExecutionMessages] << 'Data Dictionary domain item definition is missing'
|
61
|
+
responseObj[:readerExecutionPass] = false
|
62
|
+
return nil
|
63
|
+
end
|
61
64
|
|
62
|
-
|
63
|
-
|
65
|
+
# data dictionary domain item - reference {citation}
|
66
|
+
if hDomItem.has_key?('reference')
|
67
|
+
hCitation = hDomItem['reference']
|
68
|
+
unless hCitation.empty?
|
69
|
+
hReturn = Citation.unpack(hCitation, responseObj)
|
70
|
+
unless hReturn.nil?
|
71
|
+
intItem[:itemReference] = hReturn
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
64
75
|
|
65
|
-
|
76
|
+
return intItem
|
77
|
+
end
|
66
78
|
|
67
79
|
end
|
68
|
-
|
69
|
-
|
80
|
+
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
70
84
|
end
|
@@ -2,8 +2,9 @@
|
|
2
2
|
# Reader - ADIwg JSON to internal data structure
|
3
3
|
|
4
4
|
# History:
|
5
|
-
#
|
6
|
-
#
|
5
|
+
# Stan Smith 2018-01-27 add metadataConstraints
|
6
|
+
# Stan Smith 2017-01-31 remove metadataCreationDate
|
7
|
+
# Stan Smith 2016-10-31 original script
|
7
8
|
|
8
9
|
require_relative 'module_identifier'
|
9
10
|
require_relative 'module_citation'
|
@@ -11,147 +12,158 @@ require_relative 'module_locale'
|
|
11
12
|
require_relative 'module_responsibleParty'
|
12
13
|
require_relative 'module_date'
|
13
14
|
require_relative 'module_onlineResource'
|
15
|
+
require_relative 'module_constraint'
|
14
16
|
require_relative 'module_maintenance'
|
15
17
|
|
16
18
|
module ADIWG
|
17
|
-
|
18
|
-
|
19
|
-
|
19
|
+
module Mdtranslator
|
20
|
+
module Readers
|
21
|
+
module MdJson
|
20
22
|
|
21
|
-
|
23
|
+
module MetadataInfo
|
22
24
|
|
23
|
-
|
25
|
+
def self.unpack(hMetaInfo, responseObj)
|
24
26
|
|
25
27
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
# return nil object if input is empty
|
29
|
+
if hMetaInfo.empty?
|
30
|
+
responseObj[:readerExecutionMessages] << 'MetadataInfo object is empty'
|
31
|
+
responseObj[:readerExecutionPass] = false
|
32
|
+
return nil
|
33
|
+
end
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
# metadata information - metadata identifier {identifier}
|
38
|
-
if hMetaInfo.has_key?('metadataIdentifier')
|
39
|
-
hObject = hMetaInfo['metadataIdentifier']
|
40
|
-
unless hObject.empty?
|
41
|
-
hReturn = Identifier.unpack(hObject, responseObj)
|
42
|
-
unless hReturn.nil?
|
43
|
-
intMetaInfo[:metadataIdentifier] = hReturn
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
35
|
+
# instance classes needed in script
|
36
|
+
intMetadataClass = InternalMetadata.new
|
37
|
+
intMetaInfo = intMetadataClass.newMetadataInfo
|
47
38
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
end
|
56
|
-
end
|
39
|
+
# metadata information - metadata identifier {identifier}
|
40
|
+
if hMetaInfo.has_key?('metadataIdentifier')
|
41
|
+
hObject = hMetaInfo['metadataIdentifier']
|
42
|
+
unless hObject.empty?
|
43
|
+
hReturn = Identifier.unpack(hObject, responseObj)
|
44
|
+
unless hReturn.nil?
|
45
|
+
intMetaInfo[:metadataIdentifier] = hReturn
|
57
46
|
end
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# metadata information - parent metadata {citation}
|
51
|
+
if hMetaInfo.has_key?('parentMetadata')
|
52
|
+
hObject = hMetaInfo['parentMetadata']
|
53
|
+
unless hObject.empty?
|
54
|
+
hReturn = Citation.unpack(hObject, responseObj)
|
55
|
+
unless hReturn.nil?
|
56
|
+
intMetaInfo[:parentMetadata] = hReturn
|
68
57
|
end
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# metadata information - default metadata locale {locale} (default to utf-8)
|
62
|
+
if hMetaInfo.has_key?('defaultMetadataLocale')
|
63
|
+
hObject = hMetaInfo['defaultMetadataLocale']
|
64
|
+
unless hObject.empty?
|
65
|
+
hReturn = Locale.unpack(hObject, responseObj)
|
66
|
+
unless hReturn.nil?
|
67
|
+
intMetaInfo[:defaultMetadataLocale] = hReturn
|
79
68
|
end
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# metadata information - other metadata locale [] {locale}
|
73
|
+
if hMetaInfo.has_key?('otherMetadataLocale')
|
74
|
+
aItems = hMetaInfo['otherMetadataLocale']
|
75
|
+
aItems.each do |item|
|
76
|
+
hReturn = Locale.unpack(item, responseObj)
|
77
|
+
unless hReturn.nil?
|
78
|
+
intMetaInfo[:otherMetadataLocales] << hReturn
|
90
79
|
end
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# metadata information - metadata contact [] {responsibleParty} (required)
|
84
|
+
if hMetaInfo.has_key?('metadataContact')
|
85
|
+
aItems = hMetaInfo['metadataContact']
|
86
|
+
aItems.each do |item|
|
87
|
+
hReturn = ResponsibleParty.unpack(item, responseObj)
|
88
|
+
unless hReturn.nil?
|
89
|
+
intMetaInfo[:metadataContacts] << hReturn
|
95
90
|
end
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
91
|
+
end
|
92
|
+
end
|
93
|
+
if intMetaInfo[:metadataContacts].empty?
|
94
|
+
responseObj[:readerExecutionMessages] << 'MetadataInfo object is missing metadataContacts'
|
95
|
+
responseObj[:readerExecutionPass] = false
|
96
|
+
return nil
|
97
|
+
end
|
98
|
+
|
99
|
+
# metadata information - metadata dates [] {date}
|
100
|
+
if hMetaInfo.has_key?('metadataDate')
|
101
|
+
aItems = hMetaInfo['metadataDate']
|
102
|
+
aItems.each do |item|
|
103
|
+
hReturn = Date.unpack(item, responseObj)
|
104
|
+
unless hReturn.nil?
|
105
|
+
intMetaInfo[:metadataDates] << hReturn
|
106
106
|
end
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
# metadata information - metadata online resource [] {onlineResource}
|
111
|
+
if hMetaInfo.has_key?('metadataOnlineResource')
|
112
|
+
aItems = hMetaInfo['metadataOnlineResource']
|
113
|
+
aItems.each do |item|
|
114
|
+
hReturn = OnlineResource.unpack(item, responseObj)
|
115
|
+
unless hReturn.nil?
|
116
|
+
intMetaInfo[:metadataLinkages] << hReturn
|
117
117
|
end
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
# metadata information - metadata constraint [] {constraint}
|
122
|
+
if hMetaInfo.has_key?('metadataConstraint')
|
123
|
+
hMetaInfo['metadataConstraint'].each do |hItem|
|
124
|
+
hReturn = Constraint.unpack(hItem, responseObj)
|
125
|
+
unless hReturn.nil?
|
126
|
+
intMetaInfo[:metadataConstraints] << hReturn
|
128
127
|
end
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# metadata information - metadata maintenance {maintenance}
|
132
|
+
if hMetaInfo.has_key?('metadataMaintenance')
|
133
|
+
hObject = hMetaInfo['metadataMaintenance']
|
134
|
+
unless hObject.empty?
|
135
|
+
hReturn = Maintenance.unpack(hObject, responseObj)
|
136
|
+
unless hReturn.nil?
|
137
|
+
intMetaInfo[:metadataMaintenance] = hReturn
|
139
138
|
end
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
# metadata information - alternative metadata reference [] {citation}
|
143
|
+
if hMetaInfo.has_key?('alternateMetadataReference')
|
144
|
+
aItems = hMetaInfo['alternateMetadataReference']
|
145
|
+
aItems.each do |item|
|
146
|
+
hReturn = Citation.unpack(item, responseObj)
|
147
|
+
unless hReturn.nil?
|
148
|
+
intMetaInfo[:alternateMetadataReferences] << hReturn
|
146
149
|
end
|
150
|
+
end
|
151
|
+
end
|
147
152
|
|
148
|
-
|
153
|
+
# metadata information - metadata status
|
154
|
+
if hMetaInfo.has_key?('metadataStatus')
|
155
|
+
if hMetaInfo['metadataStatus'] != ''
|
156
|
+
intMetaInfo[:metadataStatus] = hMetaInfo['metadataStatus']
|
157
|
+
end
|
158
|
+
end
|
149
159
|
|
150
|
-
|
160
|
+
return intMetaInfo
|
151
161
|
|
152
|
-
|
162
|
+
end
|
153
163
|
|
154
164
|
end
|
155
|
-
|
156
|
-
|
165
|
+
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
157
169
|
end
|