Class: Rafflesia::OntologyContextData

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

Constant Summary collapse

HASH_ATTRS =
{
  available_column_count: :available_column_count,
  documents: :documents,
  estimated_tokens: :estimated_tokens,
  evaluated_source_pair_count: :evaluated_source_pair_count,
  evidence_requirement: :evidence_requirement,
  id: :id,
  is_any_column_truncated: :is_any_column_truncated,
  is_any_required_column_truncated: :is_any_required_column_truncated,
  is_byte_budget_truncated: :is_byte_budget_truncated,
  is_relations_truncated: :is_relations_truncated,
  is_source_pair_coverage_truncated: :is_source_pair_coverage_truncated,
  match_mode: :match_mode,
  max_bytes: :max_bytes,
  neighbor_hops: :neighbor_hops,
  object: :object,
  omission_reasons: :omission_reasons,
  omitted_column_count: :omitted_column_count,
  omitted_document_count: :omitted_document_count,
  omitted_path_count: :omitted_path_count,
  omitted_relation_count: :omitted_relation_count,
  omitted_relationship_count: :omitted_relationship_count,
  omitted_source_pair_count: :omitted_source_pair_count,
  ontology_digest: :ontology_digest,
  ontology_version: :ontology_version,
  path_count: :path_count,
  paths: :paths,
  pinned_releases: :pinned_releases,
  relation_count: :relation_count,
  relations: :relations,
  relationship_count: :relationship_count,
  relationships: :relationships,
  resolved_source_pair_count: :resolved_source_pair_count,
  returned_source_pair_count: :returned_source_pair_count,
  safety: :safety,
  search: :search,
  search_terms: :search_terms,
  seed_relations: :seed_relations,
  selected_column_count: :selected_column_count,
  serialized_bytes: :serialized_bytes,
  source_pair_count: :source_pair_count,
  sources: :sources,
  unevaluated_source_pair_count: :unevaluated_source_pair_count,
  unresolved_source_pair_count: :unresolved_source_pair_count
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OntologyContextData

Returns a new instance of OntologyContextData.



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 99

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @available_column_count = hash[:available_column_count]
  @documents = (hash[:documents] || []).map { |item| item ? Rafflesia::OntologyContextDocument.new(item) : nil }
  @estimated_tokens = hash[:estimated_tokens]
  @evaluated_source_pair_count = hash[:evaluated_source_pair_count]
  @evidence_requirement = hash[:evidence_requirement]
  @id = hash[:id]
  @is_any_column_truncated = hash[:is_any_column_truncated]
  @is_any_required_column_truncated = hash[:is_any_required_column_truncated]
  @is_byte_budget_truncated = hash[:is_byte_budget_truncated]
  @is_relations_truncated = hash[:is_relations_truncated]
  @is_source_pair_coverage_truncated = hash[:is_source_pair_coverage_truncated]
  @match_mode = hash[:match_mode]
  @max_bytes = hash[:max_bytes]
  @neighbor_hops = hash[:neighbor_hops]
  @object = hash[:object]
  @omission_reasons = (hash[:omission_reasons] || [])
  @omitted_column_count = hash[:omitted_column_count]
  @omitted_document_count = hash[:omitted_document_count]
  @omitted_path_count = hash[:omitted_path_count]
  @omitted_relation_count = hash[:omitted_relation_count]
  @omitted_relationship_count = hash[:omitted_relationship_count]
  @omitted_source_pair_count = hash[:omitted_source_pair_count]
  @ontology_digest = hash[:ontology_digest]
  @ontology_version = hash[:ontology_version]
  @path_count = hash[:path_count]
  @paths = (hash[:paths] || []).map { |item| item ? Rafflesia::OntologyPathData.new(item) : nil }
  @pinned_releases = (hash[:pinned_releases] || []).map { |item| item ? Rafflesia::DatabaseReleaseSelector.new(item) : nil }
  @relation_count = hash[:relation_count]
  @relations = (hash[:relations] || []).map { |item| item ? Rafflesia::OntologyContextRelation.new(item) : nil }
  @relationship_count = hash[:relationship_count]
  @relationships = (hash[:relationships] || []).map { |item| item ? Rafflesia::OntologyJoinStep.new(item) : nil }
  @resolved_source_pair_count = hash[:resolved_source_pair_count]
  @returned_source_pair_count = hash[:returned_source_pair_count]
  @safety = hash[:safety]
  @search = hash[:search]
  @search_terms = (hash[:search_terms] || [])
  @seed_relations = (hash[:seed_relations] || [])
  @selected_column_count = hash[:selected_column_count]
  @serialized_bytes = hash[:serialized_bytes]
  @source_pair_count = hash[:source_pair_count]
  @sources = (hash[:sources] || []).map { |item| item ? Rafflesia::OntologyContextSourceBinding.new(item) : nil }
  @unevaluated_source_pair_count = hash[:unevaluated_source_pair_count]
  @unresolved_source_pair_count = hash[:unresolved_source_pair_count]
end

Instance Attribute Details

#available_column_countObject

Returns the value of attribute available_column_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def available_column_count
  @available_column_count
end

#documentsObject

Returns the value of attribute documents.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def documents
  @documents
end

#estimated_tokensObject

Returns the value of attribute estimated_tokens.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def estimated_tokens
  @estimated_tokens
end

#evaluated_source_pair_countObject

Returns the value of attribute evaluated_source_pair_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def evaluated_source_pair_count
  @evaluated_source_pair_count
end

#evidence_requirementObject

Returns the value of attribute evidence_requirement.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def evidence_requirement
  @evidence_requirement
end

#idObject

Returns the value of attribute id.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def id
  @id
end

#is_any_column_truncatedObject

Returns the value of attribute is_any_column_truncated.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def is_any_column_truncated
  @is_any_column_truncated
end

#is_any_required_column_truncatedObject

Returns the value of attribute is_any_required_column_truncated.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def is_any_required_column_truncated
  @is_any_required_column_truncated
end

#is_byte_budget_truncatedObject

Returns the value of attribute is_byte_budget_truncated.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def is_byte_budget_truncated
  @is_byte_budget_truncated
end

#is_relations_truncatedObject

Returns the value of attribute is_relations_truncated.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def is_relations_truncated
  @is_relations_truncated
end

#is_source_pair_coverage_truncatedObject

Returns the value of attribute is_source_pair_coverage_truncated.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def is_source_pair_coverage_truncated
  @is_source_pair_coverage_truncated
end

#match_modeObject

Returns the value of attribute match_mode.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def match_mode
  @match_mode
end

#max_bytesObject

Returns the value of attribute max_bytes.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def max_bytes
  @max_bytes
end

#neighbor_hopsObject

Returns the value of attribute neighbor_hops.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def neighbor_hops
  @neighbor_hops
end

#objectObject

Returns the value of attribute object.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def object
  @object
end

#omission_reasonsObject

Returns the value of attribute omission_reasons.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def omission_reasons
  @omission_reasons
end

#omitted_column_countObject

Returns the value of attribute omitted_column_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def omitted_column_count
  @omitted_column_count
end

#omitted_document_countObject

Returns the value of attribute omitted_document_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def omitted_document_count
  @omitted_document_count
end

#omitted_path_countObject

Returns the value of attribute omitted_path_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def omitted_path_count
  @omitted_path_count
end

#omitted_relation_countObject

Returns the value of attribute omitted_relation_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def omitted_relation_count
  @omitted_relation_count
end

#omitted_relationship_countObject

Returns the value of attribute omitted_relationship_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def omitted_relationship_count
  @omitted_relationship_count
end

#omitted_source_pair_countObject

Returns the value of attribute omitted_source_pair_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def omitted_source_pair_count
  @omitted_source_pair_count
end

#ontology_digestObject

Returns the value of attribute ontology_digest.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def ontology_digest
  @ontology_digest
end

#ontology_versionObject

Returns the value of attribute ontology_version.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def ontology_version
  @ontology_version
end

#path_countObject

Returns the value of attribute path_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def path_count
  @path_count
end

#pathsObject

Returns the value of attribute paths.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def paths
  @paths
end

#pinned_releasesObject

Returns the value of attribute pinned_releases.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def pinned_releases
  @pinned_releases
end

#relation_countObject

Returns the value of attribute relation_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def relation_count
  @relation_count
end

#relationsObject

Returns the value of attribute relations.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def relations
  @relations
end

#relationship_countObject

Returns the value of attribute relationship_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def relationship_count
  @relationship_count
end

#relationshipsObject

Returns the value of attribute relationships.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def relationships
  @relationships
end

#resolved_source_pair_countObject

Returns the value of attribute resolved_source_pair_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def resolved_source_pair_count
  @resolved_source_pair_count
end

#returned_source_pair_countObject

Returns the value of attribute returned_source_pair_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def returned_source_pair_count
  @returned_source_pair_count
end

#safetyObject

Returns the value of attribute safety.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def safety
  @safety
end

#searchObject

Returns the value of attribute search.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def search
  @search
end

#search_termsObject

Returns the value of attribute search_terms.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def search_terms
  @search_terms
end

#seed_relationsObject

Returns the value of attribute seed_relations.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def seed_relations
  @seed_relations
end

#selected_column_countObject

Returns the value of attribute selected_column_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def selected_column_count
  @selected_column_count
end

#serialized_bytesObject

Returns the value of attribute serialized_bytes.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def serialized_bytes
  @serialized_bytes
end

#source_pair_countObject

Returns the value of attribute source_pair_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def source_pair_count
  @source_pair_count
end

#sourcesObject

Returns the value of attribute sources.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def sources
  @sources
end

#unevaluated_source_pair_countObject

Returns the value of attribute unevaluated_source_pair_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def unevaluated_source_pair_count
  @unevaluated_source_pair_count
end

#unresolved_source_pair_countObject

Returns the value of attribute unresolved_source_pair_count.



54
55
56
# File 'lib/rafflesia/ontology/ontology_context_data.rb', line 54

def unresolved_source_pair_count
  @unresolved_source_pair_count
end