adiwg-mdtranslator 0.10.2 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -4
- data/Rakefile +4 -1
- data/adiwg-mdtranslator.gemspec +10 -8
- data/bin/mdtranslator +8 -2
- data/lib/adiwg/mdtranslator.rb +72 -147
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +538 -538
- data/lib/adiwg/mdtranslator/internal/module_dateTimeFun.rb +78 -78
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +153 -74
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_validator.rb +41 -108
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_additionalDocumentation.rb +54 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_address.rb +89 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_associatedResource.rb +82 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_boundingBox.rb +62 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_browseGraphic.rb +69 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_citation.rb +122 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_contacts.rb +150 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_coordinates.rb +63 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_dataDictionary.rb +63 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_dataQuality.rb +51 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_dateTime.rb +38 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_descriptiveKeyword.rb +60 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_dictionaryInfo.rb +63 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_distributionInfo.rb +161 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_domain.rb +73 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_domainItem.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_entity.rb +103 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_entityAttribute.rb +102 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_entityForeignKey.rb +54 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_entityIndex.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_extent.rb +73 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_geoCoordSystem.rb +57 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_geoProperties.rb +100 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_geographicElement.rb +179 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_legalConstraint.rb +56 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_lineString.rb +36 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_lineage.rb +61 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_mdJson.rb +69 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_metadata.rb +88 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_metadataExtension.rb +51 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_metadataInfo.rb +123 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_onlineResource.rb +79 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_phone.rb +79 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_point.rb +36 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_polygon.rb +66 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_processStep.rb +75 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_resolution.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_resourceFormat.rb +46 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_resourceIdentifier.rb +60 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_resourceInfo.rb +328 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_resourceMaintenance.rb +61 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_resourceSpecificUsage.rb +61 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_responsibleParty.rb +48 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_securityConstraint.rb +63 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_source.rb +59 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_spatialReference.rb +59 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_taxonClass.rb +54 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_taxonomy.rb +94 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_temporalElement.rb +82 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_timeInstant.rb +56 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_timePeriod.rb +64 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_verticalElement.rb +64 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_voucher.rb +49 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/readme.md +1 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/validator.rb +43 -0
- data/lib/adiwg/mdtranslator/readers/mdReaders.rb +55 -0
- data/lib/adiwg/mdtranslator/version.rb +15 -4
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_address.rb +107 -86
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_aggregateInformation.rb +68 -57
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_boundingPolygon.rb +59 -48
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_browseGraphic.rb +57 -46
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_citation.rb +149 -138
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_contact.rb +83 -72
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_dataIdentification.rb +334 -322
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_dataQuality.rb +46 -34
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_date.rb +47 -36
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_digitalTransferOptions.rb +42 -31
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_distribution.rb +29 -18
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_distributor.rb +77 -66
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_extent.rb +87 -76
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_featureAttribute.rb +113 -102
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_featureConstraint.rb +44 -33
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_featureType.rb +121 -110
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_format.rb +45 -34
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_genericMetaData.rb +45 -36
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_geographicBoundingBox.rb +78 -67
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_geographicDescription.rb +25 -14
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_geographicElement.rb +30 -19
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_identifier.rb +41 -30
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_keyword.rb +58 -49
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_legalConstraints.rb +65 -54
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_lineString.rb +77 -66
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_lineage.rb +62 -51
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_listedValue.rb +70 -59
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_maintenanceInformation.rb +54 -43
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_medium.rb +58 -47
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_metadataExtension.rb +154 -143
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_multiGeometry.rb +138 -127
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_multiplicity.rb +37 -26
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_onlineResource.rb +79 -68
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_point.rb +77 -66
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_polygon.rb +98 -87
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_processStep.rb +80 -69
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_referenceIdentifier.rb +38 -27
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_referenceSystem.rb +25 -14
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_resolution.rb +51 -40
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_responsibleParty.rb +88 -77
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_securityConstraints.rb +70 -59
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_source.rb +58 -47
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_standardOrderProcess.rb +75 -63
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_taxonClassification.rb +55 -44
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_taxonSystem.rb +98 -87
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_telephone.rb +73 -62
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_temporalExtent.rb +58 -47
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_timeInstant.rb +36 -27
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_timePeriod.rb +42 -33
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_usage.rb +59 -48
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_useConstraints.rb +26 -15
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_verticalExtent.rb +52 -41
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_vouchers.rb +39 -28
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_associationType.rb +41 -29
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_characterSet.rb +82 -47
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_classification.rb +42 -24
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_datatype.rb +56 -34
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_dateType.rb +34 -19
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_initiativeType.rb +41 -29
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_keywordType.rb +46 -27
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_maintenanceFrequency.rb +55 -36
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_mediumFormat.rb +44 -26
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_mediumName.rb +68 -38
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_obligation.rb +32 -25
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_onlineFunction.rb +42 -25
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_presentationForm.rb +58 -31
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_progress.rb +44 -25
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_restriction.rb +47 -32
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_role.rb +52 -29
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_scope.rb +58 -35
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_spatialRepresentationType.rb +43 -30
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_topicCategory.rb +51 -44
- data/lib/adiwg/mdtranslator/writers/iso/units/class_baseUnit.rb +26 -15
- data/lib/adiwg/mdtranslator/writers/iso/units/class_conventionalUnit.rb +56 -45
- data/lib/adiwg/mdtranslator/writers/iso/units/class_definitionUnit.rb +23 -12
- data/lib/adiwg/mdtranslator/writers/iso/units/class_derivedUnit.rb +30 -19
- data/lib/adiwg/mdtranslator/writers/iso/units/class_unitsOfMeasure.rb +223 -212
- data/lib/adiwg/mdtranslator/writers/iso19110/class_FCfeatureCatalogue.rb +174 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb +41 -12
- data/lib/adiwg/mdtranslator/writers/iso19115_2/class_MImetadata.rb +347 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer.rb +151 -119
- data/lib/adiwg/mdtranslator/writers/mdWriters.rb +63 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_additionalDocumentation.rb +84 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_address.rb +100 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_associatedResource.rb +100 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_browseGraphic.rb +66 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_citation.rb +115 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_contact.rb +137 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_onlineResource.rb +47 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_phone.rb +128 -0
- data/test/readers/mdJson/v0_9/tc_translation.rb +82 -0
- data/test/writers/iso19115_2/tc_writer_iso19115_2_address.rb +222 -0
- metadata +87 -60
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_additionalDocumentation.rb +0 -36
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_address.rb +0 -71
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_associatedResource.rb +0 -66
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_boundingBox.rb +0 -51
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_browseGraphic.rb +0 -52
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_citation.rb +0 -104
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_contacts.rb +0 -121
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_coordinates.rb +0 -52
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_dataDictionary.rb +0 -53
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_dataQuality.rb +0 -40
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_dateTime.rb +0 -27
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_descriptiveKeyword.rb +0 -49
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_dictionaryInfo.rb +0 -52
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_distributionInfo.rb +0 -150
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_domain.rb +0 -62
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_domainItem.rb +0 -42
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entity.rb +0 -92
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entityAttribute.rb +0 -91
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entityForeignKey.rb +0 -43
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entityIndex.rb +0 -42
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_extent.rb +0 -62
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_geoCoordSystem.rb +0 -46
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_geoProperties.rb +0 -89
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_geographicElement.rb +0 -168
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_legalConstraint.rb +0 -45
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_lineString.rb +0 -25
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_lineage.rb +0 -50
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_metadata.rb +0 -77
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_metadataExtension.rb +0 -40
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_metadataInfo.rb +0 -112
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_onlineResource.rb +0 -62
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_phone.rb +0 -59
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_point.rb +0 -25
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_polygon.rb +0 -55
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_processStep.rb +0 -64
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_resolution.rb +0 -42
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_resourceFormat.rb +0 -35
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_resourceIdentifier.rb +0 -49
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_resourceInfo.rb +0 -317
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_resourceMaintenance.rb +0 -50
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_resourceSpecificUsage.rb +0 -50
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_responsibleParty.rb +0 -37
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_securityConstraint.rb +0 -52
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_source.rb +0 -48
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_spatialReference.rb +0 -48
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_taxonClass.rb +0 -43
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_taxonomy.rb +0 -83
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_temporalElement.rb +0 -71
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_timeInstant.rb +0 -45
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_timePeriod.rb +0 -53
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_verticalElement.rb +0 -53
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_voucher.rb +0 -38
- data/lib/adiwg/mdtranslator/validator.rb +0 -43
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_FCfeatureCatalogue.rb +0 -171
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_MImetadata.rb +0 -333
- data/test/tc_translation.rb +0 -73
@@ -6,80 +6,91 @@
|
|
6
6
|
# Stan Smith 2014-05-14 modified for JSON schema version 0.4.0
|
7
7
|
# Stan Smith 2014-05-16 added method to return contact from array
|
8
8
|
# Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
|
9
|
+
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
9
10
|
|
10
11
|
require 'class_telephone'
|
11
12
|
require 'class_address'
|
12
13
|
require 'class_onlineResource'
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
15
|
+
module ADIWG
|
16
|
+
module Mdtranslator
|
17
|
+
module Writers
|
18
|
+
module Iso
|
19
|
+
|
20
|
+
class CI_Contact
|
21
|
+
|
22
|
+
def initialize(xml)
|
23
|
+
@xml = xml
|
24
|
+
end
|
25
|
+
|
26
|
+
def writeXML(hContact)
|
27
|
+
|
28
|
+
# classes used
|
29
|
+
pBookClass = $WriterNS::CI_Telephone.new(@xml)
|
30
|
+
addClass = $WriterNS::CI_Address.new(@xml)
|
31
|
+
resourceClass = $WriterNS::CI_OnlineResource.new(@xml)
|
32
|
+
|
33
|
+
@xml.tag!('gmd:CI_Contact') do
|
34
|
+
|
35
|
+
# contact - phone list - all services
|
36
|
+
aPhones = hContact[:phones]
|
37
|
+
if !aPhones.empty?
|
38
|
+
@xml.tag!('gmd:phone') do
|
39
|
+
pBookClass.writeXML(aPhones)
|
40
|
+
end
|
41
|
+
elsif $showAllTags
|
42
|
+
@xml.tag!('gmd:phone')
|
43
|
+
end
|
44
|
+
|
45
|
+
# contact - address
|
46
|
+
hAddress = hContact[:address]
|
47
|
+
if !hAddress.empty?
|
48
|
+
@xml.tag!('gmd:address') do
|
49
|
+
addClass.writeXML(hAddress)
|
50
|
+
end
|
51
|
+
elsif $showAllTags
|
52
|
+
@xml.tag!('gmd:address')
|
53
|
+
end
|
54
|
+
|
55
|
+
# contact - online resource
|
56
|
+
aResource = hContact[:onlineRes]
|
57
|
+
if !aResource.empty?
|
58
|
+
@xml.tag!('gmd:onlineResource') do
|
59
|
+
resourceClass.writeXML(aResource[0])
|
60
|
+
end
|
61
|
+
elsif $showAllTags
|
62
|
+
@xml.tag!('gmd:onlineResource')
|
63
|
+
end
|
64
|
+
|
65
|
+
# contact - contact instructions
|
66
|
+
s = hContact[:contactInstructions]
|
67
|
+
if !s.nil?
|
68
|
+
@xml.tag!('gmd:contactInstructions') do
|
69
|
+
@xml.tag!('gco:CharacterString', hContact[:contactInstructions])
|
70
|
+
end
|
71
|
+
elsif $showAllTags
|
72
|
+
@xml.tag!('gmd:contactInstructions')
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def getContact(contactID)
|
79
|
+
|
80
|
+
# find contact in contact array and return the hash
|
81
|
+
$intContactList.each do |hContact|
|
82
|
+
if hContact[:contactId] == contactID
|
83
|
+
return hContact
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
return {}
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -14,6 +14,8 @@
|
|
14
14
|
# Stan Smith 2014-05-21 added aggregate information section
|
15
15
|
# Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
|
16
16
|
# Stan Smith 2014-10-29 add resource time period as a extent temporal element
|
17
|
+
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
18
|
+
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
17
19
|
|
18
20
|
require 'code_progress'
|
19
21
|
require 'code_topicCategory'
|
@@ -33,325 +35,335 @@ require 'class_taxonSystem'
|
|
33
35
|
require 'class_resolution'
|
34
36
|
require 'class_extent'
|
35
37
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
38
|
+
module ADIWG
|
39
|
+
module Mdtranslator
|
40
|
+
module Writers
|
41
|
+
module Iso
|
42
|
+
|
43
|
+
class MD_DataIdentification
|
44
|
+
|
45
|
+
def initialize(xml)
|
46
|
+
@xml = xml
|
47
|
+
end
|
48
|
+
|
49
|
+
def writeXML(hDataId, aAssocRes)
|
50
|
+
|
51
|
+
# codes used
|
52
|
+
progressCode = $WriterNS::MD_ProgressCode.new(@xml)
|
53
|
+
spatialCode = $WriterNS::MD_SpatialRepresentationTypeCode.new(@xml)
|
54
|
+
topicCode = $WriterNS::MD_TopicCategoryCode.new(@xml)
|
55
|
+
|
56
|
+
# classes used
|
57
|
+
intMetadataClass = InternalMetadata.new
|
58
|
+
citationClass = $WriterNS::CI_Citation.new(@xml)
|
59
|
+
rPartyClass = $WriterNS::CI_ResponsibleParty.new(@xml)
|
60
|
+
mInfoClass = $WriterNS::MD_MaintenanceInformation.new(@xml)
|
61
|
+
bGraphicClass = $WriterNS::MD_BrowseGraphic.new(@xml)
|
62
|
+
rFormatClass = $WriterNS::MD_Format.new(@xml)
|
63
|
+
keywordClass = $WriterNS::MD_Keywords.new(@xml)
|
64
|
+
useClass = $WriterNS::MD_Usage.new(@xml)
|
65
|
+
uConClass = $WriterNS::MD_Constraints.new(@xml)
|
66
|
+
lConClass = $WriterNS::MD_LegalConstraints.new(@xml)
|
67
|
+
sConClass = $WriterNS::MD_SecurityConstraints.new(@xml)
|
68
|
+
aggInfoClass = $WriterNS::MD_AggregateInformation.new(@xml)
|
69
|
+
taxClass = $WriterNS::MD_TaxonSys.new(@xml)
|
70
|
+
resolutionClass = $WriterNS::MD_Resolution.new(@xml)
|
71
|
+
extentClass = $WriterNS::EX_Extent.new(@xml)
|
72
|
+
|
73
|
+
# data identification
|
74
|
+
@xml.tag!('gmd:MD_DataIdentification') do
|
75
|
+
|
76
|
+
# data identification - citation - required
|
77
|
+
hCitation = hDataId[:citation]
|
78
|
+
if hCitation.empty?
|
79
|
+
@xml.tag!('gmd:citation', {'gco:nilReason' => 'missing'})
|
80
|
+
else
|
81
|
+
@xml.tag!('gmd:citation') do
|
82
|
+
citationClass.writeXML(hCitation)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# data identification - abstract - required
|
87
|
+
s = hDataId[:abstract]
|
88
|
+
if s.nil?
|
89
|
+
@xml.tag!('gmd:abstract', {'gco:nilReason' => 'missing'})
|
90
|
+
else
|
91
|
+
@xml.tag!('gmd:abstract') do
|
92
|
+
@xml.tag!('gco:CharacterString', s)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# data identification - purpose
|
97
|
+
s = hDataId[:purpose]
|
98
|
+
if !s.nil?
|
99
|
+
@xml.tag!('gmd:purpose') do
|
100
|
+
@xml.tag!('gco:CharacterString', s)
|
101
|
+
end
|
102
|
+
elsif $showAllTags
|
103
|
+
@xml.tag!('gmd:purpose')
|
104
|
+
end
|
105
|
+
|
106
|
+
# data identification - credit
|
107
|
+
aCredits = hDataId[:credits]
|
108
|
+
if !aCredits.empty?
|
109
|
+
aCredits.each do |credit|
|
110
|
+
@xml.tag!('gmd:credit') do
|
111
|
+
@xml.tag!('gco:CharacterString', credit)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
elsif $showAllTags
|
115
|
+
@xml.tag!('gmd:credit')
|
116
|
+
end
|
117
|
+
|
118
|
+
# data identification - status - required
|
119
|
+
s = hDataId[:status]
|
120
|
+
if s.nil?
|
121
|
+
@xml.tag!('gmd:status', {'gco:nilReason' => 'missing'})
|
122
|
+
else
|
123
|
+
@xml.tag!('gmd:status') do
|
124
|
+
progressCode.writeXML(s)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
# data identification - point of contact
|
129
|
+
aPOCs = hDataId[:pointsOfContact]
|
130
|
+
if !aPOCs.empty?
|
131
|
+
aPOCs.each do |hPContact|
|
132
|
+
@xml.tag!('gmd:pointOfContact') do
|
133
|
+
rPartyClass.writeXML(hPContact)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
elsif $showAllTags
|
137
|
+
@xml.tag!('gmd:pointOfContact')
|
138
|
+
end
|
139
|
+
|
140
|
+
# data identification - resource maintenance
|
141
|
+
aMaintInfo = hDataId[:resourceMaint]
|
142
|
+
if !aMaintInfo.empty?
|
143
|
+
aMaintInfo.each do |hResMaintInfo|
|
144
|
+
@xml.tag!('gmd:resourceMaintenance') do
|
145
|
+
mInfoClass.writeXML(hResMaintInfo)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
elsif $showAllTags
|
149
|
+
@xml.tag!('gmd:resourceMaintenance')
|
150
|
+
end
|
151
|
+
|
152
|
+
# data identification - graphic overview
|
153
|
+
aGOverview = hDataId[:graphicOverview]
|
154
|
+
if !aGOverview.empty?
|
155
|
+
aGOverview.each do |graphic|
|
156
|
+
gLink = graphic[:bGURI]
|
157
|
+
attributes = {}
|
158
|
+
attributes['xlink:href'] = gLink if gLink
|
159
|
+
@xml.tag!('gmd:graphicOverview', attributes) do
|
160
|
+
bGraphicClass.writeXML(graphic)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
elsif $showAllTags
|
164
|
+
@xml.tag!('gmd:graphicOverview')
|
165
|
+
end
|
166
|
+
|
167
|
+
# data identification - resource format
|
168
|
+
aResFormats = hDataId[:resourceFormats]
|
169
|
+
if !aResFormats.empty?
|
170
|
+
aResFormats.each do |hResFormat|
|
171
|
+
@xml.tag!('gmd:resourceFormat') do
|
172
|
+
rFormatClass.writeXML(hResFormat)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
elsif $showAllTags
|
176
|
+
@xml.tag!('gmd:resourceFormat')
|
177
|
+
end
|
178
|
+
|
179
|
+
# data identification - descriptive keywords
|
180
|
+
aDesKeywords = hDataId[:descriptiveKeywords]
|
181
|
+
if !aDesKeywords.empty?
|
182
|
+
aDesKeywords.each do |hDKeyword|
|
183
|
+
@xml.tag!('gmd:descriptiveKeywords') do
|
184
|
+
keywordClass.writeXML(hDKeyword)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
elsif $showAllTags
|
188
|
+
@xml.tag!('gmd:descriptiveKeywords')
|
189
|
+
end
|
190
|
+
|
191
|
+
# data identification - resource specific usage
|
192
|
+
aResUses = hDataId[:resourceUses]
|
193
|
+
if !aResUses.empty?
|
194
|
+
aResUses.each do |hResUse|
|
195
|
+
@xml.tag!('gmd:resourceSpecificUsage') do
|
196
|
+
useClass.writeXML(hResUse)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
elsif $showAllTags
|
200
|
+
@xml.tag!('gmd:resourceSpecificUsage')
|
201
|
+
end
|
202
|
+
|
203
|
+
# data identification - resource constraints - use constraints
|
204
|
+
aUseLimits = hDataId[:useConstraints]
|
205
|
+
if !aUseLimits.empty?
|
206
|
+
@xml.tag!('gmd:resourceConstraints') do
|
207
|
+
uConClass.writeXML(aUseLimits)
|
208
|
+
end
|
209
|
+
elsif $showAllTags
|
210
|
+
@xml.tag!('gmd:resourceConstraints') do
|
211
|
+
@xml.tag!('gmd:MD_Constraints')
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
# data identification - resource constraints - legal constraints
|
216
|
+
aLegalCons = hDataId[:legalConstraints]
|
217
|
+
if !aLegalCons.empty?
|
218
|
+
aLegalCons.each do |hLegalCon|
|
219
|
+
@xml.tag!('gmd:resourceConstraints') do
|
220
|
+
lConClass.writeXML(hLegalCon)
|
221
|
+
end
|
222
|
+
end
|
223
|
+
elsif $showAllTags
|
224
|
+
@xml.tag!('gmd:resourceConstraints') do
|
225
|
+
@xml.tag!('gmd:MD_LegalConstraints')
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
# data identification - resource constraints - security constraints
|
230
|
+
# empty tag cannot be shown for security constraints - XSD issue
|
231
|
+
aSecurityCons = hDataId[:securityConstraints]
|
232
|
+
unless aSecurityCons.empty?
|
233
|
+
aSecurityCons.each do |hSecCon|
|
234
|
+
@xml.tag!('gmd:resourceConstraints') do
|
235
|
+
sConClass.writeXML(hSecCon)
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
# data identification - aggregate information
|
241
|
+
if !aAssocRes.empty?
|
242
|
+
aAssocRes.each do |hAssocRes|
|
243
|
+
@xml.tag!('gmd:aggregationInfo') do
|
244
|
+
aggInfoClass.writeXML(hAssocRes)
|
245
|
+
end
|
246
|
+
end
|
247
|
+
elsif $showAllTags
|
248
|
+
@xml.tag!('gmd:aggregationInfo')
|
249
|
+
end
|
250
|
+
|
251
|
+
# data identification - taxonomy
|
252
|
+
hTaxonomy = hDataId[:taxonomy]
|
253
|
+
if !hTaxonomy.empty?
|
254
|
+
@xml.tag!('gmd:taxonomy') do
|
255
|
+
taxClass.writeXML(hTaxonomy)
|
256
|
+
end
|
257
|
+
elsif $showAllTags
|
258
|
+
@xml.tag!('gmd:taxonomy')
|
259
|
+
end
|
260
|
+
|
261
|
+
# data identification - spatial representation type
|
262
|
+
aSpatialType = hDataId[:spatialRepresentationTypes]
|
263
|
+
if !aSpatialType.empty?
|
264
|
+
aSpatialType.each do |spType|
|
265
|
+
@xml.tag!('gmd:spatialRepresentationType') do
|
266
|
+
spatialCode.writeXML(spType)
|
267
|
+
end
|
268
|
+
end
|
269
|
+
elsif $showAllTags
|
270
|
+
@xml.tag!('gmd:spatialRepresentationType')
|
271
|
+
end
|
272
|
+
|
273
|
+
# data identification - spatial resolution
|
274
|
+
aSpatialRes = hDataId[:spatialResolutions]
|
275
|
+
if !aSpatialRes.empty?
|
276
|
+
aSpatialRes.each do |hSpRes|
|
277
|
+
@xml.tag!('gmd:spatialResolution') do
|
278
|
+
resolutionClass.writeXML(hSpRes)
|
279
|
+
end
|
280
|
+
end
|
281
|
+
elsif $showAllTags
|
282
|
+
@xml.tag!('gmd:spatialResolution')
|
283
|
+
end
|
284
|
+
|
285
|
+
# data identification - language - required - default of english applied
|
286
|
+
aLanguages = hDataId[:resourceLanguages]
|
287
|
+
if !aLanguages.empty?
|
288
|
+
aLanguages.each do |language|
|
289
|
+
@xml.tag!('gmd:language') do
|
290
|
+
@xml.tag!('gco:CharacterString', language)
|
291
|
+
end
|
292
|
+
end
|
293
|
+
else
|
294
|
+
@xml.tag!('gmd:language') do
|
295
|
+
@xml.tag!('gco:CharacterString', 'eng; USA')
|
296
|
+
end
|
297
|
+
end
|
298
|
+
|
299
|
+
# data identification - topic category
|
300
|
+
aTopics = hDataId[:topicCategories]
|
301
|
+
if !aTopics.empty?
|
302
|
+
aTopics.each do |spType|
|
303
|
+
@xml.tag!('gmd:topicCategory') do
|
304
|
+
topicCode.writeXML(spType)
|
305
|
+
end
|
306
|
+
end
|
307
|
+
elsif $showAllTags
|
308
|
+
@xml.tag!('gmd:topicCategory')
|
309
|
+
end
|
310
|
+
|
311
|
+
# data identification - environment description
|
312
|
+
s = hDataId[:environmentDescription]
|
313
|
+
if !s.nil?
|
314
|
+
@xml.tag!('gmd:environmentDescription') do
|
315
|
+
@xml.tag!('gco:CharacterString', s)
|
316
|
+
end
|
317
|
+
elsif $showAllTags
|
318
|
+
@xml.tag!('gmd:environmentDescription')
|
319
|
+
end
|
320
|
+
|
321
|
+
# data identification - extent
|
322
|
+
# if resource time period, represent the time period as
|
323
|
+
# a temporal element in the first extent
|
324
|
+
needTag = true
|
325
|
+
hTimePeriod = hDataId[:timePeriod]
|
326
|
+
if !hTimePeriod.empty?
|
327
|
+
hTempEle = intMetadataClass.newTemporalElement
|
328
|
+
hTempEle[:timePeriod] = hTimePeriod
|
329
|
+
hExt = intMetadataClass.newExtent
|
330
|
+
hExt[:extDesc] = 'Temporal span of the resource (data or project)'
|
331
|
+
hExt[:extTempElements] << hTempEle
|
332
|
+
@xml.tag!('gmd:extent') do
|
333
|
+
extentClass.writeXML(hExt)
|
334
|
+
end
|
335
|
+
needTag = false
|
336
|
+
end
|
337
|
+
|
338
|
+
# add the remaining geographic, temporal, and veritcal extents
|
339
|
+
aExtents = hDataId[:extents]
|
340
|
+
if !aExtents.empty?
|
341
|
+
aExtents.each do |hExtent|
|
342
|
+
@xml.tag!('gmd:extent') do
|
343
|
+
extentClass.writeXML(hExtent)
|
344
|
+
end
|
345
|
+
end
|
346
|
+
elsif $showAllTags && needTag
|
347
|
+
@xml.tag!('gmd:extent')
|
348
|
+
end
|
349
|
+
|
350
|
+
# data identification - supplemental info
|
351
|
+
s = hDataId[:supplementalInfo]
|
352
|
+
if !s.nil?
|
353
|
+
@xml.tag!('gmd:supplementalInformation') do
|
354
|
+
@xml.tag!('gco:CharacterString', s)
|
355
|
+
end
|
356
|
+
elsif $showAllTags
|
357
|
+
@xml.tag!('gmd:supplementalInformation')
|
358
|
+
end
|
359
|
+
|
360
|
+
end
|
361
|
+
|
362
|
+
end
|
363
|
+
|
364
|
+
end
|
365
|
+
|
366
|
+
end
|
367
|
+
end
|
368
|
+
end
|
369
|
+
end
|