Class: Catalog::Timeline

Inherits:
Catalog show all
Defined in:
lib/catalog/timeline.rb

Overview

A Catalog::Timeline is a catalog that merges biolgological concepts (OTUs) with their nomenclature.

Filtering intent:

Level 1: [Nomenclature (origin != 'otu'), Protonym (origin == 'protonym', OTU (biology), origin == 'otu'] - mutually exclusive
Level 2 (All): [First (is_first: true,) Valid (is_valid: true)]

Visualizing intent:

First valid - (origin: protonym, is_valid: true, is_first: true)
Origin - (origin)

Instance Attribute Summary

Attributes inherited from Catalog

#catalog_targets, #entries

Instance Method Summary collapse

Methods inherited from Catalog

all_dates, chronological_item_sort, #citations, #entries_sorted, #entry_sort_valid?, #initialize, #items, #items_chronologically, #objects_for_source, #reference_object_global_id, #reference_object_valid_taxon_name_global_id, #sources, #sources_to_json, topic_year_metadata, #topics, #topics_to_json, year_hash, year_metadata

Constructor Details

This class inherits a constructor from Catalog

Instance Method Details

#buildObject



16
17
18
19
20
21
22
# File 'lib/catalog/timeline.rb', line 16

def build
  catalog_targets.each do |t|
    @entries.push(Catalog::Otu::Entry.new(t))
    @entries.push(Catalog::Nomenclature::Entry.new(t.taxon_name)) if t.taxon_name
  end
  true
end