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
@@ -6,8 +6,9 @@
6
6
  # Stan Smith 2013-12-18 added contact
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
 
10
- require 'code_maintenanceFrequency'
11
+ require 'class_codelist'
11
12
  require 'class_responsibleParty'
12
13
 
13
14
  module ADIWG
@@ -24,7 +25,7 @@ module ADIWG
24
25
  def writeXML(hMaintInfo)
25
26
 
26
27
  # classes used
27
- maintFreqCode = $IsoNS::MD_MaintenanceFrequencyCode.new(@xml)
28
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
28
29
  rPartyClass = $IsoNS::CI_ResponsibleParty.new(@xml)
29
30
 
30
31
  @xml.tag! 'gmd:MD_MaintenanceInformation' do
@@ -35,7 +36,7 @@ module ADIWG
35
36
  @xml.tag!('gmd:maintenanceAndUpdateFrequency', {'gco:nilReason' => 'unknown'})
36
37
  else
37
38
  @xml.tag!('gmd:maintenanceAndUpdateFrequency') do
38
- maintFreqCode.writeXML(s)
39
+ codelistClass.writeXML('iso_maintenanceFrequency',s)
39
40
  end
40
41
  end
41
42
 
@@ -53,7 +54,7 @@ module ADIWG
53
54
 
54
55
  # maintenance information - contact - CI_ResponsibleParty
55
56
  aContacts = hMaintInfo[:maintContacts]
56
- if aContacts.empty? && $shoeEmpty
57
+ if aContacts.empty? && $showEmpty
57
58
  @xml.tag!('gmd:contact')
58
59
  else
59
60
  aContacts.each do |hContact|
@@ -5,9 +5,9 @@
5
5
  # Stan Smith 2013-09-26 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_mediumName'
10
- require 'code_mediumFormat'
10
+ require 'class_codelist'
11
11
 
12
12
  module ADIWG
13
13
  module Mdtranslator
@@ -23,8 +23,7 @@ module ADIWG
23
23
  def writeXML(medium)
24
24
 
25
25
  # classes used
26
- medFormatCode = $IsoNS::MD_MediumFormatCode.new(@xml)
27
- medNameCode = $IsoNS::MD_MediumNameCode.new(@xml)
26
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
28
27
 
29
28
  @xml.tag!('gmd:MD_Medium') do
30
29
 
@@ -32,7 +31,7 @@ module ADIWG
32
31
  s = medium[:mediumName]
33
32
  if !s.nil?
34
33
  @xml.tag!('gmd:name') do
35
- medNameCode.writeXML(s)
34
+ codelistClass.writeXML('iso_mediumName',s)
36
35
  end
37
36
  elsif $showAllTags
38
37
  @xml.tag!('gmd:name')
@@ -42,7 +41,7 @@ module ADIWG
42
41
  s = medium[:mediumFormat]
43
42
  if !s.nil?
44
43
  @xml.tag!('gmd:mediumFormat') do
45
- medFormatCode.writeXML(s)
44
+ codelistClass.writeXML('iso_mediumFormat',s)
46
45
  end
47
46
  elsif $showAllTags
48
47
  @xml.tag!('gmd:mediumFormat')
@@ -5,9 +5,10 @@
5
5
  # Stan Smith 2013-11-22 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_obligation'
10
- require 'code_datatype'
10
+ require 'class_codelist'
11
+ require 'class_enumerationList'
11
12
  require 'class_onlineResource'
12
13
  require 'class_responsibleParty'
13
14
 
@@ -25,10 +26,10 @@ module ADIWG
25
26
  def writeXML(hExtension)
26
27
 
27
28
  # classes used
29
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
30
+ enumerationClass = $IsoNS::MD_EnumerationList.new(@xml)
28
31
  olResClass = $IsoNS::CI_OnlineResource.new(@xml)
29
32
  rPartyClass = $IsoNS::CI_ResponsibleParty.new(@xml)
30
- obCode = $IsoNS::MD_ObligationCode.new(@xml)
31
- dataTCode = $IsoNS::MD_DatatypeCode.new(@xml)
32
33
 
33
34
  @xml.tag!('gmd:MD_MetadataExtensionInformation') do
34
35
 
@@ -80,7 +81,7 @@ module ADIWG
80
81
  s = hExtension[:obligation]
81
82
  if !s.nil?
82
83
  @xml.tag!('gmd:obligation') do
83
- obCode.writeXML(s)
84
+ enumerationClass.writeXML('iso_obligation',s)
84
85
  end
85
86
  elsif $showAllTags
86
87
  @xml.tag!('gmd:obligation')
@@ -92,7 +93,7 @@ module ADIWG
92
93
  @xml.tag!('gmd:dataType', {'gco:nilReason' => 'missing'})
93
94
  else
94
95
  @xml.tag!('gmd:dataType') do
95
- dataTCode.writeXML(s)
96
+ codelistClass.writeXML('iso_dataType',s)
96
97
  end
97
98
  end
98
99
 
@@ -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-14 added protocol to 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_onlineFunction'
11
+ require 'class_codelist'
11
12
 
12
13
  module ADIWG
13
14
  module Mdtranslator
@@ -23,7 +24,7 @@ module ADIWG
23
24
  def writeXML(hOlResource)
24
25
 
25
26
  # classes used
26
- olFunctionCode = $IsoNS::CI_OnLineFunctionCode.new(@xml)
27
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
27
28
 
28
29
  @xml.tag! 'gmd:CI_OnlineResource' do
29
30
 
@@ -71,7 +72,7 @@ module ADIWG
71
72
  s = hOlResource[:olResFunction]
72
73
  if !s.nil?
73
74
  @xml.tag!('gmd:function') do
74
- olFunctionCode.writeXML(s)
75
+ codelistClass.writeXML('iso_onlineFunction',s)
75
76
  end
76
77
  elsif $showAllTags
77
78
  @xml.tag!('gmd:function')
@@ -6,8 +6,9 @@
6
6
  # Stan Smith 2014-05-14 modified for JSON schema 0.4.0
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
 
10
- require 'code_role'
11
+ require 'class_codelist'
11
12
  require 'class_contact'
12
13
 
13
14
  module ADIWG
@@ -24,8 +25,8 @@ module ADIWG
24
25
  def writeXML(rParty)
25
26
 
26
27
  # classes used
28
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
27
29
  ciContactClass = $IsoNS::CI_Contact.new(@xml)
28
- ciRoleCode = $IsoNS::CI_RoleCode.new(@xml)
29
30
 
30
31
  # search array of responsible party for matches in contact object
31
32
  rpID = rParty[:contactId]
@@ -83,7 +84,7 @@ module ADIWG
83
84
  xml.tag!('gmd:role', {'gco:nilReason' => 'missing'})
84
85
  else
85
86
  @xml.tag! 'gmd:role' do
86
- ciRoleCode.writeXML(s)
87
+ codelistClass.writeXML('iso_role',s)
87
88
  end
88
89
  end
89
90
 
@@ -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_classification'
10
+ require 'class_codelist'
10
11
 
11
12
  module ADIWG
12
13
  module Mdtranslator
@@ -22,7 +23,7 @@ module ADIWG
22
23
  def writeXML(hSecurityCons)
23
24
 
24
25
  # classes used
25
- classCode = $IsoNS::MD_ClassificationCode.new(@xml)
26
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
26
27
 
27
28
  @xml.tag!('gmd:MD_SecurityConstraints') do
28
29
 
@@ -32,7 +33,7 @@ module ADIWG
32
33
  @xml.tag!('gmd:classification', {'gco:nilReason' => 'missing'})
33
34
  else
34
35
  @xml.tag!('gmd:classification') do
35
- classCode.writeXML(s)
36
+ codelistClass.writeXML('iso_classification',s)
36
37
  end
37
38
  end
38
39
 
@@ -38,6 +38,10 @@ module ADIWG
38
38
  # document head
39
39
  metadata = @xml.instruct! :xml, encoding: 'UTF-8'
40
40
  @xml.comment!('core gfc based instance document for ISO 19110')
41
+ @xml.comment!('metadata file constructed using mdTranslator')
42
+ @xml.comment!('mdTranslator software is an open-source project sponsored by the Alaska Data Integration working group (ADIwg)')
43
+ @xml.comment!('Alaska Data Integration working group is not responsible for the metadata content')
44
+ @xml.comment!('mdTranslator and other metadata tools available at https://github.com/adiwg')
41
45
  @xml.tag!('gfc:FC_FeatureCatalogue', {'xmlns:gmi' => 'http://www.isotc211.org/2005/gmi',
42
46
  'xmlns:gmd' => 'http://www.isotc211.org/2005/gmd',
43
47
  'xmlns:gco' => 'http://www.isotc211.org/2005/gco',
@@ -49,7 +53,7 @@ module ADIWG
49
53
  'xmlns:gfc' => 'http://www.isotc211.org/2005/gfc',
50
54
  'xmlns:xlink' => 'http://www.w3.org/1999/xlink',
51
55
  'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
52
- 'xsi:schemaLocation' => 'http://www.isotc211.org/2005/gfc ftp://ftp.ncddc.noaa.gov/pub/Metadata/Online_ISO_Training/Intro_to_ISO/schemas/ISObio/schema.xsd'}) do
56
+ 'xsi:schemaLocation' => 'http://www.isotc211.org/2005/gfc ftp://ftp.ncddc.noaa.gov/pub/Metadata/Online_ISO_Training/Intro_to_ISO/schemas/ISObio/gfc/gfc.xsd'}) do
53
57
 
54
58
  # feature catalogue information - name - required
55
59
  # name is pulled from citation title in data dictionary information section
@@ -24,9 +24,10 @@
24
24
  # Stan Smith 2014-11-06 changed hierarchy level to load values from resourceInfo > resourceType
25
25
  # Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
26
26
  # Stan Smith 2014-12-29 set builder object '@xml' into string 'metadata'
27
+ # Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
28
+ # Stan Smith 2015-06-12 added support for user to specify metadataCharacterSet
27
29
 
28
- require 'code_characterSet'
29
- require 'code_scope'
30
+ require 'class_codelist'
30
31
  require 'class_responsibleParty'
31
32
  require 'class_metadataExtension'
32
33
  require 'class_dataIdentification'
@@ -51,8 +52,7 @@ module ADIWG
51
52
  $IsoNS = ADIWG::Mdtranslator::Writers::Iso
52
53
 
53
54
  # classes used
54
- charCode = $IsoNS::MD_CharacterSetCode.new(@xml)
55
- scopeCode = $IsoNS::MD_ScopeCode.new(@xml)
55
+ codelistClass = $IsoNS::MD_Codelist.new(@xml)
56
56
  rPartyClass = $IsoNS::CI_ResponsibleParty.new(@xml)
57
57
  mdExtClass = $IsoNS::MD_MetadataExtensionInformation.new(@xml)
58
58
  dataIdClass = $IsoNS::MD_DataIdentification.new(@xml)
@@ -70,6 +70,10 @@ module ADIWG
70
70
  # document head
71
71
  metadata = @xml.instruct! :xml, encoding: 'UTF-8'
72
72
  @xml.comment!('core gmi based instance document ISO 19115-2')
73
+ @xml.comment!('metadata file constructed using mdTranslator')
74
+ @xml.comment!('mdTranslator software is an open-source project sponsored by the Alaska Data Integration working group (ADIwg)')
75
+ @xml.comment!('Alaska Data Integration working group is not responsible for the metadata content')
76
+ @xml.comment!('mdTranslator and other metadata tools available at https://github.com/adiwg')
73
77
  @xml.tag!('gmi:MI_Metadata', {'xmlns:gmi' => 'http://www.isotc211.org/2005/gmi',
74
78
  'xmlns:gmd' => 'http://www.isotc211.org/2005/gmd',
75
79
  'xmlns:gco' => 'http://www.isotc211.org/2005/gco',
@@ -111,10 +115,13 @@ module ADIWG
111
115
  @xml.tag!('gco:CharacterString', 'eng; USA')
112
116
  end
113
117
 
114
- # metadata information - character set - default
118
+ # metadata information - character set - default 'utf8'
115
119
  @xml.tag!('gmd:characterSet') do
116
- # all out put is in utf8
117
- charCode.writeXML('utf8')
120
+ s = hMetaInfo[:metadataCharacterSet]
121
+ if s.nil?
122
+ s = 'utf8'
123
+ end
124
+ codelistClass.writeXML('iso_characterSet',s)
118
125
  end
119
126
 
120
127
  # metadata information - parent identifier
@@ -146,19 +153,19 @@ module ADIWG
146
153
  @xml.tag!('gmd:parentIdentifier')
147
154
  end
148
155
 
149
- # metadata information - hierarchy level - defaults to 'dataset',
156
+ # metadata information - hierarchy level - defaults to 'undefined',
150
157
  # values taken from resourceInfo > resourceType
151
158
  fileHierarchy = false
152
159
  s = hResInfo[:resourceType]
153
160
  if s != ''
154
161
  fileHierarchy = true
155
162
  @xml.tag!('gmd:hierarchyLevel') do
156
- scopeCode.writeXML(s)
163
+ codelistClass.writeXML('iso_scope',s)
157
164
  end
158
165
  end
159
166
  if !fileHierarchy
160
167
  @xml.tag!('gmd:hierarchyLevel') do
161
- scopeCode.writeXML('dataset')
168
+ codelistClass.writeXML('iso_scope','undefined')
162
169
  end
163
170
  end
164
171
 
@@ -6,8 +6,8 @@
6
6
  # ... for geometry supplemental information
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
 
10
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../iso/codelists'))
11
11
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../iso/classes'))
12
12
 
13
13
  require 'builder'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adiwg-mdtranslator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stan Smith
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-06 00:00:00.000000000 Z
12
+ date: 2015-07-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -143,9 +143,23 @@ dependencies:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: 1.0.0
146
+ - !ruby/object:Gem::Dependency
147
+ name: adiwg-mdcodes
148
+ requirement: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '1.0'
153
+ type: :runtime
154
+ prerelease: false
155
+ version_requirements: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '1.0'
146
160
  description: The mdtranslator was written by the Alaska Data Integration Working Group
147
161
  (ADIwg) to assist with creating ISO 19139 metadata records. Input to the mdtranslator
148
- is simple JSON using the mdJson-schema. The mdtranslator architecture allows developers
162
+ is JSON conforming to the mdJson-schema. The mdtranslator architecture allows developers
149
163
  to write additional readers for other input formats and/or write additional writers
150
164
  for other output other than ISO 19139.
151
165
  email:
@@ -284,6 +298,7 @@ files:
284
298
  - lib/adiwg/mdtranslator/writers/iso/classes/class_boundingPolygon.rb
285
299
  - lib/adiwg/mdtranslator/writers/iso/classes/class_browseGraphic.rb
286
300
  - lib/adiwg/mdtranslator/writers/iso/classes/class_citation.rb
301
+ - lib/adiwg/mdtranslator/writers/iso/classes/class_codelist.rb
287
302
  - lib/adiwg/mdtranslator/writers/iso/classes/class_contact.rb
288
303
  - lib/adiwg/mdtranslator/writers/iso/classes/class_dataIdentification.rb
289
304
  - lib/adiwg/mdtranslator/writers/iso/classes/class_dataQuality.rb
@@ -291,6 +306,7 @@ files:
291
306
  - lib/adiwg/mdtranslator/writers/iso/classes/class_digitalTransferOptions.rb
292
307
  - lib/adiwg/mdtranslator/writers/iso/classes/class_distribution.rb
293
308
  - lib/adiwg/mdtranslator/writers/iso/classes/class_distributor.rb
309
+ - lib/adiwg/mdtranslator/writers/iso/classes/class_enumerationList.rb
294
310
  - lib/adiwg/mdtranslator/writers/iso/classes/class_extent.rb
295
311
  - lib/adiwg/mdtranslator/writers/iso/classes/class_featureAttribute.rb
296
312
  - lib/adiwg/mdtranslator/writers/iso/classes/class_featureConstraint.rb
@@ -332,25 +348,6 @@ files:
332
348
  - lib/adiwg/mdtranslator/writers/iso/classes/class_useConstraints.rb
333
349
  - lib/adiwg/mdtranslator/writers/iso/classes/class_verticalExtent.rb
334
350
  - lib/adiwg/mdtranslator/writers/iso/classes/class_vouchers.rb
335
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_associationType.rb
336
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_characterSet.rb
337
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_classification.rb
338
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_datatype.rb
339
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_dateType.rb
340
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_initiativeType.rb
341
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_keywordType.rb
342
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_maintenanceFrequency.rb
343
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_mediumFormat.rb
344
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_mediumName.rb
345
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_obligation.rb
346
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_onlineFunction.rb
347
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_presentationForm.rb
348
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_progress.rb
349
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_restriction.rb
350
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_role.rb
351
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_scope.rb
352
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_spatialRepresentationType.rb
353
- - lib/adiwg/mdtranslator/writers/iso/codelists/code_topicCategory.rb
354
351
  - lib/adiwg/mdtranslator/writers/iso/units/class_baseUnit.rb
355
352
  - lib/adiwg/mdtranslator/writers/iso/units/class_conventionalUnit.rb
356
353
  - lib/adiwg/mdtranslator/writers/iso/units/class_definitionUnit.rb
@@ -373,7 +370,6 @@ files:
373
370
  - test/readers/mdJson/v1_0/tc_reader_mdjson_domain.rb
374
371
  - test/readers/mdJson/v1_0/tc_reader_mdjson_onlineResource.rb
375
372
  - test/readers/mdJson/v1_0/tc_reader_mdjson_phone.rb
376
- - test/readers/mdJson/v1_0/tc_reader_mdjson_responsibleParty.rb
377
373
  - test/readers/mdJson/v1_0/tc_translation.rb
378
374
  - test/writers/iso19115_2/tc_writer_iso19115_2_address.rb
379
375
  homepage: http://www.adiwg.org/mdTranslator
@@ -413,6 +409,5 @@ test_files:
413
409
  - test/readers/mdJson/v1_0/tc_reader_mdjson_domain.rb
414
410
  - test/readers/mdJson/v1_0/tc_reader_mdjson_onlineResource.rb
415
411
  - test/readers/mdJson/v1_0/tc_reader_mdjson_phone.rb
416
- - test/readers/mdJson/v1_0/tc_reader_mdjson_responsibleParty.rb
417
412
  - test/readers/mdJson/v1_0/tc_translation.rb
418
413
  - test/writers/iso19115_2/tc_writer_iso19115_2_address.rb
@@ -1,47 +0,0 @@
1
- # ISO <<CodeLists>> gmd:MD_ClassificationCode
2
-
3
- # from http://mdtranslator.adiwg.org/api/codelists?format=xml
4
- # History:
5
- # Stan Smith 2013-10-21 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
-
10
- module ADIWG
11
- module Mdtranslator
12
- module Writers
13
- module Iso
14
-
15
- class DS_AssociationTypeCode
16
- def initialize(xml)
17
- @xml = xml
18
- end
19
-
20
- def writeXML(codeName)
21
- case (codeName)
22
- when 'crossReference' then
23
- codeID = '001'
24
- when 'largerWorkCitation' then
25
- codeID = '002'
26
- when 'partOfSeamlessDatabase' then
27
- codeID = '003'
28
- when 'source' then
29
- codeID = '004'
30
- when 'stereoMate' then
31
- codeID = '005'
32
- else
33
- codeID = 'non-ISO codeName'
34
- end
35
-
36
- # write xml
37
- @xml.tag!('gmd:DS_AssociationTypeCode', {:codeList => 'http://mdtranslator.adiwg.org/api/codelists?format=xml#DS_AssociationTypeCode',
38
- :codeListValue => "#{codeName}",
39
- :codeSpace => "#{codeID}"})
40
- end
41
-
42
- end
43
-
44
- end
45
- end
46
- end
47
- end