Class: TaxonNameClassification::Iczn::Unavailable

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

Direct Known Subclasses

BasedOnSuppressedGenus, Excluded, IncorrectOriginalSpelling, LessThanTwoLetters, NomenNudum, NonBinomial, NotLatin, NotLatinizedAfter1899, NotLatinizedBefore1900AndNotAccepted, NotNominativePlural, NotNounInNominativeSingular, NotNounOrAdjective, NotScientificPlural, PreLinnean, Suppressed, UnavailableAndNotUsedAsValidBefore2000, UnavailableAndRejectedByAuthorBefore2000, UnavailableUnderIczn, VarietyOrFormAfter1960

Defined Under Namespace

Modules: InnerClass, InnerClassFamilyGroup, InnerClassFamilyGroupUnavailableBefore2000, InnerClassGenusGroup, InnerClassSpeciesGroup Classes: BasedOnSuppressedGenus, Excluded, IncorrectOriginalSpelling, LessThanTwoLetters, NomenNudum, NonBinomial, NotLatin, NotLatinizedAfter1899, NotLatinizedBefore1900AndNotAccepted, NotNominativePlural, NotNounInNominativeSingular, NotNounOrAdjective, NotScientificPlural, PreLinnean, Suppressed, UnavailableAndNotUsedAsValidBefore2000, UnavailableAndRejectedByAuthorBefore2000, UnavailableUnderIczn, VarietyOrFormAfter1960

Constant Summary

NOMEN_URI =
'http://purl.obolibrary.org/obo/NOMEN_0000168'.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

applicable_ranks, code_applicability_start_year

Methods inherited from TaxonNameClassification

#annotated_object, annotates?, applicable_ranks, 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?

Class Method Details

+ (Object) assignable



3
4
5
# File 'app/models/taxon_name_classification/iczn/unavailable.rb', line 3

def self.assignable
  true
end

+ (Object) disjoint_taxon_name_classes



14
15
16
17
# File 'app/models/taxon_name_classification/iczn/unavailable.rb', line 14

def self.disjoint_taxon_name_classes
  self.parent.disjoint_taxon_name_classes +
      self.collect_descendants_and_itself_to_s(TaxonNameClassification::Iczn::Available)
end

+ (Object) gbif_status



19
20
21
# File 'app/models/taxon_name_classification/iczn/unavailable.rb', line 19

def self.gbif_status
  'invalidum'
end

Instance Method Details

- (Object) classification_label



7
8
9
10
# File 'app/models/taxon_name_classification/iczn/unavailable.rb', line 7

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

- (Object) sv_not_specific_classes



200
201
202
# File 'app/models/taxon_name_classification/iczn/unavailable.rb', line 200

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