dwc-archive 0.5.7 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/dwc-archive/classification_normalizer.rb +3 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.8
|
@@ -61,7 +61,6 @@ class DarwinCore
|
|
61
61
|
a_scientific_name.force_encoding('utf-8')
|
62
62
|
end
|
63
63
|
canonical_name = @parser.parse(a_scientific_name, :canonical_only => true)
|
64
|
-
add_name_string(a_scientific_name)
|
65
64
|
add_name_string(canonical_name) unless canonical_name.to_s.empty?
|
66
65
|
canonical_name.to_s.empty? ? a_scientific_name : canonical_name
|
67
66
|
end
|
@@ -96,6 +95,7 @@ class DarwinCore
|
|
96
95
|
raise RuntimeError, "Darwin Core core fields must contain taxon id and scientific name" unless (@core_fields[:id] && @core_fields[:scientificname])
|
97
96
|
@dwc.core.read do |rows|
|
98
97
|
rows[0].each do |r|
|
98
|
+
add_name_string(r[@core_fields[:scientificname]])
|
99
99
|
set_scientific_name(r, @core_fields)
|
100
100
|
#core has AcceptedNameUsageId
|
101
101
|
if @core_fields[:acceptednameusageid] && r[@core_fields[:acceptednameusageid]] && r[@core_fields[:acceptednameusageid]] != r[@core_fields[:id]]
|
@@ -176,6 +176,7 @@ class DarwinCore
|
|
176
176
|
ext, fields = *extension
|
177
177
|
ext.read do |rows|
|
178
178
|
rows[0].each do |r|
|
179
|
+
add_name_string(r[fields[:scientificname]])
|
179
180
|
set_scientific_name(r, fields)
|
180
181
|
@normalized_data[r[fields[:id]]].synonyms << SynonymNormalized.new(
|
181
182
|
r[fields[:scientificname]],
|
@@ -190,6 +191,7 @@ class DarwinCore
|
|
190
191
|
ext, fields = *extension
|
191
192
|
ext.read do |rows|
|
192
193
|
rows[0].each do |r|
|
194
|
+
add_name_string(r[fields[:vernacularname]])
|
193
195
|
@normalized_data[r[fields[:id]]].vernacular_names << VernacularNormalized.new(
|
194
196
|
r[fields[:vernacularname]],
|
195
197
|
fields[:languagecode] ? r[fields[:languagecode]] : nil)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dwc-archive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 8
|
10
|
+
version: 0.5.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dmitry Mozzherin
|