Class: Rafflesia::SequenceCatalogManifest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::SequenceCatalogManifest
- Defined in:
- lib/rafflesia/sequences/sequence_catalog_manifest.rb
Constant Summary collapse
- HASH_ATTRS =
{ catalog_id: :catalog_id, content_sha256: :content_sha_256, created_at: :created_at, dataset_name: :dataset_name, dataset_version: :dataset_version, entries: :entries, fasta_object: :fasta_object, kind: :kind, manifest_version: :manifest_version, name: :name, sequence_count: :sequence_count, source_database_snapshot: :source_database_snapshot, source_object: :source_object, source_object_id: :source_object_id, source_path: :source_path, source_tool_version: :source_tool_version, version: :version }.freeze
Instance Attribute Summary collapse
-
#catalog_id ⇒ Object
Returns the value of attribute catalog_id.
-
#content_sha_256 ⇒ Object
Returns the value of attribute content_sha_256.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#dataset_name ⇒ Object
Returns the value of attribute dataset_name.
-
#dataset_version ⇒ Object
Returns the value of attribute dataset_version.
-
#entries ⇒ Object
Returns the value of attribute entries.
-
#fasta_object ⇒ Object
Returns the value of attribute fasta_object.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#manifest_version ⇒ Object
Returns the value of attribute manifest_version.
-
#name ⇒ Object
Returns the value of attribute name.
-
#sequence_count ⇒ Object
Returns the value of attribute sequence_count.
-
#source_database_snapshot ⇒ Object
Returns the value of attribute source_database_snapshot.
-
#source_object ⇒ Object
Returns the value of attribute source_object.
-
#source_object_id ⇒ Object
Returns the value of attribute source_object_id.
-
#source_path ⇒ Object
Returns the value of attribute source_path.
-
#source_tool_version ⇒ Object
Returns the value of attribute source_tool_version.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(json) ⇒ SequenceCatalogManifest
constructor
A new instance of SequenceCatalogManifest.
Constructor Details
#initialize(json) ⇒ SequenceCatalogManifest
Returns a new instance of SequenceCatalogManifest.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 47 def initialize(json) super() hash = self.class.normalize(json) @catalog_id = hash[:catalog_id] @content_sha_256 = hash[:content_sha256] @created_at = hash[:created_at] @dataset_name = hash[:dataset_name] @dataset_version = hash[:dataset_version] @entries = (hash[:entries] || []).map { |item| item ? Rafflesia::SequenceCatalogEntry.new(item) : nil } @fasta_object = hash[:fasta_object] ? Rafflesia::ObjectRef.new(hash[:fasta_object]) : nil @kind = hash[:kind] @manifest_version = hash[:manifest_version] @name = hash[:name] @sequence_count = hash[:sequence_count] @source_database_snapshot = hash[:source_database_snapshot] ? Rafflesia::DatabaseSnapshot.new(hash[:source_database_snapshot]) : nil @source_object = hash[:source_object] ? Rafflesia::ObjectRef.new(hash[:source_object]) : nil @source_object_id = hash[:source_object_id] @source_path = hash[:source_path] @source_tool_version = hash[:source_tool_version] ? Rafflesia::ToolVersion.new(hash[:source_tool_version]) : nil @version = hash[:version] end |
Instance Attribute Details
#catalog_id ⇒ Object
Returns the value of attribute catalog_id.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def catalog_id @catalog_id end |
#content_sha_256 ⇒ Object
Returns the value of attribute content_sha_256.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def content_sha_256 @content_sha_256 end |
#created_at ⇒ Object
Returns the value of attribute created_at.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def created_at @created_at end |
#dataset_name ⇒ Object
Returns the value of attribute dataset_name.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def dataset_name @dataset_name end |
#dataset_version ⇒ Object
Returns the value of attribute dataset_version.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def dataset_version @dataset_version end |
#entries ⇒ Object
Returns the value of attribute entries.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def entries @entries end |
#fasta_object ⇒ Object
Returns the value of attribute fasta_object.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def fasta_object @fasta_object end |
#kind ⇒ Object
Returns the value of attribute kind.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def kind @kind end |
#manifest_version ⇒ Object
Returns the value of attribute manifest_version.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def manifest_version @manifest_version end |
#name ⇒ Object
Returns the value of attribute name.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def name @name end |
#sequence_count ⇒ Object
Returns the value of attribute sequence_count.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def sequence_count @sequence_count end |
#source_database_snapshot ⇒ Object
Returns the value of attribute source_database_snapshot.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def source_database_snapshot @source_database_snapshot end |
#source_object ⇒ Object
Returns the value of attribute source_object.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def source_object @source_object end |
#source_object_id ⇒ Object
Returns the value of attribute source_object_id.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def source_object_id @source_object_id end |
#source_path ⇒ Object
Returns the value of attribute source_path.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def source_path @source_path end |
#source_tool_version ⇒ Object
Returns the value of attribute source_tool_version.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def source_tool_version @source_tool_version end |
#version ⇒ Object
Returns the value of attribute version.
28 29 30 |
# File 'lib/rafflesia/sequences/sequence_catalog_manifest.rb', line 28 def version @version end |