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