Class: TaxonNameRelationship::Hybrid

Inherits:
TaxonNameRelationship
  • Object
show all
Defined in:
app/models/taxon_name_relationship/hybrid.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.assignableObject



24
25
26
# File 'app/models/taxon_name_relationship/hybrid.rb', line 24

def self.assignable
  true
end

.disjoint_object_classesObject



28
29
30
# File 'app/models/taxon_name_relationship/hybrid.rb', line 28

def self.disjoint_object_classes
  ::ICZN + ['TaxonNameClassification::Icn::Hybrid']
end

.disjoint_subject_classesObject



17
18
19
20
21
22
# File 'app/models/taxon_name_relationship/hybrid.rb', line 17

def self.disjoint_subject_classes
  ::ICZN +
      self.collect_descendants_and_itself_to_s(TaxonNameClassification::Icn::NotEffectivelyPublished,
                                               TaxonNameClassification::Icn::EffectivelyPublished::InvalidlyPublished,
                                               TaxonNameClassification::Icn::EffectivelyPublished::ValidlyPublished::Illegitimate)
end

.nomenclatural_priorityObject



3
4
5
# File 'app/models/taxon_name_relationship/hybrid.rb', line 3

def self.nomenclatural_priority
  :reverse
end

.valid_object_ranksObject

right_side



13
14
15
# File 'app/models/taxon_name_relationship/hybrid.rb', line 13

def self.valid_object_ranks
  ::ICN
end

.valid_subject_ranksObject

left_side



8
9
10
# File 'app/models/taxon_name_relationship/hybrid.rb', line 8

def self.valid_subject_ranks
  ::ICN
end

Instance Method Details

#set_cached_names_for_taxon_namesObject (protected)



42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'app/models/taxon_name_relationship/hybrid.rb', line 42

def set_cached_names_for_taxon_names
  begin
    TaxonName.transaction do
      t = object_taxon_name
      n = t.get_full_name
      t.update_columns(
        cached: n,
        cached_html: t.get_full_name_html(n)
      )
    end
  end
  true
end

#sv_coordinated_taxaObject



32
33
34
# File 'app/models/taxon_name_relationship/hybrid.rb', line 32

def sv_coordinated_taxa
  true # not applicable
end

#sv_coordinated_taxa_objectObject



36
37
38
# File 'app/models/taxon_name_relationship/hybrid.rb', line 36

def sv_coordinated_taxa_object
  true # not applicable
end