Class: Rafflesia::CryoEmMapData

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

Constant Summary collapse

HASH_ATTRS =
{
  emdb_id: :emdb_id,
  format: :format,
  header: :header,
  map_id: :map_id,
  metadata: :metadata,
  object: :object,
  retrieved_at: :retrieved_at,
  source: :source,
  source_url: :source_url
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CryoEmMapData

Returns a new instance of CryoEmMapData.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @emdb_id = hash[:emdb_id]
  @format = hash[:format]
  @header = hash[:header] ? Rafflesia::MrcHeaderMetadata.new(hash[:header]) : nil
  @map_id = hash[:map_id]
  @metadata = hash[:metadata] || {}
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
  @retrieved_at = hash[:retrieved_at]
  @source = hash[:source]
  @source_url = hash[:source_url]
end

Instance Attribute Details

#emdb_idObject

Returns the value of attribute emdb_id.



20
21
22
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20

def emdb_id
  @emdb_id
end

#formatObject

Returns the value of attribute format.



20
21
22
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20

def format
  @format
end

#headerObject

Returns the value of attribute header.



20
21
22
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20

def header
  @header
end

#map_idObject

Returns the value of attribute map_id.



20
21
22
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20

def map_id
  @map_id
end

#metadataObject

Returns the value of attribute metadata.



20
21
22
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20

def 
  @metadata
end

#objectObject

Returns the value of attribute object.



20
21
22
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20

def object
  @object
end

#retrieved_atObject

Returns the value of attribute retrieved_at.



20
21
22
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20

def retrieved_at
  @retrieved_at
end

#sourceObject

Returns the value of attribute source.



20
21
22
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20

def source
  @source
end

#source_urlObject

Returns the value of attribute source_url.



20
21
22
# File 'lib/rafflesia/artifacts/cryo_em_map_data.rb', line 20

def source_url
  @source_url
end