Class: TaxonNameRelationship::Typification::Genus::Subsequent

Inherits:
TaxonNameRelationship::Typification::Genus show all
Defined in:
app/models/taxon_name_relationship/typification/genus/subsequent.rb

Defined Under Namespace

Classes: RulingByCommission, SubsequentDesignation, SubsequentMonotypy

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from TaxonNameRelationship::Typification::Genus

assignable, valid_object_ranks, valid_subject_ranks, #validate_subject_and_object_ranks

Methods inherited from TaxonNameRelationship::Typification

assignable, disjoint_classes, disjoint_object_classes, disjoint_subject_classes, nomenclatural_priority, #object_status_connector_to_subject, #subject_status_connector_to_object, #sv_coordinated_taxa_object, #sv_specific_relationship

Class Method Details

.assignment_methodObject



18
19
20
# File 'app/models/taxon_name_relationship/typification/genus/subsequent.rb', line 18

def self.assignment_method
  :type_of_genus_by_subsequent_designation_or_monotypy
end

.disjoint_taxon_name_relationshipsObject



3
4
5
6
7
8
# File 'app/models/taxon_name_relationship/typification/genus/subsequent.rb', line 3

def self.disjoint_taxon_name_relationships
  self.parent.disjoint_taxon_name_relationships +
      self.collect_descendants_and_itself_to_s(TaxonNameRelationship::Typification::Genus::Original,
                                               TaxonNameRelationship::Typification::Genus::Tautonomy,) +
      self.collect_to_s(TaxonNameRelationship::Typification::Genus)
end

.inverse_assignment_methodObject



22
23
24
# File 'app/models/taxon_name_relationship/typification/genus/subsequent.rb', line 22

def self.inverse_assignment_method
  :type_species_by_subsequent_designation_or_monotypy
end

Instance Method Details

#object_statusObject



10
11
12
# File 'app/models/taxon_name_relationship/typification/genus/subsequent.rb', line 10

def object_status
  'type of genus by subsequent designation or monotypy'
end

#subject_statusObject



14
15
16
# File 'app/models/taxon_name_relationship/typification/genus/subsequent.rb', line 14

def subject_status
  'type species by subsequent designation or monotypy'
end

#sv_not_specific_relationshipObject (protected)



40
41
42
# File 'app/models/taxon_name_relationship/typification/genus/subsequent.rb', line 40

def sv_not_specific_relationship
  soft_validations.add(:type, 'Please specify if this is Subsequent Designation or Subsequent Monotypy')
end

#sv_synonym_relationshipObject (protected)



28
29
30
31
32
33
34
35
36
37
38
# File 'app/models/taxon_name_relationship/typification/genus/subsequent.rb', line 28

def sv_synonym_relationship
  if self.source
    date1 = self.source.cached_nomenclature_date.to_time
    date2 = self.subject_taxon_name.cached_nomenclature_date
    if !!date1 && !!date2
      soft_validations.add(:base, "#{self.subject_taxon_name.cached_html_name_and_author_year} was not described at the time of citation (#{date1.to_date})") if date2.to_date > date1.to_date
    end
  else
    soft_validations.add(:base, 'The original publication is not selected')
  end
end