Module: Recon::Type::ReconType
- Defined in:
- lib/ds/recon/type/recon_type.rb
Overview
The Recon::Type::ReconType module should be included in all Recon::Type classes. It provides access to recon type configuration information. Its methods support the lookup and enrichment of DS::Extractor::BaseTerm object values.
ReconType methods define recon CSV columns, the c, the columns retrieved fom the DS data dictionaries, the lookup key columns, the import CSV as recorded column (eg., author_as_recorded), and, for validation purposes, the balanced columns; that is, those columns in the recon CSVs that must have equal numbers of subfields in each row.
Classes that include Recon::Type::ReconType should define these constants
SET_NAME :: the name of the recon set; e.g., :places
RECON_CSV_HEADERS :: the recon CSV headers; e.g., [:place_as_recorded, :authorized_label, :structured_value, :ds_qid]
LOOKUP_COLUMNS :: the columns to extract from the data dictionaries; e.g., [:authorized_label, :structured_value, :ds_qid]
KEY_COLUMNS :: the key columns in the recon CSV; e.g., [:place_as_recorded]
AS_RECORDED_COLUMN :: the column in the recon CSV that holds the as-recorded value; e.g., :author_as_recorded
DELIMITER_MAP :: a map of delimiters to replace in the recon CSV values: { ORIGINAL => REPLACEMENT}; e.g., { '|' => ';' }
METHOD_NAME :: the name of the DS::Extractor methods; e.g., [:extract_places]
BALANCED_COLUMNS :: the columns that must have equal numbers of subfields; e.g., { places: [:structured_value, :authorized_label] }
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
33 34 35 |
# File 'lib/ds/recon/type/recon_type.rb', line 33 def self.included base base.extend ClassMethods end |