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.
- checksums.yaml +4 -4
- data/.gitignore +1 -6
- data/adiwg-mdtranslator.gemspec +2 -2
- data/bin/mdtranslator +10 -10
- data/lib/adiwg/mdtranslator.rb +54 -12
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +87 -7
- data/lib/adiwg/mdtranslator/readers/{adiwgJson/adiwgJson_reader.rb → mdJson/mdJson_reader.rb} +13 -4
- data/lib/adiwg/mdtranslator/readers/{adiwgJson/adiwgJson_validator.rb → mdJson/mdJson_validator.rb} +18 -10
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_additionalDocumentation.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_address.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_associatedResource.rb +3 -3
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_boundingBox.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_browseGraphic.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_citation.rb +5 -5
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_contacts.rb +7 -7
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_coordinates.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_dataDictionary.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_dataQuality.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_dateTime.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_descriptiveKeyword.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_dictionaryInfo.rb +52 -0
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_distributionInfo.rb +4 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_domain.rb +62 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_domainItem.rb +42 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entity.rb +92 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entityAttribute.rb +91 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entityForeignKey.rb +43 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entityIndex.rb +42 -0
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_extent.rb +4 -4
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_geoCoordSystem.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_geoProperties.rb +4 -4
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_geographicElement.rb +12 -12
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_legalConstraint.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_lineString.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_lineage.rb +3 -3
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_metadata.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_metadataExtension.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_metadataInfo.rb +8 -8
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_onlineResource.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_phone.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_point.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_polygon.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_processStep.rb +4 -4
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resolution.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceFormat.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceIdentifier.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceInfo.rb +16 -16
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceMaintenance.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceSpecificUsage.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_responsibleParty.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_securityConstraint.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_source.rb +3 -3
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_spatialReference.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_taxonClass.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_taxonomy.rb +5 -5
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_temporalElement.rb +4 -4
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_timeInstant.rb +3 -3
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_timePeriod.rb +4 -4
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_verticalElement.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_voucher.rb +2 -2
- data/lib/adiwg/mdtranslator/readers/mdJson/readme.md +19 -0
- data/lib/adiwg/mdtranslator/version.rb +5 -1
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_FCfeatureCatalogue.rb +171 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2/classes/class_metadata.rb → iso/classes/class_MImetadata.rb} +3 -3
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_address.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_aggregateInformation.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_boundingPolygon.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_browseGraphic.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_citation.rb +3 -3
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_contact.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_dataIdentification.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_dataQuality.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_date.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_digitalTransferOptions.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_distribution.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_distributor.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_extent.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_featureAttribute.rb +114 -0
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_featureConstraint.rb +55 -0
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_featureType.rb +120 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_format.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_genericMetaData.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_geographicBoundingBox.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_geographicDescription.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_geographicElement.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_identifier.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_keyword.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_legalConstraints.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_lineString.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_lineage.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_listedValue.rb +68 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_maintenanceInformation.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_medium.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_metadataExtension.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_multiGeometry.rb +3 -3
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_multiplicity.rb +44 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_onlineResource.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_point.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_polygon.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_processStep.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_referenceIdentifier.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_referenceSystem.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_resolution.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_responsibleParty.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_securityConstraints.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_source.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_standardOrderProcess.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_taxonClassification.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_taxonSystem.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_telephone.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_temporalExtent.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_timeInstant.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_timePeriod.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_usage.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_useConstraints.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_verticalExtent.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/classes/class_vouchers.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_associationType.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_characterSet.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_classification.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_datatype.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_dateType.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_initiativeType.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_keywordType.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_maintenanceFrequency.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_mediumFormat.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_mediumName.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_obligation.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_onlineFunction.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_presentationForm.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_progress.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_restriction.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_role.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_scope.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_spatialRepresentationType.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/{iso19115_2 → iso}/codelists/code_topicCategory.rb +0 -0
- data/lib/adiwg/mdtranslator/writers/iso/units/class_baseUnit.rb +27 -0
- data/lib/adiwg/mdtranslator/writers/iso/units/class_conventionalUnit.rb +53 -0
- data/lib/adiwg/mdtranslator/writers/iso/units/class_definitionUnit.rb +24 -0
- data/lib/adiwg/mdtranslator/writers/iso/units/class_derivedUnit.rb +31 -0
- data/lib/adiwg/mdtranslator/writers/iso/units/class_unitsOfMeasure.rb +224 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/readme.md +13 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_2/readme.md +6 -9
- data/test/tc_translation.rb +35 -18
- metadata +166 -146
- data/lib/adiwg/mdtranslator/readers/adiwgJson/readme.md +0 -19
- 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
|
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] <<
|
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] <<
|
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
|
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] =
|
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] =
|
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] <<
|
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] <<
|
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] <<
|
68
|
+
intMetadata[:additionalDocuments] << Md_AdditionalDocumentation.unpack(hAddDoc)
|
69
69
|
end
|
70
70
|
end
|
71
71
|
end
|
data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_metadataExtension.rb
RENAMED
@@ -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
|
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[:
|
33
|
+
intContactRole[:contactId] = 'ADIwgBio'
|
34
34
|
intContactRole[:roleName] = 'resourceProvider'
|
35
35
|
intMetaExt[:extSources] << intContactRole
|
36
36
|
|
data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_metadataInfo.rb
RENAMED
@@ -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
|
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] =
|
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] =
|
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] <<
|
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 =
|
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 =
|
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] =
|
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] <<
|
103
|
+
intMetadataInfo[:extensions] << Md_MetadataExtension.addExtensionISObio
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
require ADIWG::Mdtranslator.reader_module('module_coordinates', $response[:readerVersionUsed])
|
11
11
|
|
12
|
-
module
|
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] =
|
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
|
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] =
|
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|
|
data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_processStep.rb
RENAMED
@@ -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
|
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[:
|
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] =
|
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] <<
|
56
|
+
intDataPStep[:stepProcessors] << Md_ResponsibleParty.unpack(processor)
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceIdentifier.rb
RENAMED
@@ -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
|
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] =
|
41
|
+
intResID[:identifierCitation] = Md_Citation.unpack(hCitation)
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceInfo.rb
RENAMED
@@ -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
|
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] =
|
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] =
|
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] <<
|
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] <<
|
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] <<
|
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] <<
|
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] <<
|
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] <<
|
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] <<
|
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] <<
|
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] =
|
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] =
|
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] <<
|
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] <<
|
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] <<
|
301
|
+
intResInfo[:dataQualityInfo] << Md_DataQuality.unpack(hDQ)
|
302
302
|
end
|
303
303
|
end
|
304
304
|
end
|
data/lib/adiwg/mdtranslator/readers/{adiwgJson → mdJson}/modules_0.9.0/module_resourceMaintenance.rb
RENAMED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
require ADIWG::Mdtranslator.reader_module('module_responsibleParty', $response[:readerVersionUsed])
|
12
12
|
|
13
|
-
module
|
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] <<
|
42
|
+
intResMaint[:maintContacts] << Md_ResponsibleParty.unpack(hContact)
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|