Class: Rafflesia::StructurePreparedInspectData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/structure_prepared_inspect_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,
  is_object_readable: :is_object_readable,
  is_prepared: :is_prepared,
  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
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ StructurePreparedInspectData

Returns a new instance of StructurePreparedInspectData.



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/proteins/structure_prepared_inspect_data.rb', line 57

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]
  @is_object_readable = hash[:is_object_readable]
  @is_prepared = hash[:is_prepared]
  @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]
end

Instance Attribute Details

#artifact_kindObject

Returns the value of attribute artifact_kind.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def artifact_kind
  @artifact_kind
end

#artifact_schema_versionObject

Returns the value of attribute artifact_schema_version.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def artifact_schema_version
  @artifact_schema_version
end

#atom_countObject

Returns the value of attribute atom_count.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def atom_count
  @atom_count
end

#chain_countObject

Returns the value of attribute chain_count.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def chain_count
  @chain_count
end

#compressed_size_bytesObject

Returns the value of attribute compressed_size_bytes.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def compressed_size_bytes
  @compressed_size_bytes
end

#content_typeObject

Returns the value of attribute content_type.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def content_type
  @content_type
end

#created_from_hashObject

Returns the value of attribute created_from_hash.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def created_from_hash
  @created_from_hash
end

#encodingObject

Returns the value of attribute encoding.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def encoding
  @encoding
end

#formatObject

Returns the value of attribute format.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def format
  @format
end

#is_object_readableObject

Returns the value of attribute is_object_readable.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def is_object_readable
  @is_object_readable
end

#is_preparedObject

Returns the value of attribute is_prepared.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def is_prepared
  @is_prepared
end

#parserObject

Returns the value of attribute parser.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def parser
  @parser
end

#prepared_objectObject

Returns the value of attribute prepared_object.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def prepared_object
  @prepared_object
end

#prepared_object_idObject

Returns the value of attribute prepared_object_id.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def prepared_object_id
  @prepared_object_id
end

#raw_objectObject

Returns the value of attribute raw_object.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def raw_object
  @raw_object
end

#residue_countObject

Returns the value of attribute residue_count.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def residue_count
  @residue_count
end

#schema_versionObject

Returns the value of attribute schema_version.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def schema_version
  @schema_version
end

#sourceObject

Returns the value of attribute source.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def source
  @source
end

#source_metadataObject

Returns the value of attribute source_metadata.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def 
  @source_metadata
end

#structure_idObject

Returns the value of attribute structure_id.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def structure_id
  @structure_id
end

#target_idObject

Returns the value of attribute target_id.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def target_id
  @target_id
end

#uncompressed_size_bytesObject

Returns the value of attribute uncompressed_size_bytes.



33
34
35
# File 'lib/rafflesia/proteins/structure_prepared_inspect_data.rb', line 33

def uncompressed_size_bytes
  @uncompressed_size_bytes
end