Class: Rafflesia::ComplexImportData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ComplexImportData
- Defined in:
- lib/rafflesia/proteins/complex_import_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ chain_count: :chain_count, chains: :chains, format: :format, is_complex: :is_complex, metadata: :metadata, model_version: :model_version, object: :object, pae_object: :pae_object, source: :source, source_url: :source_url, structure_id: :structure_id, target_id: :target_id }.freeze
Instance Attribute Summary collapse
-
#chain_count ⇒ Object
Returns the value of attribute chain_count.
-
#chains ⇒ Object
Returns the value of attribute chains.
-
#format ⇒ Object
Returns the value of attribute format.
-
#is_complex ⇒ Object
Returns the value of attribute is_complex.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#model_version ⇒ Object
Returns the value of attribute model_version.
-
#object ⇒ Object
Returns the value of attribute object.
-
#pae_object ⇒ Object
Returns the value of attribute pae_object.
-
#source ⇒ Object
Returns the value of attribute source.
-
#source_url ⇒ Object
Returns the value of attribute source_url.
-
#structure_id ⇒ Object
Returns the value of attribute structure_id.
-
#target_id ⇒ Object
Returns the value of attribute target_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ ComplexImportData
constructor
A new instance of ComplexImportData.
Constructor Details
#initialize(json) ⇒ ComplexImportData
Returns a new instance of ComplexImportData.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 37 def initialize(json) super() hash = self.class.normalize(json) @chain_count = hash[:chain_count] @chains = (hash[:chains] || []).map { |item| item ? Rafflesia::ChainSummary.new(item) : nil } @format = hash[:format] @is_complex = hash[:is_complex] @metadata = hash[:metadata] || {} @model_version = hash[:model_version] @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil @pae_object = hash[:pae_object] ? Rafflesia::ObjectRef.new(hash[:pae_object]) : nil @source = hash[:source] @source_url = hash[:source_url] @structure_id = hash[:structure_id] @target_id = hash[:target_id] end |
Instance Attribute Details
#chain_count ⇒ Object
Returns the value of attribute chain_count.
23 24 25 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 23 def chain_count @chain_count end |
#chains ⇒ Object
Returns the value of attribute chains.
23 24 25 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 23 def chains @chains end |
#format ⇒ Object
Returns the value of attribute format.
23 24 25 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 23 def format @format end |
#is_complex ⇒ Object
Returns the value of attribute is_complex.
23 24 25 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 23 def is_complex @is_complex end |
#metadata ⇒ Object
Returns the value of attribute metadata.
23 24 25 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 23 def @metadata end |
#model_version ⇒ Object
Returns the value of attribute model_version.
23 24 25 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 23 def model_version @model_version end |
#object ⇒ Object
Returns the value of attribute object.
23 24 25 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 23 def object @object end |
#pae_object ⇒ Object
Returns the value of attribute pae_object.
23 24 25 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 23 def pae_object @pae_object end |
#source ⇒ Object
Returns the value of attribute source.
23 24 25 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 23 def source @source end |
#source_url ⇒ Object
Returns the value of attribute source_url.
23 24 25 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 23 def source_url @source_url end |
#structure_id ⇒ Object
Returns the value of attribute structure_id.
23 24 25 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 23 def structure_id @structure_id end |
#target_id ⇒ Object
Returns the value of attribute target_id.
23 24 25 |
# File 'lib/rafflesia/proteins/complex_import_data.rb', line 23 def target_id @target_id end |