adiwg-mdtranslator 2.6.1 → 2.7.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 +3 -2
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_attribute.rb +4 -4
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_fgdc.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_identification.rb +7 -2
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_keyword.rb +35 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_lineage.rb +10 -2
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_methodology.rb +69 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_process.rb +6 -10
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_quality.rb +3 -3
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_range.rb +3 -3
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_raster.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_source.rb +5 -5
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_spatialOrganization.rb +6 -4
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_taxonSystem.rb +6 -3
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_taxonomy.rb +6 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_entityAttribute.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_resourceInfo.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_source.rb +101 -94
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_taxonomicSystem.rb +2 -2
- data/lib/adiwg/mdtranslator/version.rb +4 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb +54 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_citation.rb +35 -15
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_constraint.rb +53 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_description.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_fgdc.rb +39 -3
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_geologicAge.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_identification.rb +148 -89
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_keyword.rb +6 -6
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_lineage.rb +91 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_method.rb +94 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_methodKeywords.rb +55 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_process.rb +119 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_publisher.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_quality.rb +64 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_security.rb +69 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_series.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_source.rb +124 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_spatialDomain.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_spatialOrganization.rb +177 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_status.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_taxonomy.rb +70 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_taxonomyClassification.rb +65 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_taxonomyKeywords.rb +55 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_taxonomySystem.rb +154 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_timePeriod.rb +22 -16
- data/lib/adiwg/mdtranslator/writers/fgdc/fgdc_writer.rb +19 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/readme.md +2 -2
- data/lib/adiwg/mdtranslator/writers/html/html_writer.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_entityAttribute.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_source.rb +7 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_entityAttribute.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_source.rb +1 -0
- metadata +19 -4
@@ -0,0 +1,53 @@
|
|
1
|
+
# FGDC <<Class>> Constraint
|
2
|
+
# FGDC CSDGM writer output in XML
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2017-12-12 original script
|
6
|
+
|
7
|
+
module ADIWG
|
8
|
+
module Mdtranslator
|
9
|
+
module Writers
|
10
|
+
module Fgdc
|
11
|
+
|
12
|
+
class Constraint
|
13
|
+
|
14
|
+
def initialize(xml, hResponseObj)
|
15
|
+
@xml = xml
|
16
|
+
@hResponseObj = hResponseObj
|
17
|
+
end
|
18
|
+
|
19
|
+
def writeXML(aConstraints)
|
20
|
+
|
21
|
+
# <- resourceInfo.constraints. first type = legal
|
22
|
+
aConstraints.each do |hConstraint|
|
23
|
+
if hConstraint[:type] == 'legal'
|
24
|
+
hLegal = hConstraint[:legalConstraint]
|
25
|
+
|
26
|
+
# identification information 1.7 (accconst) - access constraint (required)
|
27
|
+
unless hLegal[:accessCodes].empty?
|
28
|
+
@xml.tag!('accconst', hLegal[:accessCodes][0])
|
29
|
+
end
|
30
|
+
if hLegal[:accessCodes].empty?
|
31
|
+
@hResponseObj[:writerPass] = false
|
32
|
+
@hResponseObj[:writerMessages] << 'Identification section is missing access constraint'
|
33
|
+
end
|
34
|
+
|
35
|
+
# identification information 1.8 (useconst) - use constraint (required)
|
36
|
+
unless hLegal[:useCodes].empty?
|
37
|
+
@xml.tag!('useconst', hLegal[:useCodes][0])
|
38
|
+
end
|
39
|
+
if hLegal[:useCodes].empty?
|
40
|
+
@hResponseObj[:writerPass] = false
|
41
|
+
@hResponseObj[:writerMessages] << 'Identification section is missing use constraint'
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end # writeXML
|
48
|
+
end # Constraint
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -34,7 +34,7 @@ module ADIWG
|
|
34
34
|
@hResponseObj[:writerMessages] << 'Description is missing purpose'
|
35
35
|
end
|
36
36
|
|
37
|
-
# description 1.2.3 (supplinf) - supplemental information
|
37
|
+
# description 1.2.3 (supplinf) - supplemental information
|
38
38
|
# <- hResourceInfo[:supplementalInfo]
|
39
39
|
unless hResourceInfo[:supplementalInfo].nil?
|
40
40
|
@xml.tag!('supplinf', hResourceInfo[:supplementalInfo])
|
@@ -5,6 +5,8 @@
|
|
5
5
|
# Stan Smith 2017-11-16 original script
|
6
6
|
|
7
7
|
require_relative 'class_identification'
|
8
|
+
require_relative 'class_quality'
|
9
|
+
require_relative 'class_spatialOrganization'
|
8
10
|
|
9
11
|
module ADIWG
|
10
12
|
module Mdtranslator
|
@@ -20,14 +22,18 @@ module ADIWG
|
|
20
22
|
|
21
23
|
def writeXML(intObj)
|
22
24
|
|
25
|
+
version = @hResponseObj[:translatorVersion]
|
26
|
+
hResourceInfo = intObj[:metadata][:resourceInfo]
|
27
|
+
|
23
28
|
# classes used
|
24
29
|
idClass = Identification.new(@xml, @hResponseObj)
|
25
|
-
|
30
|
+
qualityClass = Quality.new(@xml, @hResponseObj)
|
31
|
+
spaceOrgClass = SpatialOrganization.new(@xml, @hResponseObj)
|
26
32
|
|
27
33
|
# document head
|
28
34
|
metadata = @xml.instruct! :xml, encoding: 'UTF-8'
|
29
35
|
@xml.comment!('FGDC METADATA (FGDC-STD-001-1998)')
|
30
|
-
@xml.comment!('
|
36
|
+
@xml.comment!('This file conforms to the Biological Data Profile (FGDC-STD-001.1-1999)')
|
31
37
|
@xml.comment!('The following metadata file was constructed using the ADIwg mdTranslator, http://mdtranslator.adiwg.org')
|
32
38
|
@xml.comment!('mdTranslator software is an open-source project of the Alaska Data Integration working group (ADIwg)')
|
33
39
|
@xml.comment!('mdTranslator and other metadata tools are available at https://github.com/adiwg')
|
@@ -38,10 +44,40 @@ module ADIWG
|
|
38
44
|
@xml.tag!('metadata') do
|
39
45
|
|
40
46
|
# metadata 1 (idinfo) - identification information
|
41
|
-
|
47
|
+
@xml.tag!('idinfo') do
|
48
|
+
idClass.writeXML(intObj)
|
49
|
+
end
|
42
50
|
|
43
51
|
# metadata 2 (dataqual) - data quality information
|
52
|
+
# currently only lineage is implemented
|
53
|
+
unless intObj[:metadata][:lineageInfo].empty?
|
54
|
+
@xml.tag!('dataqual') do
|
55
|
+
qualityClass.writeXML(intObj)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
if intObj[:metadata][:lineageInfo].empty?
|
59
|
+
@xml.tag!('dataqual')
|
60
|
+
end
|
61
|
+
|
44
62
|
# metadata 3 (spdoinfo) - spatial domain information
|
63
|
+
hDomainInfo = false
|
64
|
+
hDomainInfo = true unless hResourceInfo[:spatialRepresentations].empty?
|
65
|
+
hDomainInfo = true unless hResourceInfo[:spatialRepresentationTypes].empty?
|
66
|
+
hResourceInfo[:spatialReferenceSystems].each do |hSystem|
|
67
|
+
unless hSystem[:systemIdentifier].empty?
|
68
|
+
if hSystem[:systemIdentifier][:identifier] == 'indirect'
|
69
|
+
hDomainInfo = true
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
if hDomainInfo
|
74
|
+
@xml.tag!('spdoinfo') do
|
75
|
+
spaceOrgClass.writeXML(hResourceInfo)
|
76
|
+
end
|
77
|
+
elsif @hResponseObj[:writerShowTags]
|
78
|
+
@xml.tag!('spdoinfo')
|
79
|
+
end
|
80
|
+
|
45
81
|
# metadata 4 (spref) - spatial reference systems
|
46
82
|
# metadata 5 (eainfo) - entity attribute information
|
47
83
|
# metadata 6 (distinfo) - distribution information
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# FGDC CSDGM writer output in XML
|
3
3
|
|
4
4
|
# History:
|
5
|
-
#
|
5
|
+
# Stan Smith 2017-11-17 original script
|
6
6
|
|
7
7
|
require_relative '../fgdc_writer'
|
8
8
|
require_relative 'class_citation'
|
@@ -12,6 +12,10 @@ require_relative 'class_status'
|
|
12
12
|
require_relative 'class_spatialDomain'
|
13
13
|
require_relative 'class_keyword'
|
14
14
|
require_relative 'class_contact'
|
15
|
+
require_relative 'class_taxonomy'
|
16
|
+
require_relative 'class_constraint'
|
17
|
+
require_relative 'class_security'
|
18
|
+
require_relative 'class_browse'
|
15
19
|
|
16
20
|
module ADIWG
|
17
21
|
module Mdtranslator
|
@@ -25,19 +29,6 @@ module ADIWG
|
|
25
29
|
@hResponseObj = hResponseObj
|
26
30
|
end
|
27
31
|
|
28
|
-
def find_responsibility(aResponsibility, roleName)
|
29
|
-
aParties = []
|
30
|
-
aResponsibility.each do |hRParty|
|
31
|
-
if hRParty[:roleName] == roleName
|
32
|
-
hRParty[:parties].each do |hParty|
|
33
|
-
aParties << hParty[:contactId]
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
aParties = aParties.uniq
|
38
|
-
return aParties
|
39
|
-
end
|
40
|
-
|
41
32
|
def writeXML(intObj)
|
42
33
|
|
43
34
|
# classes used
|
@@ -48,101 +39,169 @@ module ADIWG
|
|
48
39
|
spDomainClass = SpatialDomain.new(@xml, @hResponseObj)
|
49
40
|
keywordClass = Keyword.new(@xml, @hResponseObj)
|
50
41
|
contactClass = Contact.new(@xml, @hResponseObj)
|
42
|
+
taxonomyClass = Taxonomy.new(@xml, @hResponseObj)
|
43
|
+
constraintClass = Constraint.new(@xml, @hResponseObj)
|
44
|
+
securityClass = Security.new(@xml, @hResponseObj)
|
45
|
+
browseClass = Browse.new(@xml, @hResponseObj)
|
51
46
|
|
52
47
|
hResourceInfo = intObj[:metadata][:resourceInfo]
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
@xml.tag!('citation') do
|
62
|
-
citationClass.writeXML(hCitation, aAssocResource)
|
63
|
-
end
|
64
|
-
end
|
65
|
-
if hCitation.empty?
|
66
|
-
@hResponseObj[:writerPass] = false
|
67
|
-
@hResponseObj[:writerMessages] << 'Identification section is missing citation'
|
48
|
+
aAssocResource = intObj[:metadata][:associatedResources]
|
49
|
+
|
50
|
+
# identification information 1.1 (citation) - citation (required)
|
51
|
+
# <- hResourceInfo[:citation]
|
52
|
+
hCitation = hResourceInfo[:citation]
|
53
|
+
unless hCitation.empty?
|
54
|
+
@xml.tag!('citation') do
|
55
|
+
citationClass.writeXML(hCitation, aAssocResource)
|
68
56
|
end
|
57
|
+
end
|
58
|
+
if hCitation.empty?
|
59
|
+
@hResponseObj[:writerPass] = false
|
60
|
+
@hResponseObj[:writerMessages] << 'Identification section is missing citation'
|
61
|
+
end
|
69
62
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
end
|
76
|
-
end
|
77
|
-
if hResourceInfo[:abstract].nil?
|
78
|
-
@hResponseObj[:writerPass] = false
|
79
|
-
@hResponseObj[:writerMessages] << 'Identification section is missing abstract'
|
63
|
+
# identification information 1.2 (descript) - description (required)
|
64
|
+
# <- hResourceInfo[:abstract,:purpose,:supplementalInfo] (required)
|
65
|
+
unless hResourceInfo[:abstract].nil? && hResourceInfo[:purpose].nil? && hResourceInfo[:supplementalInfo].nil?
|
66
|
+
@xml.tag!('descript') do
|
67
|
+
descriptionClass.writeXML(hResourceInfo)
|
80
68
|
end
|
81
|
-
|
82
|
-
|
83
|
-
|
69
|
+
end
|
70
|
+
if hResourceInfo[:abstract].nil?
|
71
|
+
@hResponseObj[:writerPass] = false
|
72
|
+
@hResponseObj[:writerMessages] << 'Identification section is missing abstract'
|
73
|
+
end
|
74
|
+
if hResourceInfo[:purpose].nil?
|
75
|
+
@hResponseObj[:writerPass] = false
|
76
|
+
@hResponseObj[:writerMessages] << 'Identification section is missing purpose'
|
77
|
+
end
|
78
|
+
|
79
|
+
# identification information 1.3 (timeperd) - time period of content (required)
|
80
|
+
# <- hResourceInfo[:timePeriod]
|
81
|
+
unless hResourceInfo[:timePeriod].empty?
|
82
|
+
@xml.tag!('timeperd') do
|
83
|
+
timePeriodClass.writeXML(hResourceInfo[:timePeriod], 'current')
|
84
84
|
end
|
85
|
+
end
|
86
|
+
if hResourceInfo[:timePeriod].empty?
|
87
|
+
@hResponseObj[:writerPass] = false
|
88
|
+
@hResponseObj[:writerMessages] << 'Identification section is missing time period'
|
89
|
+
end
|
85
90
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
91
|
+
# identification information 1.4 (status) - status
|
92
|
+
statusClass.writeXML(hResourceInfo)
|
93
|
+
|
94
|
+
# identification information 1.5 (spdom) - spatial domain
|
95
|
+
# not required under biological extension rules
|
96
|
+
unless hResourceInfo[:extents].empty?
|
97
|
+
spDomainClass.writeXML(hResourceInfo[:extents])
|
98
|
+
end
|
99
|
+
|
100
|
+
# identification information 1.6 (keywords) - keywords [] (required)
|
101
|
+
unless hResourceInfo[:keywords].empty?
|
102
|
+
@xml.tag!('keywords') do
|
103
|
+
keywordClass.writeXML(hResourceInfo[:keywords])
|
92
104
|
end
|
93
|
-
|
94
|
-
|
95
|
-
|
105
|
+
end
|
106
|
+
if hResourceInfo[:keywords].empty?
|
107
|
+
@hResponseObj[:writerPass] = false
|
108
|
+
@hResponseObj[:writerMessages] << 'Identification section is missing keywords'
|
109
|
+
end
|
110
|
+
|
111
|
+
# identification information bio (taxonomy) - taxonomy
|
112
|
+
unless hResourceInfo[:taxonomy].empty?
|
113
|
+
@xml.tag!('taxonomy') do
|
114
|
+
taxonomyClass.writeXML(hResourceInfo[:taxonomy], hResourceInfo[:keywords])
|
96
115
|
end
|
116
|
+
end
|
117
|
+
if hResourceInfo[:taxonomy].empty? && @hResponseObj[:writerShowTags]
|
118
|
+
@xml.tag!('taxonomy')
|
119
|
+
end
|
97
120
|
|
98
|
-
|
99
|
-
|
121
|
+
# identification information 1.7 (accconst) - access constraint (required)
|
122
|
+
# identification information 1.8 (useconst) - use constraint (required)
|
123
|
+
unless hResourceInfo[:constraints].empty?
|
124
|
+
constraintClass.writeXML(hResourceInfo[:constraints])
|
125
|
+
end
|
126
|
+
if hResourceInfo[:constraints].empty?
|
127
|
+
@hResponseObj[:writerPass] = false
|
128
|
+
@hResponseObj[:writerMessages] << 'Identification section is missing access and use constraints'
|
129
|
+
end
|
100
130
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
131
|
+
# identification information 1.9 (ptcontac) - point of contact
|
132
|
+
unless hResourceInfo[:pointOfContacts].empty?
|
133
|
+
aRParties = hResourceInfo[:pointOfContacts]
|
134
|
+
aParties = ADIWG::Mdtranslator::Writers::Fgdc.find_responsibility(aRParties, 'pointOfContact')
|
135
|
+
unless aParties.empty?
|
136
|
+
hContact = ADIWG::Mdtranslator::Writers::Fgdc.get_contact(aParties[0])
|
137
|
+
unless hContact.empty?
|
138
|
+
@xml.tag!('ptcontac') do
|
139
|
+
contactClass.writeXML(hContact)
|
140
|
+
end
|
141
|
+
end
|
105
142
|
end
|
143
|
+
end
|
144
|
+
if hResourceInfo[:pointOfContacts].empty? && @hResponseObj[:writerShowTags]
|
145
|
+
@xml.tag!('ptcontac')
|
146
|
+
end
|
106
147
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
end
|
148
|
+
# identification information 1.10 (browse) - browse graphic []
|
149
|
+
hResourceInfo[:graphicOverviews].each do |hGraphic|
|
150
|
+
@xml.tag!('browse') do
|
151
|
+
browseClass.writeXML(hGraphic)
|
112
152
|
end
|
113
|
-
|
114
|
-
|
115
|
-
|
153
|
+
end
|
154
|
+
if hResourceInfo[:graphicOverviews].empty? && @hResponseObj[:writerShowTags]
|
155
|
+
@xml.tag!('browse')
|
156
|
+
end
|
157
|
+
|
158
|
+
# identification information 1.11 (datacred) - dataset credit
|
159
|
+
# <- concatenate resourceInfo.credits[]
|
160
|
+
unless hResourceInfo[:credits].empty?
|
161
|
+
dataCred = ''
|
162
|
+
hResourceInfo[:credits].each do |credit|
|
163
|
+
dataCred += credit + '; '
|
116
164
|
end
|
165
|
+
dataCred.chomp!('; ')
|
166
|
+
@xml.tag!('datacred', dataCred)
|
167
|
+
end
|
168
|
+
if hResourceInfo[:credits].empty? && @hResponseObj[:writerShowTags]
|
169
|
+
@xml.tag!('datacred')
|
170
|
+
end
|
117
171
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
172
|
+
# identification information 1.12 (secinfo) - security information
|
173
|
+
unless hResourceInfo[:constraints].empty?
|
174
|
+
securityClass.writeXML(hResourceInfo[:constraints])
|
175
|
+
end
|
176
|
+
if hResourceInfo[:constraints].empty? && @hResponseObj[:writerShowTags]
|
177
|
+
@xml.tag!('secinfo')
|
178
|
+
end
|
179
|
+
|
180
|
+
# identification information 1.13 (native) - native dataset environment
|
181
|
+
unless hResourceInfo[:environmentDescription].nil?
|
182
|
+
@xml.tag!('native', hResourceInfo[:environmentDescription])
|
183
|
+
end
|
184
|
+
if hResourceInfo[:environmentDescription].nil? && @hResponseObj[:writerShowTags]
|
185
|
+
@xml.tag!('native')
|
186
|
+
end
|
187
|
+
|
188
|
+
# identification information 1.14 (crossref) - cross reference []
|
189
|
+
# <- associatedResources[:associationType] = 'crossReference'
|
190
|
+
haveXRef = false
|
191
|
+
aAssocResource.each do |hAssocRes|
|
192
|
+
if hAssocRes[:associationType] == 'crossReference'
|
193
|
+
haveXRef = true
|
194
|
+
@xml.tag!('crossref') do
|
195
|
+
citationClass.writeXML(hAssocRes[:resourceCitation], [])
|
132
196
|
end
|
133
197
|
end
|
134
|
-
|
135
|
-
|
136
|
-
|
198
|
+
end
|
199
|
+
if !haveXRef && @hResponseObj[:writerShowTags]
|
200
|
+
@xml.tag!('crossref')
|
201
|
+
end
|
137
202
|
|
138
|
-
|
139
|
-
# identification information 1.11 (datacred) - dataset credit
|
140
|
-
# identification information 1.12 (secinfo) - security information
|
141
|
-
# identification information 1.13 (native) - native dataset environment
|
142
|
-
# identification information 1.14 (crossref) - cross reference []
|
143
|
-
# identification information bio (tool) - analytical tool [] (not supported)
|
203
|
+
# identification information bio (tool) - analytical tool [] (not supported)
|
144
204
|
|
145
|
-
end # idinfo tag
|
146
205
|
end # writeXML
|
147
206
|
end # Identification
|
148
207
|
|
@@ -21,21 +21,21 @@ module ADIWG
|
|
21
21
|
# array of keyword sets
|
22
22
|
aKeywords.each do |hKeySet|
|
23
23
|
|
24
|
-
# find
|
24
|
+
# find the keyword set parts
|
25
25
|
type = hKeySet[:keywordType]
|
26
|
-
|
26
|
+
aKeywords = hKeySet[:keywords]
|
27
27
|
thesaurus = hKeySet[:thesaurus]
|
28
|
+
thesaurusName = nil
|
28
29
|
unless thesaurus.empty?
|
29
30
|
thesaurusName = thesaurus[:title]
|
30
31
|
end
|
31
|
-
|
32
|
-
if thesaurusName.nil?
|
32
|
+
if thesaurus.empty?
|
33
33
|
@hResponseObj[:writerPass] = false
|
34
|
-
@hResponseObj[:writerMessages] << '
|
34
|
+
@hResponseObj[:writerMessages] << 'Keyword Set is missing thesaurus'
|
35
35
|
end
|
36
36
|
|
37
37
|
# keyword 1.6.1 (theme) - theme keywords
|
38
|
-
if type == 'theme'
|
38
|
+
if type == 'theme' || type == 'isoTopicCategory'
|
39
39
|
@xml.tag!('theme') do
|
40
40
|
@xml.tag!('themekt', thesaurusName)
|
41
41
|
aKeywords.each do |hKeyword|
|