Class: Rafflesia::DatasetCompareData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DatasetCompareData
- Defined in:
- lib/rafflesia/datasets/dataset_compare_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ added_structures: :added_structures, added_tables: :added_tables, changed_structures: :changed_structures, changed_tables: :changed_tables, dataset_name_a: :dataset_name_a, dataset_name_b: :dataset_name_b, dataset_version_a: :dataset_version_a, dataset_version_b: :dataset_version_b, identical: :identical, manifest_path_a: :manifest_path_a, manifest_path_b: :manifest_path_b, manifest_sha256_a: :manifest_sha_256_a, manifest_sha256_b: :manifest_sha_256_b, removed_structures: :removed_structures, removed_tables: :removed_tables, row_count_a: :row_count_a, row_count_b: :row_count_b, row_count_delta: :row_count_delta, source_a: :source_a, source_b: :source_b, structure_count_a: :structure_count_a, structure_count_b: :structure_count_b, table_artifact_count_a: :table_artifact_count_a, table_artifact_count_b: :table_artifact_count_b }.freeze
Instance Attribute Summary collapse
-
#added_structures ⇒ Object
Returns the value of attribute added_structures.
-
#added_tables ⇒ Object
Returns the value of attribute added_tables.
-
#changed_structures ⇒ Object
Returns the value of attribute changed_structures.
-
#changed_tables ⇒ Object
Returns the value of attribute changed_tables.
-
#dataset_name_a ⇒ Object
Returns the value of attribute dataset_name_a.
-
#dataset_name_b ⇒ Object
Returns the value of attribute dataset_name_b.
-
#dataset_version_a ⇒ Object
Returns the value of attribute dataset_version_a.
-
#dataset_version_b ⇒ Object
Returns the value of attribute dataset_version_b.
-
#identical ⇒ Object
Returns the value of attribute identical.
-
#manifest_path_a ⇒ Object
Returns the value of attribute manifest_path_a.
-
#manifest_path_b ⇒ Object
Returns the value of attribute manifest_path_b.
-
#manifest_sha_256_a ⇒ Object
Returns the value of attribute manifest_sha_256_a.
-
#manifest_sha_256_b ⇒ Object
Returns the value of attribute manifest_sha_256_b.
-
#removed_structures ⇒ Object
Returns the value of attribute removed_structures.
-
#removed_tables ⇒ Object
Returns the value of attribute removed_tables.
-
#row_count_a ⇒ Object
Returns the value of attribute row_count_a.
-
#row_count_b ⇒ Object
Returns the value of attribute row_count_b.
-
#row_count_delta ⇒ Object
Returns the value of attribute row_count_delta.
-
#source_a ⇒ Object
Returns the value of attribute source_a.
-
#source_b ⇒ Object
Returns the value of attribute source_b.
-
#structure_count_a ⇒ Object
Returns the value of attribute structure_count_a.
-
#structure_count_b ⇒ Object
Returns the value of attribute structure_count_b.
-
#table_artifact_count_a ⇒ Object
Returns the value of attribute table_artifact_count_a.
-
#table_artifact_count_b ⇒ Object
Returns the value of attribute table_artifact_count_b.
Instance Method Summary collapse
-
#initialize(json) ⇒ DatasetCompareData
constructor
A new instance of DatasetCompareData.
Constructor Details
#initialize(json) ⇒ DatasetCompareData
Returns a new instance of DatasetCompareData.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 61 def initialize(json) super() hash = self.class.normalize(json) @added_structures = (hash[:added_structures] || []).map { |item| item ? Rafflesia::DatasetStructureDiff.new(item) : nil } @added_tables = (hash[:added_tables] || []).map { |item| item ? Rafflesia::DatasetTableArtifactDiff.new(item) : nil } @changed_structures = (hash[:changed_structures] || []).map { |item| item ? Rafflesia::DatasetStructureDiff.new(item) : nil } @changed_tables = (hash[:changed_tables] || []).map { |item| item ? Rafflesia::DatasetTableArtifactDiff.new(item) : nil } @dataset_name_a = hash[:dataset_name_a] @dataset_name_b = hash[:dataset_name_b] @dataset_version_a = hash[:dataset_version_a] @dataset_version_b = hash[:dataset_version_b] @identical = hash[:identical] @manifest_path_a = hash[:manifest_path_a] @manifest_path_b = hash[:manifest_path_b] @manifest_sha_256_a = hash[:manifest_sha256_a] @manifest_sha_256_b = hash[:manifest_sha256_b] @removed_structures = (hash[:removed_structures] || []).map { |item| item ? Rafflesia::DatasetStructureDiff.new(item) : nil } @removed_tables = (hash[:removed_tables] || []).map { |item| item ? Rafflesia::DatasetTableArtifactDiff.new(item) : nil } @row_count_a = hash[:row_count_a] @row_count_b = hash[:row_count_b] @row_count_delta = hash[:row_count_delta] @source_a = hash[:source_a] @source_b = hash[:source_b] @structure_count_a = hash[:structure_count_a] @structure_count_b = hash[:structure_count_b] @table_artifact_count_a = hash[:table_artifact_count_a] @table_artifact_count_b = hash[:table_artifact_count_b] end |
Instance Attribute Details
#added_structures ⇒ Object
Returns the value of attribute added_structures.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def added_structures @added_structures end |
#added_tables ⇒ Object
Returns the value of attribute added_tables.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def added_tables @added_tables end |
#changed_structures ⇒ Object
Returns the value of attribute changed_structures.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def changed_structures @changed_structures end |
#changed_tables ⇒ Object
Returns the value of attribute changed_tables.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def changed_tables @changed_tables end |
#dataset_name_a ⇒ Object
Returns the value of attribute dataset_name_a.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def dataset_name_a @dataset_name_a end |
#dataset_name_b ⇒ Object
Returns the value of attribute dataset_name_b.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def dataset_name_b @dataset_name_b end |
#dataset_version_a ⇒ Object
Returns the value of attribute dataset_version_a.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def dataset_version_a @dataset_version_a end |
#dataset_version_b ⇒ Object
Returns the value of attribute dataset_version_b.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def dataset_version_b @dataset_version_b end |
#identical ⇒ Object
Returns the value of attribute identical.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def identical @identical end |
#manifest_path_a ⇒ Object
Returns the value of attribute manifest_path_a.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def manifest_path_a @manifest_path_a end |
#manifest_path_b ⇒ Object
Returns the value of attribute manifest_path_b.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def manifest_path_b @manifest_path_b end |
#manifest_sha_256_a ⇒ Object
Returns the value of attribute manifest_sha_256_a.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def manifest_sha_256_a @manifest_sha_256_a end |
#manifest_sha_256_b ⇒ Object
Returns the value of attribute manifest_sha_256_b.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def manifest_sha_256_b @manifest_sha_256_b end |
#removed_structures ⇒ Object
Returns the value of attribute removed_structures.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def removed_structures @removed_structures end |
#removed_tables ⇒ Object
Returns the value of attribute removed_tables.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def removed_tables @removed_tables end |
#row_count_a ⇒ Object
Returns the value of attribute row_count_a.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def row_count_a @row_count_a end |
#row_count_b ⇒ Object
Returns the value of attribute row_count_b.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def row_count_b @row_count_b end |
#row_count_delta ⇒ Object
Returns the value of attribute row_count_delta.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def row_count_delta @row_count_delta end |
#source_a ⇒ Object
Returns the value of attribute source_a.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def source_a @source_a end |
#source_b ⇒ Object
Returns the value of attribute source_b.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def source_b @source_b end |
#structure_count_a ⇒ Object
Returns the value of attribute structure_count_a.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def structure_count_a @structure_count_a end |
#structure_count_b ⇒ Object
Returns the value of attribute structure_count_b.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def structure_count_b @structure_count_b end |
#table_artifact_count_a ⇒ Object
Returns the value of attribute table_artifact_count_a.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def table_artifact_count_a @table_artifact_count_a end |
#table_artifact_count_b ⇒ Object
Returns the value of attribute table_artifact_count_b.
35 36 37 |
# File 'lib/rafflesia/datasets/dataset_compare_data.rb', line 35 def table_artifact_count_b @table_artifact_count_b end |