adiwg-mdtranslator 2.13.0 → 2.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +26 -14
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +1 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_dateTime.rb +56 -41
- data/lib/adiwg/mdtranslator/readers/fgdc/version.rb +3 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +1 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader_messages_eng.yml +377 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_additionalDocumentation.rb +6 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_address.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_allocation.rb +6 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_associatedResource.rb +7 -11
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_attribute.rb +12 -13
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_attributeGroup.rb +10 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_bearingDistanceResolution.rb +11 -21
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_boundingBox.rb +18 -38
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_citation.rb +10 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_constraint.rb +22 -28
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_contact.rb +17 -18
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_contactPostprocess.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_coordinateResolution.rb +9 -15
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_coverageDescription.rb +6 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataDictionary.rb +8 -13
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_date.rb +8 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dateTime.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dimension.rb +7 -11
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_distribution.rb +6 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_distributor.rb +17 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_domain.rb +12 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_domainItem.rb +9 -13
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_duration.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_entity.rb +14 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_entityAttribute.rb +20 -19
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_entityForeignKey.rb +8 -15
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_entityIndex.rb +7 -10
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_extent.rb +12 -10
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_featureCollection.rb +8 -13
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_format.rb +10 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_funding.rb +8 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geoJson.rb +8 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geodetic.rb +11 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geographicExtent.rb +12 -10
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geographicResolution.rb +10 -13
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geologicAge.rb +11 -10
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geometryCollection.rb +8 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geometryFeature.rb +8 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geometryObject.rb +7 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geometryProperties.rb +4 -2
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_georectifiedRepresentation.rb +13 -20
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_georeferenceableRepresentation.rb +12 -14
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_gmlIdentifier.rb +8 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_graphic.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_gridRepresentation.rb +12 -13
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_identifier.rb +10 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_imageDescription.rb +9 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_keyword.rb +8 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_keywordObject.rb +6 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_legalConstraint.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_lineage.rb +10 -10
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_locale.rb +7 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_maintenance.rb +12 -10
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_mdJson.rb +59 -17
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_measure.rb +9 -16
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_medium.rb +10 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_metadata.rb +6 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_metadataInfo.rb +16 -16
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_metadataRepository.rb +8 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_obliqueLinePoint.rb +7 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_onlineResource.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_orderProcess.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_party.rb +25 -28
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_phone.rb +7 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_processStep.rb +15 -12
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_projectionParameters.rb +11 -10
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_referenceSystemParameters.rb +12 -11
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_releasability.rb +10 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_resourceInfo.rb +29 -40
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_resourceType.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_resourceUsage.rb +5 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_responsibleParty.rb +12 -11
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_schema.rb +6 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_scope.rb +11 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_scopeDescription.rb +6 -7
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_securityConstraint.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_series.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_source.rb +15 -13
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_spatialReference.rb +10 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_spatialRepresentation.rb +14 -11
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_spatialResolution.rb +14 -10
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_taxonomicClassification.rb +8 -15
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_taxonomicSystem.rb +5 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_taxonomy.rb +7 -11
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_temporalExtent.rb +12 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_timeInstant.rb +12 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_timeInterval.rb +9 -13
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_timePeriod.rb +22 -26
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_transferOption.rb +13 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_valueRange.rb +7 -9
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_vectorObject.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_vectorRepresentation.rb +12 -10
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_verticalDatum.rb +10 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_verticalExtent.rb +12 -13
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_voucher.rb +10 -10
- data/lib/adiwg/mdtranslator/version.rb +8 -3
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_spatialOrganization.rb +78 -84
- data/lib/adiwg/mdtranslator/writers/html/sections/html_responsibility.rb +3 -3
- data/lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb +23 -14
- data/lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer_messages_eng.yml +2 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataIdentification.rb +10 -2
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_date.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_dictionary.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_geographicExtent.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_mdJson.rb +5 -5
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_medium.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_party.rb +1 -5
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_repository.rb +4 -2
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_verticalDatumParameters.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_citation.rb +11 -11
- metadata +4 -3
@@ -34,16 +34,16 @@ module ADIWG
|
|
34
34
|
# mdJson - metadata (required)
|
35
35
|
json.metadata Metadata.build(intObj[:metadata])
|
36
36
|
|
37
|
-
# mdJson - dataDictionaries []
|
38
|
-
unless intObj[:dataDictionaries].empty?
|
39
|
-
json.dataDictionary intObj[:dataDictionaries].map { |obj| Dictionary.build(obj).attributes! }
|
40
|
-
end
|
41
|
-
|
42
37
|
# mdJson - metadataRepositories []
|
43
38
|
unless intObj[:metadataRepositories].empty?
|
44
39
|
json.metadataRepository intObj[:metadataRepositories].map { |obj| Repository.build(obj).attributes! }
|
45
40
|
end
|
46
41
|
|
42
|
+
# mdJson - dataDictionaries []
|
43
|
+
unless intObj[:dataDictionaries].empty?
|
44
|
+
json.dataDictionary intObj[:dataDictionaries].map { |obj| Dictionary.build(obj).attributes! }
|
45
|
+
end
|
46
|
+
|
47
47
|
end
|
48
48
|
|
49
49
|
end # build
|
@@ -16,11 +16,7 @@ module ADIWG
|
|
16
16
|
|
17
17
|
Jbuilder.new do |json|
|
18
18
|
json.contactId hParty[:contactId]
|
19
|
-
|
20
|
-
hParty[:organizationMembers].each do |hOrg|
|
21
|
-
aOrgs << hOrg[:contactId]
|
22
|
-
end
|
23
|
-
json.organizationMembers aOrgs unless aOrgs.empty?
|
19
|
+
json.organizationMembers hParty[:organizationMembers] unless hParty[:organizationMembers].empty?
|
24
20
|
end
|
25
21
|
|
26
22
|
end # build
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# mdJson 2.0 writer - metadataRepository
|
2
2
|
|
3
3
|
# History:
|
4
|
-
#
|
5
|
-
#
|
4
|
+
# Stan Smith 2017-03-11 refactored for mdJson/mdTranslator 2.0
|
5
|
+
# Josh Bradley original script
|
6
6
|
|
7
7
|
require 'jbuilder'
|
8
|
+
require_relative 'mdJson_citation'
|
8
9
|
|
9
10
|
module ADIWG
|
10
11
|
module Mdtranslator
|
@@ -18,6 +19,7 @@ module ADIWG
|
|
18
19
|
Jbuilder.new do |json|
|
19
20
|
json.repository hRepository[:repository]
|
20
21
|
json.metadataStandard hRepository[:metadataStandard]
|
22
|
+
json.citation Citation.build(hRepository[:citation]) unless hRepository[:citation].empty?
|
21
23
|
end
|
22
24
|
|
23
25
|
end # build
|
@@ -17,6 +17,7 @@ module ADIWG
|
|
17
17
|
|
18
18
|
Jbuilder.new do |json|
|
19
19
|
json.datumIdentifier Identifier.build(hDatum[:datumIdentifier]) unless hDatum[:datumIdentifier].empty?
|
20
|
+
json.datumName hDatum[:datumName]
|
20
21
|
json.encodingMethod hDatum[:encodingMethod]
|
21
22
|
json.isDepthSystem hDatum[:isDepthSystem]
|
22
23
|
json.verticalResolution hDatum[:verticalResolution]
|
@@ -23,29 +23,29 @@ module ADIWG
|
|
23
23
|
citation = ''
|
24
24
|
|
25
25
|
# names
|
26
|
-
|
26
|
+
aParties = []
|
27
27
|
hCitation[:responsibleParties].each do |hResponsibility|
|
28
28
|
role = hResponsibility[:roleName]
|
29
29
|
hResponsibility[:parties].each do |hParty|
|
30
30
|
party = {}
|
31
31
|
party[:role] = role
|
32
|
-
party[:
|
33
|
-
|
34
|
-
hParty[:organizationMembers].each do |
|
32
|
+
party[:contactId] = hParty[:contactId]
|
33
|
+
aParties << party
|
34
|
+
hParty[:organizationMembers].each do |memberId|
|
35
35
|
party = {}
|
36
36
|
party[:role] = role
|
37
|
-
party[:
|
38
|
-
|
37
|
+
party[:contactId] = memberId
|
38
|
+
aParties << party
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
42
|
-
|
43
|
-
|
44
|
-
hContact = ADIWG::Mdtranslator::Writers::SbJson.
|
42
|
+
aParties.uniq!
|
43
|
+
aParties.each do |hParty|
|
44
|
+
hContact = ADIWG::Mdtranslator::Writers::SbJson.get_contact_by_id(hParty[:contactId])
|
45
45
|
unless hContact.empty?
|
46
46
|
unless hContact[:name].nil?
|
47
|
-
sbRole = Codelists.codelist_adiwg2sb('role_adiwg2sb',
|
48
|
-
sbRole = sbRole.nil? ?
|
47
|
+
sbRole = Codelists.codelist_adiwg2sb('role_adiwg2sb', hParty[:role])
|
48
|
+
sbRole = sbRole.nil? ? hParty[:role] : sbRole
|
49
49
|
citation += hContact[:name] + '(' + sbRole + '), '
|
50
50
|
end
|
51
51
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adiwg-mdtranslator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.13.
|
4
|
+
version: 2.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stan Smith
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-07-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -317,6 +317,7 @@ files:
|
|
317
317
|
- lib/adiwg/mdtranslator/readers/fgdc/readme.md
|
318
318
|
- lib/adiwg/mdtranslator/readers/fgdc/version.rb
|
319
319
|
- lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb
|
320
|
+
- lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader_messages_eng.yml
|
320
321
|
- lib/adiwg/mdtranslator/readers/mdJson/mdJson_validator.rb
|
321
322
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_additionalDocumentation.rb
|
322
323
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_address.rb
|
@@ -854,7 +855,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
854
855
|
version: '0'
|
855
856
|
requirements: []
|
856
857
|
rubyforge_project:
|
857
|
-
rubygems_version: 2.
|
858
|
+
rubygems_version: 2.5.2
|
858
859
|
signing_key:
|
859
860
|
specification_version: 4
|
860
861
|
summary: The mdtranslator (metadata translator) is a tool for translating metadata
|