Class: Rafflesia::OntologyRelationshipEvidenceData

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

Constant Summary collapse

HASH_ATTRS =
{
  bytes_scanned: :bytes_scanned,
  cardinality: :cardinality,
  checks: :checks,
  from_relation: :from_relation,
  is_cardinality_observed: :is_cardinality_observed,
  object: :object,
  query_count: :query_count,
  relationship_id: :relationship_id,
  rows_scanned: :rows_scanned,
  status: :status,
  to_relation: :to_relation,
  unavailable_reason: :unavailable_reason
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OntologyRelationshipEvidenceData

Returns a new instance of OntologyRelationshipEvidenceData.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 37

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @bytes_scanned = hash[:bytes_scanned]
  @cardinality = hash[:cardinality]
  @checks = (hash[:checks] || []).map { |item| item ? Rafflesia::OntologyRelationshipKeyCheckData.new(item) : nil }
  @from_relation = hash[:from_relation]
  @is_cardinality_observed = hash[:is_cardinality_observed]
  @object = hash[:object]
  @query_count = hash[:query_count]
  @relationship_id = hash[:relationship_id]
  @rows_scanned = hash[:rows_scanned]
  @status = hash[:status]
  @to_relation = hash[:to_relation]
  @unavailable_reason = hash[:unavailable_reason]
end

Instance Attribute Details

#bytes_scannedObject

Returns the value of attribute bytes_scanned.



23
24
25
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 23

def bytes_scanned
  @bytes_scanned
end

#cardinalityObject

Returns the value of attribute cardinality.



23
24
25
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 23

def cardinality
  @cardinality
end

#checksObject

Returns the value of attribute checks.



23
24
25
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 23

def checks
  @checks
end

#from_relationObject

Returns the value of attribute from_relation.



23
24
25
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 23

def from_relation
  @from_relation
end

#is_cardinality_observedObject

Returns the value of attribute is_cardinality_observed.



23
24
25
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 23

def is_cardinality_observed
  @is_cardinality_observed
end

#objectObject

Returns the value of attribute object.



23
24
25
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 23

def object
  @object
end

#query_countObject

Returns the value of attribute query_count.



23
24
25
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 23

def query_count
  @query_count
end

#relationship_idObject

Returns the value of attribute relationship_id.



23
24
25
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 23

def relationship_id
  @relationship_id
end

#rows_scannedObject

Returns the value of attribute rows_scanned.



23
24
25
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 23

def rows_scanned
  @rows_scanned
end

#statusObject

Returns the value of attribute status.



23
24
25
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 23

def status
  @status
end

#to_relationObject

Returns the value of attribute to_relation.



23
24
25
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 23

def to_relation
  @to_relation
end

#unavailable_reasonObject

Returns the value of attribute unavailable_reason.



23
24
25
# File 'lib/rafflesia/ontology/ontology_relationship_evidence_data.rb', line 23

def unavailable_reason
  @unavailable_reason
end