Skip to content

Commit

Permalink
Work on #1203
Browse files Browse the repository at this point in the history
  • Loading branch information
mjy committed Oct 26, 2020
1 parent e47b703 commit 56e1372
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/export/coldp/files/name.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,25 @@ def self.nom_status_field(taxon_name)

# Invalid Protonyms are rendered only as their original Combination
# @param t [An invalid Protonym]
# only place that var./frm can be handled.
def self.add_original_combination(t, csv)
e = t.original_combination_elements

infraspecific_epithet = [
e[:form], e[:variety], e[:subspecies]
].compact&.first&.last

csv << [
::Export::Coldp.reified_id(t), # ID
t.id, # basionymID, always nil, this is the original
t.cached_original_combination, # scientificName
authorship_field(t, true), # authorship
t.rank, # rank
nil, # uninomial
(e[:genus] =~ /NOT SPECIFIED/) ? nil : e[:genus]&.join(' '), # genus
(e[:subgenus] =~ /NOT SPECIFIED/) ? nil : e[:subgenus]&.join(' '), # subgenus
(e[:species] =~ /NOT SPECIFIED/) ? nil : e[:species]&.join(' '), # species
(e[:subspecies] =~ /NOT SPECIFIED/) ? nil : e[:subspecies]&.join(' '), # subspecies
(e[:genus] =~ /NOT SPECIFIED/) ? nil : e[:genus]&.last, # genus
(e[:subgenus] =~ /NOT SPECIFIED/) ? nil : e[:subgenus]&.last, # subgenus (no parens)
(e[:species] =~ /NOT SPECIFIED/) ? nil : e[:species]&.last, # species
infraspecific_epithet, # infraspecificEpithet
nil, # publishedInID |
nil, # publishedInPage |-- Decisions is that these add to Synonym table
nil, # publishedInYear |
Expand Down

0 comments on commit 56e1372

Please sign in to comment.