Class: Rafflesia::OntologyPathListData

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

Constant Summary collapse

HASH_ATTRS =
{
  ambiguous_relations: :ambiguous_relations,
  auto_resolve_bridges: :auto_resolve_bridges,
  auto_resolved_bridge_count: :auto_resolved_bridge_count,
  bridge_selection_mode: :bridge_selection_mode,
  data: :data,
  evidence_requirement: :evidence_requirement,
  from_database: :from_database,
  from_release: :from_release,
  has_more: :has_more,
  is_release_backed: :is_release_backed,
  is_total_matches_exact: :is_total_matches_exact,
  max_hops: :max_hops,
  next_cursor: :next_cursor,
  object: :object,
  ontology_digest: :ontology_digest,
  ontology_version: :ontology_version,
  pinned_releases: :pinned_releases,
  safety: :safety,
  safety_basis: :safety_basis,
  search_strategy: :search_strategy,
  to_database: :to_database,
  to_release: :to_release,
  total_matches: :total_matches
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OntologyPathListData

Returns a new instance of OntologyPathListData.



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 59

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @ambiguous_relations = (hash[:ambiguous_relations] || [])
  @auto_resolve_bridges = hash[:auto_resolve_bridges]
  @auto_resolved_bridge_count = hash[:auto_resolved_bridge_count]
  @bridge_selection_mode = hash[:bridge_selection_mode]
  @data = (hash[:data] || []).map { |item| item ? Rafflesia::OntologyPathData.new(item) : nil }
  @evidence_requirement = hash[:evidence_requirement]
  @from_database = hash[:from_database]
  @from_release = hash[:from_release]
  @has_more = hash[:has_more]
  @is_release_backed = hash[:is_release_backed]
  @is_total_matches_exact = hash[:is_total_matches_exact]
  @max_hops = hash[:max_hops]
  @next_cursor = hash[:next_cursor]
  @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 }
  @safety = hash[:safety]
  @safety_basis = hash[:safety_basis]
  @search_strategy = hash[:search_strategy]
  @to_database = hash[:to_database]
  @to_release = hash[:to_release]
  @total_matches = hash[:total_matches]
end

Instance Attribute Details

#ambiguous_relationsObject

Returns the value of attribute ambiguous_relations.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def ambiguous_relations
  @ambiguous_relations
end

#auto_resolve_bridgesObject

Returns the value of attribute auto_resolve_bridges.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def auto_resolve_bridges
  @auto_resolve_bridges
end

#auto_resolved_bridge_countObject

Returns the value of attribute auto_resolved_bridge_count.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def auto_resolved_bridge_count
  @auto_resolved_bridge_count
end

#bridge_selection_modeObject

Returns the value of attribute bridge_selection_mode.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def bridge_selection_mode
  @bridge_selection_mode
end

#dataObject

Returns the value of attribute data.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def data
  @data
end

#evidence_requirementObject

Returns the value of attribute evidence_requirement.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def evidence_requirement
  @evidence_requirement
end

#from_databaseObject

Returns the value of attribute from_database.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def from_database
  @from_database
end

#from_releaseObject

Returns the value of attribute from_release.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def from_release
  @from_release
end

#has_moreObject

Returns the value of attribute has_more.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def has_more
  @has_more
end

#is_release_backedObject

Returns the value of attribute is_release_backed.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def is_release_backed
  @is_release_backed
end

#is_total_matches_exactObject

Returns the value of attribute is_total_matches_exact.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def is_total_matches_exact
  @is_total_matches_exact
end

#max_hopsObject

Returns the value of attribute max_hops.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def max_hops
  @max_hops
end

#next_cursorObject

Returns the value of attribute next_cursor.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def next_cursor
  @next_cursor
end

#objectObject

Returns the value of attribute object.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def object
  @object
end

#ontology_digestObject

Returns the value of attribute ontology_digest.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def ontology_digest
  @ontology_digest
end

#ontology_versionObject

Returns the value of attribute ontology_version.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def ontology_version
  @ontology_version
end

#pinned_releasesObject

Returns the value of attribute pinned_releases.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def pinned_releases
  @pinned_releases
end

#safetyObject

Returns the value of attribute safety.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def safety
  @safety
end

#safety_basisObject

Returns the value of attribute safety_basis.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def safety_basis
  @safety_basis
end

#search_strategyObject

Returns the value of attribute search_strategy.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def search_strategy
  @search_strategy
end

#to_databaseObject

Returns the value of attribute to_database.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def to_database
  @to_database
end

#to_releaseObject

Returns the value of attribute to_release.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def to_release
  @to_release
end

#total_matchesObject

Returns the value of attribute total_matches.



34
35
36
# File 'lib/rafflesia/ontology/ontology_path_list_data.rb', line 34

def total_matches
  @total_matches
end