adiwg-mdtranslator 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/Rakefile +1 -2
- data/adiwg-mdtranslator.gemspec +23 -23
- data/bin/mdtranslator +187 -155
- data/lib/adiwg/mdtranslator.rb +63 -38
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +123 -5
- data/lib/adiwg/mdtranslator/internal/module_coordinates.rb +55 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +98 -70
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_validator.rb +13 -11
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_additionalDocumentation.rb +13 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_address.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_associatedResource.rb +22 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_boundingBox.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_browseGraphic.rb +11 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_citation.rb +28 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_classedData.rb +49 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_classedDataItem.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_contacts.rb +14 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_coverageInfo.rb +83 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_coverageItem.rb +136 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_dataDictionary.rb +9 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_dataQuality.rb +17 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_dateTime.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_descriptiveKeyword.rb +22 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_dictionaryInfo.rb +18 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_digitalTransferOption.rb +80 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_dimension.rb +81 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_distributionInfo.rb +89 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_distributionOrder.rb +62 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_domain.rb +24 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_domainItem.rb +23 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_entity.rb +26 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_entityAttribute.rb +24 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_entityForeignKey.rb +20 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_entityIndex.rb +20 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_extent.rb +9 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_geoCoordSystem.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_geoProperties.rb +9 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_geographicElement.rb +20 -18
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_gridInfo.rb +67 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_imageInfo.rb +119 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_legalConstraint.rb +7 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_lineString.rb +5 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_lineage.rb +11 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_locale.rb +57 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_mdJson.rb +10 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_medium.rb +73 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_metadata.rb +14 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_metadataExtension.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_metadataInfo.rb +35 -15
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_onlineResource.rb +7 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_phone.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_point.rb +5 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_polygon.rb +5 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_processStep.rb +19 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resolution.rb +7 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceFormat.rb +12 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceIdentifier.rb +30 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceInfo.rb +70 -33
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceMaintenance.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceSpecificUsage.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_responsibleParty.rb +10 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_securityConstraint.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_sensorInfo.rb +69 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_source.rb +11 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_spatialReference.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_taxonClass.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_taxonomy.rb +11 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_temporalElement.rb +9 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_timeInstant.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_timePeriod.rb +6 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_verticalElement.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_voucher.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/version.rb +19 -0
- data/lib/adiwg/mdtranslator/readers/mdReaders.rb +21 -18
- data/lib/adiwg/mdtranslator/version.rb +15 -1
- data/lib/adiwg/mdtranslator/writers/html/html_writer.rb +11 -8
- data/lib/adiwg/mdtranslator/writers/html/md_html_writer.rb +21 -18
- data/lib/adiwg/mdtranslator/writers/html/sections/html_additionalDocumentation.rb +48 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_associatedResource.rb +73 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_body.rb +84 -135
- data/lib/adiwg/mdtranslator/writers/html/sections/html_citation.rb +18 -8
- data/lib/adiwg/mdtranslator/writers/html/sections/html_classedData.rb +50 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_classedDataItem.rb +50 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_contact.rb +5 -9
- data/lib/adiwg/mdtranslator/writers/html/sections/html_coverageInfo.rb +88 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_coverageItem.rb +139 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataDictionary.rb +13 -12
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataLineage.rb +5 -4
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataSource.rb +5 -4
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dimension.rb +71 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_distributor.rb +62 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_domain.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_entity.rb +5 -4
- data/lib/adiwg/mdtranslator/writers/html/sections/html_extent.rb +7 -6
- data/lib/adiwg/mdtranslator/writers/html/sections/html_format.rb +7 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_geographicElement.rb +7 -7
- data/lib/adiwg/mdtranslator/writers/html/sections/html_gridInfo.rb +65 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_head.rb +18 -3
- data/lib/adiwg/mdtranslator/writers/html/sections/html_imageInfo.rb +120 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_inlineCss.css +13 -20
- data/lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_medium.rb +19 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_metadataInfo.rb +22 -9
- data/lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_processStep.rb +5 -4
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceContact.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceGeneral.rb +25 -14
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceId.rb +30 -3
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceInfo.rb +194 -129
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceMaint.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceOther.rb +7 -6
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceUsage.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_responsibleParty.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_sensorInfo.rb +66 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_taxonomy.rb +7 -6
- data/lib/adiwg/mdtranslator/writers/html/sections/html_temporalElement.rb +7 -6
- data/lib/adiwg/mdtranslator/writers/html/sections/html_timeInstant.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_timePeriod.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_transferOption.rb +29 -4
- data/lib/adiwg/mdtranslator/writers/html/version.rb +17 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/class_FCfeatureCatalogue.rb +17 -16
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_address.rb +12 -8
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_baseUnit.rb +42 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_codelist.rb +8 -3
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_contact.rb +16 -25
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_conventionalUnit.rb +68 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionUnit.rb +39 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_derivedUnit.rb +46 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_featureAttribute.rb +17 -14
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_featureConstraint.rb +6 -2
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_featureType.rb +16 -12
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_listedValue.rb +9 -18
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_multiplicity.rb +8 -4
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_onlineResource.rb +13 -9
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_responsibleParty.rb +16 -12
- data/lib/adiwg/mdtranslator/writers/{iso → iso19110}/classes/class_telephone.rb +9 -5
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_unitsOfMeasure.rb +262 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb +36 -16
- data/lib/adiwg/mdtranslator/writers/iso19110/version.rb +14 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/class_MImetadata.rb +73 -37
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_address.rb +116 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_aggregateInformation.rb +13 -9
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_band.rb +165 -0
- data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_baseUnit.rb +6 -6
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_boundingPolygon.rb +14 -10
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_browseGraphic.rb +9 -5
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_citation.rb +31 -16
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_codelist.rb +56 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_contact.rb +87 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_contentInfo.rb +111 -0
- data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_conventionalUnit.rb +6 -6
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_dataIdentification.rb +106 -59
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_dataQuality.rb +11 -7
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_date.rb +8 -5
- data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_definitionUnit.rb +7 -7
- data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_derivedUnit.rb +6 -6
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_digitalTransferOptions.rb +92 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dimension.rb +68 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_distribution.rb +8 -4
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_distributor.rb +44 -22
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_enumerationList.rb +7 -2
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_extent.rb +18 -14
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_format.rb +18 -2
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_geographicBoundingBox.rb +6 -2
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_geographicDescription.rb +8 -4
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_geographicElement.rb +10 -6
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_gridInfo.rb +80 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_identifier.rb +10 -6
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_imageDescription.rb +157 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_keyword.rb +12 -8
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_legalConstraints.rb +12 -8
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_lineString.rb +13 -10
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_lineage.rb +14 -10
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_locale.rb +67 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_maintenanceInformation.rb +12 -8
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_medium.rb +30 -9
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_metadataExtension.rb +19 -15
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_multiGeometry.rb +22 -17
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_onlineResource.rb +94 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_point.rb +12 -9
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_polygon.rb +14 -11
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_processStep.rb +12 -9
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_rangeElementDescription.rb +88 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_referenceSystem.rb +52 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_resolution.rb +6 -2
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_resourceIdentifier.rb +94 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_responsibleParty.rb +106 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_securityConstraints.rb +12 -8
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_source.rb +12 -8
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_standardOrderProcess.rb +11 -9
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_taxonClassification.rb +8 -4
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_taxonSystem.rb +18 -14
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_telephone.rb +92 -0
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_temporalExtent.rb +10 -6
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_timeInstant.rb +9 -8
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_timePeriod.rb +10 -8
- data/lib/adiwg/mdtranslator/writers/{iso/units → iso19115_2/classes}/class_unitsOfMeasure.rb +48 -25
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_usage.rb +11 -7
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_useConstraints.rb +6 -2
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_verticalExtent.rb +6 -2
- data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_vouchers.rb +8 -4
- data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer.rb +32 -19
- data/lib/adiwg/mdtranslator/writers/iso19115_2/version.rb +17 -0
- data/lib/adiwg/mdtranslator/writers/mdWriters.rb +21 -24
- data/test/readers/mdJson/v1/tc_reader_mdjson_additionalDocumentation.rb +116 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_address.rb +111 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_associatedResource.rb +157 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_browseGraphic.rb +119 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_citation.rb +143 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_contact.rb +138 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_dataQuality.rb +111 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_dateTime.rb +159 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_descriptiveKeyword.rb +115 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_dictionaryInfo.rb +121 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_digitalTransferOption.rb +94 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_distributionOrder.rb +103 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_domain.rb +130 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_domainItem.rb +98 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_entity.rb +134 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_entityAttribute.rb +154 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_entityForeignKey.rb +100 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_entityIndex.rb +99 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_legalConstraint.rb +104 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_lineage.rb +117 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_medium.rb +98 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_metadataInfo.rb +141 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_onlineResource.rb +110 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_phone.rb +112 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_processStep.rb +118 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_resolution.rb +77 -0
- data/test/readers/mdJson/v1/tc_reader_mdjson_source.rb +117 -0
- data/test/readers/mdJson/v1/tc_translation_19110.rb +57 -0
- data/test/readers/mdJson/{v1_0/tc_translation.rb → v1/tc_translation_19115_2.rb} +16 -31
- data/test/writers/iso19115_2/tc_writer_iso19115_2_address.rb +22 -15
- metadata +219 -140
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_coordinates.rb +0 -63
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_1.0/module_distributionInfo.rb +0 -161
- data/lib/adiwg/mdtranslator/writers/html/sections/logo150.txt +0 -25
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_digitalTransferOptions.rb +0 -62
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_genericMetaData.rb +0 -74
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_referenceIdentifier.rb +0 -53
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_referenceSystem.rb +0 -40
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_additionalDocumentation.rb +0 -85
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_address.rb +0 -100
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_associatedResource.rb +0 -101
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_browseGraphic.rb +0 -86
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_citation.rb +0 -116
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_contact.rb +0 -138
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_dictionaryInfo.rb +0 -95
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_domain.rb +0 -99
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_onlineResource.rb +0 -92
- data/test/readers/mdJson/v1_0/tc_reader_mdjson_phone.rb +0 -110
@@ -4,54 +4,74 @@
|
|
4
4
|
# Stan Smith 2014-12-01 original script
|
5
5
|
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
6
6
|
# Stan Smith 2015-03-02 added test and return for missing data dictionary
|
7
|
-
|
8
|
-
|
9
|
-
$
|
10
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../iso/classes'))
|
7
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
8
|
+
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
9
|
+
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
11
10
|
|
12
11
|
require 'builder'
|
13
12
|
require 'date'
|
14
13
|
require 'uuidtools'
|
15
|
-
|
14
|
+
require_relative 'version'
|
15
|
+
require_relative 'class_FCfeatureCatalogue'
|
16
16
|
|
17
17
|
module ADIWG
|
18
18
|
module Mdtranslator
|
19
19
|
module Writers
|
20
20
|
module Iso19110
|
21
21
|
|
22
|
-
def self.startWriter(intObj)
|
22
|
+
def self.startWriter(intObj, responseObj, paramsObj)
|
23
23
|
|
24
|
-
#
|
25
|
-
|
24
|
+
# make internal object available to writer methods in this namespace
|
25
|
+
@intObj = intObj
|
26
26
|
|
27
27
|
# set the format of the output file based on the writer specified
|
28
|
-
|
29
|
-
|
28
|
+
responseObj[:writerFormat] = 'xml'
|
29
|
+
responseObj[:writerVersion] = ADIWG::Mdtranslator::Writers::Iso19110::VERSION
|
30
30
|
|
31
31
|
# test for a valid dataDictionary object in the internal object
|
32
32
|
aDictionaries = intObj[:dataDictionary]
|
33
33
|
if aDictionaries.length == 0
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
responseObj[:writerMessages] << 'Writer Failed - see following message(s):\n'
|
35
|
+
responseObj[:writerMessages] << 'No data dictionary was loaded from the input file'
|
36
|
+
responseObj[:writerPass] = false
|
37
37
|
return
|
38
38
|
end
|
39
39
|
|
40
40
|
# create new XML document
|
41
41
|
xml = Builder::XmlMarkup.new(indent: 3)
|
42
|
-
metadataWriter =
|
42
|
+
metadataWriter = FC_FeatureCatalogue.new(xml, responseObj)
|
43
43
|
metadata = metadataWriter.writeXML(intObj)
|
44
44
|
|
45
45
|
# set writer pass to true if no writer modules set it to false
|
46
46
|
# false or warning will be set by code that places the message
|
47
47
|
# load metadata into $response
|
48
|
-
if
|
49
|
-
|
48
|
+
if responseObj[:writerPass].nil?
|
49
|
+
responseObj[:writerPass] = true
|
50
50
|
end
|
51
51
|
|
52
52
|
return metadata
|
53
53
|
end
|
54
54
|
|
55
|
+
# find contact in contact array and return the contact hash
|
56
|
+
def self.getContact(contactID)
|
57
|
+
@intObj[:contacts].each do |hContact|
|
58
|
+
if hContact[:contactId] == contactID
|
59
|
+
return hContact
|
60
|
+
end
|
61
|
+
end
|
62
|
+
return {}
|
63
|
+
end
|
64
|
+
|
65
|
+
# find domain in domain array and return the domain hash
|
66
|
+
def self.getDomain(domainID)
|
67
|
+
@intObj[:dataDictionary][0][:domains].each do |hDomain|
|
68
|
+
if hDomain[:domainId] == domainID
|
69
|
+
return hDomain
|
70
|
+
end
|
71
|
+
end
|
72
|
+
return {}
|
73
|
+
end
|
74
|
+
|
55
75
|
end
|
56
76
|
end
|
57
77
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# ISO 19115-2 <<Class>> MI_Metadata
|
2
|
-
# writer output in XML
|
2
|
+
# writer output in XML.
|
3
3
|
|
4
4
|
# History:
|
5
5
|
# Stan Smith 2013-08-09 original script
|
@@ -26,16 +26,24 @@
|
|
26
26
|
# Stan Smith 2014-12-29 set builder object '@xml' into string 'metadata'
|
27
27
|
# Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
|
28
28
|
# Stan Smith 2015-06-12 added support for user to specify metadataCharacterSet
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
29
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
30
|
+
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
31
|
+
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
32
|
+
# Stan Smith 2015-07-28 added support for PT_Locale
|
33
|
+
# Stan Smith 2015-07-30 added support for grid information
|
34
|
+
# Stan Smith 2015-08-27 added support for content information
|
35
|
+
|
36
|
+
require_relative 'classes/class_codelist'
|
37
|
+
require_relative 'classes/class_responsibleParty'
|
38
|
+
require_relative 'classes/class_metadataExtension'
|
39
|
+
require_relative 'classes/class_dataIdentification'
|
40
|
+
require_relative 'classes/class_distribution'
|
41
|
+
require_relative 'classes/class_dataQuality'
|
42
|
+
require_relative 'classes/class_maintenanceInformation'
|
43
|
+
require_relative 'classes/class_referenceSystem'
|
44
|
+
require_relative 'classes/class_locale'
|
45
|
+
require_relative 'classes/class_gridInfo'
|
46
|
+
require_relative 'classes/class_contentInfo'
|
39
47
|
|
40
48
|
module ADIWG
|
41
49
|
module Mdtranslator
|
@@ -44,36 +52,39 @@ module ADIWG
|
|
44
52
|
|
45
53
|
class MI_Metadata
|
46
54
|
|
47
|
-
def initialize(xml)
|
55
|
+
def initialize(xml, responseObj)
|
48
56
|
@xml = xml
|
57
|
+
@responseObj = responseObj
|
49
58
|
end
|
50
59
|
|
51
|
-
def writeXML(
|
52
|
-
$IsoNS = ADIWG::Mdtranslator::Writers::Iso
|
60
|
+
def writeXML(intObj)
|
53
61
|
|
54
62
|
# classes used
|
55
|
-
codelistClass =
|
56
|
-
rPartyClass =
|
57
|
-
mdExtClass =
|
58
|
-
dataIdClass =
|
59
|
-
distClass =
|
60
|
-
dqClass =
|
61
|
-
metaMaintClass =
|
62
|
-
refSysClass =
|
63
|
-
|
64
|
-
|
63
|
+
codelistClass = MD_Codelist.new(@xml, @responseObj)
|
64
|
+
rPartyClass = CI_ResponsibleParty.new(@xml, @responseObj)
|
65
|
+
mdExtClass = MD_MetadataExtensionInformation.new(@xml, @responseObj)
|
66
|
+
dataIdClass = MD_DataIdentification.new(@xml, @responseObj)
|
67
|
+
distClass = MD_Distribution.new(@xml, @responseObj)
|
68
|
+
dqClass = DQ_DataQuality.new(@xml, @responseObj)
|
69
|
+
metaMaintClass = MD_MaintenanceInformation.new(@xml, @responseObj)
|
70
|
+
refSysClass = MD_ReferenceSystem.new(@xml, @responseObj)
|
71
|
+
localeClass = PT_Locale.new(@xml, @responseObj)
|
72
|
+
gridClass = MD_GridInfo.new(@xml, @responseObj)
|
73
|
+
contentClass = ContentInfo.new(@xml, @responseObj)
|
74
|
+
|
75
|
+
intMetadata = intObj[:metadata]
|
65
76
|
hMetaInfo = intMetadata[:metadataInfo]
|
66
77
|
hResInfo = intMetadata[:resourceInfo]
|
67
78
|
aAssocRes = intMetadata[:associatedResources]
|
68
|
-
$intContactList = internalObj[:contacts]
|
69
79
|
|
70
80
|
# document head
|
71
81
|
metadata = @xml.instruct! :xml, encoding: 'UTF-8'
|
72
82
|
@xml.comment!('core gmi based instance document ISO 19115-2')
|
73
|
-
@xml.comment!('metadata file constructed using mdTranslator')
|
74
|
-
@xml.comment!('mdTranslator software is an open-source project
|
75
|
-
@xml.comment!('Alaska Data Integration working group is not responsible for the metadata
|
83
|
+
@xml.comment!('metadata file constructed using ADIwg mdTranslator')
|
84
|
+
@xml.comment!('mdTranslator software is an open-source project of the Alaska Data Integration working group (ADIwg)')
|
85
|
+
@xml.comment!('Alaska Data Integration working group is not responsible for the content of this metadata record')
|
76
86
|
@xml.comment!('mdTranslator and other metadata tools available at https://github.com/adiwg')
|
87
|
+
@xml.comment!('metadata record generated ' + Time.now.to_s)
|
77
88
|
@xml.tag!('gmi:MI_Metadata', {'xmlns:gmi' => 'http://www.isotc211.org/2005/gmi',
|
78
89
|
'xmlns:gmd' => 'http://www.isotc211.org/2005/gmd',
|
79
90
|
'xmlns:gco' => 'http://www.isotc211.org/2005/gco',
|
@@ -149,7 +160,7 @@ module ADIWG
|
|
149
160
|
@xml.tag!('gmd:parentIdentifier') do
|
150
161
|
@xml.tag!('gco:CharacterString', s)
|
151
162
|
end
|
152
|
-
elsif
|
163
|
+
elsif @responseObj[:writerShowTags]
|
153
164
|
@xml.tag!('gmd:parentIdentifier')
|
154
165
|
end
|
155
166
|
|
@@ -235,10 +246,30 @@ module ADIWG
|
|
235
246
|
@xml.tag!('gmd:dataSetURI') do
|
236
247
|
@xml.tag!('gco:CharacterString', s)
|
237
248
|
end
|
238
|
-
elsif
|
249
|
+
elsif @responseObj[:writerShowTags]
|
239
250
|
@xml.tag!('gmd:dataSetURI')
|
240
251
|
end
|
241
252
|
|
253
|
+
# metadata information - locale
|
254
|
+
if hMetaInfo
|
255
|
+
if hMetaInfo[:metadataLocales]
|
256
|
+
aLocales = hMetaInfo[:metadataLocales]
|
257
|
+
aLocales.each do |hLocale|
|
258
|
+
@xml.tag!('gmd:locale') do
|
259
|
+
localeClass.writeXML(hLocale)
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
# metadata information - grid info
|
266
|
+
aGrids = hResInfo[:gridInfo]
|
267
|
+
aGrids.each do |hGrid|
|
268
|
+
@xml.tag!('gmd:spatialRepresentationInfo') do
|
269
|
+
gridClass.writeXML(hGrid)
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
242
273
|
# metadata information - reference system
|
243
274
|
hRefSystems = hResInfo[:spatialReferenceSystem]
|
244
275
|
if !hRefSystems.empty?
|
@@ -267,7 +298,7 @@ module ADIWG
|
|
267
298
|
end
|
268
299
|
end
|
269
300
|
|
270
|
-
elsif
|
301
|
+
elsif @responseObj[:writerShowTags]
|
271
302
|
@xml.tag!('gmd:referenceSystemInfo')
|
272
303
|
end
|
273
304
|
|
@@ -286,7 +317,7 @@ module ADIWG
|
|
286
317
|
end
|
287
318
|
end
|
288
319
|
end
|
289
|
-
if !extensions &&
|
320
|
+
if !extensions && @responseObj[:writerShowTags]
|
290
321
|
@xml.tag!('gmd:metadataExtensionInfo')
|
291
322
|
end
|
292
323
|
|
@@ -300,8 +331,13 @@ module ADIWG
|
|
300
331
|
end
|
301
332
|
|
302
333
|
# metadata information - content info
|
303
|
-
# ... information about data and link to 19110
|
304
|
-
|
334
|
+
# ... information about data content and/or link to 19110
|
335
|
+
aContentInfo = hResInfo[:coverageInfo]
|
336
|
+
aContentInfo.each do |hContent|
|
337
|
+
@xml.tag!('gmd:contentInfo') do
|
338
|
+
contentClass.writeXML(hContent)
|
339
|
+
end
|
340
|
+
end
|
305
341
|
|
306
342
|
# metadata information - distribution info []
|
307
343
|
aDistInfo = intMetadata[:distributorInfo]
|
@@ -309,7 +345,7 @@ module ADIWG
|
|
309
345
|
@xml.tag!('gmd:distributionInfo') do
|
310
346
|
distClass.writeXML(aDistInfo)
|
311
347
|
end
|
312
|
-
elsif
|
348
|
+
elsif @responseObj[:writerShowTags]
|
313
349
|
@xml.tag!('gmd:distributionInfo')
|
314
350
|
end
|
315
351
|
|
@@ -321,7 +357,7 @@ module ADIWG
|
|
321
357
|
dqClass.writeXML(hDQInfo)
|
322
358
|
end
|
323
359
|
end
|
324
|
-
elsif
|
360
|
+
elsif @responseObj[:writerShowTags]
|
325
361
|
@xml.tag!('gmd:dataQualityInfo')
|
326
362
|
end
|
327
363
|
|
@@ -338,7 +374,7 @@ module ADIWG
|
|
338
374
|
end
|
339
375
|
end
|
340
376
|
end
|
341
|
-
if !maintInfo &&
|
377
|
+
if !maintInfo && @responseObj[:writerShowTags]
|
342
378
|
@xml.tag!('gmd:metadataMaintenance')
|
343
379
|
end
|
344
380
|
|
@@ -0,0 +1,116 @@
|
|
1
|
+
# ISO <<Class>> CI_Address
|
2
|
+
# writer output in XML
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2013-08-09 original script
|
6
|
+
# Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
|
7
|
+
# Stan Smith 2014-12-22 added return if passed nil address objects
|
8
|
+
# Stan Smith 2014-12-23 refactored to drop physical address elements if no
|
9
|
+
# ... deliveryPoints are provided
|
10
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
11
|
+
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
12
|
+
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
13
|
+
|
14
|
+
module ADIWG
|
15
|
+
module Mdtranslator
|
16
|
+
module Writers
|
17
|
+
module Iso19115_2
|
18
|
+
|
19
|
+
class CI_Address
|
20
|
+
|
21
|
+
def initialize(xml, responseObj)
|
22
|
+
@xml = xml
|
23
|
+
@responseObj = responseObj
|
24
|
+
end
|
25
|
+
|
26
|
+
def writeXML(hAddress)
|
27
|
+
|
28
|
+
return if hAddress.nil?
|
29
|
+
|
30
|
+
deliveryPoints = hAddress[:deliveryPoints].length
|
31
|
+
eMails = hAddress[:eMailList].length
|
32
|
+
|
33
|
+
if deliveryPoints + eMails > 0
|
34
|
+
@xml.tag!('gmd:CI_Address') do
|
35
|
+
|
36
|
+
# physical address
|
37
|
+
# ... if no delivery points are provided ignore rest
|
38
|
+
# ... of physical address items
|
39
|
+
if deliveryPoints > 0
|
40
|
+
|
41
|
+
# address - delivery points (address lines)
|
42
|
+
aDeliveryPoints = hAddress[:deliveryPoints]
|
43
|
+
aDeliveryPoints.each do |myPoint|
|
44
|
+
@xml.tag!('gmd:deliveryPoint') do
|
45
|
+
@xml.tag!('gco:CharacterString', myPoint)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# address - city
|
50
|
+
s = hAddress[:city]
|
51
|
+
if !s.nil?
|
52
|
+
@xml.tag!('gmd:city') do
|
53
|
+
@xml.tag!('gco:CharacterString', s)
|
54
|
+
end
|
55
|
+
elsif @responseObj[:writerShowTags]
|
56
|
+
@xml.tag!('gmd:city')
|
57
|
+
end
|
58
|
+
|
59
|
+
# address - admin area (state)
|
60
|
+
s = hAddress[:adminArea]
|
61
|
+
if !s.nil?
|
62
|
+
@xml.tag!('gmd:administrativeArea') do
|
63
|
+
@xml.tag!('gco:CharacterString', s)
|
64
|
+
end
|
65
|
+
elsif @responseObj[:writerShowTags]
|
66
|
+
@xml.tag!('gmd:administrativeArea')
|
67
|
+
end
|
68
|
+
|
69
|
+
# address - postal code
|
70
|
+
s = hAddress[:postalCode]
|
71
|
+
if !s.nil?
|
72
|
+
@xml.tag!('gmd:postalCode') do
|
73
|
+
@xml.tag!('gco:CharacterString', s)
|
74
|
+
end
|
75
|
+
elsif @responseObj[:writerShowTags]
|
76
|
+
@xml.tag!('gmd:postalCode')
|
77
|
+
end
|
78
|
+
|
79
|
+
# address - country
|
80
|
+
s = hAddress[:country]
|
81
|
+
if !s.nil?
|
82
|
+
@xml.tag!('gmd:country') do
|
83
|
+
@xml.tag!('gco:CharacterString', s)
|
84
|
+
end
|
85
|
+
elsif @responseObj[:writerShowTags]
|
86
|
+
@xml.tag!('gmd:country')
|
87
|
+
end
|
88
|
+
|
89
|
+
elsif @responseObj[:writerShowTags]
|
90
|
+
@xml.tag!('gmd:deliveryPoint')
|
91
|
+
@xml.tag!('gmd:city')
|
92
|
+
@xml.tag!('gmd:administrativeArea')
|
93
|
+
@xml.tag!('gmd:postalCode')
|
94
|
+
@xml.tag!('gmd:country')
|
95
|
+
end
|
96
|
+
|
97
|
+
# address - email addresses
|
98
|
+
if eMails > 0
|
99
|
+
hAddress[:eMailList].each do |myEmail|
|
100
|
+
@xml.tag!('gmd:electronicMailAddress') do
|
101
|
+
@xml.tag!('gco:CharacterString', myEmail)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
elsif @responseObj[:writerShowTags]
|
105
|
+
@xml.tag!('gmd:electronicMailAddress')
|
106
|
+
end
|
107
|
+
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end # writeXML
|
111
|
+
end # CI_Address
|
112
|
+
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
data/lib/adiwg/mdtranslator/writers/{iso → iso19115_2}/classes/class_aggregateInformation.rb
RENAMED
@@ -8,19 +8,23 @@
|
|
8
8
|
# ... rather than resourceType for 0.9.0
|
9
9
|
# Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
|
10
10
|
# Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
|
11
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
12
|
+
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
13
|
+
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
11
14
|
|
12
|
-
|
13
|
-
|
15
|
+
require_relative 'class_codelist'
|
16
|
+
require_relative 'class_citation'
|
14
17
|
|
15
18
|
module ADIWG
|
16
19
|
module Mdtranslator
|
17
20
|
module Writers
|
18
|
-
module
|
21
|
+
module Iso19115_2
|
19
22
|
|
20
23
|
class MD_AggregateInformation
|
21
24
|
|
22
|
-
def initialize(xml)
|
25
|
+
def initialize(xml, responseObj)
|
23
26
|
@xml = xml
|
27
|
+
@responseObj = responseObj
|
24
28
|
end
|
25
29
|
|
26
30
|
def writeXML(hAssocRes)
|
@@ -31,8 +35,8 @@ module ADIWG
|
|
31
35
|
# ... citation > identifier section
|
32
36
|
|
33
37
|
# classes used
|
34
|
-
codelistClass =
|
35
|
-
citationClass =
|
38
|
+
codelistClass = MD_Codelist.new(@xml, @responseObj)
|
39
|
+
citationClass = CI_Citation.new(@xml, @responseObj)
|
36
40
|
|
37
41
|
@xml.tag!('gmd:MD_AggregateInformation') do
|
38
42
|
|
@@ -42,7 +46,7 @@ module ADIWG
|
|
42
46
|
@xml.tag!('gmd:aggregateDataSetName') do
|
43
47
|
citationClass.writeXML(hAssocCit)
|
44
48
|
end
|
45
|
-
elsif
|
49
|
+
elsif @responseObj[:writerShowTags]
|
46
50
|
@xml.tag!('gmd:aggregateDataSetName')
|
47
51
|
end
|
48
52
|
|
@@ -54,7 +58,7 @@ module ADIWG
|
|
54
58
|
@xml.tag!('gmd:associationType') do
|
55
59
|
codelistClass.writeXML('iso_associationType',s)
|
56
60
|
end
|
57
|
-
elsif
|
61
|
+
elsif @responseObj[:writerShowTags]
|
58
62
|
@xml.tag!('gmd:associationType')
|
59
63
|
end
|
60
64
|
|
@@ -64,7 +68,7 @@ module ADIWG
|
|
64
68
|
@xml.tag!('gmd:initiativeType') do
|
65
69
|
codelistClass.writeXML('iso_initiativeType',s)
|
66
70
|
end
|
67
|
-
elsif
|
71
|
+
elsif @responseObj[:writerShowTags]
|
68
72
|
@xml.tag!('gmd:initiativeType')
|
69
73
|
end
|
70
74
|
|