Class: Rafflesia::FoldSearchData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/fold_search_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  backend: :backend,
  database: :database,
  exact_rerank: :exact_rerank,
  foldseek_run: :foldseek_run,
  hits: :hits,
  index_ref: :index_ref,
  manifest_id: :manifest_id,
  manifest_object_id: :manifest_object_id,
  manifest_path: :manifest_path,
  materialization: :materialization,
  normalized_output_object: :normalized_output_object,
  plan: :plan,
  profile: :profile,
  query_id: :query_id,
  query_structure_token_extraction: :query_structure_token_extraction,
  raw_output_objects: :raw_output_objects,
  relation: :relation,
  routing: :routing,
  runtime_feedback_observations: :runtime_feedback_observations,
  shards: :shards,
  target_dir: :target_dir
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldSearchData

Returns a new instance of FoldSearchData.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 55

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @backend = hash[:backend]
  @database = hash[:database]
  @exact_rerank = hash[:exact_rerank] ? Rafflesia::CorpuReleaseExactRerankData.new(hash[:exact_rerank]) : nil
  @foldseek_run = hash[:foldseek_run] ? Rafflesia::FoldseekRunData.new(hash[:foldseek_run]) : nil
  @hits = (hash[:hits] || []).map { |item| item ? Rafflesia::FoldHit.new(item) : nil }
  @index_ref = hash[:index_ref]
  @manifest_id = hash[:manifest_id]
  @manifest_object_id = hash[:manifest_object_id]
  @manifest_path = hash[:manifest_path]
  @materialization = hash[:materialization] ? Rafflesia::FoldIndexMaterializeData.new(hash[:materialization]) : nil
  @normalized_output_object = hash[:normalized_output_object] ? Rafflesia::ObjectRef.new(hash[:normalized_output_object]) : nil
  @plan = hash[:plan] ? Rafflesia::FoldSearchPlanData.new(hash[:plan]) : nil
  @profile = hash[:profile] ? Rafflesia::FoldSearchProfile.new(hash[:profile]) : nil
  @query_id = hash[:query_id]
  @query_structure_token_extraction = hash[:query_structure_token_extraction] ? Rafflesia::CorpuReleaseStructureTokenExtractionData.new(hash[:query_structure_token_extraction]) : nil
  @raw_output_objects = (hash[:raw_output_objects] || []).map { |item| item ? Rafflesia::ObjectRef.new(item) : nil }
  @relation = hash[:relation] ? Rafflesia::RelationArtifactData.new(hash[:relation]) : nil
  @routing = hash[:routing] ? Rafflesia::FoldRoutingProvenance.new(hash[:routing]) : nil
  @runtime_feedback_observations = (hash[:runtime_feedback_observations] || []).map { |item| item ? Rafflesia::FoldSearchRuntimeFeedbackObservation.new(item) : nil }
  @shards = (hash[:shards] || []).map { |item| item ? Rafflesia::FoldSearchShardData.new(item) : nil }
  @target_dir = hash[:target_dir]
end

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def backend
  @backend
end

#databaseObject

Returns the value of attribute database.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def database
  @database
end

#exact_rerankObject

Returns the value of attribute exact_rerank.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def exact_rerank
  @exact_rerank
end

#foldseek_runObject

Returns the value of attribute foldseek_run.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def foldseek_run
  @foldseek_run
end

#hitsObject

Returns the value of attribute hits.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def hits
  @hits
end

#index_refObject

Returns the value of attribute index_ref.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def index_ref
  @index_ref
end

#manifest_idObject

Returns the value of attribute manifest_id.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def manifest_id
  @manifest_id
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def manifest_object_id
  @manifest_object_id
end

#manifest_pathObject

Returns the value of attribute manifest_path.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def manifest_path
  @manifest_path
end

#materializationObject

Returns the value of attribute materialization.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def materialization
  @materialization
end

#normalized_output_objectObject

Returns the value of attribute normalized_output_object.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def normalized_output_object
  @normalized_output_object
end

#planObject

Returns the value of attribute plan.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def plan
  @plan
end

#profileObject

Returns the value of attribute profile.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def profile
  @profile
end

#query_idObject

Returns the value of attribute query_id.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def query_id
  @query_id
end

#query_structure_token_extractionObject

Returns the value of attribute query_structure_token_extraction.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def query_structure_token_extraction
  @query_structure_token_extraction
end

#raw_output_objectsObject

Returns the value of attribute raw_output_objects.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def raw_output_objects
  @raw_output_objects
end

#relationObject

Returns the value of attribute relation.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def relation
  @relation
end

#routingObject

Returns the value of attribute routing.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def routing
  @routing
end

#runtime_feedback_observationsObject

Returns the value of attribute runtime_feedback_observations.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def runtime_feedback_observations
  @runtime_feedback_observations
end

#shardsObject

Returns the value of attribute shards.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def shards
  @shards
end

#target_dirObject

Returns the value of attribute target_dir.



32
33
34
# File 'lib/rafflesia/proteins/fold_search_data.rb', line 32

def target_dir
  @target_dir
end