Class: Rafflesia::OntologyPathQueryPlan

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/ontology/ontology_path_query_plan.rb

Constant Summary collapse

HASH_ATTRS =
{
  id: :id,
  is_executable: :is_executable,
  object: :object,
  plan_digest: :plan_digest,
  required_join_evidence: :required_join_evidence,
  sources: :sources,
  sql_from_clause: :sql_from_clause
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OntologyPathQueryPlan

Returns a new instance of OntologyPathQueryPlan.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rafflesia/ontology/ontology_path_query_plan.rb', line 27

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @id = hash[:id]
  @is_executable = hash[:is_executable]
  @object = hash[:object]
  @plan_digest = hash[:plan_digest]
  @required_join_evidence = (hash[:required_join_evidence] || []).map { |item| item ? Rafflesia::DatabaseJoinEvidenceRequirement.new(item) : nil }
  @sources = (hash[:sources] || []).map { |item| item ? Rafflesia::DatabaseJoinSourceFragment.new(item) : nil }
  @sql_from_clause = hash[:sql_from_clause]
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



18
19
20
# File 'lib/rafflesia/ontology/ontology_path_query_plan.rb', line 18

def id
  @id
end

#is_executableObject

Returns the value of attribute is_executable.



18
19
20
# File 'lib/rafflesia/ontology/ontology_path_query_plan.rb', line 18

def is_executable
  @is_executable
end

#objectObject

Returns the value of attribute object.



18
19
20
# File 'lib/rafflesia/ontology/ontology_path_query_plan.rb', line 18

def object
  @object
end

#plan_digestObject

Returns the value of attribute plan_digest.



18
19
20
# File 'lib/rafflesia/ontology/ontology_path_query_plan.rb', line 18

def plan_digest
  @plan_digest
end

#required_join_evidenceObject

Returns the value of attribute required_join_evidence.



18
19
20
# File 'lib/rafflesia/ontology/ontology_path_query_plan.rb', line 18

def required_join_evidence
  @required_join_evidence
end

#sourcesObject

Returns the value of attribute sources.



18
19
20
# File 'lib/rafflesia/ontology/ontology_path_query_plan.rb', line 18

def sources
  @sources
end

#sql_from_clauseObject

Returns the value of attribute sql_from_clause.



18
19
20
# File 'lib/rafflesia/ontology/ontology_path_query_plan.rb', line 18

def sql_from_clause
  @sql_from_clause
end