Class: TaxonNameRelationship::Icn
- Inherits:
-
TaxonNameRelationship
- Object
- TaxonNameRelationship
- TaxonNameRelationship::Icn
- Defined in:
- app/models/taxon_name_relationship/icn.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Accepting, Unaccepting
Constant Summary collapse
- NOMEN_URI =
'http://purl.obolibrary.org/obo/NOMEN_0000232'.freeze
Class Method Summary collapse
- .disjoint_object_classes ⇒ Object
- .disjoint_subject_classes ⇒ Object
-
.valid_object_ranks ⇒ Object
right_side.
-
.valid_subject_ranks ⇒ Object
left_side.
Instance Method Summary collapse
Class Method Details
.disjoint_object_classes ⇒ Object
21 22 23 24 25 26 |
# File 'app/models/taxon_name_relationship/icn.rb', line 21 def self.disjoint_object_classes ICZN_TAXON_NAME_CLASSIFICATION_NAMES + ICNP_TAXON_NAME_CLASSIFICATION_NAMES + self.collect_descendants_and_itself_to_s(TaxonNameClassification::Icn::NotEffectivelyPublished, TaxonNameClassification::Icn::EffectivelyPublished::InvalidlyPublished, TaxonNameClassification::Icn::EffectivelyPublished::ValidlyPublished::Illegitimate) end |
.disjoint_subject_classes ⇒ Object
17 18 19 |
# File 'app/models/taxon_name_relationship/icn.rb', line 17 def self.disjoint_subject_classes ICZN_TAXON_NAME_CLASSIFICATION_NAMES + ICNP_TAXON_NAME_CLASSIFICATION_NAMES + ICVCN_TAXON_NAME_CLASSIFICATION_NAMES end |
.valid_object_ranks ⇒ Object
right_side
13 14 15 |
# File 'app/models/taxon_name_relationship/icn.rb', line 13 def self.valid_object_ranks ::ICN end |
.valid_subject_ranks ⇒ Object
left_side
8 9 10 |
# File 'app/models/taxon_name_relationship/icn.rb', line 8 def self.valid_subject_ranks ::ICN end |
Instance Method Details
#sv_validate_priority ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'app/models/taxon_name_relationship/icn.rb', line 28 def sv_validate_priority if self.type_class.nomenclatural_priority == :direct date1 = self.subject_taxon_name.cached_nomenclature_date date2 = self.object_taxon_name.cached_nomenclature_date if !!date1 && !!date2 && subject_invalid_statuses.empty? if TaxonNameRelationship.where_subject_is_taxon_name(self.subject_taxon_name).with_two_type_bases('TaxonNameRelationship::Icn::Accepting::Conserved', 'TaxonNameRelationship::Icn::Accepting::Sanctioned').not_self(self).empty? soft_validations.add(:type, "#{self.subject_status.capitalize} #{self.subject_taxon_name.} should not be older than #{self.object_status} #{self.object_taxon_name.}, unless it is also conserved or sanctioned name") end end end end |