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
data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceInfo.rb
RENAMED
@@ -17,23 +17,30 @@
|
|
17
17
|
# Stan Smith 2014-11-06 added resourceType for 0.9.0
|
18
18
|
# Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
|
19
19
|
# Stan Smith 2015-06-12 added support for resource characterSets
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
require
|
27
|
-
require
|
28
|
-
require
|
29
|
-
require
|
30
|
-
require
|
31
|
-
require
|
32
|
-
require
|
33
|
-
require
|
34
|
-
require
|
35
|
-
require
|
36
|
-
require
|
20
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
21
|
+
# Stan Smith 2015-07-14 refactored to remove global namespace constants
|
22
|
+
# Stan Smith 2015-07-29 added support for locale
|
23
|
+
# Stan Smith 2015-07-30 added support for grid descriptions
|
24
|
+
# Stan Smith 2015-08-19 added support for coverage information
|
25
|
+
|
26
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_citation')
|
27
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_responsibleParty')
|
28
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_resourceFormat')
|
29
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_descriptiveKeyword')
|
30
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_resourceMaintenance')
|
31
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_resourceSpecificUsage')
|
32
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_browseGraphic')
|
33
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_legalConstraint')
|
34
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_securityConstraint')
|
35
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_taxonomy')
|
36
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_resolution')
|
37
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_extent')
|
38
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_dataQuality')
|
39
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_spatialReference')
|
40
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_timePeriod')
|
41
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_locale')
|
42
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_gridInfo')
|
43
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_coverageInfo')
|
37
44
|
|
38
45
|
module ADIWG
|
39
46
|
module Mdtranslator
|
@@ -42,7 +49,7 @@ module ADIWG
|
|
42
49
|
|
43
50
|
module ResourceInfo
|
44
51
|
|
45
|
-
def self.unpack(hResourceInfo)
|
52
|
+
def self.unpack(hResourceInfo, responseObj)
|
46
53
|
|
47
54
|
# instance classes needed in script
|
48
55
|
intMetadataClass = InternalMetadata.new
|
@@ -60,7 +67,7 @@ module ADIWG
|
|
60
67
|
if hResourceInfo.has_key?('citation')
|
61
68
|
hCitation = hResourceInfo['citation']
|
62
69
|
unless hCitation.empty?
|
63
|
-
intResInfo[:citation] =
|
70
|
+
intResInfo[:citation] = Citation.unpack(hCitation, responseObj)
|
64
71
|
end
|
65
72
|
end
|
66
73
|
|
@@ -68,7 +75,7 @@ module ADIWG
|
|
68
75
|
if hResourceInfo.has_key?('resourceTimePeriod')
|
69
76
|
hResPeriod = hResourceInfo['resourceTimePeriod']
|
70
77
|
unless hResPeriod.empty?
|
71
|
-
intResInfo[:timePeriod] =
|
78
|
+
intResInfo[:timePeriod] = TimePeriod.unpack(hResPeriod, responseObj)
|
72
79
|
end
|
73
80
|
end
|
74
81
|
|
@@ -77,7 +84,7 @@ module ADIWG
|
|
77
84
|
aPOC = hResourceInfo['pointOfContact']
|
78
85
|
unless aPOC.empty?
|
79
86
|
aPOC.each do |rParty|
|
80
|
-
intResInfo[:pointsOfContact] <<
|
87
|
+
intResInfo[:pointsOfContact] << ResponsibleParty.unpack(rParty, responseObj)
|
81
88
|
end
|
82
89
|
end
|
83
90
|
end
|
@@ -140,6 +147,16 @@ module ADIWG
|
|
140
147
|
end
|
141
148
|
end
|
142
149
|
|
150
|
+
# metadata - locale
|
151
|
+
if hResourceInfo.has_key?('locale')
|
152
|
+
aLocale = hResourceInfo['locale']
|
153
|
+
unless aLocale.empty?
|
154
|
+
aLocale.each do |hLocale|
|
155
|
+
intResInfo[:resourceLocales] << Locale.unpack(hLocale, responseObj)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
143
160
|
# resource information - purpose
|
144
161
|
if hResourceInfo.has_key?('purpose')
|
145
162
|
s = hResourceInfo['purpose']
|
@@ -181,7 +198,7 @@ module ADIWG
|
|
181
198
|
aResFormat = hResourceInfo['resourceNativeFormat']
|
182
199
|
unless aResFormat.empty?
|
183
200
|
aResFormat.each do |hResFormat|
|
184
|
-
intResInfo[:resourceFormats] <<
|
201
|
+
intResInfo[:resourceFormats] << ResourceFormat.unpack(hResFormat, responseObj)
|
185
202
|
end
|
186
203
|
end
|
187
204
|
end
|
@@ -191,7 +208,7 @@ module ADIWG
|
|
191
208
|
aDesKeywords = hResourceInfo['keyword']
|
192
209
|
unless aDesKeywords.empty?
|
193
210
|
aDesKeywords.each do |hDesKeyword|
|
194
|
-
intResInfo[:descriptiveKeywords] <<
|
211
|
+
intResInfo[:descriptiveKeywords] << DescriptiveKeyword.unpack(hDesKeyword, responseObj)
|
195
212
|
end
|
196
213
|
end
|
197
214
|
end
|
@@ -201,7 +218,7 @@ module ADIWG
|
|
201
218
|
aResMaint = hResourceInfo['resourceMaintenance']
|
202
219
|
unless aResMaint.empty?
|
203
220
|
aResMaint.each do |hResource|
|
204
|
-
intResInfo[:resourceMaint] <<
|
221
|
+
intResInfo[:resourceMaint] << ResourceMaintenance.unpack(hResource, responseObj)
|
205
222
|
end
|
206
223
|
end
|
207
224
|
end
|
@@ -211,7 +228,7 @@ module ADIWG
|
|
211
228
|
aResUses = hResourceInfo['resourceSpecificUsage']
|
212
229
|
unless aResUses.empty?
|
213
230
|
aResUses.each do |hUsage|
|
214
|
-
intResInfo[:resourceUses] <<
|
231
|
+
intResInfo[:resourceUses] << ResourceSpecificUsage.unpack(hUsage, responseObj)
|
215
232
|
end
|
216
233
|
end
|
217
234
|
end
|
@@ -221,7 +238,7 @@ module ADIWG
|
|
221
238
|
aBrowseGraph = hResourceInfo['graphicOverview']
|
222
239
|
unless aBrowseGraph.empty?
|
223
240
|
aBrowseGraph.each do |hBGraphic|
|
224
|
-
intResInfo[:graphicOverview] <<
|
241
|
+
intResInfo[:graphicOverview] << BrowseGraphic.unpack(hBGraphic, responseObj)
|
225
242
|
end
|
226
243
|
end
|
227
244
|
end
|
@@ -245,7 +262,7 @@ module ADIWG
|
|
245
262
|
aLegalCons = hConstraint['legalConstraint']
|
246
263
|
unless aLegalCons.empty?
|
247
264
|
aLegalCons.each do |hLegalCon|
|
248
|
-
intResInfo[:legalConstraints] <<
|
265
|
+
intResInfo[:legalConstraints] << LegalConstraints.unpack(hLegalCon, responseObj)
|
249
266
|
end
|
250
267
|
end
|
251
268
|
end
|
@@ -255,7 +272,7 @@ module ADIWG
|
|
255
272
|
aSecurityCons = hConstraint['securityConstraint']
|
256
273
|
unless aSecurityCons.empty?
|
257
274
|
aSecurityCons.each do |hSecurityCon|
|
258
|
-
intResInfo[:securityConstraints] <<
|
275
|
+
intResInfo[:securityConstraints] << SecurityConstraints.unpack(hSecurityCon, responseObj)
|
259
276
|
end
|
260
277
|
end
|
261
278
|
end
|
@@ -266,7 +283,7 @@ module ADIWG
|
|
266
283
|
if hResourceInfo.has_key?('taxonomy')
|
267
284
|
hTaxonomy = hResourceInfo['taxonomy']
|
268
285
|
unless hTaxonomy.empty?
|
269
|
-
intResInfo[:taxonomy] =
|
286
|
+
intResInfo[:taxonomy] = Taxonomy.unpack(hTaxonomy, responseObj)
|
270
287
|
end
|
271
288
|
end
|
272
289
|
|
@@ -274,7 +291,7 @@ module ADIWG
|
|
274
291
|
if hResourceInfo.has_key?('spatialReferenceSystem')
|
275
292
|
hSpatialRef = hResourceInfo['spatialReferenceSystem']
|
276
293
|
unless hSpatialRef.empty?
|
277
|
-
intResInfo[:spatialReferenceSystem] =
|
294
|
+
intResInfo[:spatialReferenceSystem] = SpatialReferenceSystem.unpack(hSpatialRef, responseObj)
|
278
295
|
end
|
279
296
|
end
|
280
297
|
|
@@ -293,7 +310,7 @@ module ADIWG
|
|
293
310
|
aSpRes = hResourceInfo['spatialResolution']
|
294
311
|
unless aSpRes.empty?
|
295
312
|
aSpRes.each do |hResolution|
|
296
|
-
intResInfo[:spatialResolutions] <<
|
313
|
+
intResInfo[:spatialResolutions] << Resolution.unpack(hResolution, responseObj)
|
297
314
|
end
|
298
315
|
end
|
299
316
|
end
|
@@ -303,7 +320,27 @@ module ADIWG
|
|
303
320
|
aExtents = hResourceInfo['extent']
|
304
321
|
unless aExtents.empty?
|
305
322
|
aExtents.each do |hExtent|
|
306
|
-
intResInfo[:extents] <<
|
323
|
+
intResInfo[:extents] << Extent.unpack(hExtent, responseObj)
|
324
|
+
end
|
325
|
+
end
|
326
|
+
end
|
327
|
+
|
328
|
+
# resource information - grid information
|
329
|
+
if hResourceInfo.has_key?('gridInfo')
|
330
|
+
aGrids = hResourceInfo['gridInfo']
|
331
|
+
unless aGrids.empty?
|
332
|
+
aGrids.each do |hGrid|
|
333
|
+
intResInfo[:gridInfo] << GridInfo.unpack(hGrid, responseObj)
|
334
|
+
end
|
335
|
+
end
|
336
|
+
end
|
337
|
+
|
338
|
+
# resource information - coverage information
|
339
|
+
if hResourceInfo.has_key?('coverageInfo')
|
340
|
+
aCoverage = hResourceInfo['coverageInfo']
|
341
|
+
unless aCoverage.empty?
|
342
|
+
aCoverage.each do |hCoverage|
|
343
|
+
intResInfo[:coverageInfo] << CoverageInfo.unpack(hCoverage, responseObj)
|
307
344
|
end
|
308
345
|
end
|
309
346
|
end
|
@@ -313,7 +350,7 @@ module ADIWG
|
|
313
350
|
aDataQual = hResourceInfo['dataQualityInfo']
|
314
351
|
unless aDataQual.empty?
|
315
352
|
aDataQual.each do |hDQ|
|
316
|
-
intResInfo[:dataQualityInfo] <<
|
353
|
+
intResInfo[:dataQualityInfo] << DataQuality.unpack(hDQ, responseObj)
|
317
354
|
end
|
318
355
|
end
|
319
356
|
end
|
data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_resourceMaintenance.rb
RENAMED
@@ -8,8 +8,10 @@
|
|
8
8
|
# Stan Smith 2014-04-24 modified for json schema 0.3.0
|
9
9
|
# Stan Smith 2014-07-03 resolve require statements using Mdtranslator.reader_module
|
10
10
|
# Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
|
11
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
12
|
+
# Stan Smith 2015-07-14 refactored to remove global namespace constants
|
11
13
|
|
12
|
-
require
|
14
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_responsibleParty')
|
13
15
|
|
14
16
|
module ADIWG
|
15
17
|
module Mdtranslator
|
@@ -18,7 +20,7 @@ module ADIWG
|
|
18
20
|
|
19
21
|
module ResourceMaintenance
|
20
22
|
|
21
|
-
def self.unpack(hResource)
|
23
|
+
def self.unpack(hResource, responseObj)
|
22
24
|
|
23
25
|
# instance classes needed in script
|
24
26
|
intMetadataClass = InternalMetadata.new
|
@@ -45,7 +47,7 @@ module ADIWG
|
|
45
47
|
aContact = hResource['maintenanceContact']
|
46
48
|
unless aContact.empty?
|
47
49
|
aContact.each do |hContact|
|
48
|
-
intResMaint[:maintContacts] <<
|
50
|
+
intResMaint[:maintContacts] << ResponsibleParty.unpack(hContact, responseObj)
|
49
51
|
end
|
50
52
|
end
|
51
53
|
end
|
@@ -7,8 +7,10 @@
|
|
7
7
|
# Stan Smith 2014-04-28 modified attribute names to match json schema 0.3.0
|
8
8
|
# Stan Smith 2014-07-03 resolve require statements using Mdtranslator.reader_module
|
9
9
|
# Stan Smith 2014-12-15 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 remove global namespace constants
|
10
12
|
|
11
|
-
require
|
13
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_responsibleParty')
|
12
14
|
|
13
15
|
module ADIWG
|
14
16
|
module Mdtranslator
|
@@ -17,7 +19,7 @@ module ADIWG
|
|
17
19
|
|
18
20
|
module ResourceSpecificUsage
|
19
21
|
|
20
|
-
def self.unpack(hUsage)
|
22
|
+
def self.unpack(hUsage, responseObj)
|
21
23
|
|
22
24
|
# instance classes needed in script
|
23
25
|
intMetadataClass = InternalMetadata.new
|
@@ -44,7 +46,7 @@ module ADIWG
|
|
44
46
|
aContacts = hUsage['userContactInfo']
|
45
47
|
unless aContacts.empty?
|
46
48
|
aContacts.each do |hContact|
|
47
|
-
intUsage[:userContacts] <<
|
49
|
+
intUsage[:userContacts] << ResponsibleParty.unpack(hContact, responseObj)
|
48
50
|
end
|
49
51
|
end
|
50
52
|
end
|
data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_responsibleParty.rb
RENAMED
@@ -9,6 +9,8 @@
|
|
9
9
|
# Stan Smith 2015-01-18 added nil return if hRParty empty
|
10
10
|
# Stan Smith 2015-06-12 added check that contactId for responsibleParty
|
11
11
|
# ... matches an actual contact in the contact array
|
12
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
13
|
+
# Stan Smith 2015-07-14 refactored to remove global namespace constants
|
12
14
|
|
13
15
|
module ADIWG
|
14
16
|
module Mdtranslator
|
@@ -17,7 +19,7 @@ module ADIWG
|
|
17
19
|
|
18
20
|
module ResponsibleParty
|
19
21
|
|
20
|
-
def self.unpack(hRParty)
|
22
|
+
def self.unpack(hRParty, responseObj)
|
21
23
|
|
22
24
|
# return nil object if input is empty
|
23
25
|
intResById = nil
|
@@ -32,13 +34,13 @@ module ADIWG
|
|
32
34
|
s = hRParty['contactId']
|
33
35
|
if s != ''
|
34
36
|
intResById[:contactId] = s
|
35
|
-
if (
|
36
|
-
|
37
|
-
|
37
|
+
if (!ADIWG::Mdtranslator::Readers::MdJson.findContact(s))
|
38
|
+
responseObj[:readerExecutionPass] = false
|
39
|
+
responseObj[:readerExecutionMessages] << "Responsible Party contact ID #{s} does not match with any contact provided\n"
|
38
40
|
end
|
39
41
|
else
|
40
|
-
|
41
|
-
|
42
|
+
responseObj[:readerExecutionPass] = false
|
43
|
+
responseObj[:readerExecutionMessages] << 'Responsible Party is missing the contact ID\n'
|
42
44
|
end
|
43
45
|
end
|
44
46
|
|
@@ -48,8 +50,8 @@ module ADIWG
|
|
48
50
|
if s != ''
|
49
51
|
intResById[:roleName] = s
|
50
52
|
else
|
51
|
-
|
52
|
-
|
53
|
+
responseObj[:readerExecutionPass] = false
|
54
|
+
responseObj[:readerExecutionMessages] << 'Responsible Party is missing the contact role\n'
|
53
55
|
end
|
54
56
|
end
|
55
57
|
|
data/lib/adiwg/mdtranslator/readers/mdJson/{modules_1.0 → modules_v1}/module_securityConstraint.rb
RENAMED
@@ -5,6 +5,8 @@
|
|
5
5
|
# Stan Smith 2013-11-15 original script
|
6
6
|
# Stan Smith 2013-11-27 modified to process a single security constraint
|
7
7
|
# Stan Smith 2014-12-15 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 remove global namespace constants
|
8
10
|
|
9
11
|
module ADIWG
|
10
12
|
module Mdtranslator
|
@@ -13,7 +15,7 @@ module ADIWG
|
|
13
15
|
|
14
16
|
module SecurityConstraints
|
15
17
|
|
16
|
-
def self.unpack(hSecurityCon)
|
18
|
+
def self.unpack(hSecurityCon, responseObj)
|
17
19
|
|
18
20
|
# instance classes needed in script
|
19
21
|
intMetadataClass = InternalMetadata.new
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# unpack sensor info
|
2
|
+
# Reader - ADIwg JSON V1 to internal data structure
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2015-08-19 original script
|
6
|
+
|
7
|
+
module ADIWG
|
8
|
+
module Mdtranslator
|
9
|
+
module Readers
|
10
|
+
module MdJson
|
11
|
+
|
12
|
+
module SensorInfo
|
13
|
+
|
14
|
+
def self.unpack(hSensorInfo, responseObj)
|
15
|
+
|
16
|
+
# instance classes needed in script
|
17
|
+
intMetadataClass = InternalMetadata.new
|
18
|
+
hSensor = intMetadataClass.newSensorInfo
|
19
|
+
|
20
|
+
# sensor info - sensor tone gradation
|
21
|
+
if hSensorInfo.has_key?('toneGradations')
|
22
|
+
s = hSensorInfo['toneGradations']
|
23
|
+
if s != ''
|
24
|
+
hSensor[:toneGradations] = s
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# sensor info - sensor max value
|
29
|
+
if hSensorInfo.has_key?('sensorMax')
|
30
|
+
s = hSensorInfo['sensorMax']
|
31
|
+
if s != ''
|
32
|
+
hSensor[:sensorMax] = s
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# sensor info - sensor minimum value
|
37
|
+
if hSensorInfo.has_key?('sensorMin')
|
38
|
+
s = hSensorInfo['sensorMin']
|
39
|
+
if s != ''
|
40
|
+
hSensor[:sensorMin] = s
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# sensor info - sensor units
|
45
|
+
if hSensorInfo.has_key?('sensorUnits')
|
46
|
+
s = hSensorInfo['sensorUnits']
|
47
|
+
if s != ''
|
48
|
+
hSensor[:sensorUnits] = s
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# sensor info - sensor peak response
|
53
|
+
if hSensorInfo.has_key?('sensorPeakResponse')
|
54
|
+
s = hSensorInfo['sensorPeakResponse']
|
55
|
+
if s != ''
|
56
|
+
hSensor[:sensorPeakResponse] = s
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
return hSensor
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -5,9 +5,11 @@
|
|
5
5
|
# Stan Smith 2013-11-26 original script
|
6
6
|
# Stan Smith 2014-07-03 resolve require statements using Mdtranslator.reader_module
|
7
7
|
# Stan Smith 2014-12-15 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 remove global namespace constants
|
8
10
|
|
9
|
-
require
|
10
|
-
require
|
11
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_citation')
|
12
|
+
require ADIWG::Mdtranslator::Readers::MdJson.readerModule('module_processStep')
|
11
13
|
|
12
14
|
module ADIWG
|
13
15
|
module Mdtranslator
|
@@ -16,7 +18,11 @@ module ADIWG
|
|
16
18
|
|
17
19
|
module Source
|
18
20
|
|
19
|
-
def self.unpack(hSource)
|
21
|
+
def self.unpack(hSource, responseObj)
|
22
|
+
|
23
|
+
# return nil object if input is empty
|
24
|
+
intDataSource = nil
|
25
|
+
return if hSource.empty?
|
20
26
|
|
21
27
|
# instance classes needed in script
|
22
28
|
intMetadataClass = InternalMetadata.new
|
@@ -34,7 +40,7 @@ module ADIWG
|
|
34
40
|
if hSource.has_key?('citation')
|
35
41
|
hCitation = hSource['citation']
|
36
42
|
unless hCitation.empty?
|
37
|
-
intDataSource[:sourceCitation] =
|
43
|
+
intDataSource[:sourceCitation] = Citation.unpack(hCitation, responseObj)
|
38
44
|
end
|
39
45
|
end
|
40
46
|
|
@@ -43,7 +49,7 @@ module ADIWG
|
|
43
49
|
aSourceSteps = hSource['processStep']
|
44
50
|
unless aSourceSteps.empty?
|
45
51
|
aSourceSteps.each do |hStep|
|
46
|
-
intDataSource[:sourceSteps] <<
|
52
|
+
intDataSource[:sourceSteps] << ProcessStep.unpack(hStep, responseObj)
|
47
53
|
end
|
48
54
|
end
|
49
55
|
end
|