Class: Rafflesia::ArchiveArtifactImportData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/artifacts/archive_artifact_import_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  artifact_count: :artifact_count,
  artifacts: :artifacts,
  association_candidate_count: :association_candidate_count,
  association_candidates: :association_candidates,
  association_count: :association_count,
  associations: :associations,
  failure_count: :failure_count,
  imported_map_count: :imported_map_count,
  imported_maps: :imported_maps,
  imported_structure_count: :imported_structure_count,
  imported_structures: :imported_structures,
  include_kinds: :include_kinds,
  include_path_substrings: :include_path_substrings,
  inventory_object_id: :inventory_object_id,
  inventory_path: :inventory_path,
  manifest_object: :manifest_object,
  manifest_path: :manifest_path,
  map_candidate_count: :map_candidate_count,
  output_dir: :output_dir,
  structure_candidate_count: :structure_candidate_count,
  table_object: :table_object,
  table_path: :table_path
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ArchiveArtifactImportData

Returns a new instance of ArchiveArtifactImportData.



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 57

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_count = hash[:artifact_count]
  @artifacts = (hash[:artifacts] || []).map { |item| item ? Rafflesia::ArchiveArtifactRecord.new(item) : nil }
  @association_candidate_count = hash[:association_candidate_count]
  @association_candidates = (hash[:association_candidates] || []).map { |item| item ? Rafflesia::ArchiveAssociationCandidate.new(item) : nil }
  @association_count = hash[:association_count]
  @associations = (hash[:associations] || []).map { |item| item ? Rafflesia::MapModelAssociationData.new(item) : nil }
  @failure_count = hash[:failure_count]
  @imported_map_count = hash[:imported_map_count]
  @imported_maps = (hash[:imported_maps] || []).map { |item| item ? Rafflesia::CryoEmMapData.new(item) : nil }
  @imported_structure_count = hash[:imported_structure_count]
  @imported_structures = (hash[:imported_structures] || []).map { |item| item ? Rafflesia::StructureData.new(item) : nil }
  @include_kinds = (hash[:include_kinds] || [])
  @include_path_substrings = (hash[:include_path_substrings] || [])
  @inventory_object_id = hash[:inventory_object_id]
  @inventory_path = hash[:inventory_path]
  @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil
  @manifest_path = hash[:manifest_path]
  @map_candidate_count = hash[:map_candidate_count]
  @output_dir = hash[:output_dir]
  @structure_candidate_count = hash[:structure_candidate_count]
  @table_object = hash[:table_object] ? Rafflesia::ObjectRef.new(hash[:table_object]) : nil
  @table_path = hash[:table_path]
end

Instance Attribute Details

#artifact_countObject

Returns the value of attribute artifact_count.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def artifact_count
  @artifact_count
end

#artifactsObject

Returns the value of attribute artifacts.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def artifacts
  @artifacts
end

#association_candidate_countObject

Returns the value of attribute association_candidate_count.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def association_candidate_count
  @association_candidate_count
end

#association_candidatesObject

Returns the value of attribute association_candidates.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def association_candidates
  @association_candidates
end

#association_countObject

Returns the value of attribute association_count.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def association_count
  @association_count
end

#associationsObject

Returns the value of attribute associations.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def associations
  @associations
end

#failure_countObject

Returns the value of attribute failure_count.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def failure_count
  @failure_count
end

#imported_map_countObject

Returns the value of attribute imported_map_count.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def imported_map_count
  @imported_map_count
end

#imported_mapsObject

Returns the value of attribute imported_maps.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def imported_maps
  @imported_maps
end

#imported_structure_countObject

Returns the value of attribute imported_structure_count.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def imported_structure_count
  @imported_structure_count
end

#imported_structuresObject

Returns the value of attribute imported_structures.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def imported_structures
  @imported_structures
end

#include_kindsObject

Returns the value of attribute include_kinds.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def include_kinds
  @include_kinds
end

#include_path_substringsObject

Returns the value of attribute include_path_substrings.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def include_path_substrings
  @include_path_substrings
end

#inventory_object_idObject

Returns the value of attribute inventory_object_id.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def inventory_object_id
  @inventory_object_id
end

#inventory_pathObject

Returns the value of attribute inventory_path.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def inventory_path
  @inventory_path
end

#manifest_objectObject

Returns the value of attribute manifest_object.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def manifest_object
  @manifest_object
end

#manifest_pathObject

Returns the value of attribute manifest_path.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def manifest_path
  @manifest_path
end

#map_candidate_countObject

Returns the value of attribute map_candidate_count.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def map_candidate_count
  @map_candidate_count
end

#output_dirObject

Returns the value of attribute output_dir.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def output_dir
  @output_dir
end

#structure_candidate_countObject

Returns the value of attribute structure_candidate_count.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def structure_candidate_count
  @structure_candidate_count
end

#table_objectObject

Returns the value of attribute table_object.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def table_object
  @table_object
end

#table_pathObject

Returns the value of attribute table_path.



33
34
35
# File 'lib/rafflesia/artifacts/archive_artifact_import_data.rb', line 33

def table_path
  @table_path
end