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
@@ -2,34 +2,38 @@
|
|
2
2
|
# writer output in XML
|
3
3
|
|
4
4
|
# History:
|
5
|
-
# Stan Smith 2013-11-22 original script
|
5
|
+
# Stan Smith 2013-11-22 original script.
|
6
6
|
# Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
|
7
7
|
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
8
8
|
# Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
|
9
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
10
|
+
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
11
|
+
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
9
12
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
13
|
+
require_relative 'class_codelist'
|
14
|
+
require_relative 'class_enumerationList'
|
15
|
+
require_relative 'class_onlineResource'
|
16
|
+
require_relative 'class_responsibleParty'
|
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_MetadataExtensionInformation
|
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(hExtension)
|
27
31
|
|
28
32
|
# classes used
|
29
|
-
codelistClass =
|
30
|
-
enumerationClass =
|
31
|
-
olResClass =
|
32
|
-
rPartyClass =
|
33
|
+
codelistClass = MD_Codelist.new(@xml, @responseObj)
|
34
|
+
enumerationClass = MD_EnumerationList.new(@xml, @responseObj)
|
35
|
+
olResClass = CI_OnlineResource.new(@xml, @responseObj)
|
36
|
+
rPartyClass = CI_ResponsibleParty.new(@xml, @responseObj)
|
33
37
|
|
34
38
|
@xml.tag!('gmd:MD_MetadataExtensionInformation') do
|
35
39
|
|
@@ -39,7 +43,7 @@ module ADIWG
|
|
39
43
|
@xml.tag!('gmd:extensionOnLineResource') do
|
40
44
|
olResClass.writeXML(hOLResource)
|
41
45
|
end
|
42
|
-
elsif
|
46
|
+
elsif @responseObj[:writerShowTags]
|
43
47
|
@xml.tag!('gmd:extensionOnLineResource')
|
44
48
|
end
|
45
49
|
|
@@ -63,7 +67,7 @@ module ADIWG
|
|
63
67
|
@xml.tag!('gmd:shortName') do
|
64
68
|
@xml.tag!('gco:CharacterString', s)
|
65
69
|
end
|
66
|
-
elsif
|
70
|
+
elsif @responseObj[:writerShowTags]
|
67
71
|
@xml.tag!('gmd:shortName')
|
68
72
|
end
|
69
73
|
|
@@ -83,7 +87,7 @@ module ADIWG
|
|
83
87
|
@xml.tag!('gmd:obligation') do
|
84
88
|
enumerationClass.writeXML('iso_obligation',s)
|
85
89
|
end
|
86
|
-
elsif
|
90
|
+
elsif @responseObj[:writerShowTags]
|
87
91
|
@xml.tag!('gmd:obligation')
|
88
92
|
end
|
89
93
|
|
@@ -103,7 +107,7 @@ module ADIWG
|
|
103
107
|
@xml.tag!('gmd:maximumOccurrence') do
|
104
108
|
@xml.tag!('gco:CharacterString', s)
|
105
109
|
end
|
106
|
-
elsif
|
110
|
+
elsif @responseObj[:writerShowTags]
|
107
111
|
@xml.tag!('gmd:maximumOccurrence')
|
108
112
|
end
|
109
113
|
|
@@ -2,35 +2,40 @@
|
|
2
2
|
# writer output in XML
|
3
3
|
|
4
4
|
# History:
|
5
|
-
# Stan Smith 2013-11-12 original script
|
5
|
+
# Stan Smith 2013-11-12 original script.
|
6
6
|
# Stan Smith 2013-11-13 add line string
|
7
7
|
# Stan Smith 2014-05-30 modified for version 0.5.0
|
8
8
|
# Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
|
9
9
|
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
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
|
10
13
|
|
11
|
-
require
|
12
|
-
require '
|
13
|
-
|
14
|
-
|
14
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_point')
|
15
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_lineString')
|
16
|
+
require_relative 'class_point'
|
17
|
+
require_relative 'class_lineString'
|
18
|
+
require_relative 'class_polygon'
|
15
19
|
|
16
20
|
module ADIWG
|
17
21
|
module Mdtranslator
|
18
22
|
module Writers
|
19
|
-
module
|
23
|
+
module Iso19115_2
|
20
24
|
|
21
25
|
class MultiGeometry
|
22
26
|
|
23
|
-
def initialize(xml)
|
27
|
+
def initialize(xml, responseObj)
|
24
28
|
@xml = xml
|
29
|
+
@responseObj = responseObj
|
25
30
|
end
|
26
31
|
|
27
32
|
def writeXML(hGeoElement)
|
28
33
|
|
29
34
|
# classes used
|
30
35
|
intMetadataClass = InternalMetadata.new
|
31
|
-
pointClass =
|
32
|
-
lineClass =
|
33
|
-
polygonClass =
|
36
|
+
pointClass = Point.new(@xml, @responseObj)
|
37
|
+
lineClass = LineString.new(@xml, @responseObj)
|
38
|
+
polygonClass = Polygon.new(@xml, @responseObj)
|
34
39
|
|
35
40
|
|
36
41
|
# gml:MultiGeometry attributes
|
@@ -39,8 +44,8 @@ module ADIWG
|
|
39
44
|
# gml:MultiGeometry attributes - gml:id - required
|
40
45
|
mGeoID = hGeoElement[:elementId]
|
41
46
|
if mGeoID.nil?
|
42
|
-
|
43
|
-
mGeoID = 'multiGeo' +
|
47
|
+
@responseObj[:writerMissingIdCount] = @responseObj[:writerMissingIdCount].succ
|
48
|
+
mGeoID = 'multiGeo' + @responseObj[:writerMissingIdCount]
|
44
49
|
end
|
45
50
|
attributes['gml:id'] = mGeoID
|
46
51
|
|
@@ -62,7 +67,7 @@ module ADIWG
|
|
62
67
|
s = hGeoElement[:elementDescription]
|
63
68
|
if !s.nil?
|
64
69
|
@xml.tag!('gml:description', s)
|
65
|
-
elsif
|
70
|
+
elsif @responseObj[:writerShowTags]
|
66
71
|
@xml.tag!('gml:description')
|
67
72
|
end
|
68
73
|
|
@@ -70,7 +75,7 @@ module ADIWG
|
|
70
75
|
s = hGeoElement[:elementName]
|
71
76
|
if !s.nil?
|
72
77
|
@xml.tag!('gml:name', s)
|
73
|
-
elsif
|
78
|
+
elsif @responseObj[:writerShowTags]
|
74
79
|
@xml.tag!('gml:name')
|
75
80
|
end
|
76
81
|
|
@@ -85,7 +90,7 @@ module ADIWG
|
|
85
90
|
aPoints.each do |aCoords|
|
86
91
|
intPoint = intMetadataClass.newGeoElement
|
87
92
|
intPoint[:elementSrs] = hGeoElement[:elementSrs]
|
88
|
-
intPoint[:elementGeometry] =
|
93
|
+
intPoint[:elementGeometry] = ADIWG::Mdtranslator::Readers::MdJson::Point.unpack(aCoords, 'Point', @responseObj)
|
89
94
|
pointClass.writeXML(intPoint)
|
90
95
|
end
|
91
96
|
end
|
@@ -97,7 +102,7 @@ module ADIWG
|
|
97
102
|
aLines.each do |aCoords|
|
98
103
|
intLine = intMetadataClass.newGeoElement
|
99
104
|
intLine[:elementSrs] = hGeoElement[:elementSrs]
|
100
|
-
intLine[:elementGeometry] =
|
105
|
+
intLine[:elementGeometry] = ADIWG::Mdtranslator::Readers::MdJson::LineString.unpack(aCoords, 'LineString', @responseObj)
|
101
106
|
lineClass.writeXML(intLine)
|
102
107
|
end
|
103
108
|
end
|
@@ -109,7 +114,7 @@ module ADIWG
|
|
109
114
|
aPolygons.each do |aCoords|
|
110
115
|
intPolygon = intMetadataClass.newGeoElement
|
111
116
|
intPolygon[:elementSrs] = hGeoElement[:elementSrs]
|
112
|
-
intPolygon[:elementGeometry] =
|
117
|
+
intPolygon[:elementGeometry] = ADIWG::Mdtranslator::Readers::MdJson::LineString.unpack(aCoords, 'Polygon', @responseObj)
|
113
118
|
polygonClass.writeXML(intPolygon)
|
114
119
|
end
|
115
120
|
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# ISO <<Class>> CI_OnlineResource
|
2
|
+
# writer output in XML
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2013-08-14 original script.
|
6
|
+
# Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
|
7
|
+
# Stan Smith 2014-08-14 added protocol to onlineResource
|
8
|
+
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
9
|
+
# Stan Smith 2015-06-11 change all codelists to use 'class_codelist' method
|
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
|
+
require_relative 'class_codelist'
|
15
|
+
|
16
|
+
module ADIWG
|
17
|
+
module Mdtranslator
|
18
|
+
module Writers
|
19
|
+
module Iso19115_2
|
20
|
+
|
21
|
+
class CI_OnlineResource
|
22
|
+
|
23
|
+
def initialize(xml, responseObj)
|
24
|
+
@xml = xml
|
25
|
+
@responseObj = responseObj
|
26
|
+
end
|
27
|
+
|
28
|
+
def writeXML(hOlResource)
|
29
|
+
|
30
|
+
# classes used
|
31
|
+
codelistClass = MD_Codelist.new(@xml, @responseObj)
|
32
|
+
|
33
|
+
@xml.tag! 'gmd:CI_OnlineResource' do
|
34
|
+
|
35
|
+
# online resource - link - required
|
36
|
+
s = hOlResource[:olResURI]
|
37
|
+
if s.nil?
|
38
|
+
@xml.tag!('gmd:linkage', {'gco:nilReason' => 'missing'})
|
39
|
+
else
|
40
|
+
@xml.tag!('gmd:linkage') do
|
41
|
+
@xml.tag!('gmd:URL', s)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# online resource - protocol
|
46
|
+
s = hOlResource[:olResProtocol]
|
47
|
+
if !s.nil?
|
48
|
+
@xml.tag!('gmd:protocol') do
|
49
|
+
@xml.tag!('gco:CharacterString', s)
|
50
|
+
end
|
51
|
+
elsif @responseObj[:writerShowTags]
|
52
|
+
@xml.tag!('gmd:protocol')
|
53
|
+
end
|
54
|
+
|
55
|
+
# online resource - link name
|
56
|
+
s = hOlResource[:olResName]
|
57
|
+
if !s.nil?
|
58
|
+
@xml.tag!('gmd:name') do
|
59
|
+
@xml.tag!('gco:CharacterString', s)
|
60
|
+
end
|
61
|
+
elsif @responseObj[:writerShowTags]
|
62
|
+
@xml.tag!('gmd:name')
|
63
|
+
end
|
64
|
+
|
65
|
+
# online resource - link description
|
66
|
+
s = hOlResource[:olResDesc]
|
67
|
+
if !s.nil?
|
68
|
+
@xml.tag!('gmd:description') do
|
69
|
+
@xml.tag!('gco:CharacterString', s)
|
70
|
+
end
|
71
|
+
elsif @responseObj[:writerShowTags]
|
72
|
+
@xml.tag!('gmd:description')
|
73
|
+
end
|
74
|
+
|
75
|
+
# online resource - link function - CI_OnLineFunctionCode
|
76
|
+
s = hOlResource[:olResFunction]
|
77
|
+
if !s.nil?
|
78
|
+
@xml.tag!('gmd:function') do
|
79
|
+
codelistClass.writeXML('iso_onlineFunction',s)
|
80
|
+
end
|
81
|
+
elsif @responseObj[:writerShowTags]
|
82
|
+
@xml.tag!('gmd:function')
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -6,18 +6,21 @@
|
|
6
6
|
# Stan Smith 2014-05-30 modified for version 0.5.0
|
7
7
|
# Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
|
8
8
|
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
9
|
-
|
10
|
-
|
9
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
10
|
+
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
11
|
+
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
12
|
+
# Stan Smith 2015-07-16 moved module_coordinates from mdJson reader to internal
|
11
13
|
|
12
14
|
module ADIWG
|
13
15
|
module Mdtranslator
|
14
16
|
module Writers
|
15
|
-
module
|
17
|
+
module Iso19115_2
|
16
18
|
|
17
19
|
class Point
|
18
20
|
|
19
|
-
def initialize(xml)
|
21
|
+
def initialize(xml, responseObj)
|
20
22
|
@xml = xml
|
23
|
+
@responseObj = responseObj
|
21
24
|
end
|
22
25
|
|
23
26
|
def writeXML(hGeoElement)
|
@@ -28,8 +31,8 @@ module ADIWG
|
|
28
31
|
# gml:Point attributes - gml:id - required
|
29
32
|
pointID = hGeoElement[:elementId]
|
30
33
|
if pointID.nil?
|
31
|
-
|
32
|
-
pointID = 'point' +
|
34
|
+
@responseObj[:writerMissingIdCount] = @responseObj[:writerMissingIdCount].succ
|
35
|
+
pointID = 'point' + @responseObj[:writerMissingIdCount]
|
33
36
|
end
|
34
37
|
attributes['gml:id'] = pointID
|
35
38
|
|
@@ -51,7 +54,7 @@ module ADIWG
|
|
51
54
|
s = hGeoElement[:elementDescription]
|
52
55
|
if !s.nil?
|
53
56
|
@xml.tag!('gml:description', s)
|
54
|
-
elsif
|
57
|
+
elsif @responseObj[:writerShowTags]
|
55
58
|
@xml.tag!('gml:description')
|
56
59
|
end
|
57
60
|
|
@@ -59,7 +62,7 @@ module ADIWG
|
|
59
62
|
s = hGeoElement[:elementName]
|
60
63
|
if !s.nil?
|
61
64
|
@xml.tag!('gml:name', s)
|
62
|
-
elsif
|
65
|
+
elsif @responseObj[:writerShowTags]
|
63
66
|
@xml.tag!('gml:name')
|
64
67
|
end
|
65
68
|
|
@@ -68,7 +71,7 @@ module ADIWG
|
|
68
71
|
# convert coordinate string from geoJSON to gml
|
69
72
|
s = hGeoElement[:elementGeometry][:geometry]
|
70
73
|
if !s.nil?
|
71
|
-
s =
|
74
|
+
s = AdiwgCoordinates.unpack(s, @responseObj)
|
72
75
|
@xml.tag!('gml:coordinates', s)
|
73
76
|
else
|
74
77
|
@xml.tag!('gml:coordinates')
|
@@ -2,22 +2,25 @@
|
|
2
2
|
# writer output in XML
|
3
3
|
|
4
4
|
# History:
|
5
|
-
# Stan Smith 2013-11-18 original script
|
5
|
+
# Stan Smith 2013-11-18 original script.
|
6
6
|
# Stan Smith 2014-05-30 modified for version 0.5.0
|
7
7
|
# Stan Smith 2014-07-08 modify require statements to function in RubyGem structure
|
8
8
|
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
9
|
-
|
10
|
-
|
9
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
10
|
+
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
11
|
+
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
12
|
+
# Stan Smith 2015-07-16 moved module_coordinates from mdJson reader to internal
|
11
13
|
|
12
14
|
module ADIWG
|
13
15
|
module Mdtranslator
|
14
16
|
module Writers
|
15
|
-
module
|
17
|
+
module Iso19115_2
|
16
18
|
|
17
19
|
class Polygon
|
18
20
|
|
19
|
-
def initialize(xml)
|
21
|
+
def initialize(xml, responseObj)
|
20
22
|
@xml = xml
|
23
|
+
@responseObj = responseObj
|
21
24
|
end
|
22
25
|
|
23
26
|
def writeXML(hGeoElement)
|
@@ -28,8 +31,8 @@ module ADIWG
|
|
28
31
|
# gml:Polygon attributes - gml:id - required
|
29
32
|
lineID = hGeoElement[:elementId]
|
30
33
|
if lineID.nil?
|
31
|
-
|
32
|
-
lineID = 'polygon' +
|
34
|
+
@responseObj[:writerMissingIdCount] = @responseObj[:writerMissingIdCount].succ
|
35
|
+
lineID = 'polygon' + @responseObj[:writerMissingIdCount]
|
33
36
|
end
|
34
37
|
attributes['gml:id'] = lineID
|
35
38
|
|
@@ -51,7 +54,7 @@ module ADIWG
|
|
51
54
|
s = hGeoElement[:elementDescription]
|
52
55
|
if !s.nil?
|
53
56
|
@xml.tag!('gml:description', s)
|
54
|
-
elsif
|
57
|
+
elsif @responseObj[:writerShowTags]
|
55
58
|
@xml.tag!('gml:description')
|
56
59
|
end
|
57
60
|
|
@@ -59,7 +62,7 @@ module ADIWG
|
|
59
62
|
s = hGeoElement[:elementName]
|
60
63
|
if !s.nil?
|
61
64
|
@xml.tag!('gml:name', s)
|
62
|
-
elsif
|
65
|
+
elsif @responseObj[:writerShowTags]
|
63
66
|
@xml.tag!('gml:name')
|
64
67
|
end
|
65
68
|
|
@@ -68,7 +71,7 @@ module ADIWG
|
|
68
71
|
# convert coordinate string from geoJSON to gml
|
69
72
|
aCoords = hGeoElement[:elementGeometry][:geometry][:exteriorRing]
|
70
73
|
if !aCoords.empty?
|
71
|
-
s =
|
74
|
+
s = AdiwgCoordinates.unpack(aCoords, @responseObj)
|
72
75
|
@xml.tag!('gml:exterior') do
|
73
76
|
@xml.tag!('gml:LinearRing') do
|
74
77
|
@xml.tag!('gml:coordinates', s)
|
@@ -84,7 +87,7 @@ module ADIWG
|
|
84
87
|
aRings = hGeoElement[:elementGeometry][:geometry][:exclusionRings]
|
85
88
|
unless aRings.empty?
|
86
89
|
aRings.each do |aRing|
|
87
|
-
s =
|
90
|
+
s = AdiwgCoordinates.unpack(aRing, @responseObj)
|
88
91
|
@xml.tag!('gml:interior') do
|
89
92
|
@xml.tag!('gml:LinearRing') do
|
90
93
|
@xml.tag!('gml:coordinates', s)
|
@@ -2,28 +2,31 @@
|
|
2
2
|
# writer output in XML
|
3
3
|
|
4
4
|
# History:
|
5
|
-
# Stan Smith 2013-11-20 original script
|
5
|
+
# Stan Smith 2013-11-20 original script.
|
6
6
|
# Stan Smith 2014-07-09 modify require statements to function in RubyGem structure
|
7
7
|
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
8
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
9
|
+
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
10
|
+
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
8
11
|
|
9
|
-
|
10
|
-
require 'class_responsibleParty'
|
12
|
+
require_relative 'class_responsibleParty'
|
11
13
|
|
12
14
|
module ADIWG
|
13
15
|
module Mdtranslator
|
14
16
|
module Writers
|
15
|
-
module
|
17
|
+
module Iso19115_2
|
16
18
|
|
17
19
|
class LI_ProcessStep
|
18
20
|
|
19
|
-
def initialize(xml)
|
21
|
+
def initialize(xml, responseObj)
|
20
22
|
@xml = xml
|
23
|
+
@responseObj = responseObj
|
21
24
|
end
|
22
25
|
|
23
26
|
def writeXML(hProcessStep)
|
24
27
|
|
25
28
|
# classes used
|
26
|
-
rPartyClass =
|
29
|
+
rPartyClass = CI_ResponsibleParty.new(@xml, @responseObj)
|
27
30
|
|
28
31
|
# process step - id
|
29
32
|
attributes = {}
|
@@ -49,7 +52,7 @@ module ADIWG
|
|
49
52
|
@xml.tag!('gmd:rationale') do
|
50
53
|
@xml.tag!('gco:CharacterString', s)
|
51
54
|
end
|
52
|
-
elsif
|
55
|
+
elsif @responseObj[:writerShowTags]
|
53
56
|
@xml.tag!('gmd:rationale')
|
54
57
|
end
|
55
58
|
|
@@ -64,7 +67,7 @@ module ADIWG
|
|
64
67
|
@xml.tag!('gco:DateTime', s)
|
65
68
|
end
|
66
69
|
end
|
67
|
-
elsif
|
70
|
+
elsif @responseObj[:writerShowTags]
|
68
71
|
@xml.tag!('gmd:dateTime')
|
69
72
|
end
|
70
73
|
|
@@ -76,7 +79,7 @@ module ADIWG
|
|
76
79
|
rPartyClass.writeXML(rParty)
|
77
80
|
end
|
78
81
|
end
|
79
|
-
elsif
|
82
|
+
elsif @responseObj[:writerShowTags]
|
80
83
|
@xml.tag!('gmd:processor')
|
81
84
|
end
|
82
85
|
|