adiwg-mdtranslator 0.9.0 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -6
  3. data/adiwg-mdtranslator.gemspec +2 -2
  4. data/bin/mdtranslator +10 -10
  5. data/lib/adiwg/mdtranslator.rb +54 -12
  6. data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +87 -7
  7. data/lib/adiwg/mdtranslator/readers/{adiwgJson/adiwgJson_reader.rb → mdJson/mdJson_reader.rb} +13 -4
  8. data/lib/adiwg/mdtranslator/readers/{adiwgJson/adiwgJson_validator.rb → mdJson/mdJson_validator.rb} +18 -10
  9. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_additionalDocumentation.rb +2 -2
  10. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_address.rb +1 -1
  11. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_associatedResource.rb +3 -3
  12. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_boundingBox.rb +1 -1
  13. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_browseGraphic.rb +1 -1
  14. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_citation.rb +5 -5
  15. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_contacts.rb +7 -7
  16. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_coordinates.rb +1 -1
  17. data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_dataDictionary.rb +53 -0
  18. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_dataQuality.rb +2 -2
  19. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_dateTime.rb +1 -1
  20. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_descriptiveKeyword.rb +2 -2
  21. data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_dictionaryInfo.rb +52 -0
  22. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_distributionInfo.rb +4 -4
  23. data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_domain.rb +62 -0
  24. data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_domainItem.rb +42 -0
  25. data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entity.rb +92 -0
  26. data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entityAttribute.rb +91 -0
  27. data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entityForeignKey.rb +43 -0
  28. data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entityIndex.rb +42 -0
  29. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_extent.rb +4 -4
  30. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_geoCoordSystem.rb +1 -1
  31. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_geoProperties.rb +4 -4
  32. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_geographicElement.rb +12 -12
  33. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_legalConstraint.rb +1 -1
  34. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_lineString.rb +2 -2
  35. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_lineage.rb +3 -3
  36. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_metadata.rb +6 -6
  37. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_metadataExtension.rb +2 -2
  38. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_metadataInfo.rb +8 -8
  39. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_onlineResource.rb +1 -1
  40. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_phone.rb +1 -1
  41. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_point.rb +2 -2
  42. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_polygon.rb +2 -2
  43. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_processStep.rb +4 -4
  44. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resolution.rb +1 -1
  45. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceFormat.rb +1 -1
  46. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceIdentifier.rb +2 -2
  47. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceInfo.rb +16 -16
  48. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceMaintenance.rb +2 -2
  49. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceSpecificUsage.rb +2 -2
  50. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_responsibleParty.rb +2 -2
  51. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_securityConstraint.rb +1 -1
  52. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_source.rb +3 -3
  53. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_spatialReference.rb +1 -1
  54. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_taxonClass.rb +1 -1
  55. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_taxonomy.rb +5 -5
  56. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_temporalElement.rb +4 -4
  57. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_timeInstant.rb +3 -3
  58. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_timePeriod.rb +4 -4
  59. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_verticalElement.rb +1 -1
  60. data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_voucher.rb +2 -2
  61. data/lib/adiwg/mdtranslator/readers/mdJson/readme.md +19 -0
  62. data/lib/adiwg/mdtranslator/version.rb +5 -1
  63. data/lib/adiwg/mdtranslator/writers/iso/classes/class_FCfeatureCatalogue.rb +171 -0
  64. data/lib/adiwg/mdtranslator/writers/{iso19115_2/classes/class_metadata.rb → iso/classes/class_MImetadata.rb} +3 -3
  65. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_address.rb +0 -0
  66. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_aggregateInformation.rb +0 -0
  67. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_boundingPolygon.rb +0 -0
  68. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_browseGraphic.rb +0 -0
  69. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_citation.rb +3 -3
  70. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_contact.rb +1 -1
  71. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_dataIdentification.rb +0 -0
  72. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_dataQuality.rb +0 -0
  73. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_date.rb +0 -0
  74. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_digitalTransferOptions.rb +0 -0
  75. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_distribution.rb +0 -0
  76. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_distributor.rb +0 -0
  77. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_extent.rb +0 -0
  78. data/lib/adiwg/mdtranslator/writers/iso/classes/class_featureAttribute.rb +114 -0
  79. data/lib/adiwg/mdtranslator/writers/iso/classes/class_featureConstraint.rb +55 -0
  80. data/lib/adiwg/mdtranslator/writers/iso/classes/class_featureType.rb +120 -0
  81. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_format.rb +0 -0
  82. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_genericMetaData.rb +0 -0
  83. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_geographicBoundingBox.rb +0 -0
  84. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_geographicDescription.rb +0 -0
  85. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_geographicElement.rb +0 -0
  86. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_identifier.rb +0 -0
  87. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_keyword.rb +0 -0
  88. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_legalConstraints.rb +0 -0
  89. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_lineString.rb +1 -1
  90. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_lineage.rb +0 -0
  91. data/lib/adiwg/mdtranslator/writers/iso/classes/class_listedValue.rb +68 -0
  92. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_maintenanceInformation.rb +0 -0
  93. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_medium.rb +0 -0
  94. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_metadataExtension.rb +0 -0
  95. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_multiGeometry.rb +3 -3
  96. data/lib/adiwg/mdtranslator/writers/iso/classes/class_multiplicity.rb +44 -0
  97. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_onlineResource.rb +0 -0
  98. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_point.rb +1 -1
  99. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_polygon.rb +2 -2
  100. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_processStep.rb +1 -1
  101. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_referenceIdentifier.rb +0 -0
  102. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_referenceSystem.rb +0 -0
  103. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_resolution.rb +0 -0
  104. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_responsibleParty.rb +1 -1
  105. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_securityConstraints.rb +0 -0
  106. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_source.rb +0 -0
  107. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_standardOrderProcess.rb +0 -0
  108. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_taxonClassification.rb +0 -0
  109. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_taxonSystem.rb +0 -0
  110. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_telephone.rb +0 -0
  111. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_temporalExtent.rb +0 -0
  112. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_timeInstant.rb +1 -1
  113. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_timePeriod.rb +1 -1
  114. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_usage.rb +0 -0
  115. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_useConstraints.rb +0 -0
  116. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_verticalExtent.rb +0 -0
  117. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_vouchers.rb +0 -0
  118. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_associationType.rb +0 -0
  119. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_characterSet.rb +0 -0
  120. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_classification.rb +0 -0
  121. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_datatype.rb +0 -0
  122. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_dateType.rb +0 -0
  123. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_initiativeType.rb +0 -0
  124. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_keywordType.rb +0 -0
  125. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_maintenanceFrequency.rb +0 -0
  126. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_mediumFormat.rb +0 -0
  127. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_mediumName.rb +0 -0
  128. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_obligation.rb +0 -0
  129. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_onlineFunction.rb +0 -0
  130. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_presentationForm.rb +0 -0
  131. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_progress.rb +0 -0
  132. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_restriction.rb +0 -0
  133. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_role.rb +0 -0
  134. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_scope.rb +0 -0
  135. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_spatialRepresentationType.rb +0 -0
  136. data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_topicCategory.rb +0 -0
  137. data/lib/adiwg/mdtranslator/writers/iso/units/class_baseUnit.rb +27 -0
  138. data/lib/adiwg/mdtranslator/writers/iso/units/class_conventionalUnit.rb +53 -0
  139. data/lib/adiwg/mdtranslator/writers/iso/units/class_definitionUnit.rb +24 -0
  140. data/lib/adiwg/mdtranslator/writers/iso/units/class_derivedUnit.rb +31 -0
  141. data/lib/adiwg/mdtranslator/writers/iso/units/class_unitsOfMeasure.rb +224 -0
  142. data/lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb +28 -0
  143. data/lib/adiwg/mdtranslator/writers/iso19110/readme.md +13 -0
  144. data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer.rb +1 -1
  145. data/lib/adiwg/mdtranslator/writers/iso19115_2/readme.md +6 -9
  146. data/test/tc_translation.rb +35 -18
  147. metadata +166 -146
  148. data/lib/adiwg/mdtranslator/readers/adiwgJson/readme.md +0 -19
  149. data/mdtranslator.rb +0 -187
@@ -8,7 +8,7 @@
8
8
  require ADIWG::Mdtranslator.reader_module('module_processStep', $response[:readerVersionUsed])
9
9
  require ADIWG::Mdtranslator.reader_module('module_source', $response[:readerVersionUsed])
10
10
 
11
- module Adiwg_Lineage
11
+ module Md_Lineage
12
12
 
13
13
  def self.unpack(hLineage)
14
14
 
@@ -29,7 +29,7 @@ module Adiwg_Lineage
29
29
  aProcSteps = hLineage['processStep']
30
30
  unless aProcSteps.empty?
31
31
  aProcSteps.each do |hProcStep|
32
- intDataLine[:processSteps] << Adiwg_ProcessStep.unpack(hProcStep)
32
+ intDataLine[:processSteps] << Md_ProcessStep.unpack(hProcStep)
33
33
  end
34
34
  end
35
35
  end
@@ -39,7 +39,7 @@ module Adiwg_Lineage
39
39
  aSources = hLineage['source']
40
40
  unless aSources.empty?
41
41
  aSources.each do |hSource|
42
- intDataLine[:dataSources] << Adiwg_Source.unpack(hSource)
42
+ intDataLine[:dataSources] << Md_Source.unpack(hSource)
43
43
  end
44
44
  end
45
45
  end
@@ -20,7 +20,7 @@ require ADIWG::Mdtranslator.reader_module('module_associatedResource', $response
20
20
  require ADIWG::Mdtranslator.reader_module('module_additionalDocumentation', $response[:readerVersionUsed])
21
21
  require ADIWG::Mdtranslator.reader_module('module_citation', $response[:readerVersionUsed])
22
22
 
23
- module Adiwg_Metadata
23
+ module Md_Metadata
24
24
 
25
25
  def self.unpack(hMetadata)
26
26
 
@@ -31,13 +31,13 @@ module Adiwg_Metadata
31
31
  # metadata - metadataInfo
32
32
  # metadataInfo needs access to resourceInfo to check taxonomy
33
33
  if hMetadata.has_key?('metadataInfo')
34
- intMetadata[:metadataInfo] = Adiwg_MetadataInfo.unpack(hMetadata)
34
+ intMetadata[:metadataInfo] = Md_MetadataInfo.unpack(hMetadata)
35
35
  end
36
36
 
37
37
  # metadata - resource identification info
38
38
  if hMetadata.has_key?('resourceInfo')
39
39
  hResourceInfo = hMetadata['resourceInfo']
40
- intMetadata[:resourceInfo] = Adiwg_ResourceInfo.unpack(hResourceInfo)
40
+ intMetadata[:resourceInfo] = Md_ResourceInfo.unpack(hResourceInfo)
41
41
  end
42
42
 
43
43
  # metadata - distribution info
@@ -45,7 +45,7 @@ module Adiwg_Metadata
45
45
  aDistributors = hMetadata['distributionInfo']
46
46
  unless aDistributors.empty?
47
47
  aDistributors.each do |hDistributor|
48
- intMetadata[:distributorInfo] << Adiwg_DistributionInfo.unpack(hDistributor)
48
+ intMetadata[:distributorInfo] << Md_DistributionInfo.unpack(hDistributor)
49
49
  end
50
50
  end
51
51
  end
@@ -55,7 +55,7 @@ module Adiwg_Metadata
55
55
  aAssocRes = hMetadata['associatedResource']
56
56
  unless aAssocRes.empty?
57
57
  aAssocRes.each do |hAssocRes|
58
- intMetadata[:associatedResources] << Adiwg_AssociatedResource.unpack(hAssocRes)
58
+ intMetadata[:associatedResources] << Md_AssociatedResource.unpack(hAssocRes)
59
59
  end
60
60
  end
61
61
  end
@@ -65,7 +65,7 @@ module Adiwg_Metadata
65
65
  aAddDocs = hMetadata['additionalDocumentation']
66
66
  unless aAddDocs.empty?
67
67
  aAddDocs.each do |hAddDoc|
68
- intMetadata[:additionalDocuments] << Adiwg_AdditionalDocumentation.unpack(hAddDoc)
68
+ intMetadata[:additionalDocuments] << Md_AdditionalDocumentation.unpack(hAddDoc)
69
69
  end
70
70
  end
71
71
  end
@@ -5,7 +5,7 @@
5
5
  # Stan Smith 2013-11-22 original script
6
6
  # Stan Smith 2014-05-15 modified for JSON schema 0.4.0
7
7
 
8
- module Adiwg_MetadataExtension
8
+ module Md_MetadataExtension
9
9
 
10
10
  def self.addExtensionISObio()
11
11
 
@@ -30,7 +30,7 @@ module Adiwg_MetadataExtension
30
30
  'taxonomic sources, procedures, and treatments.'
31
31
 
32
32
  # source information
33
- intContactRole[:contactID] = 'ADIwgBio'
33
+ intContactRole[:contactId] = 'ADIwgBio'
34
34
  intContactRole[:roleName] = 'resourceProvider'
35
35
  intMetaExt[:extSources] << intContactRole
36
36
 
@@ -15,7 +15,7 @@ require ADIWG::Mdtranslator.reader_module('module_metadataExtension', $response[
15
15
  require ADIWG::Mdtranslator.reader_module('module_resourceIdentifier', $response[:readerVersionUsed])
16
16
  require ADIWG::Mdtranslator.reader_module('module_citation', $response[:readerVersionUsed])
17
17
 
18
- module Adiwg_MetadataInfo
18
+ module Md_MetadataInfo
19
19
 
20
20
  def self.unpack(hMetadata)
21
21
 
@@ -28,7 +28,7 @@ module Adiwg_MetadataInfo
28
28
  if hMetadataInfo.has_key?('metadataIdentifier')
29
29
  hMetadataId = hMetadataInfo['metadataIdentifier']
30
30
  unless hMetadataId.empty?
31
- intMetadataInfo[:metadataId] = Adiwg_ResourceIdentifier.unpack(hMetadataId)
31
+ intMetadataInfo[:metadataId] = Md_ResourceIdentifier.unpack(hMetadataId)
32
32
  end
33
33
  end
34
34
 
@@ -36,7 +36,7 @@ module Adiwg_MetadataInfo
36
36
  if hMetadataInfo.has_key?('parentMetadata')
37
37
  hParent = hMetadataInfo['parentMetadata']
38
38
  unless hParent.empty?
39
- intMetadataInfo[:parentMetadata] = Adiwg_Citation.unpack(hParent)
39
+ intMetadataInfo[:parentMetadata] = Md_Citation.unpack(hParent)
40
40
  end
41
41
  end
42
42
 
@@ -45,7 +45,7 @@ module Adiwg_MetadataInfo
45
45
  aCust = hMetadataInfo['metadataContact']
46
46
  unless aCust.empty?
47
47
  aCust.each do |rParty|
48
- intMetadataInfo[:metadataCustodians] << Adiwg_ResponsibleParty.unpack(rParty)
48
+ intMetadataInfo[:metadataCustodians] << Md_ResponsibleParty.unpack(rParty)
49
49
  end
50
50
  end
51
51
  end
@@ -54,7 +54,7 @@ module Adiwg_MetadataInfo
54
54
  if hMetadataInfo.has_key?('metadataCreationDate')
55
55
  s = hMetadataInfo['metadataCreationDate']
56
56
  if s != ''
57
- hDateTime = Adiwg_DateTime.unpack(s)
57
+ hDateTime = Md_DateTime.unpack(s)
58
58
  hDateTime[:dateType] = 'publication'
59
59
  intMetadataInfo[:metadataCreateDate] = hDateTime
60
60
  end
@@ -64,7 +64,7 @@ module Adiwg_MetadataInfo
64
64
  if hMetadataInfo.has_key?('metadataLastUpdate')
65
65
  s = hMetadataInfo['metadataLastUpdate']
66
66
  if s != ''
67
- hDateTime = Adiwg_DateTime.unpack(s)
67
+ hDateTime = Md_DateTime.unpack(s)
68
68
  hDateTime[:dateType] = 'revision'
69
69
  intMetadataInfo[:metadataUpdateDate] = hDateTime
70
70
  end
@@ -90,7 +90,7 @@ module Adiwg_MetadataInfo
90
90
  if hMetadataInfo.has_key?('metadataMaintenance')
91
91
  hMetaMaint = hMetadataInfo['metadataMaintenance']
92
92
  unless hMetaMaint.empty?
93
- intMetadataInfo[:maintInfo] = Adiwg_ResourceMaintenance.unpack(hMetaMaint)
93
+ intMetadataInfo[:maintInfo] = Md_ResourceMaintenance.unpack(hMetaMaint)
94
94
  end
95
95
  end
96
96
 
@@ -100,7 +100,7 @@ module Adiwg_MetadataInfo
100
100
  if resourceInfo.has_key?('taxonomy')
101
101
  hTaxonomy = resourceInfo['taxonomy']
102
102
  unless hTaxonomy.empty?
103
- intMetadataInfo[:extensions] << Adiwg_MetadataExtension.addExtensionISObio
103
+ intMetadataInfo[:extensions] << Md_MetadataExtension.addExtensionISObio
104
104
  end
105
105
  end
106
106
  end
@@ -7,7 +7,7 @@
7
7
  # Stan Smith 2014-08-18 removed doi section for json 0.6.0
8
8
  # Stan Smith 2014-08-21 changed url to uri for json 0.6.0
9
9
 
10
- module Adiwg_OnlineResource
10
+ module Md_OnlineResource
11
11
 
12
12
  def self.unpack(hOlResource)
13
13
 
@@ -5,7 +5,7 @@
5
5
  # Stan Smith 2013-12-16 original script
6
6
  # Stan Smith 2014-05-14 combine phone service types
7
7
 
8
- module Adiwg_Phone
8
+ module Md_Phone
9
9
 
10
10
  def self.unpack(hPhone)
11
11
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  require ADIWG::Mdtranslator.reader_module('module_coordinates', $response[:readerVersionUsed])
11
11
 
12
- module Adiwg_Point
12
+ module Md_Point
13
13
 
14
14
  def self.unpack(aCoords,geoType)
15
15
  intMetadataClass = InternalMetadata.new
@@ -17,7 +17,7 @@ module Adiwg_Point
17
17
 
18
18
  intPoint[:geoType] = geoType
19
19
  intPoint[:geometry] = aCoords
20
- intPoint[:dimension] = Adiwg_Coordinates.getDimension(aCoords)
20
+ intPoint[:dimension] = Md_Coordinates.getDimension(aCoords)
21
21
 
22
22
  return intPoint
23
23
  end
@@ -10,7 +10,7 @@
10
10
 
11
11
  require ADIWG::Mdtranslator.reader_module('module_coordinates', $response[:readerVersionUsed])
12
12
 
13
- module Adiwg_Polygon
13
+ module Md_Polygon
14
14
 
15
15
  def self.unpack(aCoords, geoType)
16
16
  intMetadataClass = InternalMetadata.new
@@ -20,7 +20,7 @@ module Adiwg_Polygon
20
20
  # polygon - coordinate(s)
21
21
  if geoType == 'Polygon'
22
22
  intGeometry[:geometry] = splitPolygons(aCoords)
23
- intGeometry[:dimension] = Adiwg_Coordinates.getDimension(intGeometry[:geometry][:exteriorRing])
23
+ intGeometry[:dimension] = Md_Coordinates.getDimension(intGeometry[:geometry][:exteriorRing])
24
24
  elsif geoType == 'MultiPolygon'
25
25
  aPolySets = Array.new
26
26
  aCoords.each do |aPolygonSet|
@@ -8,7 +8,7 @@
8
8
  require ADIWG::Mdtranslator.reader_module('module_responsibleParty', $response[:readerVersionUsed])
9
9
  require ADIWG::Mdtranslator.reader_module('module_dateTime', $response[:readerVersionUsed])
10
10
 
11
- module Adiwg_ProcessStep
11
+ module Md_ProcessStep
12
12
 
13
13
  def self.unpack(hProcStep)
14
14
 
@@ -20,7 +20,7 @@ module Adiwg_ProcessStep
20
20
  if hProcStep.has_key?('stepId')
21
21
  s = hProcStep['stepId']
22
22
  if s != ''
23
- intDataPStep[:stepID] = s
23
+ intDataPStep[:stepId] = s
24
24
  end
25
25
  end
26
26
 
@@ -44,7 +44,7 @@ module Adiwg_ProcessStep
44
44
  if hProcStep.has_key?('dateTime')
45
45
  s = hProcStep['dateTime']
46
46
  if s != ''
47
- intDataPStep[:stepDateTime] = Adiwg_DateTime.unpack(s)
47
+ intDataPStep[:stepDateTime] = Md_DateTime.unpack(s)
48
48
  end
49
49
  end
50
50
 
@@ -53,7 +53,7 @@ module Adiwg_ProcessStep
53
53
  aProcessors = hProcStep['processor']
54
54
  unless aProcessors.empty?
55
55
  aProcessors.each do |processor|
56
- intDataPStep[:stepProcessors] << Adiwg_ResponsibleParty.unpack(processor)
56
+ intDataPStep[:stepProcessors] << Md_ResponsibleParty.unpack(processor)
57
57
  end
58
58
  end
59
59
  end
@@ -4,7 +4,7 @@
4
4
  # History:
5
5
  # Stan Smith 2013-11-26 original script
6
6
 
7
- module Adiwg_Resolution
7
+ module Md_Resolution
8
8
 
9
9
  def self.unpack(hResolution)
10
10
 
@@ -5,7 +5,7 @@
5
5
  # Stan Smith 2013-08-26 original script
6
6
  # Stan Smith 2013-11-27 modified to process single resource format rather than array
7
7
 
8
- module Adiwg_ResourceFormat
8
+ module Md_ResourceFormat
9
9
 
10
10
  def self.unpack(hResFormat)
11
11
 
@@ -10,7 +10,7 @@ require ADIWG::Mdtranslator.reader_module('module_citation', $response[:readerVe
10
10
  require ADIWG::Mdtranslator.reader_module('module_responsibleParty', $response[:readerVersionUsed])
11
11
  require ADIWG::Mdtranslator.reader_module('module_onlineResource', $response[:readerVersionUsed])
12
12
 
13
- module Adiwg_ResourceIdentifier
13
+ module Md_ResourceIdentifier
14
14
 
15
15
  def self.unpack(hResID)
16
16
 
@@ -38,7 +38,7 @@ module Adiwg_ResourceIdentifier
38
38
  if hResID.has_key?('authority')
39
39
  hCitation = hResID['authority']
40
40
  unless hCitation.empty?
41
- intResID[:identifierCitation] = Adiwg_Citation.unpack(hCitation)
41
+ intResID[:identifierCitation] = Md_Citation.unpack(hCitation)
42
42
  end
43
43
  end
44
44
 
@@ -33,7 +33,7 @@ require ADIWG::Mdtranslator.reader_module('module_dataQuality', $response[:reade
33
33
  require ADIWG::Mdtranslator.reader_module('module_spatialReference', $response[:readerVersionUsed])
34
34
  require ADIWG::Mdtranslator.reader_module('module_timePeriod', $response[:readerVersionUsed])
35
35
 
36
- module Adiwg_ResourceInfo
36
+ module Md_ResourceInfo
37
37
 
38
38
  def self.unpack(hResourceInfo)
39
39
 
@@ -53,7 +53,7 @@ module Adiwg_ResourceInfo
53
53
  if hResourceInfo.has_key?('citation')
54
54
  hCitation = hResourceInfo['citation']
55
55
  unless hCitation.empty?
56
- intResInfo[:citation] = Adiwg_Citation.unpack(hCitation)
56
+ intResInfo[:citation] = Md_Citation.unpack(hCitation)
57
57
  end
58
58
  end
59
59
 
@@ -61,7 +61,7 @@ module Adiwg_ResourceInfo
61
61
  if hResourceInfo.has_key?('resourceTimePeriod')
62
62
  hResPeriod = hResourceInfo['resourceTimePeriod']
63
63
  unless hResPeriod.empty?
64
- intResInfo[:timePeriod] = Adiwg_TimePeriod.unpack(hResPeriod)
64
+ intResInfo[:timePeriod] = Md_TimePeriod.unpack(hResPeriod)
65
65
  end
66
66
  end
67
67
 
@@ -70,7 +70,7 @@ module Adiwg_ResourceInfo
70
70
  aPOC = hResourceInfo['pointOfContact']
71
71
  unless aPOC.empty?
72
72
  aPOC.each do |rParty|
73
- intResInfo[:pointsOfContact] << Adiwg_ResponsibleParty.unpack(rParty)
73
+ intResInfo[:pointsOfContact] << Md_ResponsibleParty.unpack(rParty)
74
74
  end
75
75
  end
76
76
  end
@@ -166,7 +166,7 @@ module Adiwg_ResourceInfo
166
166
  aResFormat = hResourceInfo['resourceNativeFormat']
167
167
  unless aResFormat.empty?
168
168
  aResFormat.each do |hResFormat|
169
- intResInfo[:resourceFormats] << Adiwg_ResourceFormat.unpack(hResFormat)
169
+ intResInfo[:resourceFormats] << Md_ResourceFormat.unpack(hResFormat)
170
170
  end
171
171
  end
172
172
  end
@@ -176,7 +176,7 @@ module Adiwg_ResourceInfo
176
176
  aDesKeywords = hResourceInfo['keyword']
177
177
  unless aDesKeywords.empty?
178
178
  aDesKeywords.each do |hDesKeyword|
179
- intResInfo[:descriptiveKeywords] << Adiwg_DescriptiveKeyword.unpack(hDesKeyword)
179
+ intResInfo[:descriptiveKeywords] << Md_DescriptiveKeyword.unpack(hDesKeyword)
180
180
  end
181
181
  end
182
182
  end
@@ -186,7 +186,7 @@ module Adiwg_ResourceInfo
186
186
  aResMaint = hResourceInfo['resourceMaintenance']
187
187
  unless aResMaint.empty?
188
188
  aResMaint.each do |hResource|
189
- intResInfo[:resourceMaint] << Adiwg_ResourceMaintenance.unpack(hResource)
189
+ intResInfo[:resourceMaint] << Md_ResourceMaintenance.unpack(hResource)
190
190
  end
191
191
  end
192
192
  end
@@ -196,7 +196,7 @@ module Adiwg_ResourceInfo
196
196
  aResUses = hResourceInfo['resourceSpecificUsage']
197
197
  unless aResUses.empty?
198
198
  aResUses.each do |hUsage|
199
- intResInfo[:resourceUses] << Adiwg_ResourceSpecificUsage.unpack(hUsage)
199
+ intResInfo[:resourceUses] << Md_ResourceSpecificUsage.unpack(hUsage)
200
200
  end
201
201
  end
202
202
  end
@@ -206,7 +206,7 @@ module Adiwg_ResourceInfo
206
206
  aBrowseGraph = hResourceInfo['graphicOverview']
207
207
  unless aBrowseGraph.empty?
208
208
  aBrowseGraph.each do |hBGraphic|
209
- intResInfo[:graphicOverview] << Adiwg_BrowseGraphic.unpack(hBGraphic)
209
+ intResInfo[:graphicOverview] << Md_BrowseGraphic.unpack(hBGraphic)
210
210
  end
211
211
  end
212
212
  end
@@ -230,7 +230,7 @@ module Adiwg_ResourceInfo
230
230
  aLegalCons = hConstraint['legalConstraint']
231
231
  unless aLegalCons.empty?
232
232
  aLegalCons.each do |hLegalCon|
233
- intResInfo[:legalConstraints] << Adiwg_LegalConstraints.unpack(hLegalCon)
233
+ intResInfo[:legalConstraints] << Md_LegalConstraints.unpack(hLegalCon)
234
234
  end
235
235
  end
236
236
  end
@@ -240,7 +240,7 @@ module Adiwg_ResourceInfo
240
240
  aSecurityCons = hConstraint['securityConstraint']
241
241
  unless aSecurityCons.empty?
242
242
  aSecurityCons.each do |hSecurityCon|
243
- intResInfo[:securityConstraints] << Adiwg_SecurityConstraints.unpack(hSecurityCon)
243
+ intResInfo[:securityConstraints] << Md_SecurityConstraints.unpack(hSecurityCon)
244
244
  end
245
245
  end
246
246
  end
@@ -251,7 +251,7 @@ module Adiwg_ResourceInfo
251
251
  if hResourceInfo.has_key?('taxonomy')
252
252
  hTaxonomy = hResourceInfo['taxonomy']
253
253
  unless hTaxonomy.empty?
254
- intResInfo[:taxonomy] = Adiwg_Taxonomy.unpack(hTaxonomy)
254
+ intResInfo[:taxonomy] = Md_Taxonomy.unpack(hTaxonomy)
255
255
  end
256
256
  end
257
257
 
@@ -259,7 +259,7 @@ module Adiwg_ResourceInfo
259
259
  if hResourceInfo.has_key?('spatialReferenceSystem')
260
260
  hSpatialRef = hResourceInfo['spatialReferenceSystem']
261
261
  unless hSpatialRef.empty?
262
- intResInfo[:spatialReferenceSystem] = Adiwg_SpatialReferenceSystem.unpack(hSpatialRef)
262
+ intResInfo[:spatialReferenceSystem] = Md_SpatialReferenceSystem.unpack(hSpatialRef)
263
263
  end
264
264
  end
265
265
 
@@ -278,7 +278,7 @@ module Adiwg_ResourceInfo
278
278
  aSpRes = hResourceInfo['spatialResolution']
279
279
  unless aSpRes.empty?
280
280
  aSpRes.each do |hResolution|
281
- intResInfo[:spatialResolutions] << Adiwg_Resolution.unpack(hResolution)
281
+ intResInfo[:spatialResolutions] << Md_Resolution.unpack(hResolution)
282
282
  end
283
283
  end
284
284
  end
@@ -288,7 +288,7 @@ module Adiwg_ResourceInfo
288
288
  aExtents = hResourceInfo['extent']
289
289
  unless aExtents.empty?
290
290
  aExtents.each do |hExtent|
291
- intResInfo[:extents] << Adiwg_Extent.unpack(hExtent)
291
+ intResInfo[:extents] << Md_Extent.unpack(hExtent)
292
292
  end
293
293
  end
294
294
  end
@@ -298,7 +298,7 @@ module Adiwg_ResourceInfo
298
298
  aDataQual = hResourceInfo['dataQualityInfo']
299
299
  unless aDataQual.empty?
300
300
  aDataQual.each do |hDQ|
301
- intResInfo[:dataQualityInfo] << Adiwg_DataQuality.unpack(hDQ)
301
+ intResInfo[:dataQualityInfo] << Md_DataQuality.unpack(hDQ)
302
302
  end
303
303
  end
304
304
  end
@@ -10,7 +10,7 @@
10
10
 
11
11
  require ADIWG::Mdtranslator.reader_module('module_responsibleParty', $response[:readerVersionUsed])
12
12
 
13
- module Adiwg_ResourceMaintenance
13
+ module Md_ResourceMaintenance
14
14
 
15
15
  def self.unpack(hResource)
16
16
 
@@ -39,7 +39,7 @@ module Adiwg_ResourceMaintenance
39
39
  aContact = hResource['maintenanceContact']
40
40
  unless aContact.empty?
41
41
  aContact.each do |hContact|
42
- intResMaint[:maintContacts] << Adiwg_ResponsibleParty.unpack(hContact)
42
+ intResMaint[:maintContacts] << Md_ResponsibleParty.unpack(hContact)
43
43
  end
44
44
  end
45
45
  end