Class: Rafflesia::BlastDbRegistryRecord

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/blast_db_registry_record.rb

Constant Summary collapse

HASH_ATTRS =
{
  artifact_count: :artifact_count,
  benchmark: :benchmark,
  benchmark_object_id: :benchmark_object_id,
  benchmark_passed: :benchmark_passed,
  db_prefix: :db_prefix,
  engine: :engine,
  engine_version: :engine_version,
  index_format: :index_format,
  manifest_id: :manifest_id,
  manifest_object: :manifest_object,
  manifest_object_id: :manifest_object_id,
  manifest_path: :manifest_path,
  molecule: :molecule,
  name: :name,
  published_at: :published_at,
  ref: :ref,
  source_object_id: :source_object_id,
  total_size_bytes: :total_size_bytes,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BlastDbRegistryRecord

Returns a new instance of BlastDbRegistryRecord.



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 51

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_count = hash[:artifact_count]
  @benchmark = hash[:benchmark] ? Rafflesia::BlastSearchBenchmarkSummary.new(hash[:benchmark]) : nil
  @benchmark_object_id = hash[:benchmark_object_id]
  @benchmark_passed = hash[:benchmark_passed]
  @db_prefix = hash[:db_prefix]
  @engine = hash[:engine]
  @engine_version = hash[:engine_version]
  @index_format = hash[:index_format]
  @manifest_id = hash[:manifest_id]
  @manifest_object = hash[:manifest_object] ? Rafflesia::ObjectRef.new(hash[:manifest_object]) : nil
  @manifest_object_id = hash[:manifest_object_id]
  @manifest_path = hash[:manifest_path]
  @molecule = hash[:molecule]
  @name = hash[:name]
  @published_at = hash[:published_at]
  @ref = hash[:ref]
  @source_object_id = hash[:source_object_id]
  @total_size_bytes = hash[:total_size_bytes]
  @version = hash[:version]
end

Instance Attribute Details

#artifact_countObject

Returns the value of attribute artifact_count.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def artifact_count
  @artifact_count
end

#benchmarkObject

Returns the value of attribute benchmark.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def benchmark
  @benchmark
end

#benchmark_object_idObject

Returns the value of attribute benchmark_object_id.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def benchmark_object_id
  @benchmark_object_id
end

#benchmark_passedObject

Returns the value of attribute benchmark_passed.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def benchmark_passed
  @benchmark_passed
end

#db_prefixObject

Returns the value of attribute db_prefix.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def db_prefix
  @db_prefix
end

#engineObject

Returns the value of attribute engine.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def engine
  @engine
end

#engine_versionObject

Returns the value of attribute engine_version.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def engine_version
  @engine_version
end

#index_formatObject

Returns the value of attribute index_format.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def index_format
  @index_format
end

#manifest_idObject

Returns the value of attribute manifest_id.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def manifest_id
  @manifest_id
end

#manifest_objectObject

Returns the value of attribute manifest_object.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def manifest_object
  @manifest_object
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def manifest_object_id
  @manifest_object_id
end

#manifest_pathObject

Returns the value of attribute manifest_path.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def manifest_path
  @manifest_path
end

#moleculeObject

Returns the value of attribute molecule.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def molecule
  @molecule
end

#nameObject

Returns the value of attribute name.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def name
  @name
end

#published_atObject

Returns the value of attribute published_at.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def published_at
  @published_at
end

#refObject

Returns the value of attribute ref.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def ref
  @ref
end

#source_object_idObject

Returns the value of attribute source_object_id.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def source_object_id
  @source_object_id
end

#total_size_bytesObject

Returns the value of attribute total_size_bytes.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def total_size_bytes
  @total_size_bytes
end

#versionObject

Returns the value of attribute version.



30
31
32
# File 'lib/rafflesia/sequences/blast_db_registry_record.rb', line 30

def version
  @version
end