adiwg-mdtranslator 2.14.2 → 2.15.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 +1 -1
- data/CHANGELOG.md +20 -5
- data/Rakefile +2 -0
- data/adiwg-mdtranslator.gemspec +2 -1
- data/lib/adiwg/mdtranslator.rb +1 -0
- data/lib/adiwg/mdtranslator/internal/module_codelistFun.rb +26 -0
- data/lib/adiwg/mdtranslator/internal/module_coordinates.rb +3 -0
- data/lib/adiwg/mdtranslator/internal/module_dateTimeFun.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_date.rb +0 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_dateTime.rb +0 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_keyword.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_taxonSystem.rb +2 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_contact.rb +0 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_date.rb +0 -2
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dateTime.rb +0 -2
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_provenance.rb +0 -1
- data/lib/adiwg/mdtranslator/version.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_attribute.rb +0 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_citation.rb +0 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_dateRange.rb +0 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_dateSingle.rb +0 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_method.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_methodKeywords.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_process.rb +0 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_transferInfo.rb +0 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_taxonomy.rb +1 -3
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_additionalDocument.rb +48 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_address.rb +90 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_associatedResource.rb +84 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_attribute.rb +107 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_attributeGroup.rb +69 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_baseUnit.rb +38 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_boundingBox.rb +70 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_browseGraphic.rb +95 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_citation.rb +205 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_codelist.rb +50 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_constraint.rb +51 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_constraintCommon.rb +104 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_contact.rb +119 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_conventionalUnit.rb +64 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_coverageDescription.rb +84 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_dataIdentification.rb +347 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_date.rb +62 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_definitionUnit.rb +35 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_derivedUnit.rb +42 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_dimension.rb +72 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_distribution.rb +62 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_distributor.rb +77 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_email.rb +44 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_extent.rb +85 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_feature.rb +71 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_featureCollection.rb +56 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_featureProperties.rb +64 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_format.rb +74 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_fraction.rb +46 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_gcoDateTime.rb +45 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_geographicElement.rb +77 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_geographicExtent.rb +96 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_geometricObjects.rb +60 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_geometryCollection.rb +97 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_georectified.rb +121 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_georeferenceable.rb +87 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_gmlIdentifier.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_grid.rb +71 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_gridRepresentation.rb +36 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_identifier.rb +95 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_imageDescription.rb +175 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_individual.rb +85 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_keyword.rb +78 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_legalConstraints.rb +87 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_lineString.rb +76 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_lineage.rb +97 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_locale.rb +67 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_maintenance.rb +101 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_mdBand.rb +82 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_mdMetadata.rb +372 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_measure.rb +71 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_medium.rb +113 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_miBand.rb +90 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_multiLine.rb +84 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_multiPoint.rb +84 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_multiPolygon.rb +84 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_onlineResource.rb +91 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_orderProcess.rb +79 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_organization.rb +106 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_phone.rb +81 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_point.rb +77 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_polygon.rb +95 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_processStep.rb +130 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_rangeDimension.rb +94 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_referenceSystem.rb +92 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_releasability.rb +71 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_resolution.rb +97 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_responsibility.rb +91 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_sampleDimension.rb +127 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_scope.rb +75 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_scopeDescription.rb +75 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_securityConstraints.rb +97 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_series.rb +63 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_source.rb +125 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_spatialRepresentation.rb +61 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_temporalExtent.rb +53 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_timeInstant.rb +80 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_timePeriod.rb +113 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_transferOptions.rb +107 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_unitsOfMeasure.rb +258 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_usage.rb +134 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_useConstraints.rb +41 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_vectorRepresentation.rb +61 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_verticalExtent.rb +70 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/iso19115_1_writer.rb +105 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/iso19115_1_writer_messages_eng.yml +132 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/readme.md +12 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_1/version.rb +15 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_citation.rb +3 -2
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataIdentification.rb +42 -39
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataQuality.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_distributor.rb +3 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_extension.rb +12 -7
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_miMetadata.rb +2 -3
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_referenceSystem.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_resolution.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_responsibleParty.rb +42 -35
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_spatialRepresentation.rb +4 -10
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_useConstraints.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer_messages_eng.yml +5 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/readme.md +2 -2
- data/lib/adiwg/mdtranslator/writers/iso19115_2/version.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/mdWriters.rb +7 -7
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_citation.rb +0 -1
- data/lib/adiwg/mdtranslator_cli.rb +2 -1
- metadata +93 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_gmlIdentifier.rb +0 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c28a9de2c4b82b2f0b46f4de13a87b8de286d98
|
4
|
+
data.tar.gz: af96ef12d442a941918a23842bd74aa027d0d1a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f428c56a2f93748c0482746b31278bbacd995080416a6c28e3aa195c1ca16b30a02a73ee3a1a1b7e45037f8f4fa28ee0db3735dc630903af85a6cedf58253ad4
|
7
|
+
data.tar.gz: 1a8b0cc95da21914bab8eae81d2b9f55b962984cc583e76fc49472ca8c14b1b0d3d9b0e3d16ef9f1c3b27986eadd954edc78e341b25228eb7a73de85e1f4f7b9
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,25 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [v2.
|
3
|
+
## [v2.15.0](https://github.com/adiwg/mdTranslator/tree/v2.15.0)
|
4
4
|
|
5
|
+
[Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.14.2...v2.15.0)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Add writer for ISO 19115-1 [\#207](https://github.com/adiwg/mdTranslator/issues/207)
|
10
|
+
- Add ISO 19115-3 \(1\) Support [\#209](https://github.com/adiwg/mdTranslator/pull/209) ([stansmith907](https://github.com/stansmith907))
|
11
|
+
|
12
|
+
## [v2.14.2](https://github.com/adiwg/mdTranslator/tree/v2.14.2) (2018-11-02)
|
13
|
+
[Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.14.1...v2.14.2)
|
14
|
+
|
15
|
+
## [v2.14.1](https://github.com/adiwg/mdTranslator/tree/v2.14.1) (2018-11-01)
|
16
|
+
[Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.14.0...v2.14.1)
|
17
|
+
|
18
|
+
**Merged pull requests:**
|
19
|
+
|
20
|
+
- Fix issue with empty verticalDatum objects [\#205](https://github.com/adiwg/mdTranslator/pull/205) ([stansmith907](https://github.com/stansmith907))
|
21
|
+
|
22
|
+
## [v2.14.0](https://github.com/adiwg/mdTranslator/tree/v2.14.0) (2018-10-31)
|
5
23
|
[Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.13.3...v2.14.0)
|
6
24
|
|
7
25
|
**Closed issues:**
|
@@ -106,6 +124,7 @@
|
|
106
124
|
|
107
125
|
- Minor bug fixes [\#182](https://github.com/adiwg/mdTranslator/pull/182) ([stansmith907](https://github.com/stansmith907))
|
108
126
|
- mdTranslator version 2.9.0 [\#181](https://github.com/adiwg/mdTranslator/pull/181) ([stansmith907](https://github.com/stansmith907))
|
127
|
+
- Remove repository name from harvest set tag in sbJson writer. [\#151](https://github.com/adiwg/mdTranslator/pull/151) ([stansmith907](https://github.com/stansmith907))
|
109
128
|
|
110
129
|
## [v2.9.1](https://github.com/adiwg/mdTranslator/tree/v2.9.1) (2018-02-03)
|
111
130
|
[Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.9.0...v2.9.1)
|
@@ -216,10 +235,6 @@
|
|
216
235
|
## [v2.3.4](https://github.com/adiwg/mdTranslator/tree/v2.3.4) (2017-10-13)
|
217
236
|
[Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.3.3...v2.3.4)
|
218
237
|
|
219
|
-
**Merged pull requests:**
|
220
|
-
|
221
|
-
- Remove repository name from harvest set tag in sbJson writer. [\#151](https://github.com/adiwg/mdTranslator/pull/151) ([stansmith907](https://github.com/stansmith907))
|
222
|
-
|
223
238
|
## [v2.3.3](https://github.com/adiwg/mdTranslator/tree/v2.3.3) (2017-10-11)
|
224
239
|
[Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.3.2...v2.3.3)
|
225
240
|
|
data/Rakefile
CHANGED
@@ -11,6 +11,7 @@ Rake::TestTask.new do |t|
|
|
11
11
|
'test/writers/fgdc/tc*.rb',
|
12
12
|
'test/writers/html/tc*.rb',
|
13
13
|
'test/writers/iso19110/tc*.rb',
|
14
|
+
'test/writers/iso19115-1/tc*.rb',
|
14
15
|
'test/writers/iso19115-2/tc*.rb',
|
15
16
|
'test/writers/mdJson/tc*.rb',
|
16
17
|
'test/writers/sbJson/tc*.rb',
|
@@ -28,6 +29,7 @@ task :default => :test
|
|
28
29
|
# 'test/writers/fgdc/tc*.rb',
|
29
30
|
# 'test/writers/html/tc*.rb',
|
30
31
|
# 'test/writers/iso19110/tc*.rb',
|
32
|
+
# 'test/writers/iso19115-1/tc*.rb',
|
31
33
|
# 'test/writers/iso19115-2/tc*.rb',
|
32
34
|
# 'test/writers/mdJson/tc*.rb',
|
33
35
|
# 'test/writers/sbJson/tc*.rb',
|
data/adiwg-mdtranslator.gemspec
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
# History
|
3
3
|
# Stan Smith 2017-05-16 remove rgeo 0.5 support
|
4
|
+
# Stan Smith 2019-03-19 migrated to version 2 bundler
|
4
5
|
|
5
6
|
lib = File.expand_path('../lib', __FILE__)
|
6
7
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
@@ -24,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
24
25
|
|
25
26
|
spec.required_ruby_version = '>= 2.3'
|
26
27
|
|
27
|
-
spec.add_development_dependency "bundler", "~>
|
28
|
+
spec.add_development_dependency "bundler", "~> 2"
|
28
29
|
spec.add_development_dependency "rake", "~> 10"
|
29
30
|
spec.add_development_dependency "minitest", "~> 5"
|
30
31
|
|
data/lib/adiwg/mdtranslator.rb
CHANGED
@@ -26,6 +26,7 @@
|
|
26
26
|
# Stan Smith 2014-07-02 original script
|
27
27
|
|
28
28
|
# required by readers and writers
|
29
|
+
require 'adiwg/mdtranslator/internal/module_dateTimeFun'
|
29
30
|
require 'adiwg/mdtranslator/version'
|
30
31
|
require 'adiwg/mdtranslator/readers/mdReaders'
|
31
32
|
require 'adiwg/mdtranslator/writers/mdWriters'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# codelist methods
|
2
|
+
# for ADIwg readers and writers
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2019-03-22 original script
|
6
|
+
|
7
|
+
require 'adiwg-mdcodes'
|
8
|
+
|
9
|
+
module CodelistFun
|
10
|
+
|
11
|
+
def self.validateItem(codeList, codeName)
|
12
|
+
|
13
|
+
# get requested codelist from the adiwg-mdcodes gem
|
14
|
+
mdCodelist = ADIWG::Mdcodes.getCodelistDetail(codeList)
|
15
|
+
|
16
|
+
aCodes = mdCodelist['codelist']
|
17
|
+
|
18
|
+
# search the codelist for a matching codeName
|
19
|
+
aCodes.each do |hCode|
|
20
|
+
return true if hCode['codeName'] == codeName
|
21
|
+
end
|
22
|
+
return false
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -76,6 +76,9 @@ module AdiwgCoordinates
|
|
76
76
|
unpackGeometry(hGeo, aNorthings, aEastings)
|
77
77
|
end
|
78
78
|
|
79
|
+
# return if no coordinates found in geographic object(s)
|
80
|
+
return {} if aNorthings.empty? || aEastings.empty?
|
81
|
+
|
79
82
|
# find most north/south points
|
80
83
|
north = aNorthings.max
|
81
84
|
south = aNorthings.min
|
@@ -222,7 +222,7 @@ module ADIWG
|
|
222
222
|
nodeName = xKeywords.xpath('.').first.name
|
223
223
|
if nodeName == 'methodid'
|
224
224
|
hKeyword = intMetadataClass.newKeyword
|
225
|
-
hKeyword[:keywordType] = '
|
225
|
+
hKeyword[:keywordType] = 'methodology'
|
226
226
|
|
227
227
|
# theme bio.1.1 (methkt) - lineage method keyword thesaurus {citation}
|
228
228
|
thesaurus = xKeywords.xpath('./methkt').text
|
@@ -2,6 +2,7 @@
|
|
2
2
|
# unpack fgdc taxonomy system
|
3
3
|
|
4
4
|
# History:
|
5
|
+
# Stan Smith 2019-05-17 fixed, changed idref output from identifier to citation
|
5
6
|
# Stan Smith 2017-09-20 original script
|
6
7
|
|
7
8
|
require 'nokogiri'
|
@@ -64,10 +65,7 @@ module ADIWG
|
|
64
65
|
axTaxRef.each do |xTaxRef|
|
65
66
|
hCitation = Citation.unpack(xTaxRef, hResponseObj)
|
66
67
|
unless hCitation.nil?
|
67
|
-
|
68
|
-
hIdentifier[:identifier] = 'none'
|
69
|
-
hIdentifier[:citation] = hCitation
|
70
|
-
hTaxonomy[:idReferences] << hIdentifier
|
68
|
+
hTaxonomy[:idReferences] << hCitation
|
71
69
|
end
|
72
70
|
end
|
73
71
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
# adiwg mdTranslator
|
2
2
|
|
3
3
|
# version 2 history
|
4
|
-
# 2.
|
4
|
+
# 2.15.0 2019-05-15 added ISO 19115-3(1) writer
|
5
|
+
# 2.14.2 2018-11-02 changed keywordType from 'method' to 'methodology' for FGDC reader/writer
|
5
6
|
# 2.14.1 2018-10-31 add fix for empty verticalDatum in fgdc and iso 19115_2 writers
|
6
7
|
# 2.14.0 2018-10-27 refactor taxonomy for multiple taxonomic classifications
|
7
8
|
# 2.14.0 2018-10-27 refactor taxonomy for identification reference as citation
|
@@ -103,7 +104,7 @@
|
|
103
104
|
module ADIWG
|
104
105
|
module Mdtranslator
|
105
106
|
# current mdtranslator version
|
106
|
-
VERSION = "2.
|
107
|
+
VERSION = "2.15.0"
|
107
108
|
end
|
108
109
|
end
|
109
110
|
|
@@ -5,7 +5,6 @@
|
|
5
5
|
# Stan Smith 2018-02-26 refactored error and warning messaging
|
6
6
|
# Stan Smith 2017-11-17 original script
|
7
7
|
|
8
|
-
require 'adiwg/mdtranslator/internal/module_dateTimeFun'
|
9
8
|
require_relative '../fgdc_writer'
|
10
9
|
require_relative 'class_series'
|
11
10
|
require_relative 'class_publisher'
|
@@ -34,7 +34,7 @@ module ADIWG
|
|
34
34
|
haveMethod = true unless hLineage[:lineageCitation].empty?
|
35
35
|
aKeywords = hIntObj[:metadata][:resourceInfo][:keywords]
|
36
36
|
aKeywords.each do |hKeyword|
|
37
|
-
if hKeyword[:keywordType]
|
37
|
+
if %w(method methodology).include?(hKeyword[:keywordType])
|
38
38
|
haveMethod = true
|
39
39
|
end
|
40
40
|
end
|
@@ -26,7 +26,7 @@ module ADIWG
|
|
26
26
|
haveMethod = false
|
27
27
|
aKeywords.each do |hKeySet|
|
28
28
|
type = hKeySet[:keywordType]
|
29
|
-
if type == 'method'
|
29
|
+
if type == 'method' || type == 'methodology'
|
30
30
|
aKeywords = hKeySet[:keywords]
|
31
31
|
hThesaurus = hKeySet[:thesaurus]
|
32
32
|
thesaurusName = nil
|
@@ -8,7 +8,6 @@
|
|
8
8
|
# Stan Smith 2015-03-25 original script
|
9
9
|
|
10
10
|
require_relative 'html_citation'
|
11
|
-
require_relative 'html_identifier'
|
12
11
|
require_relative 'html_responsibility'
|
13
12
|
require_relative 'html_taxonomyClass'
|
14
13
|
|
@@ -27,7 +26,6 @@ module ADIWG
|
|
27
26
|
|
28
27
|
# classes used
|
29
28
|
citationClass = Html_Citation.new(@html)
|
30
|
-
identifierClass = Html_Identifier.new(@html)
|
31
29
|
responsibilityClass = Html_Responsibility.new(@html)
|
32
30
|
taxonomicClass = Html_TaxonomyClass.new(@html)
|
33
31
|
|
@@ -94,7 +92,7 @@ module ADIWG
|
|
94
92
|
# taxonomy - identification references
|
95
93
|
hTaxonomy[:idReferences].each do |hReference|
|
96
94
|
@html.details do
|
97
|
-
@html.summary('Non-Authoritative Reference', {'class' => 'h5'})
|
95
|
+
@html.summary('Non-Authoritative Identification Reference', {'class' => 'h5'})
|
98
96
|
@html.section(:class => 'block') do
|
99
97
|
citationClass.writeHtml(hReference)
|
100
98
|
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# ISO <<Class>> MD_AssociatedResource
|
2
|
+
# 19115-1 writer output in XML
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2019-04-22 original script
|
6
|
+
|
7
|
+
require_relative 'class_citation'
|
8
|
+
|
9
|
+
module ADIWG
|
10
|
+
module Mdtranslator
|
11
|
+
module Writers
|
12
|
+
module Iso19115_1
|
13
|
+
|
14
|
+
class AdditionalDocument
|
15
|
+
|
16
|
+
def initialize(xml, hResponseObj)
|
17
|
+
@xml = xml
|
18
|
+
@hResponseObj = hResponseObj
|
19
|
+
@NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_1
|
20
|
+
end
|
21
|
+
|
22
|
+
def writeXML(hAdditionalDoc, inContext = nil)
|
23
|
+
|
24
|
+
# classes used
|
25
|
+
citationClass = CI_Citation.new(@xml, @hResponseObj)
|
26
|
+
|
27
|
+
outContext = 'additional document'
|
28
|
+
outContext = inContext + ' additional document' unless inContext.nil?
|
29
|
+
|
30
|
+
# additional document - resource type [] {MD_ScopeCode} - not used by ISO
|
31
|
+
|
32
|
+
# additional document - additional documentation [] {CI_Citation}
|
33
|
+
aDocs = hAdditionalDoc[:citation]
|
34
|
+
aDocs.each do |hCitation|
|
35
|
+
unless hCitation.empty?
|
36
|
+
@xml.tag!('mri:additionalDocumentation') do
|
37
|
+
citationClass.writeXML(hCitation, outContext)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
end # writeXML
|
43
|
+
end # AdditionalDocument class
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# ISO <<Class>> CI_Address
|
2
|
+
# 19115-1 writer output in XML
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2019-03-18 original script
|
6
|
+
|
7
|
+
module ADIWG
|
8
|
+
module Mdtranslator
|
9
|
+
module Writers
|
10
|
+
module Iso19115_1
|
11
|
+
|
12
|
+
class CI_Address
|
13
|
+
|
14
|
+
def initialize(xml, hResponseObj)
|
15
|
+
@xml = xml
|
16
|
+
@hResponseObj = hResponseObj
|
17
|
+
end
|
18
|
+
|
19
|
+
def writeXML(hAddress)
|
20
|
+
|
21
|
+
@xml.tag!('cit:CI_Address') do
|
22
|
+
|
23
|
+
|
24
|
+
unless hAddress.nil?
|
25
|
+
|
26
|
+
# address - address type (not used by ISO 19115-1)
|
27
|
+
|
28
|
+
# address - description (not used by ISO 19115-1)
|
29
|
+
|
30
|
+
# address - delivery points []
|
31
|
+
aDeliveryPoints = hAddress[:deliveryPoints]
|
32
|
+
aDeliveryPoints.each do |myPoint|
|
33
|
+
@xml.tag!('cit:deliveryPoint') do
|
34
|
+
@xml.tag!('gco:CharacterString', myPoint)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
if aDeliveryPoints.empty? && @hResponseObj[:writerShowTags]
|
38
|
+
@xml.tag!('cit:deliveryPoint')
|
39
|
+
end
|
40
|
+
|
41
|
+
# address - city
|
42
|
+
unless hAddress[:city].nil?
|
43
|
+
@xml.tag!('cit:city') do
|
44
|
+
@xml.tag!('gco:CharacterString', hAddress[:city])
|
45
|
+
end
|
46
|
+
end
|
47
|
+
if hAddress[:city].nil? && @hResponseObj[:writerShowTags]
|
48
|
+
@xml.tag!('cit:city')
|
49
|
+
end
|
50
|
+
|
51
|
+
# address - administrative area
|
52
|
+
unless hAddress[:adminArea].nil?
|
53
|
+
@xml.tag!('cit:administrativeArea') do
|
54
|
+
@xml.tag!('gco:CharacterString', hAddress[:adminArea])
|
55
|
+
end
|
56
|
+
end
|
57
|
+
if hAddress[:adminArea].nil? && @hResponseObj[:writerShowTags]
|
58
|
+
@xml.tag!('cit:administrativeArea')
|
59
|
+
end
|
60
|
+
|
61
|
+
# address - postal code
|
62
|
+
unless hAddress[:postalCode].nil?
|
63
|
+
@xml.tag!('cit:postalCode') do
|
64
|
+
@xml.tag!('gco:CharacterString', hAddress[:postalCode])
|
65
|
+
end
|
66
|
+
end
|
67
|
+
if hAddress[:postalCode].nil? && @hResponseObj[:writerShowTags]
|
68
|
+
@xml.tag!('cit:postalCode')
|
69
|
+
end
|
70
|
+
|
71
|
+
# address - country
|
72
|
+
unless hAddress[:country].nil?
|
73
|
+
@xml.tag!('cit:country') do
|
74
|
+
@xml.tag!('gco:CharacterString', hAddress[:country])
|
75
|
+
end
|
76
|
+
end
|
77
|
+
if hAddress[:country].nil? && @hResponseObj[:writerShowTags]
|
78
|
+
@xml.tag!('cit:country')
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
|
83
|
+
end # CI_Address tag
|
84
|
+
end # writeXML
|
85
|
+
end # CI_Address class
|
86
|
+
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|