Class: Rafflesia::OntologyPathData

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

Constant Summary collapse

HASH_ATTRS =
{
  alternative_rank: :alternative_rank,
  automatic_bridge_release_count: :automatic_bridge_release_count,
  bridge_selection_mode: :bridge_selection_mode,
  certification: :certification,
  fanout_join_count: :fanout_join_count,
  from_relation: :from_relation,
  hop_count: :hop_count,
  id: :id,
  joins: :joins,
  lossy_join_count: :lossy_join_count,
  many_to_many_join_count: :many_to_many_join_count,
  object: :object,
  ontology_digest: :ontology_digest,
  ontology_version: :ontology_version,
  pinned_releases: :pinned_releases,
  plan: :plan,
  proof_digest: :proof_digest,
  range_mapping_count: :range_mapping_count,
  relation_sequence: :relation_sequence,
  sources: :sources,
  to_relation: :to_relation
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OntologyPathData

Returns a new instance of OntologyPathData.



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/ontology/ontology_path_data.rb', line 55

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @alternative_rank = hash[:alternative_rank]
  @automatic_bridge_release_count = hash[:automatic_bridge_release_count]
  @bridge_selection_mode = hash[:bridge_selection_mode]
  @certification = hash[:certification] ? Rafflesia::OntologyPathCertification.new(hash[:certification]) : nil
  @fanout_join_count = hash[:fanout_join_count]
  @from_relation = hash[:from_relation]
  @hop_count = hash[:hop_count]
  @id = hash[:id]
  @joins = (hash[:joins] || []).map { |item| item ? Rafflesia::OntologyJoinStep.new(item) : nil }
  @lossy_join_count = hash[:lossy_join_count]
  @many_to_many_join_count = hash[:many_to_many_join_count]
  @object = hash[:object]
  @ontology_digest = hash[:ontology_digest]
  @ontology_version = hash[:ontology_version]
  @pinned_releases = (hash[:pinned_releases] || []).map { |item| item ? Rafflesia::DatabaseReleaseSelector.new(item) : nil }
  @plan = hash[:plan] ? Rafflesia::OntologyPathQueryPlan.new(hash[:plan]) : nil
  @proof_digest = hash[:proof_digest]
  @range_mapping_count = hash[:range_mapping_count]
  @relation_sequence = (hash[:relation_sequence] || [])
  @sources = (hash[:sources] || []).map { |item| item ? Rafflesia::OntologyPathSource.new(item) : nil }
  @to_relation = hash[:to_relation]
end

Instance Attribute Details

#alternative_rankObject

Returns the value of attribute alternative_rank.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def alternative_rank
  @alternative_rank
end

#automatic_bridge_release_countObject

Returns the value of attribute automatic_bridge_release_count.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def automatic_bridge_release_count
  @automatic_bridge_release_count
end

#bridge_selection_modeObject

Returns the value of attribute bridge_selection_mode.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def bridge_selection_mode
  @bridge_selection_mode
end

#certificationObject

Returns the value of attribute certification.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def certification
  @certification
end

#fanout_join_countObject

Returns the value of attribute fanout_join_count.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def fanout_join_count
  @fanout_join_count
end

#from_relationObject

Returns the value of attribute from_relation.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def from_relation
  @from_relation
end

#hop_countObject

Returns the value of attribute hop_count.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def hop_count
  @hop_count
end

#idObject

Returns the value of attribute id.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def id
  @id
end

#joinsObject

Returns the value of attribute joins.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def joins
  @joins
end

#lossy_join_countObject

Returns the value of attribute lossy_join_count.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def lossy_join_count
  @lossy_join_count
end

#many_to_many_join_countObject

Returns the value of attribute many_to_many_join_count.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def many_to_many_join_count
  @many_to_many_join_count
end

#objectObject

Returns the value of attribute object.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def object
  @object
end

#ontology_digestObject

Returns the value of attribute ontology_digest.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def ontology_digest
  @ontology_digest
end

#ontology_versionObject

Returns the value of attribute ontology_version.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def ontology_version
  @ontology_version
end

#pinned_releasesObject

Returns the value of attribute pinned_releases.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def pinned_releases
  @pinned_releases
end

#planObject

Returns the value of attribute plan.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def plan
  @plan
end

#proof_digestObject

Returns the value of attribute proof_digest.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def proof_digest
  @proof_digest
end

#range_mapping_countObject

Returns the value of attribute range_mapping_count.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def range_mapping_count
  @range_mapping_count
end

#relation_sequenceObject

Returns the value of attribute relation_sequence.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def relation_sequence
  @relation_sequence
end

#sourcesObject

Returns the value of attribute sources.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def sources
  @sources
end

#to_relationObject

Returns the value of attribute to_relation.



32
33
34
# File 'lib/rafflesia/ontology/ontology_path_data.rb', line 32

def to_relation
  @to_relation
end