adiwg-mdtranslator 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/adiwg-mdtranslator.gemspec +3 -1
  3. data/bin/mdtranslator +5 -5
  4. data/lib/adiwg/mdtranslator.rb +8 -29
  5. data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +2 -0
  6. data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +21 -2
  7. data/lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_contacts.rb +5 -3
  8. data/lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_mdJson.rb +4 -11
  9. data/lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_metadataInfo.rb +9 -0
  10. data/lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_resourceInfo.rb +9 -0
  11. data/lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_responsibleParty.rb +12 -0
  12. data/lib/adiwg/mdtranslator/version.rb +6 -1
  13. data/lib/adiwg/mdtranslator/writers/html/sections/html_body.rb +7 -4
  14. data/lib/adiwg/mdtranslator/writers/html/sections/html_bodyScript.js +21 -3
  15. data/lib/adiwg/mdtranslator/writers/html/sections/html_geographicElement.rb +2 -1
  16. data/lib/adiwg/mdtranslator/writers/html/sections/html_inlineCss.css +16 -3
  17. data/lib/adiwg/mdtranslator/writers/html/sections/html_metadataInfo.rb +9 -0
  18. data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceGeneral.rb +17 -1
  19. data/lib/adiwg/mdtranslator/writers/iso/classes/class_aggregateInformation.rb +5 -6
  20. data/lib/adiwg/mdtranslator/writers/iso/classes/class_citation.rb +5 -4
  21. data/lib/adiwg/mdtranslator/writers/iso/classes/class_codelist.rb +51 -0
  22. data/lib/adiwg/mdtranslator/writers/iso/classes/class_dataIdentification.rb +23 -11
  23. data/lib/adiwg/mdtranslator/writers/iso/classes/class_dataQuality.rb +4 -3
  24. data/lib/adiwg/mdtranslator/writers/iso/classes/class_date.rb +4 -3
  25. data/lib/adiwg/mdtranslator/writers/iso/classes/class_enumerationList.rb +47 -0
  26. data/lib/adiwg/mdtranslator/writers/iso/classes/class_keyword.rb +4 -3
  27. data/lib/adiwg/mdtranslator/writers/iso/classes/class_legalConstraints.rb +5 -4
  28. data/lib/adiwg/mdtranslator/writers/iso/classes/class_maintenanceInformation.rb +5 -4
  29. data/lib/adiwg/mdtranslator/writers/iso/classes/class_medium.rb +5 -6
  30. data/lib/adiwg/mdtranslator/writers/iso/classes/class_metadataExtension.rb +7 -6
  31. data/lib/adiwg/mdtranslator/writers/iso/classes/class_onlineResource.rb +4 -3
  32. data/lib/adiwg/mdtranslator/writers/iso/classes/class_responsibleParty.rb +4 -3
  33. data/lib/adiwg/mdtranslator/writers/iso/classes/class_securityConstraints.rb +4 -3
  34. data/lib/adiwg/mdtranslator/writers/iso19110/class_FCfeatureCatalogue.rb +5 -1
  35. data/lib/adiwg/mdtranslator/writers/iso19115_2/class_MImetadata.rb +17 -10
  36. data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer.rb +1 -1
  37. metadata +19 -24
  38. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_associationType.rb +0 -47
  39. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_characterSet.rb +0 -93
  40. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_classification.rb +0 -53
  41. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_datatype.rb +0 -67
  42. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_dateType.rb +0 -44
  43. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_initiativeType.rb +0 -47
  44. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_keywordType.rb +0 -52
  45. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_maintenanceFrequency.rb +0 -61
  46. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_mediumFormat.rb +0 -50
  47. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_mediumName.rb +0 -74
  48. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_obligation.rb +0 -39
  49. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_onlineFunction.rb +0 -48
  50. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_presentationForm.rb +0 -71
  51. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_progress.rb +0 -52
  52. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_restriction.rb +0 -53
  53. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_role.rb +0 -60
  54. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_scope.rb +0 -69
  55. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_spatialRepresentationType.rb +0 -49
  56. data/lib/adiwg/mdtranslator/writers/iso/codelists/code_topicCategory.rb +0 -57
  57. data/test/readers/mdJson/v1_0/tc_reader_mdjson_responsibleParty.rb +0 -76
@@ -218,6 +218,19 @@
218
218
  content: "\f0da";
219
219
  }
220
220
  /*** Maps ***/
221
- section.extent-section div.map {
222
- height: 350px;
223
- }
221
+ section.extent-section div.map {
222
+ height: 350px;
223
+ }
224
+ /*** Side Nav ***/
225
+ div#sideNav {
226
+ position: fixed;
227
+ right: 10px;
228
+ bottom: 10px;
229
+ z-index: 100;
230
+ }
231
+ div#sideNav * {
232
+ display: block;
233
+ }
234
+ div#sideNav span {
235
+ margin-top: 4px;
236
+ }
@@ -3,6 +3,7 @@
3
3
 
4
4
  # History:
5
5
  # Stan Smith 2015-03-24 original script
6
+ # Stan Smith 2016-06-12 added metadata character set
6
7
 
7
8
  require 'html_citation'
8
9
  require 'html_responsibleParty'
@@ -75,6 +76,14 @@ module ADIWG
75
76
  htmlDateTime.writeHtml(hDate)
76
77
  end
77
78
 
79
+ # metadata characterSet
80
+ s = hMetaInfo[:metadataCharacterSet]
81
+ if s
82
+ @html.em('Metadata character set: ')
83
+ @html.text!(s)
84
+ @html.br
85
+ end
86
+
78
87
  # metadata status
79
88
  s = hMetaInfo[:metadataStatus]
80
89
  if s
@@ -55,7 +55,7 @@ module ADIWG
55
55
  end
56
56
  end
57
57
 
58
- #general - status
58
+ # general - status
59
59
  s = resourceInfo[:status]
60
60
  if !s.nil?
61
61
  @html.em('Status: ')
@@ -63,6 +63,22 @@ module ADIWG
63
63
  @html.br
64
64
  end
65
65
 
66
+ # general - languages
67
+ aLangs = resourceInfo[:resourceLanguages]
68
+ if !aLangs.empty?
69
+ @html.em('Resource Languages: ')
70
+ @html.text!(aLangs.to_s)
71
+ @html.br
72
+ end
73
+
74
+ # general - character sets
75
+ aCharSets = resourceInfo[:resourceCharacterSets]
76
+ if !aCharSets.empty?
77
+ @html.em('Resource character sets: ')
78
+ @html.text!(aCharSets.to_s)
79
+ @html.br
80
+ end
81
+
66
82
  # general - citation
67
83
  @html.details do
68
84
  @html.summary('Citation', {'id'=>'resourceGen-citation', 'class'=>'h4'})
@@ -7,9 +7,9 @@
7
7
  # Stan Smith 2014-11-06 take initiativeType from internal initiativeType
8
8
  # ... rather than resourceType for 0.9.0
9
9
  # Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
10
+ # Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
10
11
 
11
- require 'code_associationType'
12
- require 'code_initiativeType'
12
+ require 'class_codelist'
13
13
  require 'class_citation'
14
14
 
15
15
  module ADIWG
@@ -31,8 +31,7 @@ module ADIWG
31
31
  # ... citation > identifier section
32
32
 
33
33
  # classes used
34
- assocCode = $IsoNS::DS_AssociationTypeCode.new(@xml)
35
- initCode = $IsoNS::DS_InitiativeTypeCode.new(@xml)
34
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
36
35
  citationClass = $IsoNS::CI_Citation.new(@xml)
37
36
 
38
37
  @xml.tag!('gmd:MD_AggregateInformation') do
@@ -53,7 +52,7 @@ module ADIWG
53
52
  s = hAssocRes[:associationType]
54
53
  if !s.nil?
55
54
  @xml.tag!('gmd:associationType') do
56
- assocCode.writeXML(s)
55
+ codelistClass.writeXML('iso_associationType',s)
57
56
  end
58
57
  elsif $showAllTags
59
58
  @xml.tag!('gmd:associationType')
@@ -63,7 +62,7 @@ module ADIWG
63
62
  s = hAssocRes[:initiativeType]
64
63
  if !s.nil?
65
64
  @xml.tag!('gmd:initiativeType') do
66
- initCode.writeXML(s)
65
+ codelistClass.writeXML('iso_initiativeType',s)
67
66
  end
68
67
  elsif $showAllTags
69
68
  @xml.tag!('gmd:initiativeType')
@@ -9,10 +9,11 @@
9
9
  # Stan Smith 2014-05-28 modified for json schema 0.5.0
10
10
  # Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
11
11
  # Stan Smith 2014-08-18 modify identifier section for schema 0.6.0
12
- # Stan Smith 2014-08-18 process isbn and issn from identifier section per 0.6.0
12
+ # Stan Smith 2014-08-18 process isbn and ISSN from identifier section per 0.6.0
13
13
  # Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
14
+ # Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
14
15
 
15
- require 'code_presentationForm'
16
+ require 'class_codelist'
16
17
  require 'class_responsibleParty'
17
18
  require 'class_date'
18
19
  require 'class_identifier'
@@ -31,7 +32,7 @@ module ADIWG
31
32
  def writeXML(hCitation)
32
33
 
33
34
  # classes used
34
- presFormClass = $IsoNS::CI_PresentationFormCode.new(@xml)
35
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
35
36
  rPartyClass = $IsoNS::CI_ResponsibleParty.new(@xml)
36
37
  dateClass = $IsoNS::CI_Date.new(@xml)
37
38
  idClass = $IsoNS::MD_Identifier.new(@xml)
@@ -105,7 +106,7 @@ module ADIWG
105
106
  if !aPresForms.empty?
106
107
  aPresForms.each do |presForm|
107
108
  @xml.tag!('gmd:presentationForm') do
108
- presFormClass.writeXML(presForm)
109
+ codelistClass.writeXML('iso_presentationForm',presForm)
109
110
  end
110
111
  end
111
112
  elsif $showAllTags
@@ -0,0 +1,51 @@
1
+ # ISO <<CodeLists>>
2
+
3
+ # from http://mdtranslator.adiwg.org/api/codelists?format=xml
4
+ # History:
5
+ # Stan Smith 2013-08-09 original script
6
+ # Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered
7
+ # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
8
+ # Stan Smith 2014-12-15 replaced NOAA CT_CodelistCatalogue with mdTranslator CT_CodelistCatalogue
9
+ # Stan Smith 2015-06-11 refactored to use mdCodes gem for codelist contents
10
+
11
+ require 'adiwg-mdcodes'
12
+
13
+ module ADIWG
14
+ module Mdtranslator
15
+ module Writers
16
+ module Iso
17
+
18
+ class MD_Codelist
19
+ def initialize(xml)
20
+ @xml = xml
21
+ end
22
+
23
+ def writeXML(codeList, codeName)
24
+
25
+ # get requested codelist from the adiwg-mdcodes gem
26
+ mdCodelist = ADIWG::Mdcodes.getCodelistDetail(codeList)
27
+
28
+ sourceName = mdCodelist['sourceName']
29
+ codelist = mdCodelist['codelist']
30
+ codeId = 'user-provided-code'
31
+
32
+ # search the codelist for a matching codeName
33
+ codelist.each do |code|
34
+ if code['codeName'] == codeName
35
+ codeId = code['code']
36
+ break
37
+ end
38
+ end
39
+
40
+ # generate the iso code block
41
+ @xml.tag!('gmd:' + "#{sourceName}", {:codeList => 'http://mdtranslator.adiwg.org/api/codelists?format=xml#' + "#{sourceName}",
42
+ :codeListValue => "#{codeName}",
43
+ :codeSpace => "#{codeId}"})
44
+ end
45
+
46
+ end
47
+
48
+ end
49
+ end
50
+ end
51
+ end
@@ -16,10 +16,11 @@
16
16
  # Stan Smith 2014-10-29 add resource time period as a extent temporal element
17
17
  # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
18
18
  # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
19
+ # Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
20
+ # Stan Smith 2015-16-12 added support for declaring multiple resource character sets
19
21
 
20
- require 'code_progress'
21
- require 'code_topicCategory'
22
- require 'code_spatialRepresentationType'
22
+ require 'class_codelist'
23
+ require 'class_enumerationList'
23
24
  require 'class_citation'
24
25
  require 'class_responsibleParty'
25
26
  require 'class_maintenanceInformation'
@@ -48,12 +49,9 @@ module ADIWG
48
49
 
49
50
  def writeXML(hDataId, aAssocRes)
50
51
 
51
- # codes used
52
- progressCode = $IsoNS::MD_ProgressCode.new(@xml)
53
- spatialCode = $IsoNS::MD_SpatialRepresentationTypeCode.new(@xml)
54
- topicCode = $IsoNS::MD_TopicCategoryCode.new(@xml)
55
-
56
52
  # classes used
53
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
54
+ enumerationClass = $IsoNS::MD_EnumerationList.new(@xml)
57
55
  intMetadataClass = InternalMetadata.new
58
56
  citationClass = $IsoNS::CI_Citation.new(@xml)
59
57
  rPartyClass = $IsoNS::CI_ResponsibleParty.new(@xml)
@@ -121,7 +119,7 @@ module ADIWG
121
119
  @xml.tag!('gmd:status', {'gco:nilReason' => 'missing'})
122
120
  else
123
121
  @xml.tag!('gmd:status') do
124
- progressCode.writeXML(s)
122
+ codelistClass.writeXML('iso_progress',s)
125
123
  end
126
124
  end
127
125
 
@@ -263,7 +261,7 @@ module ADIWG
263
261
  if !aSpatialType.empty?
264
262
  aSpatialType.each do |spType|
265
263
  @xml.tag!('gmd:spatialRepresentationType') do
266
- spatialCode.writeXML(spType)
264
+ codelistClass.writeXML('iso_spatialRepresentation',spType)
267
265
  end
268
266
  end
269
267
  elsif $showAllTags
@@ -296,12 +294,26 @@ module ADIWG
296
294
  end
297
295
  end
298
296
 
297
+ # data identification - characterSet - default 'utf8'
298
+ aCharSets = hDataId[:resourceCharacterSets]
299
+ if !aCharSets.empty?
300
+ aCharSets.each do |charSet|
301
+ @xml.tag!('gmd:characterSet') do
302
+ codelistClass.writeXML('iso_characterSet',charSet)
303
+ end
304
+ end
305
+ else
306
+ @xml.tag!('gmd:characterSet') do
307
+ codelistClass.writeXML('iso_characterSet','utf8')
308
+ end
309
+ end
310
+
299
311
  # data identification - topic category
300
312
  aTopics = hDataId[:topicCategories]
301
313
  if !aTopics.empty?
302
314
  aTopics.each do |spType|
303
315
  @xml.tag!('gmd:topicCategory') do
304
- topicCode.writeXML(spType)
316
+ enumerationClass.writeXML('iso_topicCategory',spType)
305
317
  end
306
318
  end
307
319
  elsif $showAllTags
@@ -6,8 +6,9 @@
6
6
  # Stan Smith 2014-07-09 modify require statements to function in RubyGem structure
7
7
  # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
8
8
  # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
9
+ # Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
9
10
 
10
- require 'code_scope'
11
+ require 'class_codelist'
11
12
  require 'class_lineage'
12
13
 
13
14
  module ADIWG
@@ -24,7 +25,7 @@ module ADIWG
24
25
  def writeXML(hDataQ)
25
26
 
26
27
  # classes used
27
- scopeCode = $IsoNS::MD_ScopeCode.new(@xml)
28
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
28
29
  lineClass = $IsoNS::LI_Lineage.new(@xml)
29
30
 
30
31
  @xml.tag!('gmd:DQ_DataQuality') do
@@ -37,7 +38,7 @@ module ADIWG
37
38
  @xml.tag!('gmd:scope') do
38
39
  @xml.tag!('gmd:DQ_Scope') do
39
40
  @xml.tag!('gmd:level') do
40
- scopeCode.writeXML(s)
41
+ codelistClass.writeXML('iso_scope',s)
41
42
  end
42
43
  end
43
44
  end
@@ -6,9 +6,10 @@
6
6
  # Stan Smith 2013-11-21 support for date or datetime
7
7
  # Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
8
8
  # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
9
+ # Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
9
10
 
11
+ require 'class_codelist'
10
12
  require 'module_dateTimeFun'
11
- require 'code_dateType'
12
13
 
13
14
  module ADIWG
14
15
  module Mdtranslator
@@ -24,7 +25,7 @@ module ADIWG
24
25
  def writeXML(hDate)
25
26
 
26
27
  # classes used
27
- dateTypeCode = $IsoNS::CI_DateTypeCode.new(@xml)
28
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
28
29
 
29
30
  citDateTime = hDate[:dateTime]
30
31
  citDateRes = hDate[:dateResolution]
@@ -56,7 +57,7 @@ module ADIWG
56
57
  @xml.tag!('gmd:dateType', {'gco:nilReason' => 'missing'})
57
58
  else
58
59
  @xml.tag!('gmd:dateType') do
59
- dateTypeCode.writeXML(citDateType)
60
+ codelistClass.writeXML('iso_dateType',citDateType)
60
61
  end
61
62
  end
62
63
  end
@@ -0,0 +1,47 @@
1
+ # ISO <<CodeLists>> Enumerations
2
+
3
+ # from http://mdtranslator.adiwg.org/api/codelists?format=xml
4
+ # History:
5
+ # Stan Smith 2013-08-09 original script
6
+ # Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered
7
+ # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
8
+ # Stan Smith 2014-12-15 replaced NOAA CT_CodelistCatalogue with mdTranslator CT_CodelistCatalogue
9
+ # Stan Smith 2015-06-12 refactored to use mdCodes gem for codelist contents
10
+
11
+ require 'adiwg-mdcodes'
12
+
13
+ module ADIWG
14
+ module Mdtranslator
15
+ module Writers
16
+ module Iso
17
+
18
+ class MD_EnumerationList
19
+ def initialize(xml)
20
+ @xml = xml
21
+ end
22
+
23
+ def writeXML(codeList, codeName)
24
+
25
+ # get requested codelist from the adiwg-mdcodes gem
26
+ mdCodelist = ADIWG::Mdcodes.getCodelistDetail(codeList)
27
+
28
+ sourceName = mdCodelist['sourceName']
29
+ codelist = mdCodelist['codelist']
30
+
31
+ # search the codelist for a matching codeName
32
+ # only valid enumeration values can be written in ISO
33
+ codelist.each do |code|
34
+ if code['codeName'] == codeName
35
+ @xml.tag!('gmd:' + "#{sourceName}", codeName)
36
+ break
37
+ end
38
+ end
39
+
40
+ end
41
+
42
+ end
43
+
44
+ end
45
+ end
46
+ end
47
+ end
@@ -6,8 +6,9 @@
6
6
  # Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
7
7
  # Stan Smith 2014-08-21 removed keyword thesaurus link; use citation onlineResource
8
8
  # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
9
+ # Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
9
10
 
10
- require 'code_keywordType'
11
+ require 'class_codelist'
11
12
  require 'class_citation'
12
13
 
13
14
  module ADIWG
@@ -24,8 +25,8 @@ module ADIWG
24
25
  def writeXML(hDKeyword)
25
26
 
26
27
  # classes used
28
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
27
29
  citationClass = $IsoNS::CI_Citation.new(@xml)
28
- keywordCode = $IsoNS::MD_KeywordTypeCode.new(@xml)
29
30
 
30
31
  @xml.tag!('gmd:MD_Keywords') do
31
32
 
@@ -45,7 +46,7 @@ module ADIWG
45
46
  s = hDKeyword[:keywordType]
46
47
  if !s.nil?
47
48
  @xml.tag!('gmd:type') do
48
- keywordCode.writeXML(s)
49
+ codelistClass.writeXML('iso_keywordType',s)
49
50
  end
50
51
  elsif $showAllTags
51
52
  @xml.tag!('gmd:type')
@@ -5,8 +5,9 @@
5
5
  # Stan Smith 2013-11-01 original script
6
6
  # Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
7
7
  # Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
8
+ # Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
8
9
 
9
- require 'code_restriction'
10
+ require 'class_codelist'
10
11
 
11
12
  module ADIWG
12
13
  module Mdtranslator
@@ -22,7 +23,7 @@ module ADIWG
22
23
  def writeXML(hLegalCons)
23
24
 
24
25
  # classes used
25
- restrictionCode = $IsoNS::MD_RestrictionCode.new(@xml)
26
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
26
27
 
27
28
  @xml.tag!('gmd:MD_LegalConstraints') do
28
29
 
@@ -31,7 +32,7 @@ module ADIWG
31
32
  if !aAccessCodes.empty?
32
33
  aAccessCodes.each do |code|
33
34
  @xml.tag!('gmd:accessConstraints') do
34
- restrictionCode.writeXML(code)
35
+ codelistClass.writeXML('iso_restriction',code)
35
36
  end
36
37
  end
37
38
  elsif $showAllTags
@@ -43,7 +44,7 @@ module ADIWG
43
44
  if !aUseCodes.empty?
44
45
  aUseCodes.each do |code|
45
46
  @xml.tag!('gmd:useConstraints') do
46
- restrictionCode.writeXML(code)
47
+ codelistClass.writeXML('iso_restriction',code)
47
48
  end
48
49
  end
49
50
  elsif $showAllTags