Class: Rafflesia::RelationImportData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/annotations/relation_import_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  auxiliary_input_sha256: :auxiliary_input_sha_256,
  auxiliary_source_object: :auxiliary_source_object,
  batch_rows: :batch_rows,
  checkpoint_path: :checkpoint_path,
  columns: :columns,
  completed_batch_count: :completed_batch_count,
  database: :database,
  id: :id,
  input_row_count: :input_row_count,
  input_sha256: :input_sha_256,
  is_resumed: :is_resumed,
  mapping_family: :mapping_family,
  object: :object,
  object_ref: :object_ref,
  peak_buffered_records: :peak_buffered_records,
  relation: :relation,
  relation_id: :relation_id,
  release: :release,
  release_digest: :release_digest,
  required_columns: :required_columns,
  row_count: :row_count,
  skipped_row_count: :skipped_row_count,
  source_doi: :source_doi,
  source_layout: :source_layout,
  source_object: :source_object,
  source_record_id: :source_record_id,
  source_url: :source_url,
  validation: :validation
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ RelationImportData

Returns a new instance of RelationImportData.



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 69

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @auxiliary_input_sha_256 = hash[:auxiliary_input_sha256]
  @auxiliary_source_object = hash[:auxiliary_source_object] ? Rafflesia::ObjectRef.new(hash[:auxiliary_source_object]) : nil
  @batch_rows = hash[:batch_rows]
  @checkpoint_path = hash[:checkpoint_path]
  @columns = (hash[:columns] || []).map { |item| item ? Rafflesia::TableColumn.new(item) : nil }
  @completed_batch_count = hash[:completed_batch_count]
  @database = hash[:database]
  @id = hash[:id]
  @input_row_count = hash[:input_row_count]
  @input_sha_256 = hash[:input_sha256]
  @is_resumed = hash[:is_resumed]
  @mapping_family = hash[:mapping_family]
  @object = hash[:object]
  @object_ref = hash[:object_ref] ? Rafflesia::ObjectRef.new(hash[:object_ref]) : nil
  @peak_buffered_records = hash[:peak_buffered_records]
  @relation = hash[:relation]
  @relation_id = hash[:relation_id]
  @release = hash[:release]
  @release_digest = hash[:release_digest]
  @required_columns = (hash[:required_columns] || [])
  @row_count = hash[:row_count]
  @skipped_row_count = hash[:skipped_row_count]
  @source_doi = hash[:source_doi]
  @source_layout = hash[:source_layout]
  @source_object = hash[:source_object] ? Rafflesia::ObjectRef.new(hash[:source_object]) : nil
  @source_record_id = hash[:source_record_id]
  @source_url = hash[:source_url]
  @validation = hash[:validation]
end

Instance Attribute Details

#auxiliary_input_sha_256Object

Returns the value of attribute auxiliary_input_sha_256.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def auxiliary_input_sha_256
  @auxiliary_input_sha_256
end

#auxiliary_source_objectObject

Returns the value of attribute auxiliary_source_object.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def auxiliary_source_object
  @auxiliary_source_object
end

#batch_rowsObject

Returns the value of attribute batch_rows.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def batch_rows
  @batch_rows
end

#checkpoint_pathObject

Returns the value of attribute checkpoint_path.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def checkpoint_path
  @checkpoint_path
end

#columnsObject

Returns the value of attribute columns.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def columns
  @columns
end

#completed_batch_countObject

Returns the value of attribute completed_batch_count.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def completed_batch_count
  @completed_batch_count
end

#databaseObject

Returns the value of attribute database.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def database
  @database
end

#idObject

Returns the value of attribute id.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def id
  @id
end

#input_row_countObject

Returns the value of attribute input_row_count.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def input_row_count
  @input_row_count
end

#input_sha_256Object

Returns the value of attribute input_sha_256.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def input_sha_256
  @input_sha_256
end

#is_resumedObject

Returns the value of attribute is_resumed.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def is_resumed
  @is_resumed
end

#mapping_familyObject

Returns the value of attribute mapping_family.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def mapping_family
  @mapping_family
end

#objectObject

Returns the value of attribute object.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def object
  @object
end

#object_refObject

Returns the value of attribute object_ref.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def object_ref
  @object_ref
end

#peak_buffered_recordsObject

Returns the value of attribute peak_buffered_records.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def peak_buffered_records
  @peak_buffered_records
end

#relationObject

Returns the value of attribute relation.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def relation
  @relation
end

#relation_idObject

Returns the value of attribute relation_id.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def relation_id
  @relation_id
end

#releaseObject

Returns the value of attribute release.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def release
  @release
end

#release_digestObject

Returns the value of attribute release_digest.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def release_digest
  @release_digest
end

#required_columnsObject

Returns the value of attribute required_columns.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def required_columns
  @required_columns
end

#row_countObject

Returns the value of attribute row_count.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def row_count
  @row_count
end

#skipped_row_countObject

Returns the value of attribute skipped_row_count.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def skipped_row_count
  @skipped_row_count
end

#source_doiObject

Returns the value of attribute source_doi.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def source_doi
  @source_doi
end

#source_layoutObject

Returns the value of attribute source_layout.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def source_layout
  @source_layout
end

#source_objectObject

Returns the value of attribute source_object.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def source_object
  @source_object
end

#source_record_idObject

Returns the value of attribute source_record_id.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def source_record_id
  @source_record_id
end

#source_urlObject

Returns the value of attribute source_url.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def source_url
  @source_url
end

#validationObject

Returns the value of attribute validation.



39
40
41
# File 'lib/rafflesia/annotations/relation_import_data.rb', line 39

def validation
  @validation
end