Class: BiocurationClass
- Inherits:
-
ControlledVocabularyTerm
- Object
- ActiveRecord::Base
- ApplicationRecord
- ControlledVocabularyTerm
- BiocurationClass
- Includes:
- Shared::Tags
- Defined in:
- app/models/biocuration_class.rb
Overview
A BiocurationClass is used with BiocurationClassification to organize a collection according to some biological categories (attributes). Biocuration classes help to answer the question “where might I find this in the collection.”
For example, in an insect collection, this may be things like “adult”, “pupae”, “male”, “female”. More generally they could be categories like “skulls”, “furs”, or perhaps even “wet” or “dry”. It is important to note that these categorizations are for organization and curatorial purposes, they are not primary assertions that the collection object itself has the biological property “maleness”, or “adultness”. That is, in most, but not all, cases we can infer that the classification means that the collection object is a “male” or “adult”.
Constant Summary
Constants inherited from ControlledVocabularyTerm
ControlledVocabularyTerm::ALTERNATE_VALUES_FOR
Constants included from SoftValidation
SoftValidation::ANCESTORS_WITH_SOFT_VALIDATIONS
Instance Attribute Summary
Attributes inherited from ControlledVocabularyTerm
#definition, #name, #project_id, #type, #uri, #uri_relation
Instance Method Summary collapse
Methods included from Shared::Tags
#reject_tags, #tag_with, #tagged?, #tagged_with?
Methods inherited from ControlledVocabularyTerm
#uri_relation_is_a_skos_relation
Methods included from SoftValidation
#clear_soft_validations, #fix_for, #fix_soft_validations, #soft_fixed?, #soft_valid?, #soft_validate, #soft_validated?, #soft_validations, #soft_validators
Methods included from Shared::IsData
#errors_excepting, #full_error_messages_excepting, #identical, #is_community?, #is_destroyable?, #is_editable?, #is_in_use?, #is_in_users_projects?, #metamorphosize, #similar
Methods included from Shared::HasPapertrail
#attribute_updated, #attribute_updater
Methods included from Shared::AlternateValues
#all_values_for, #alternate_valued?
Methods included from Housekeeping
#has_polymorphic_relationship?
Methods inherited from ApplicationRecord
Instance Method Details
#check_dwc_occurrence_basis ⇒ Object (protected)
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/models/biocuration_class.rb', line 24 def check_dwc_occurrence_basis if saved_change_to_attribute?(:uri, from: DWC_FOSSIL_URI) biological_collection_objects.each do |o| o.dwc_occurrence.update_attribute(:basisOfRecord, 'PreservedSpecimen') end end if saved_change_to_attribute?(:uri, to: DWC_FOSSIL_URI) biological_collection_objects.each do |o| o.dwc_occurrence.update_attribute(:basisOfRecord, 'FossilSpecimen') end end end |
#taggable_with ⇒ Object
18 19 20 |
# File 'app/models/biocuration_class.rb', line 18 def taggable_with %w{BiocurationGroup} end |