adiwg-mdtranslator 0.10.2 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -4
- data/Rakefile +4 -1
- data/adiwg-mdtranslator.gemspec +10 -8
- data/bin/mdtranslator +8 -2
- data/lib/adiwg/mdtranslator.rb +72 -147
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +538 -538
- data/lib/adiwg/mdtranslator/internal/module_dateTimeFun.rb +78 -78
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +153 -74
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_validator.rb +41 -108
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_additionalDocumentation.rb +54 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_address.rb +89 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_associatedResource.rb +82 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_boundingBox.rb +62 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_browseGraphic.rb +69 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_citation.rb +122 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_contacts.rb +150 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_coordinates.rb +63 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_dataDictionary.rb +63 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_dataQuality.rb +51 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_dateTime.rb +38 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_descriptiveKeyword.rb +60 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_dictionaryInfo.rb +63 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_distributionInfo.rb +161 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_domain.rb +73 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_domainItem.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_entity.rb +103 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_entityAttribute.rb +102 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_entityForeignKey.rb +54 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_entityIndex.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_extent.rb +73 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_geoCoordSystem.rb +57 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_geoProperties.rb +100 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_geographicElement.rb +179 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_legalConstraint.rb +56 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_lineString.rb +36 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_lineage.rb +61 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_mdJson.rb +69 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_metadata.rb +88 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_metadataExtension.rb +51 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_metadataInfo.rb +123 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_onlineResource.rb +79 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_phone.rb +79 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_point.rb +36 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_polygon.rb +66 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_processStep.rb +75 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_resolution.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_resourceFormat.rb +46 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_resourceIdentifier.rb +60 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_resourceInfo.rb +328 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_resourceMaintenance.rb +61 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_resourceSpecificUsage.rb +61 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_responsibleParty.rb +48 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_securityConstraint.rb +63 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_source.rb +59 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_spatialReference.rb +59 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_taxonClass.rb +54 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_taxonomy.rb +94 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_temporalElement.rb +82 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_timeInstant.rb +56 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_timePeriod.rb +64 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_verticalElement.rb +64 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9/module_voucher.rb +49 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/readme.md +1 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/validator.rb +43 -0
- data/lib/adiwg/mdtranslator/readers/mdReaders.rb +55 -0
- data/lib/adiwg/mdtranslator/version.rb +15 -4
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_address.rb +107 -86
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_aggregateInformation.rb +68 -57
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_boundingPolygon.rb +59 -48
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_browseGraphic.rb +57 -46
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_citation.rb +149 -138
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_contact.rb +83 -72
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_dataIdentification.rb +334 -322
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_dataQuality.rb +46 -34
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_date.rb +47 -36
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_digitalTransferOptions.rb +42 -31
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_distribution.rb +29 -18
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_distributor.rb +77 -66
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_extent.rb +87 -76
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_featureAttribute.rb +113 -102
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_featureConstraint.rb +44 -33
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_featureType.rb +121 -110
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_format.rb +45 -34
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_genericMetaData.rb +45 -36
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_geographicBoundingBox.rb +78 -67
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_geographicDescription.rb +25 -14
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_geographicElement.rb +30 -19
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_identifier.rb +41 -30
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_keyword.rb +58 -49
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_legalConstraints.rb +65 -54
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_lineString.rb +77 -66
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_lineage.rb +62 -51
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_listedValue.rb +70 -59
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_maintenanceInformation.rb +54 -43
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_medium.rb +58 -47
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_metadataExtension.rb +154 -143
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_multiGeometry.rb +138 -127
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_multiplicity.rb +37 -26
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_onlineResource.rb +79 -68
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_point.rb +77 -66
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_polygon.rb +98 -87
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_processStep.rb +80 -69
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_referenceIdentifier.rb +38 -27
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_referenceSystem.rb +25 -14
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_resolution.rb +51 -40
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_responsibleParty.rb +88 -77
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_securityConstraints.rb +70 -59
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_source.rb +58 -47
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_standardOrderProcess.rb +75 -63
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_taxonClassification.rb +55 -44
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_taxonSystem.rb +98 -87
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_telephone.rb +73 -62
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_temporalExtent.rb +58 -47
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_timeInstant.rb +36 -27
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_timePeriod.rb +42 -33
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_usage.rb +59 -48
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_useConstraints.rb +26 -15
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_verticalExtent.rb +52 -41
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_vouchers.rb +39 -28
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_associationType.rb +41 -29
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_characterSet.rb +82 -47
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_classification.rb +42 -24
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_datatype.rb +56 -34
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_dateType.rb +34 -19
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_initiativeType.rb +41 -29
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_keywordType.rb +46 -27
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_maintenanceFrequency.rb +55 -36
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_mediumFormat.rb +44 -26
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_mediumName.rb +68 -38
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_obligation.rb +32 -25
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_onlineFunction.rb +42 -25
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_presentationForm.rb +58 -31
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_progress.rb +44 -25
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_restriction.rb +47 -32
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_role.rb +52 -29
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_scope.rb +58 -35
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_spatialRepresentationType.rb +43 -30
- data/lib/adiwg/mdtranslator/writers/iso/codelists/code_topicCategory.rb +51 -44
- data/lib/adiwg/mdtranslator/writers/iso/units/class_baseUnit.rb +26 -15
- data/lib/adiwg/mdtranslator/writers/iso/units/class_conventionalUnit.rb +56 -45
- data/lib/adiwg/mdtranslator/writers/iso/units/class_definitionUnit.rb +23 -12
- data/lib/adiwg/mdtranslator/writers/iso/units/class_derivedUnit.rb +30 -19
- data/lib/adiwg/mdtranslator/writers/iso/units/class_unitsOfMeasure.rb +223 -212
- data/lib/adiwg/mdtranslator/writers/iso19110/class_FCfeatureCatalogue.rb +174 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb +41 -12
- data/lib/adiwg/mdtranslator/writers/iso19115_2/class_MImetadata.rb +347 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer.rb +151 -119
- data/lib/adiwg/mdtranslator/writers/mdWriters.rb +63 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_additionalDocumentation.rb +84 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_address.rb +100 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_associatedResource.rb +100 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_browseGraphic.rb +66 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_citation.rb +115 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_contact.rb +137 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_onlineResource.rb +47 -0
- data/test/readers/mdJson/v0_9/tc_reader_mdjson_phone.rb +128 -0
- data/test/readers/mdJson/v0_9/tc_translation.rb +82 -0
- data/test/writers/iso19115_2/tc_writer_iso19115_2_address.rb +222 -0
- metadata +87 -60
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_additionalDocumentation.rb +0 -36
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_address.rb +0 -71
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_associatedResource.rb +0 -66
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_boundingBox.rb +0 -51
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_browseGraphic.rb +0 -52
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_citation.rb +0 -104
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_contacts.rb +0 -121
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_coordinates.rb +0 -52
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_dataDictionary.rb +0 -53
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_dataQuality.rb +0 -40
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_dateTime.rb +0 -27
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_descriptiveKeyword.rb +0 -49
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_dictionaryInfo.rb +0 -52
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_distributionInfo.rb +0 -150
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_domain.rb +0 -62
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_domainItem.rb +0 -42
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entity.rb +0 -92
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entityAttribute.rb +0 -91
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entityForeignKey.rb +0 -43
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_entityIndex.rb +0 -42
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_extent.rb +0 -62
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_geoCoordSystem.rb +0 -46
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_geoProperties.rb +0 -89
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_geographicElement.rb +0 -168
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_legalConstraint.rb +0 -45
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_lineString.rb +0 -25
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_lineage.rb +0 -50
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_metadata.rb +0 -77
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_metadataExtension.rb +0 -40
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_metadataInfo.rb +0 -112
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_onlineResource.rb +0 -62
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_phone.rb +0 -59
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_point.rb +0 -25
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_polygon.rb +0 -55
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_processStep.rb +0 -64
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_resolution.rb +0 -42
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_resourceFormat.rb +0 -35
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_resourceIdentifier.rb +0 -49
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_resourceInfo.rb +0 -317
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_resourceMaintenance.rb +0 -50
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_resourceSpecificUsage.rb +0 -50
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_responsibleParty.rb +0 -37
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_securityConstraint.rb +0 -52
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_source.rb +0 -48
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_spatialReference.rb +0 -48
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_taxonClass.rb +0 -43
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_taxonomy.rb +0 -83
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_temporalElement.rb +0 -71
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_timeInstant.rb +0 -45
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_timePeriod.rb +0 -53
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_verticalElement.rb +0 -53
- data/lib/adiwg/mdtranslator/readers/mdJson/modules_0.9.0/module_voucher.rb +0 -38
- data/lib/adiwg/mdtranslator/validator.rb +0 -43
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_FCfeatureCatalogue.rb +0 -171
- data/lib/adiwg/mdtranslator/writers/iso/classes/class_MImetadata.rb +0 -333
- data/test/tc_translation.rb +0 -73
@@ -1,62 +0,0 @@
|
|
1
|
-
# unpack online resources
|
2
|
-
# Reader - ADIwg JSON V1 to internal data structure
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2013-09-25 original script
|
6
|
-
# Stan Smith 2014-04-23 modified for json 0.3.0
|
7
|
-
# Stan Smith 2014-08-18 removed doi section for json 0.6.0
|
8
|
-
# Stan Smith 2014-08-21 changed url to uri for json 0.6.0
|
9
|
-
|
10
|
-
module Md_OnlineResource
|
11
|
-
|
12
|
-
def self.unpack(hOlResource)
|
13
|
-
|
14
|
-
# instance classes needed in script
|
15
|
-
intMetadataClass = InternalMetadata.new
|
16
|
-
intOLRes = intMetadataClass.newOnlineResource
|
17
|
-
|
18
|
-
# unpack the online resource
|
19
|
-
# resource - web link
|
20
|
-
if hOlResource.has_key?('uri')
|
21
|
-
s = hOlResource['uri']
|
22
|
-
if s != ''
|
23
|
-
intOLRes[:olResURI] = s
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
# resource - web link protocol
|
28
|
-
if hOlResource.has_key?('protocol')
|
29
|
-
s = hOlResource['protocol']
|
30
|
-
if s != ''
|
31
|
-
intOLRes[:olResProtocol] = s
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# resource - web link name
|
36
|
-
if hOlResource.has_key?('name')
|
37
|
-
s = hOlResource['name']
|
38
|
-
if s != ''
|
39
|
-
intOLRes[:olResName] = s
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
# resource - web link description
|
44
|
-
if hOlResource.has_key?('description')
|
45
|
-
s = hOlResource['description']
|
46
|
-
if s != ''
|
47
|
-
intOLRes[:olResDesc] = s
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
# resource - web link function
|
52
|
-
if hOlResource.has_key?('function')
|
53
|
-
s = hOlResource['function']
|
54
|
-
if s != ''
|
55
|
-
intOLRes[:olResFunction] = s
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
return intOLRes
|
60
|
-
end
|
61
|
-
|
62
|
-
end
|
@@ -1,59 +0,0 @@
|
|
1
|
-
# unpack phone
|
2
|
-
# Reader - ADIwg JSON V1 to internal data structure
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2013-12-16 original script
|
6
|
-
# Stan Smith 2014-05-14 combine phone service types
|
7
|
-
|
8
|
-
module Md_Phone
|
9
|
-
|
10
|
-
def self.unpack(hPhone)
|
11
|
-
|
12
|
-
# instance classes needed in script
|
13
|
-
intMetadataClass = InternalMetadata.new
|
14
|
-
aPhones = Array.new
|
15
|
-
|
16
|
-
# create a separate phone for each phone service type
|
17
|
-
# if service is missing, default service to 'voice'
|
18
|
-
if hPhone.has_key?('service')
|
19
|
-
aService = hPhone['service']
|
20
|
-
else
|
21
|
-
aService = ['voice']
|
22
|
-
end
|
23
|
-
|
24
|
-
if aService.empty?
|
25
|
-
aService = ['voice']
|
26
|
-
end
|
27
|
-
|
28
|
-
# if service is nil, default service to 'voice'
|
29
|
-
aService.each do |phService|
|
30
|
-
intPhone = intMetadataClass.newPhone
|
31
|
-
|
32
|
-
# phone - service
|
33
|
-
intPhone[:phoneServiceType] = phService
|
34
|
-
|
35
|
-
# phone - name
|
36
|
-
if hPhone.has_key?('phoneName')
|
37
|
-
s = hPhone['phoneName']
|
38
|
-
unless s.nil?
|
39
|
-
intPhone[:phoneName] = s
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
# phone - number
|
44
|
-
if hPhone.has_key?('phoneNumber')
|
45
|
-
s = hPhone['phoneNumber']
|
46
|
-
unless s.nil?
|
47
|
-
intPhone[:phoneNumber] = s
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
aPhones << intPhone
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
return aPhones
|
56
|
-
|
57
|
-
end
|
58
|
-
|
59
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# unpack point
|
2
|
-
# point is coded in GeoJSON
|
3
|
-
# Reader - ADIwg JSON V1 to internal data structure
|
4
|
-
|
5
|
-
# History:
|
6
|
-
# Stan Smith 2013-11-07 original script
|
7
|
-
# Stan Smith 2014-04-30 reorganized for json schema 0.3.0
|
8
|
-
# Stan Smith 2014-07-07 resolve require statements using Mdtranslator.reader_module
|
9
|
-
|
10
|
-
require ADIWG::Mdtranslator.reader_module('module_coordinates', $response[:readerVersionUsed])
|
11
|
-
|
12
|
-
module Md_Point
|
13
|
-
|
14
|
-
def self.unpack(aCoords,geoType)
|
15
|
-
intMetadataClass = InternalMetadata.new
|
16
|
-
intPoint = intMetadataClass.newGeometry
|
17
|
-
|
18
|
-
intPoint[:geoType] = geoType
|
19
|
-
intPoint[:geometry] = aCoords
|
20
|
-
intPoint[:dimension] = Md_Coordinates.getDimension(aCoords)
|
21
|
-
|
22
|
-
return intPoint
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
# unpack polygon
|
2
|
-
# point is coded in GeoJSON
|
3
|
-
# Reader - ADIwg JSON V1 to internal data structure
|
4
|
-
|
5
|
-
# History:
|
6
|
-
# Stan Smith 2013-11-18 original script
|
7
|
-
# Stan Smith 2014-04-30 reorganized for json schema 0.3.0
|
8
|
-
# Stan Smith 2014-05-23 modified to handle MultiPolygon objects
|
9
|
-
# Stan Smith 2014-07-07 resolve require statements using Mdtranslator.reader_module
|
10
|
-
|
11
|
-
require ADIWG::Mdtranslator.reader_module('module_coordinates', $response[:readerVersionUsed])
|
12
|
-
|
13
|
-
module Md_Polygon
|
14
|
-
|
15
|
-
def self.unpack(aCoords, geoType)
|
16
|
-
intMetadataClass = InternalMetadata.new
|
17
|
-
intGeometry = intMetadataClass.newGeometry
|
18
|
-
intGeometry[:geoType] = geoType
|
19
|
-
|
20
|
-
# polygon - coordinate(s)
|
21
|
-
if geoType == 'Polygon'
|
22
|
-
intGeometry[:geometry] = splitPolygons(aCoords)
|
23
|
-
intGeometry[:dimension] = Md_Coordinates.getDimension(intGeometry[:geometry][:exteriorRing])
|
24
|
-
elsif geoType == 'MultiPolygon'
|
25
|
-
aPolySets = Array.new
|
26
|
-
aCoords.each do |aPolygonSet|
|
27
|
-
aPolySets << splitPolygons(aPolygonSet)
|
28
|
-
end
|
29
|
-
intGeometry[:geometry] = aPolySets
|
30
|
-
end
|
31
|
-
|
32
|
-
return intGeometry
|
33
|
-
end
|
34
|
-
|
35
|
-
def self.splitPolygons(aPolySet)
|
36
|
-
intMetadataClass = InternalMetadata.new
|
37
|
-
intPolygonSet = intMetadataClass.newPolygonSet
|
38
|
-
|
39
|
-
# first polygon in set is a bounding exterior ring
|
40
|
-
# all subsequent polygons are exclusion rings
|
41
|
-
i = 0
|
42
|
-
aPolySet.each do |aPolygon|
|
43
|
-
i += 1
|
44
|
-
if i == 1
|
45
|
-
intPolygonSet[:exteriorRing] = aPolygon
|
46
|
-
else
|
47
|
-
intPolygonSet[:exclusionRings] << aPolygon
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|
51
|
-
|
52
|
-
return intPolygonSet
|
53
|
-
end
|
54
|
-
|
55
|
-
end
|
@@ -1,64 +0,0 @@
|
|
1
|
-
# unpack process step
|
2
|
-
# Reader - ADIwg JSON V1 to internal data structure
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2013-11-26 original script
|
6
|
-
# Stan Smith 2014-07-03 resolve require statements using Mdtranslator.reader_module
|
7
|
-
|
8
|
-
require ADIWG::Mdtranslator.reader_module('module_responsibleParty', $response[:readerVersionUsed])
|
9
|
-
require ADIWG::Mdtranslator.reader_module('module_dateTime', $response[:readerVersionUsed])
|
10
|
-
|
11
|
-
module Md_ProcessStep
|
12
|
-
|
13
|
-
def self.unpack(hProcStep)
|
14
|
-
|
15
|
-
# instance classes needed in script
|
16
|
-
intMetadataClass = InternalMetadata.new
|
17
|
-
intDataPStep = intMetadataClass.newDataProcessStep
|
18
|
-
|
19
|
-
# process step - step ID
|
20
|
-
if hProcStep.has_key?('stepId')
|
21
|
-
s = hProcStep['stepId']
|
22
|
-
if s != ''
|
23
|
-
intDataPStep[:stepId] = s
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
# process step - description
|
28
|
-
if hProcStep.has_key?('description')
|
29
|
-
s = hProcStep['description']
|
30
|
-
if s != ''
|
31
|
-
intDataPStep[:stepDescription] = s
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# process step - rationale
|
36
|
-
if hProcStep.has_key?('rationale')
|
37
|
-
s = hProcStep['rationale']
|
38
|
-
if s != ''
|
39
|
-
intDataPStep[:stepRationale] = s
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
# process step - dateTime
|
44
|
-
if hProcStep.has_key?('dateTime')
|
45
|
-
s = hProcStep['dateTime']
|
46
|
-
if s != ''
|
47
|
-
intDataPStep[:stepDateTime] = Md_DateTime.unpack(s)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
# process step - step processors
|
52
|
-
if hProcStep.has_key?('processor')
|
53
|
-
aProcessors = hProcStep['processor']
|
54
|
-
unless aProcessors.empty?
|
55
|
-
aProcessors.each do |processor|
|
56
|
-
intDataPStep[:stepProcessors] << Md_ResponsibleParty.unpack(processor)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
return intDataPStep
|
62
|
-
end
|
63
|
-
|
64
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# unpack resolution
|
2
|
-
# Reader - ADIwg JSON V1 to internal data structure
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2013-11-26 original script
|
6
|
-
|
7
|
-
module Md_Resolution
|
8
|
-
|
9
|
-
def self.unpack(hResolution)
|
10
|
-
|
11
|
-
# instance classes needed in script
|
12
|
-
intMetadataClass = InternalMetadata.new
|
13
|
-
intResolution = intMetadataClass.newResolution
|
14
|
-
|
15
|
-
# resolution - equivalent scale
|
16
|
-
if hResolution.has_key?('equivalentScale')
|
17
|
-
s = hResolution['equivalentScale']
|
18
|
-
if s != ''
|
19
|
-
intResolution[:equivalentScale] = s
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
# resolution - distance
|
24
|
-
if hResolution.has_key?('distance')
|
25
|
-
s = hResolution['distance']
|
26
|
-
if s != ''
|
27
|
-
intResolution[:distance] = s
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
# resolution - uom
|
32
|
-
if hResolution.has_key?('uom')
|
33
|
-
s = hResolution['uom']
|
34
|
-
if s != ''
|
35
|
-
intResolution[:distanceUOM] = s
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
return intResolution
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# unpack resource formats
|
2
|
-
# Reader - ADIwg JSON V1 to internal data structure
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2013-08-26 original script
|
6
|
-
# Stan Smith 2013-11-27 modified to process single resource format rather than array
|
7
|
-
|
8
|
-
module Md_ResourceFormat
|
9
|
-
|
10
|
-
def self.unpack(hResFormat)
|
11
|
-
|
12
|
-
# instance classes needed in script
|
13
|
-
intMetadataClass = InternalMetadata.new
|
14
|
-
rFormat = intMetadataClass.newResourceFormat
|
15
|
-
|
16
|
-
# format - name
|
17
|
-
if hResFormat.has_key?('formatName')
|
18
|
-
s = hResFormat['formatName']
|
19
|
-
if s != ''
|
20
|
-
rFormat[:formatName] = s
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
# format - version
|
25
|
-
if hResFormat.has_key?('version')
|
26
|
-
s = hResFormat['version']
|
27
|
-
if s != ''
|
28
|
-
rFormat[:formatVersion] = s
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
return rFormat
|
33
|
-
end
|
34
|
-
|
35
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
# unpack resource identifier
|
2
|
-
# Reader - ADIwg JSON V1 to internal data structure
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2014-05-28 original script
|
6
|
-
# Stan Smith 2014-07-03 resolve require statements using Mdtranslator.reader_module
|
7
|
-
# Stan Smith 2014-08-18 added type to identifier schema 0.6.0
|
8
|
-
|
9
|
-
require ADIWG::Mdtranslator.reader_module('module_citation', $response[:readerVersionUsed])
|
10
|
-
require ADIWG::Mdtranslator.reader_module('module_responsibleParty', $response[:readerVersionUsed])
|
11
|
-
require ADIWG::Mdtranslator.reader_module('module_onlineResource', $response[:readerVersionUsed])
|
12
|
-
|
13
|
-
module Md_ResourceIdentifier
|
14
|
-
|
15
|
-
def self.unpack(hResID)
|
16
|
-
|
17
|
-
# instance classes needed in script
|
18
|
-
intMetadataClass = InternalMetadata.new
|
19
|
-
intResID = intMetadataClass.newResourceId
|
20
|
-
|
21
|
-
# resource identifier - identifier
|
22
|
-
if hResID.has_key?('identifier')
|
23
|
-
s = hResID['identifier']
|
24
|
-
if s != ''
|
25
|
-
intResID[:identifier] = s
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
# resource identifier - identifier type
|
30
|
-
if hResID.has_key?('type')
|
31
|
-
s = hResID['type']
|
32
|
-
if s != ''
|
33
|
-
intResID[:identifierType] = s
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
# resource identifier - authority (expressed as a citation)
|
38
|
-
if hResID.has_key?('authority')
|
39
|
-
hCitation = hResID['authority']
|
40
|
-
unless hCitation.empty?
|
41
|
-
intResID[:identifierCitation] = Md_Citation.unpack(hCitation)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
return intResID
|
46
|
-
|
47
|
-
end
|
48
|
-
|
49
|
-
end
|
@@ -1,317 +0,0 @@
|
|
1
|
-
# unpack data identification
|
2
|
-
# Reader - ADIwg JSON V1 to internal data structure
|
3
|
-
|
4
|
-
# History:
|
5
|
-
# Stan Smith 2013-08-22 original script
|
6
|
-
# Stan Smith 2013-11-04 extents
|
7
|
-
# Stan Smith 2013-11-14 legal constraints
|
8
|
-
# Stan Smith 2013-11-20 taxonomy
|
9
|
-
# Stan Smith 2013-11-25 resource specific usage
|
10
|
-
# Stan Smith 2013-11-26 spatial resolution
|
11
|
-
# Stan Smith 2014-04-25 revised to support json schema version 0.3.0
|
12
|
-
# Stan Smith 2014-05-28 added resource identifier to citation json schema 0.5.0
|
13
|
-
# Stan Smith 2014-07-03 resolve require statements using Mdtranslator.reader_module
|
14
|
-
# Stan Smith 2014-08-18 moved resourceIdentifier to citation module schema 0.6.0
|
15
|
-
# Stan Smith 2014-09-03 added spatial reference system module for 0.7.0
|
16
|
-
# Stan Smith 2014-10-29 added support for resource time period
|
17
|
-
# Stan Smith 2014-11-06 added resourceType for 0.9.0
|
18
|
-
|
19
|
-
require ADIWG::Mdtranslator.reader_module('module_citation', $response[:readerVersionUsed])
|
20
|
-
require ADIWG::Mdtranslator.reader_module('module_resourceIdentifier', $response[:readerVersionUsed])
|
21
|
-
require ADIWG::Mdtranslator.reader_module('module_responsibleParty', $response[:readerVersionUsed])
|
22
|
-
require ADIWG::Mdtranslator.reader_module('module_resourceFormat', $response[:readerVersionUsed])
|
23
|
-
require ADIWG::Mdtranslator.reader_module('module_descriptiveKeyword', $response[:readerVersionUsed])
|
24
|
-
require ADIWG::Mdtranslator.reader_module('module_resourceMaintenance', $response[:readerVersionUsed])
|
25
|
-
require ADIWG::Mdtranslator.reader_module('module_resourceSpecificUsage', $response[:readerVersionUsed])
|
26
|
-
require ADIWG::Mdtranslator.reader_module('module_browseGraphic', $response[:readerVersionUsed])
|
27
|
-
require ADIWG::Mdtranslator.reader_module('module_legalConstraint', $response[:readerVersionUsed])
|
28
|
-
require ADIWG::Mdtranslator.reader_module('module_securityConstraint', $response[:readerVersionUsed])
|
29
|
-
require ADIWG::Mdtranslator.reader_module('module_taxonomy', $response[:readerVersionUsed])
|
30
|
-
require ADIWG::Mdtranslator.reader_module('module_resolution', $response[:readerVersionUsed])
|
31
|
-
require ADIWG::Mdtranslator.reader_module('module_extent', $response[:readerVersionUsed])
|
32
|
-
require ADIWG::Mdtranslator.reader_module('module_dataQuality', $response[:readerVersionUsed])
|
33
|
-
require ADIWG::Mdtranslator.reader_module('module_spatialReference', $response[:readerVersionUsed])
|
34
|
-
require ADIWG::Mdtranslator.reader_module('module_timePeriod', $response[:readerVersionUsed])
|
35
|
-
|
36
|
-
module Md_ResourceInfo
|
37
|
-
|
38
|
-
def self.unpack(hResourceInfo)
|
39
|
-
|
40
|
-
# instance classes needed in script
|
41
|
-
intMetadataClass = InternalMetadata.new
|
42
|
-
intResInfo = intMetadataClass.newResourceInfo
|
43
|
-
|
44
|
-
# resource information - resource type
|
45
|
-
if hResourceInfo.has_key?('resourceType')
|
46
|
-
s = hResourceInfo['resourceType']
|
47
|
-
if s != ''
|
48
|
-
intResInfo[:resourceType] = s
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
# resource information - citation
|
53
|
-
if hResourceInfo.has_key?('citation')
|
54
|
-
hCitation = hResourceInfo['citation']
|
55
|
-
unless hCitation.empty?
|
56
|
-
intResInfo[:citation] = Md_Citation.unpack(hCitation)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
# resource information - resource time period
|
61
|
-
if hResourceInfo.has_key?('resourceTimePeriod')
|
62
|
-
hResPeriod = hResourceInfo['resourceTimePeriod']
|
63
|
-
unless hResPeriod.empty?
|
64
|
-
intResInfo[:timePeriod] = Md_TimePeriod.unpack(hResPeriod)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
# resource information - point of contact
|
69
|
-
if hResourceInfo.has_key?('pointOfContact')
|
70
|
-
aPOC = hResourceInfo['pointOfContact']
|
71
|
-
unless aPOC.empty?
|
72
|
-
aPOC.each do |rParty|
|
73
|
-
intResInfo[:pointsOfContact] << Md_ResponsibleParty.unpack(rParty)
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
# resource information - abstract
|
79
|
-
if hResourceInfo.has_key?('abstract')
|
80
|
-
s = hResourceInfo['abstract']
|
81
|
-
if s != ''
|
82
|
-
intResInfo[:abstract] = s
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
# resource information - short abstract
|
87
|
-
if hResourceInfo.has_key?('shortAbstract')
|
88
|
-
s = hResourceInfo['shortAbstract']
|
89
|
-
if s != ''
|
90
|
-
intResInfo[:shortAbstract] = s
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
# resource information - status
|
95
|
-
if hResourceInfo.has_key?('status')
|
96
|
-
s = hResourceInfo['status']
|
97
|
-
if s != ''
|
98
|
-
intResInfo[:status] = s
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
# resource information - has mappable location
|
103
|
-
if hResourceInfo.has_key?('hasMapLocation')
|
104
|
-
s = hResourceInfo['hasMapLocation']
|
105
|
-
if s != ''
|
106
|
-
intResInfo[:hasMapLocation?] = s
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
# resource information - has data available
|
111
|
-
if hResourceInfo.has_key?('hasDataAvailable')
|
112
|
-
s = hResourceInfo['hasDataAvailable']
|
113
|
-
if s != ''
|
114
|
-
intResInfo[:hasDataAvailable?] = s
|
115
|
-
end
|
116
|
-
end
|
117
|
-
|
118
|
-
# resource information - language
|
119
|
-
if hResourceInfo.has_key?('language')
|
120
|
-
aLanguage = hResourceInfo['language']
|
121
|
-
unless aLanguage.empty?
|
122
|
-
aLanguage.each do |language|
|
123
|
-
intResInfo[:resourceLanguages] << language
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
# resource information - purpose
|
129
|
-
if hResourceInfo.has_key?('purpose')
|
130
|
-
s = hResourceInfo['purpose']
|
131
|
-
if s != ''
|
132
|
-
intResInfo[:purpose] = s
|
133
|
-
end
|
134
|
-
end
|
135
|
-
|
136
|
-
# resource information - credit
|
137
|
-
if hResourceInfo.has_key?('credit')
|
138
|
-
aCredits = hResourceInfo['credit']
|
139
|
-
unless aCredits.empty?
|
140
|
-
aCredits.each do |credit|
|
141
|
-
intResInfo[:credits] << credit
|
142
|
-
end
|
143
|
-
end
|
144
|
-
end
|
145
|
-
|
146
|
-
# resource information - topic category
|
147
|
-
if hResourceInfo.has_key?('topicCategory')
|
148
|
-
aTopics = hResourceInfo['topicCategory']
|
149
|
-
unless aTopics.empty?
|
150
|
-
aTopics.each do |topic|
|
151
|
-
intResInfo[:topicCategories] << topic
|
152
|
-
end
|
153
|
-
end
|
154
|
-
end
|
155
|
-
|
156
|
-
# resource information - environment description
|
157
|
-
if hResourceInfo.has_key?('environmentDescription')
|
158
|
-
s = hResourceInfo['environmentDescription']
|
159
|
-
if s != ''
|
160
|
-
intResInfo[:environmentDescription] = s
|
161
|
-
end
|
162
|
-
end
|
163
|
-
|
164
|
-
# resource information - resource format
|
165
|
-
if hResourceInfo.has_key?('resourceNativeFormat')
|
166
|
-
aResFormat = hResourceInfo['resourceNativeFormat']
|
167
|
-
unless aResFormat.empty?
|
168
|
-
aResFormat.each do |hResFormat|
|
169
|
-
intResInfo[:resourceFormats] << Md_ResourceFormat.unpack(hResFormat)
|
170
|
-
end
|
171
|
-
end
|
172
|
-
end
|
173
|
-
|
174
|
-
# resource information - descriptive keywords
|
175
|
-
if hResourceInfo.has_key?('keyword')
|
176
|
-
aDesKeywords = hResourceInfo['keyword']
|
177
|
-
unless aDesKeywords.empty?
|
178
|
-
aDesKeywords.each do |hDesKeyword|
|
179
|
-
intResInfo[:descriptiveKeywords] << Md_DescriptiveKeyword.unpack(hDesKeyword)
|
180
|
-
end
|
181
|
-
end
|
182
|
-
end
|
183
|
-
|
184
|
-
# resource information - resource maintenance
|
185
|
-
if hResourceInfo.has_key?('resourceMaintenance')
|
186
|
-
aResMaint = hResourceInfo['resourceMaintenance']
|
187
|
-
unless aResMaint.empty?
|
188
|
-
aResMaint.each do |hResource|
|
189
|
-
intResInfo[:resourceMaint] << Md_ResourceMaintenance.unpack(hResource)
|
190
|
-
end
|
191
|
-
end
|
192
|
-
end
|
193
|
-
|
194
|
-
# resource information - resource specific usage
|
195
|
-
if hResourceInfo.has_key?('resourceSpecificUsage')
|
196
|
-
aResUses = hResourceInfo['resourceSpecificUsage']
|
197
|
-
unless aResUses.empty?
|
198
|
-
aResUses.each do |hUsage|
|
199
|
-
intResInfo[:resourceUses] << Md_ResourceSpecificUsage.unpack(hUsage)
|
200
|
-
end
|
201
|
-
end
|
202
|
-
end
|
203
|
-
|
204
|
-
# resource information - graphic overview
|
205
|
-
if hResourceInfo.has_key?('graphicOverview')
|
206
|
-
aBrowseGraph = hResourceInfo['graphicOverview']
|
207
|
-
unless aBrowseGraph.empty?
|
208
|
-
aBrowseGraph.each do |hBGraphic|
|
209
|
-
intResInfo[:graphicOverview] << Md_BrowseGraphic.unpack(hBGraphic)
|
210
|
-
end
|
211
|
-
end
|
212
|
-
end
|
213
|
-
|
214
|
-
# resource information - use constraints
|
215
|
-
if hResourceInfo.has_key?('constraint')
|
216
|
-
hConstraint = hResourceInfo['constraint']
|
217
|
-
|
218
|
-
# resource information - resource constraints - use
|
219
|
-
if hConstraint.has_key?('useLimitation')
|
220
|
-
aUseLimits = hConstraint['useLimitation']
|
221
|
-
unless aUseLimits.empty?
|
222
|
-
aUseLimits.each do |useLimit|
|
223
|
-
intResInfo[:useConstraints] << useLimit
|
224
|
-
end
|
225
|
-
end
|
226
|
-
end
|
227
|
-
|
228
|
-
# resource information - resource constraints - legal
|
229
|
-
if hConstraint.has_key?('legalConstraint')
|
230
|
-
aLegalCons = hConstraint['legalConstraint']
|
231
|
-
unless aLegalCons.empty?
|
232
|
-
aLegalCons.each do |hLegalCon|
|
233
|
-
intResInfo[:legalConstraints] << Md_LegalConstraints.unpack(hLegalCon)
|
234
|
-
end
|
235
|
-
end
|
236
|
-
end
|
237
|
-
|
238
|
-
# resource information - resource constraints - security
|
239
|
-
if hConstraint.has_key?('securityConstraint')
|
240
|
-
aSecurityCons = hConstraint['securityConstraint']
|
241
|
-
unless aSecurityCons.empty?
|
242
|
-
aSecurityCons.each do |hSecurityCon|
|
243
|
-
intResInfo[:securityConstraints] << Md_SecurityConstraints.unpack(hSecurityCon)
|
244
|
-
end
|
245
|
-
end
|
246
|
-
end
|
247
|
-
|
248
|
-
end
|
249
|
-
|
250
|
-
# resource information - taxonomy
|
251
|
-
if hResourceInfo.has_key?('taxonomy')
|
252
|
-
hTaxonomy = hResourceInfo['taxonomy']
|
253
|
-
unless hTaxonomy.empty?
|
254
|
-
intResInfo[:taxonomy] = Md_Taxonomy.unpack(hTaxonomy)
|
255
|
-
end
|
256
|
-
end
|
257
|
-
|
258
|
-
# resource information - spatial reference systems
|
259
|
-
if hResourceInfo.has_key?('spatialReferenceSystem')
|
260
|
-
hSpatialRef = hResourceInfo['spatialReferenceSystem']
|
261
|
-
unless hSpatialRef.empty?
|
262
|
-
intResInfo[:spatialReferenceSystem] = Md_SpatialReferenceSystem.unpack(hSpatialRef)
|
263
|
-
end
|
264
|
-
end
|
265
|
-
|
266
|
-
# resource information - spatial representation type
|
267
|
-
if hResourceInfo.has_key?('spatialRepresentation')
|
268
|
-
aSpatialType = hResourceInfo['spatialRepresentation']
|
269
|
-
unless aSpatialType.empty?
|
270
|
-
aSpatialType.each do |spType|
|
271
|
-
intResInfo[:spatialRepresentationTypes] << spType
|
272
|
-
end
|
273
|
-
end
|
274
|
-
end
|
275
|
-
|
276
|
-
# resource information - spatial resolution
|
277
|
-
if hResourceInfo.has_key?('spatialResolution')
|
278
|
-
aSpRes = hResourceInfo['spatialResolution']
|
279
|
-
unless aSpRes.empty?
|
280
|
-
aSpRes.each do |hResolution|
|
281
|
-
intResInfo[:spatialResolutions] << Md_Resolution.unpack(hResolution)
|
282
|
-
end
|
283
|
-
end
|
284
|
-
end
|
285
|
-
|
286
|
-
# resource information - extent
|
287
|
-
if hResourceInfo.has_key?('extent')
|
288
|
-
aExtents = hResourceInfo['extent']
|
289
|
-
unless aExtents.empty?
|
290
|
-
aExtents.each do |hExtent|
|
291
|
-
intResInfo[:extents] << Md_Extent.unpack(hExtent)
|
292
|
-
end
|
293
|
-
end
|
294
|
-
end
|
295
|
-
|
296
|
-
# resource information - data quality information
|
297
|
-
if hResourceInfo.has_key?('dataQualityInfo')
|
298
|
-
aDataQual = hResourceInfo['dataQualityInfo']
|
299
|
-
unless aDataQual.empty?
|
300
|
-
aDataQual.each do |hDQ|
|
301
|
-
intResInfo[:dataQualityInfo] << Md_DataQuality.unpack(hDQ)
|
302
|
-
end
|
303
|
-
end
|
304
|
-
end
|
305
|
-
|
306
|
-
# resource information - supplemental info
|
307
|
-
if hResourceInfo.has_key?('supplementalInfo')
|
308
|
-
s = hResourceInfo['supplementalInfo']
|
309
|
-
if s != ''
|
310
|
-
intResInfo[:supplementalInfo] = s
|
311
|
-
end
|
312
|
-
end
|
313
|
-
|
314
|
-
return intResInfo
|
315
|
-
end
|
316
|
-
|
317
|
-
end
|