Class: Rafflesia::StructurePrepareData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/structure_prepare_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  artifact_kind: :artifact_kind,
  artifact_schema_version: :artifact_schema_version,
  atom_count: :atom_count,
  chain_count: :chain_count,
  compressed_size_bytes: :compressed_size_bytes,
  content_type: :content_type,
  created_from_hash: :created_from_hash,
  encoding: :encoding,
  format: :format,
  parse_elapsed_ms: :parse_elapsed_ms,
  parser: :parser,
  prepared_object: :prepared_object,
  prepared_object_id: :prepared_object_id,
  raw_object: :raw_object,
  residue_count: :residue_count,
  schema_version: :schema_version,
  source: :source,
  source_metadata: :source_metadata,
  structure_id: :structure_id,
  target_id: :target_id,
  uncompressed_size_bytes: :uncompressed_size_bytes,
  was_object_already_prepared: :was_object_already_prepared,
  was_parsed_cache_hit: :was_parsed_cache_hit,
  was_prepared_record_hit: :was_prepared_record_hit,
  write_elapsed_ms: :write_elapsed_ms
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ StructurePrepareData

Returns a new instance of StructurePrepareData.



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
89
90
91
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 63

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_kind = hash[:artifact_kind]
  @artifact_schema_version = hash[:artifact_schema_version]
  @atom_count = hash[:atom_count]
  @chain_count = hash[:chain_count]
  @compressed_size_bytes = hash[:compressed_size_bytes]
  @content_type = hash[:content_type]
  @created_from_hash = hash[:created_from_hash]
  @encoding = hash[:encoding]
  @format = hash[:format]
  @parse_elapsed_ms = hash[:parse_elapsed_ms]
  @parser = hash[:parser] ? Rafflesia::StructureParserMetadata.new(hash[:parser]) : nil
  @prepared_object = hash[:prepared_object] ? Rafflesia::ObjectRef.new(hash[:prepared_object]) : nil
  @prepared_object_id = hash[:prepared_object_id]
  @raw_object = hash[:raw_object] ? Rafflesia::ObjectRef.new(hash[:raw_object]) : nil
  @residue_count = hash[:residue_count]
  @schema_version = hash[:schema_version]
  @source = hash[:source]
  @source_metadata = hash[:source_metadata] || {}
  @structure_id = hash[:structure_id]
  @target_id = hash[:target_id]
  @uncompressed_size_bytes = hash[:uncompressed_size_bytes]
  @was_object_already_prepared = hash[:was_object_already_prepared]
  @was_parsed_cache_hit = hash[:was_parsed_cache_hit]
  @was_prepared_record_hit = hash[:was_prepared_record_hit]
  @write_elapsed_ms = hash[:write_elapsed_ms]
end

Instance Attribute Details

#artifact_kindObject

Returns the value of attribute artifact_kind.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def artifact_kind
  @artifact_kind
end

#artifact_schema_versionObject

Returns the value of attribute artifact_schema_version.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def artifact_schema_version
  @artifact_schema_version
end

#atom_countObject

Returns the value of attribute atom_count.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def atom_count
  @atom_count
end

#chain_countObject

Returns the value of attribute chain_count.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def chain_count
  @chain_count
end

#compressed_size_bytesObject

Returns the value of attribute compressed_size_bytes.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def compressed_size_bytes
  @compressed_size_bytes
end

#content_typeObject

Returns the value of attribute content_type.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def content_type
  @content_type
end

#created_from_hashObject

Returns the value of attribute created_from_hash.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def created_from_hash
  @created_from_hash
end

#encodingObject

Returns the value of attribute encoding.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def encoding
  @encoding
end

#formatObject

Returns the value of attribute format.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def format
  @format
end

#parse_elapsed_msObject

Returns the value of attribute parse_elapsed_ms.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def parse_elapsed_ms
  @parse_elapsed_ms
end

#parserObject

Returns the value of attribute parser.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def parser
  @parser
end

#prepared_objectObject

Returns the value of attribute prepared_object.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def prepared_object
  @prepared_object
end

#prepared_object_idObject

Returns the value of attribute prepared_object_id.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def prepared_object_id
  @prepared_object_id
end

#raw_objectObject

Returns the value of attribute raw_object.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def raw_object
  @raw_object
end

#residue_countObject

Returns the value of attribute residue_count.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def residue_count
  @residue_count
end

#schema_versionObject

Returns the value of attribute schema_version.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def schema_version
  @schema_version
end

#sourceObject

Returns the value of attribute source.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def source
  @source
end

#source_metadataObject

Returns the value of attribute source_metadata.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def 
  @source_metadata
end

#structure_idObject

Returns the value of attribute structure_id.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def structure_id
  @structure_id
end

#target_idObject

Returns the value of attribute target_id.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def target_id
  @target_id
end

#uncompressed_size_bytesObject

Returns the value of attribute uncompressed_size_bytes.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def uncompressed_size_bytes
  @uncompressed_size_bytes
end

#was_object_already_preparedObject

Returns the value of attribute was_object_already_prepared.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def was_object_already_prepared
  @was_object_already_prepared
end

#was_parsed_cache_hitObject

Returns the value of attribute was_parsed_cache_hit.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def was_parsed_cache_hit
  @was_parsed_cache_hit
end

#was_prepared_record_hitObject

Returns the value of attribute was_prepared_record_hit.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def was_prepared_record_hit
  @was_prepared_record_hit
end

#write_elapsed_msObject

Returns the value of attribute write_elapsed_ms.



36
37
38
# File 'lib/rafflesia/proteins/structure_prepare_data.rb', line 36

def write_elapsed_ms
  @write_elapsed_ms
end