Class: TaxonNameClassification::Iczn::Unavailable::NomenNudum

Inherits:
TaxonNameClassification::Iczn::Unavailable show all
Defined in:
app/models/taxon_name_classification/iczn/unavailable/nomen_nudum.rb

Defined Under Namespace

Modules: FamilyGroupRanks, GenusGroupRanks, InnerClass, InnerClassAfter1930, InnerClassAfter1930GenusGroup, InnerClassAfter1960, InnerClassAfter1999, InnerClassAfter1999FamilyGroup, InnerClassAfter1999GenusGroup, InnerClassAfter1999SpeciesGroup, InnerClassFamilyGroup, InnerClassSpeciesGroup, InnerClassStart2012, SpeciesGroupRanks Classes: AmbiguousGenericPlacement, AnonymousAuthorshipAfter1950, CitationOfUnavailableName, ConditionallyProposedAfter1960, ElectronicOnlyPublicationBefore2012, ElectronicPublicationNotInPdfFormat, ElectronicPublicationNotRegisteredInZoobank, ElectronicPublicationWithoutIssnOrIsbn, IchnotaxonWithoutTypeSpeciesAfter1999, InterpolatedName, NoDescription, NoDiagnosisAfter1930, NoTypeDepositionStatementAfter1999, NoTypeFixationAfter1930, NoTypeGenusCitationAfter1999, NoTypeSpecimenFixationAfter1999, NotBasedOnAvailableGenusName, NotFromGenusName, NotIndicatedAsNewAfter1999, PublishedAsSynonymAfter1960, PublishedAsSynonymAndNotValidatedBefore1961, ReplacementNameWithoutTypeFixationAfter1930

Constant Summary collapse

NOMEN_URI =
'http://purl.obolibrary.org/obo/NOMEN_0000174'.freeze

Constants included from SoftValidation

SoftValidation::ANCESTORS_WITH_SOFT_VALIDATIONS

Instance Attribute Summary

Attributes inherited from TaxonNameClassification

#project_id, #taxon_name_id, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from TaxonNameClassification::Iczn::Unavailable

assignable

Methods inherited from TaxonNameClassification::Iczn

applicable_ranks, code_applicability_start_year

Methods inherited from TaxonNameClassification

#annotated_object, annotates?, applicable_ranks, assignable, code_applicability_end_year, code_applicability_start_year, collect_descendants_and_itself_to_s, collect_descendants_to_s, collect_to_s, label, #nomen_id, nomen_uri, #nomenclature_code, #nomenclature_code_matches, possible_genus_endings, possible_species_endings, questionable_species_endings, #set_cached, #set_cached_names_for_taxon_names, #sv_proper_classification, #sv_proper_year, #sv_validate_disjoint_classes, #type_class, #type_class=, #type_name, #validate_taxon_name_classification, #validate_uniqueness_of_latinized

Methods included from SoftValidation

#clear_soft_validations, #fix_soft_validations, #soft_fixed?, #soft_valid?, #soft_validate, #soft_validated?, #soft_validations

Methods included from Housekeeping

#has_polymorphic_relationship?

Methods inherited from ApplicationRecord

transaction_with_retry

Class Method Details

.disjoint_taxon_name_classesObject



15
16
17
18
19
20
21
# File 'app/models/taxon_name_classification/iczn/unavailable/nomen_nudum.rb', line 15

def self.disjoint_taxon_name_classes
  self.parent.disjoint_taxon_name_classes +
      self.collect_descendants_and_itself_to_s(TaxonNameClassification::Iczn::Unavailable::Excluded,
          TaxonNameClassification::Iczn::Unavailable::Suppressed,
          TaxonNameClassification::Iczn::Unavailable::NonBinomial) +
      self.collect_to_s(TaxonNameClassification::Iczn::Unavailable)
end

.gbif_statusObject



5
6
7
# File 'app/models/taxon_name_classification/iczn/unavailable/nomen_nudum.rb', line 5

def self.gbif_status
  'nudum'
end

Instance Method Details

#classification_labelObject



9
10
11
12
# File 'app/models/taxon_name_classification/iczn/unavailable/nomen_nudum.rb', line 9

def classification_label
  return 'nomen nudum' if type_name.to_s == 'TaxonNameClassification::Iczn::Unavailable::NomenNudum'
  'nomen nudum: ' + type_name.demodulize.underscore.humanize.downcase.gsub(/\d+/, ' \0 ').squish
end

#sv_not_specific_classesObject



360
361
362
# File 'app/models/taxon_name_classification/iczn/unavailable/nomen_nudum.rb', line 360

def sv_not_specific_classes
  soft_validations.add(:type, 'Please specify the reasons for the name being Nomen Nudum')
end