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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63b3cd8cb6f3159a54205fd2f0a115a4c24d3c8a
|
4
|
+
data.tar.gz: d534245c030a32263c4d1cff67e5d3f3dcdec1df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a09bbde9b021a3e44144ef06b9859c023095abeba947c95ac7c5f68faf260f724fc10c129a6b3da3db19718f8fd254a5c8857874f9021162f409cd6ec9b1aea5
|
7
|
+
data.tar.gz: cb801a07e03ecb09af2d3c7ae32235f0b4183c125d8c8acf70a520776b8d4cf1bb3e9b5550a1e44fb58021af1a7c3f09653b834c03ecb950b175708c63ef7fa6
|
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
data/adiwg-mdtranslator.gemspec
CHANGED
@@ -19,14 +19,16 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.test_files = spec.files.grep(%r{^(tc|test|spec|features)/})
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
+
spec.required_ruby_version = '>= 2.1'
|
23
|
+
|
22
24
|
spec.add_development_dependency "bundler", "~> 1"
|
23
|
-
spec.add_development_dependency "rake", "~>10"
|
24
|
-
spec.add_development_dependency "minitest", "~>5"
|
25
|
+
spec.add_development_dependency "rake", "~> 10"
|
26
|
+
spec.add_development_dependency "minitest", "~> 5"
|
25
27
|
|
26
|
-
spec.add_runtime_dependency "json", "~>1.8"
|
27
|
-
spec.add_runtime_dependency "builder", "~>3.2"
|
28
|
-
spec.add_runtime_dependency "thor", "~>0.19"
|
29
|
-
spec.add_runtime_dependency "uuidtools", "~>2.1"
|
30
|
-
spec.add_runtime_dependency "json-schema", "~>2.4.0"
|
31
|
-
spec.add_runtime_dependency "adiwg-json_schemas", "~>0.9.4"
|
28
|
+
spec.add_runtime_dependency "json", "~> 1.8"
|
29
|
+
spec.add_runtime_dependency "builder", "~> 3.2"
|
30
|
+
spec.add_runtime_dependency "thor", "~> 0.19"
|
31
|
+
spec.add_runtime_dependency "uuidtools", "~> 2.1"
|
32
|
+
spec.add_runtime_dependency "json-schema", "~> 2.4.0", "< 2.5.0"
|
33
|
+
spec.add_runtime_dependency "adiwg-json_schemas", "~> 0.9.4"
|
32
34
|
end
|
data/bin/mdtranslator
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
# Stan Smith 2014-09-02 changed name to mdtranslator
|
7
7
|
# Stan Smith 2014-09-21 coded cli to 0.8.0 api
|
8
8
|
# Stan Smith 2014-10-09 added version command to the CLI
|
9
|
+
# Stan Smith 2014-12-29 changed default reader from adiwgJson to mdJson
|
10
|
+
# Stan Smith 2015-01-15 changed translate method to use keyword arguments
|
9
11
|
|
10
12
|
require 'thor'
|
11
13
|
require 'adiwg-mdtranslator'
|
@@ -48,8 +50,12 @@ class Mdtranslator < Thor
|
|
48
50
|
end
|
49
51
|
|
50
52
|
# call mdtranslator
|
51
|
-
|
52
|
-
|
53
|
+
mdReturn = ADIWG::Mdtranslator.translate(
|
54
|
+
file: fileObj,
|
55
|
+
reader: options[:reader],
|
56
|
+
writer: options[:writer],
|
57
|
+
validate: options[:validate],
|
58
|
+
showAllTags: options[:showAllTags])
|
53
59
|
|
54
60
|
# determine return content and type of return ...
|
55
61
|
if mdReturn[:readerStructurePass] && mdReturn[:readerValidationPass]
|
data/lib/adiwg/mdtranslator.rb
CHANGED
@@ -11,160 +11,85 @@
|
|
11
11
|
# Stan Smith 2014-09-26 added processing of minor release numbers
|
12
12
|
# Stan Smith 2014-10-10 added method to return path to readers and writers
|
13
13
|
# Stan Smith 2014-10-11 added methods to return content of readme files
|
14
|
-
# Stan Smith 2014-12-01 changed adiwgJson
|
14
|
+
# Stan Smith 2014-12-01 changed adiwgJson to mdJson
|
15
15
|
# Stan Smith 2014-12-01 added writer iso19110 (feature catalogue)
|
16
16
|
# Stan Smith 2014-12-01 added translator version to $response
|
17
17
|
# Stan Smith 2014-12-02 organized shared class/code/units folders for 19115-2, 19110
|
18
|
+
# Stan Smith 2014-12-11 refactored to handle namespacing readers and writers
|
19
|
+
# Stan Smith 2015-01-15 changed translate() to keyword parameter list
|
18
20
|
|
19
21
|
# add main directories to load_path
|
20
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),'mdtranslator'))
|
21
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),'mdtranslator/internal'))
|
22
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),'mdtranslator/readers'))
|
23
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),'mdtranslator/writers'))
|
22
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'mdtranslator/internal'))
|
24
23
|
|
25
|
-
require 'version'
|
26
|
-
require 'internal_metadata_obj'
|
24
|
+
require 'adiwg/mdtranslator/version'
|
27
25
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
$showAllTags = showAllTags
|
35
|
-
|
36
|
-
# load and return this hash
|
37
|
-
$response = {
|
38
|
-
readerFormat: nil,
|
39
|
-
readerStructurePass: nil,
|
40
|
-
readerStructureMessages: [],
|
41
|
-
readerRequested: reader,
|
42
|
-
readerFound: nil,
|
43
|
-
readerVersionFound: nil,
|
44
|
-
readerVersionUsed: nil,
|
45
|
-
readerValidationLevel: validate,
|
46
|
-
readerValidationPass: nil,
|
47
|
-
readerValidationMessages: [],
|
48
|
-
writerName: writer,
|
49
|
-
writerVersion: ADIWG::Mdtranslator::VERSION,
|
50
|
-
writerFormat: nil,
|
51
|
-
writerPass: nil,
|
52
|
-
writerMessages: [],
|
53
|
-
writerOutput: nil
|
54
|
-
}
|
55
|
-
|
56
|
-
case reader
|
57
|
-
|
58
|
-
# ADIwg mdJson JSON schema
|
59
|
-
when 'mdJson'
|
60
|
-
require 'mdJson/mdJson_validator'
|
61
|
-
|
62
|
-
# validate adiwgJson file
|
63
|
-
MdJsonValidation.validate(file)
|
64
|
-
if $response[:readerStructurePass] && $response[:readerValidationPass]
|
65
|
-
# initiate the reader
|
66
|
-
require 'mdJson/mdJson_reader'
|
67
|
-
readerClass = MdJsonReader.new
|
68
|
-
internalObj = readerClass.unpack(file)
|
69
|
-
else
|
70
|
-
return $response
|
71
|
-
end
|
72
|
-
|
73
|
-
# reader name not provided or not supported
|
74
|
-
else
|
75
|
-
$response[:readerValidationPass] = false
|
76
|
-
$response[:readerValidationMessages] << 'Reader name is missing or not supported.'
|
77
|
-
return $response
|
78
|
-
|
79
|
-
end
|
80
|
-
|
81
|
-
case writer
|
82
|
-
|
83
|
-
# ISO 19110 standard for feature catalogue used to describe tabular data dictionaries
|
84
|
-
when 'iso19110'
|
85
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),'mdtranslator/writers/iso/codelists'))
|
86
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),'mdtranslator/writers/iso/classes'))
|
87
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),'mdtranslator/writers/iso/units'))
|
88
|
-
require 'iso19110/iso19110_writer'
|
89
|
-
|
90
|
-
# set the format of the output file based on the writer specified
|
91
|
-
$response[:writerFormat] = 'xml'
|
92
|
-
|
93
|
-
writerClass = Iso19110Writer.new
|
26
|
+
# additional require statements to support rails
|
27
|
+
# ... these modules contain methods called by rails endpoints
|
28
|
+
# ... by default rails does not resolve namespaces beyond this point
|
29
|
+
require 'adiwg/mdtranslator/readers/mdReaders'
|
30
|
+
require 'adiwg/mdtranslator/writers/mdWriters'
|
94
31
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
def self.get_writer_readme(writer)
|
158
|
-
readmeText = 'No text found'
|
159
|
-
path = File.join(path_to_resources, 'writers', writer, 'readme.md')
|
160
|
-
if File.exist?(path)
|
161
|
-
file = File.open(path, 'r')
|
162
|
-
readmeText = file.read
|
163
|
-
file.close
|
164
|
-
end
|
165
|
-
return readmeText
|
166
|
-
end
|
167
|
-
|
168
|
-
end
|
32
|
+
module ADIWG
|
33
|
+
module Mdtranslator
|
34
|
+
|
35
|
+
def self.translate(file:, reader:, validate: 'normal', writer: nil, showAllTags: false)
|
36
|
+
|
37
|
+
$showAllTags = showAllTags
|
38
|
+
|
39
|
+
# load and return this hash
|
40
|
+
$response = {
|
41
|
+
readerFormat: nil,
|
42
|
+
readerStructurePass: nil,
|
43
|
+
readerStructureMessages: [],
|
44
|
+
readerRequested: reader,
|
45
|
+
readerFound: nil,
|
46
|
+
readerVersionFound: nil,
|
47
|
+
readerVersionUsed: nil,
|
48
|
+
readerValidationLevel: validate,
|
49
|
+
readerValidationPass: nil,
|
50
|
+
readerValidationMessages: [],
|
51
|
+
readerExecutionPass: nil,
|
52
|
+
readerExecutionMessages: [],
|
53
|
+
writerName: writer,
|
54
|
+
writerVersion: nil,
|
55
|
+
writerFormat: nil,
|
56
|
+
writerPass: nil,
|
57
|
+
writerMessages: [],
|
58
|
+
writerOutput: nil
|
59
|
+
}
|
60
|
+
|
61
|
+
# handle readers
|
62
|
+
if reader.nil? || reader == ''
|
63
|
+
$response[:readerValidationPass] = false
|
64
|
+
$response[:readerValidationMessages] << 'Reader name is missing.'
|
65
|
+
$response[:readerExecutionPass] = false
|
66
|
+
$response[:readerExecutionMessages] << 'Reader failed to complete.'
|
67
|
+
return $response
|
68
|
+
else
|
69
|
+
require File.join(File.dirname(__FILE__), 'mdtranslator/readers/mdReaders')
|
70
|
+
intObj = ADIWG::Mdtranslator::Readers.handleReader(file)
|
71
|
+
|
72
|
+
if intObj
|
73
|
+
$response[:readerExecutionPass] = true
|
74
|
+
else
|
75
|
+
$response[:readerExecutionPass] = false
|
76
|
+
$response[:readerExecutionMessages] << 'Reader failed to complete.'
|
77
|
+
return $response
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# handle writers
|
82
|
+
if writer
|
83
|
+
require File.join(File.dirname(__FILE__), 'mdtranslator/writers/mdWriters')
|
84
|
+
ADIWG::Mdtranslator::Writers.handleWriter(intObj)
|
85
|
+
else
|
86
|
+
$response[:writerPass] = false
|
87
|
+
$response[:writerMessages] << 'Writer name is missing.'
|
88
|
+
end
|
89
|
+
return $response
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
169
94
|
|
170
95
|
end
|
@@ -30,7 +30,7 @@
|
|
30
30
|
# Stan Smith 2013-11-20 modified citation
|
31
31
|
# Stan Smith 2013-12-16 added phone book
|
32
32
|
# Stan Smith 2014-04-23 added protocol and doi to online resource
|
33
|
-
# Stan Smith 2014-04-24 added
|
33
|
+
# Stan Smith 2014-04-24 added schema to newBase
|
34
34
|
# Stan Smith 2014-04-24 renamed newDataId to newResourceInfo
|
35
35
|
# Stan Smith 2014-04-24 reorganized newMetadata, newResourceInfo
|
36
36
|
# Stan Smith 2014-04-24 added newMetadataInfo
|
@@ -49,543 +49,543 @@
|
|
49
49
|
|
50
50
|
class InternalMetadata
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
52
|
+
# initialize attribute values - nil
|
53
|
+
# initialize arrays - []
|
54
|
+
# initialize hashes - {}
|
55
|
+
|
56
|
+
def initialize
|
57
|
+
end
|
58
|
+
|
59
|
+
def newBase
|
60
|
+
intObj = {
|
61
|
+
schema: {
|
62
|
+
name: nil,
|
63
|
+
version: nil
|
64
|
+
},
|
65
|
+
contacts: [],
|
66
|
+
metadata: {},
|
67
|
+
dataDictionary: {}
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
def newDateTime
|
72
|
+
intObj = {
|
73
|
+
dateTime: nil,
|
74
|
+
dateType: nil,
|
75
|
+
dateResolution: nil
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
79
|
+
def newContact
|
80
|
+
intObj = {
|
81
|
+
contactId: nil,
|
82
|
+
indName: nil,
|
83
|
+
orgName: nil,
|
84
|
+
position: nil,
|
85
|
+
phones: [],
|
86
|
+
address: {},
|
87
|
+
onlineRes: [],
|
88
|
+
contactInstructions: nil
|
89
|
+
}
|
90
|
+
end
|
91
|
+
|
92
|
+
def newPhone
|
93
|
+
intObj = {
|
94
|
+
phoneServiceType: nil,
|
95
|
+
phoneName: nil,
|
96
|
+
phoneNumber: nil
|
97
|
+
}
|
98
|
+
end
|
99
|
+
|
100
|
+
def newAddress
|
101
|
+
intObj = {
|
102
|
+
deliveryPoints: [],
|
103
|
+
city: nil,
|
104
|
+
adminArea: nil,
|
105
|
+
postalCode: nil,
|
106
|
+
country: nil,
|
107
|
+
eMailList: []
|
108
|
+
}
|
109
|
+
end
|
110
|
+
|
111
|
+
def newMetadata
|
112
|
+
intObj = {
|
113
|
+
metadataInfo: {},
|
114
|
+
resourceInfo: {},
|
115
|
+
distributorInfo: [],
|
116
|
+
associatedResources: [],
|
117
|
+
additionalDocuments: []
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
121
|
+
def newMetadataInfo
|
122
|
+
intObj = {
|
123
|
+
metadataId: {},
|
124
|
+
parentMetadata: {},
|
125
|
+
metadataCustodians: [],
|
126
|
+
metadataCreateDate: {},
|
127
|
+
metadataUpdateDate: {},
|
128
|
+
metadataURI: nil,
|
129
|
+
metadataStatus: nil,
|
130
|
+
maintInfo: {},
|
131
|
+
extensions: []
|
132
|
+
}
|
133
|
+
end
|
134
|
+
|
135
|
+
def newRespParty
|
136
|
+
intObj = {
|
137
|
+
contactId: nil,
|
138
|
+
roleName: nil
|
139
|
+
}
|
140
|
+
end
|
141
|
+
|
142
|
+
def newOnlineResource
|
143
|
+
intObj = {
|
144
|
+
olResURI: nil,
|
145
|
+
olResProtocol: nil,
|
146
|
+
olResName: nil,
|
147
|
+
olResDesc: nil,
|
148
|
+
olResFunction: nil
|
149
|
+
}
|
150
|
+
end
|
151
|
+
|
152
|
+
def newResourceInfo
|
153
|
+
intObj = {
|
154
|
+
resourceType: nil,
|
155
|
+
citation: {},
|
156
|
+
timePeriod: {},
|
157
|
+
abstract: nil,
|
158
|
+
shortAbstract: nil,
|
159
|
+
hasMapLocation?: nil,
|
160
|
+
hasDataAvailable?: nil,
|
161
|
+
purpose: nil,
|
162
|
+
credits: [],
|
163
|
+
status: nil,
|
164
|
+
pointsOfContact: [],
|
165
|
+
resourceMaint: [],
|
166
|
+
graphicOverview: [],
|
167
|
+
resourceFormats: [],
|
168
|
+
resourceLanguages: [],
|
169
|
+
descriptiveKeywords: [],
|
170
|
+
resourceUses: [],
|
171
|
+
useConstraints: [],
|
172
|
+
legalConstraints: [],
|
173
|
+
securityConstraints: [],
|
174
|
+
taxonomy: {},
|
175
|
+
spatialReferenceSystem: {},
|
176
|
+
spatialRepresentationTypes: [],
|
177
|
+
spatialResolutions: [],
|
178
|
+
topicCategories: [],
|
179
|
+
environmentDescription: nil,
|
180
|
+
extents: [],
|
181
|
+
dataQualityInfo: [],
|
182
|
+
supplementalInfo: nil
|
183
|
+
}
|
184
|
+
end
|
185
|
+
|
186
|
+
def newCitation
|
187
|
+
intObj = {
|
188
|
+
citTitle: nil,
|
189
|
+
citDate: [],
|
190
|
+
citEdition: nil,
|
191
|
+
citResourceIds: [],
|
192
|
+
citResponsibleParty: [],
|
193
|
+
citResourceForms: [],
|
194
|
+
citOlResources: []
|
195
|
+
}
|
196
|
+
end
|
197
|
+
|
198
|
+
def newResourceId
|
199
|
+
intObj = {
|
200
|
+
identifier: nil,
|
201
|
+
identifierType: nil,
|
202
|
+
identifierCitation: {}
|
203
|
+
}
|
204
|
+
end
|
205
|
+
|
206
|
+
def newResourceFormat
|
207
|
+
intObj = {
|
208
|
+
formatName: nil,
|
209
|
+
formatVersion: nil
|
210
|
+
}
|
211
|
+
end
|
212
|
+
|
213
|
+
def newResourceMaint
|
214
|
+
intObj = {
|
215
|
+
maintFreq: nil,
|
216
|
+
maintNotes: [],
|
217
|
+
maintContacts: []
|
218
|
+
}
|
219
|
+
end
|
220
|
+
|
221
|
+
def newKeyword
|
222
|
+
intObj = {
|
223
|
+
keyword: [],
|
224
|
+
keywordType: nil,
|
225
|
+
keyTheCitation: {}
|
226
|
+
}
|
227
|
+
end
|
228
|
+
|
229
|
+
def newLegalCon
|
230
|
+
intObj = {
|
231
|
+
accessCons: [],
|
232
|
+
useCons: [],
|
233
|
+
otherCons: []
|
234
|
+
}
|
235
|
+
end
|
236
|
+
|
237
|
+
def newSecurityCon
|
238
|
+
intObj = {
|
239
|
+
classification: nil,
|
240
|
+
userNote: nil,
|
241
|
+
classSystem: nil,
|
242
|
+
handlingDesc: nil
|
243
|
+
}
|
244
|
+
end
|
245
|
+
|
246
|
+
def newDistributor
|
247
|
+
intObj = {
|
248
|
+
distContact: {},
|
249
|
+
distOrderProc: [],
|
250
|
+
distFormat: [],
|
251
|
+
distTransOption: []
|
252
|
+
}
|
253
|
+
end
|
254
|
+
|
255
|
+
def newDistOrder
|
256
|
+
intObj = {
|
257
|
+
fees: nil,
|
258
|
+
plannedDateTime: {},
|
259
|
+
orderInstructions: nil,
|
260
|
+
turnaround: nil
|
261
|
+
}
|
262
|
+
end
|
263
|
+
|
264
|
+
def newDigitalTransOption
|
265
|
+
intObj = {
|
266
|
+
online: [],
|
267
|
+
offline: {}
|
268
|
+
}
|
269
|
+
end
|
270
|
+
|
271
|
+
def newMedium
|
272
|
+
intObj = {
|
273
|
+
mediumName: nil,
|
274
|
+
mediumFormat: nil,
|
275
|
+
mediumNote: nil
|
276
|
+
}
|
277
|
+
end
|
278
|
+
|
279
|
+
def newBrowseGraphic
|
280
|
+
intObj = {
|
281
|
+
bGName: nil,
|
282
|
+
bGDescription: nil,
|
283
|
+
bGType: nil,
|
284
|
+
bGURI: nil
|
285
|
+
}
|
286
|
+
end
|
287
|
+
|
288
|
+
def newSpatialReferenceSystem
|
289
|
+
intObj = {
|
290
|
+
sRNames: [],
|
291
|
+
sREPSGs: [],
|
292
|
+
sRWKTs: []
|
293
|
+
}
|
294
|
+
end
|
295
|
+
|
296
|
+
def newExtent
|
297
|
+
intObj = {
|
298
|
+
extDesc: nil,
|
299
|
+
extGeoElements: [],
|
300
|
+
extIdElements: [],
|
301
|
+
extTempElements: [],
|
302
|
+
extVertElements: []
|
303
|
+
}
|
304
|
+
end
|
305
|
+
|
306
|
+
def newGeoElement
|
307
|
+
intObj = {
|
308
|
+
elementId: nil,
|
309
|
+
elementIncludeData: nil,
|
310
|
+
elementName: nil,
|
311
|
+
elementDescription: nil,
|
312
|
+
temporalElements: [],
|
313
|
+
verticalElements: [],
|
314
|
+
elementIdentifiers: [],
|
315
|
+
elementScope: nil,
|
316
|
+
elementAcquisition: nil,
|
317
|
+
elementSrs: {},
|
318
|
+
elementGeometry: {}
|
319
|
+
}
|
320
|
+
end
|
321
|
+
|
322
|
+
def newSRS
|
323
|
+
intObj = {
|
324
|
+
srsName: nil,
|
325
|
+
srsHref: nil,
|
326
|
+
sysType: nil
|
327
|
+
}
|
328
|
+
end
|
329
|
+
|
330
|
+
def newGeometry
|
331
|
+
intObj = {
|
332
|
+
geoType: nil,
|
333
|
+
geometry: {},
|
334
|
+
dimension: nil
|
335
|
+
}
|
336
|
+
end
|
337
|
+
|
338
|
+
def newBoundingBox
|
339
|
+
intObj = {
|
340
|
+
westLong: nil,
|
341
|
+
eastLong: nil,
|
342
|
+
southLat: nil,
|
343
|
+
northLat: nil
|
344
|
+
}
|
345
|
+
end
|
346
|
+
|
347
|
+
def newPolygonSet
|
348
|
+
intObj = {
|
349
|
+
exteriorRing: {},
|
350
|
+
exclusionRings: []
|
351
|
+
}
|
352
|
+
end
|
353
|
+
|
354
|
+
def newTemporalElement
|
355
|
+
intObj = {
|
356
|
+
date: {},
|
357
|
+
timeInstant: {},
|
358
|
+
timePeriod: {}
|
359
|
+
}
|
360
|
+
end
|
361
|
+
|
362
|
+
def newTimeInstant
|
363
|
+
intObj = {
|
364
|
+
timeId: nil,
|
365
|
+
description: nil,
|
366
|
+
timePosition: {}
|
367
|
+
}
|
368
|
+
end
|
369
|
+
|
370
|
+
def newTimePeriod
|
371
|
+
intObj = {
|
372
|
+
timeId: nil,
|
373
|
+
description: nil,
|
374
|
+
beginTime: {},
|
375
|
+
endTime: {}
|
376
|
+
}
|
377
|
+
end
|
378
|
+
|
379
|
+
def newVerticalElement
|
380
|
+
intObj = {
|
381
|
+
minValue: nil,
|
382
|
+
maxValue: nil,
|
383
|
+
crsURI: nil,
|
384
|
+
crsTitle: nil
|
385
|
+
}
|
386
|
+
end
|
387
|
+
|
388
|
+
def newLegalConstraint
|
389
|
+
intObj = {
|
390
|
+
accessCodes: [],
|
391
|
+
useCodes: [],
|
392
|
+
otherCons: []
|
393
|
+
}
|
394
|
+
end
|
395
|
+
|
396
|
+
def newSecurityConstraint
|
397
|
+
intObj = {
|
398
|
+
classCode: nil,
|
399
|
+
userNote: nil,
|
400
|
+
classSystem: nil,
|
401
|
+
handlingDesc: nil
|
402
|
+
}
|
403
|
+
end
|
404
|
+
|
405
|
+
def newDataUsage
|
406
|
+
intObj = {
|
407
|
+
specificUsage: nil,
|
408
|
+
userLimits: nil,
|
409
|
+
userContacts: []
|
410
|
+
}
|
411
|
+
end
|
412
|
+
|
413
|
+
def newTaxonSystem
|
414
|
+
intObj = {
|
415
|
+
taxClassSys: [],
|
416
|
+
taxGeneralScope: nil,
|
417
|
+
taxObservers: [],
|
418
|
+
taxIdProcedures: nil,
|
419
|
+
taxVoucher: {},
|
420
|
+
taxClasses: []
|
421
|
+
}
|
422
|
+
end
|
423
|
+
|
424
|
+
def newTaxonVoucher
|
425
|
+
intObj = {
|
426
|
+
specimen: nil,
|
427
|
+
repository: {}
|
428
|
+
}
|
429
|
+
end
|
430
|
+
|
431
|
+
def newTaxonClass
|
432
|
+
intObj = {
|
433
|
+
commonName: nil,
|
434
|
+
taxRankName: nil,
|
435
|
+
taxRankValue: nil
|
436
|
+
}
|
437
|
+
end
|
438
|
+
|
439
|
+
def newResolution
|
440
|
+
intObj = {
|
441
|
+
equivalentScale: nil,
|
442
|
+
distance: nil,
|
443
|
+
distanceUOM: nil
|
444
|
+
}
|
445
|
+
end
|
446
|
+
|
447
|
+
def newDataQuality
|
448
|
+
intObj = {
|
449
|
+
dataScope: nil,
|
450
|
+
dataLineage: {}
|
451
|
+
}
|
452
|
+
end
|
453
|
+
|
454
|
+
def newLineage
|
455
|
+
intObj = {
|
456
|
+
statement: nil,
|
457
|
+
processSteps: [],
|
458
|
+
dataSources: []
|
459
|
+
}
|
460
|
+
end
|
461
|
+
|
462
|
+
def newDataProcessStep
|
463
|
+
intObj = {
|
464
|
+
stepId: nil,
|
465
|
+
stepDescription: nil,
|
466
|
+
stepRationale: nil,
|
467
|
+
stepDateTime: {},
|
468
|
+
stepProcessors: []
|
469
|
+
}
|
470
|
+
end
|
471
|
+
|
472
|
+
def newDataSource
|
473
|
+
intObj = {
|
474
|
+
sourceDescription: nil,
|
475
|
+
sourceCitation: {},
|
476
|
+
sourceSteps: []
|
477
|
+
}
|
478
|
+
end
|
479
|
+
|
480
|
+
def newMetadataExtension
|
481
|
+
intObj = {
|
482
|
+
onLineResource: {},
|
483
|
+
extName: nil,
|
484
|
+
extShortName: nil,
|
485
|
+
extDefinition: nil,
|
486
|
+
obligation: nil,
|
487
|
+
dataType: nil,
|
488
|
+
maxOccurrence: nil,
|
489
|
+
parentEntities: [],
|
490
|
+
rule: nil,
|
491
|
+
rationales: [],
|
492
|
+
extSources: []
|
493
|
+
}
|
494
|
+
end
|
495
|
+
|
496
|
+
def newAssociatedResource
|
497
|
+
intObj = {
|
498
|
+
associationType: nil,
|
499
|
+
initiativeType: nil,
|
500
|
+
resourceType: nil,
|
501
|
+
resourceCitation: {},
|
502
|
+
metadataCitation: {}
|
503
|
+
}
|
504
|
+
end
|
505
|
+
|
506
|
+
def newAdditionalDocumentation
|
507
|
+
intObj = {
|
508
|
+
resourceType: nil,
|
509
|
+
citation: {}
|
510
|
+
}
|
511
|
+
end
|
512
|
+
|
513
|
+
def newDataDictionary
|
514
|
+
intObj = {
|
515
|
+
dictionaryInfo: {},
|
516
|
+
domains: [],
|
517
|
+
entities: []
|
518
|
+
}
|
519
|
+
end
|
520
|
+
|
521
|
+
def newDictionaryInfo
|
522
|
+
intObj = {
|
523
|
+
dictCitation: {},
|
524
|
+
dictDescription: nil,
|
525
|
+
dictResourceType: nil,
|
526
|
+
dictLanguage: nil
|
527
|
+
}
|
528
|
+
end
|
529
|
+
|
530
|
+
def newDictionaryDomain
|
531
|
+
intObj = {
|
532
|
+
domainId: nil,
|
533
|
+
domainName: nil,
|
534
|
+
domainCode: nil,
|
535
|
+
domainDescription: nil,
|
536
|
+
domainItems: []
|
537
|
+
}
|
538
|
+
end
|
539
|
+
|
540
|
+
def newDomainItem
|
541
|
+
intObj = {
|
542
|
+
itemName: nil,
|
543
|
+
itemValue: nil,
|
544
|
+
itemDefinition: nil
|
545
|
+
}
|
546
|
+
end
|
547
|
+
|
548
|
+
def newEntity
|
549
|
+
intObj = {
|
550
|
+
entityId: nil,
|
551
|
+
entityName: nil,
|
552
|
+
entityCode: nil,
|
553
|
+
entityDefinition: nil,
|
554
|
+
primaryKey: [],
|
555
|
+
indexes: [],
|
556
|
+
attributes: [],
|
557
|
+
foreignKeys: []
|
558
|
+
}
|
559
|
+
end
|
560
|
+
|
561
|
+
def newEntityIndex
|
562
|
+
intObj = {
|
563
|
+
indexCode: nil,
|
564
564
|
duplicate: false,
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
565
|
+
attributeNames: []
|
566
|
+
}
|
567
|
+
end
|
568
|
+
|
569
|
+
def newEntityAttribute
|
570
|
+
intObj = {
|
571
|
+
attributeName: nil,
|
572
|
+
attributeCode: nil,
|
573
|
+
attributeDefinition: nil,
|
574
|
+
dataType: nil,
|
575
|
+
allowNull: true,
|
576
|
+
unitOfMeasure: nil,
|
577
|
+
domainId: nil,
|
578
|
+
minValue: nil,
|
579
|
+
maxValue: nil
|
580
|
+
}
|
581
|
+
end
|
582
|
+
|
583
|
+
def newEntityForeignKey
|
584
|
+
intObj = {
|
585
|
+
fkLocalAttributes: [],
|
586
|
+
fkReferencedEntity: nil,
|
587
|
+
fkReferencedAttributes: []
|
588
|
+
}
|
589
|
+
end
|
590
590
|
|
591
591
|
end
|