Class: Rafflesia::MapModelCandidateExportData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/maps/map_model_candidate_export_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  archive_artifact_manifest_object_id: :archive_artifact_manifest_object_id,
  archive_artifact_manifest_path: :archive_artifact_manifest_path,
  candidate_pair_count: :candidate_pair_count,
  dataset_manifest_object: :dataset_manifest_object,
  dataset_manifest_path: :dataset_manifest_path,
  dataset_name: :dataset_name,
  dataset_version: :dataset_version,
  group_count: :group_count,
  manifest_object: :manifest_object,
  manifest_path: :manifest_path,
  output_dir: :output_dir,
  rows: :rows,
  table_object: :table_object,
  table_path: :table_path
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ MapModelCandidateExportData

Returns a new instance of MapModelCandidateExportData.



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 41

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @archive_artifact_manifest_object_id = hash[:archive_artifact_manifest_object_id]
  @archive_artifact_manifest_path = hash[:archive_artifact_manifest_path]
  @candidate_pair_count = hash[:candidate_pair_count]
  @dataset_manifest_object = hash[:dataset_manifest_object] ? Rafflesia::ObjectRef.new(hash[:dataset_manifest_object]) : nil
  @dataset_manifest_path = hash[:dataset_manifest_path]
  @dataset_name = hash[:dataset_name]
  @dataset_version = hash[:dataset_version]
  @group_count = hash[:group_count]
  @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil
  @manifest_path = hash[:manifest_path]
  @output_dir = hash[:output_dir]
  @rows = (hash[:rows] || []).map { |item| item ? Rafflesia::MapModelCandidatePairRow.new(item) : nil }
  @table_object = hash[:table_object] ? Rafflesia::ObjectRef.new(hash[:table_object]) : nil
  @table_path = hash[:table_path]
end

Instance Attribute Details

#archive_artifact_manifest_object_idObject

Returns the value of attribute archive_artifact_manifest_object_id.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def archive_artifact_manifest_object_id
  @archive_artifact_manifest_object_id
end

#archive_artifact_manifest_pathObject

Returns the value of attribute archive_artifact_manifest_path.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def archive_artifact_manifest_path
  @archive_artifact_manifest_path
end

#candidate_pair_countObject

Returns the value of attribute candidate_pair_count.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def candidate_pair_count
  @candidate_pair_count
end

#dataset_manifest_objectObject

Returns the value of attribute dataset_manifest_object.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def dataset_manifest_object
  @dataset_manifest_object
end

#dataset_manifest_pathObject

Returns the value of attribute dataset_manifest_path.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def dataset_manifest_path
  @dataset_manifest_path
end

#dataset_nameObject

Returns the value of attribute dataset_name.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def dataset_name
  @dataset_name
end

#dataset_versionObject

Returns the value of attribute dataset_version.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def dataset_version
  @dataset_version
end

#group_countObject

Returns the value of attribute group_count.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def group_count
  @group_count
end

#manifest_objectObject

Returns the value of attribute manifest_object.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def manifest_object
  @manifest_object
end

#manifest_pathObject

Returns the value of attribute manifest_path.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def manifest_path
  @manifest_path
end

#output_dirObject

Returns the value of attribute output_dir.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def output_dir
  @output_dir
end

#rowsObject

Returns the value of attribute rows.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def rows
  @rows
end

#table_objectObject

Returns the value of attribute table_object.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def table_object
  @table_object
end

#table_pathObject

Returns the value of attribute table_path.



25
26
27
# File 'lib/rafflesia/maps/map_model_candidate_export_data.rb', line 25

def table_path
  @table_path
end