Class: Rafflesia::OntologyJoinPatchData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  base_ontology_digest: :base_ontology_digest,
  base_ontology_version: :base_ontology_version,
  candidate_evidence_digest: :candidate_evidence_digest,
  candidate_id: :candidate_id,
  evidence_references: :evidence_references,
  forward: :forward,
  id: :id,
  object: :object,
  patch_digest: :patch_digest,
  reciprocal: :reciprocal,
  removed_connectivity_classifications: :removed_connectivity_classifications,
  review_version: :review_version,
  reviewer: :reviewer,
  schema_version: :schema_version,
  semantic_basis: :semantic_basis
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OntologyJoinPatchData

Returns a new instance of OntologyJoinPatchData.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 43

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @base_ontology_digest = hash[:base_ontology_digest]
  @base_ontology_version = hash[:base_ontology_version]
  @candidate_evidence_digest = hash[:candidate_evidence_digest]
  @candidate_id = hash[:candidate_id]
  @evidence_references = (hash[:evidence_references] || []).map { |item| item ? Rafflesia::OntologyReviewEvidenceReference.new(item) : nil }
  @forward = hash[:forward] ? Rafflesia::OntologyJoinPatchRelationship.new(hash[:forward]) : nil
  @id = hash[:id]
  @object = hash[:object]
  @patch_digest = hash[:patch_digest]
  @reciprocal = hash[:reciprocal] ? Rafflesia::OntologyJoinPatchRelationship.new(hash[:reciprocal]) : nil
  @removed_connectivity_classifications = (hash[:removed_connectivity_classifications] || [])
  @review_version = hash[:review_version]
  @reviewer = hash[:reviewer]
  @schema_version = hash[:schema_version]
  @semantic_basis = hash[:semantic_basis]
end

Instance Attribute Details

#base_ontology_digestObject

Returns the value of attribute base_ontology_digest.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def base_ontology_digest
  @base_ontology_digest
end

#base_ontology_versionObject

Returns the value of attribute base_ontology_version.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def base_ontology_version
  @base_ontology_version
end

#candidate_evidence_digestObject

Returns the value of attribute candidate_evidence_digest.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def candidate_evidence_digest
  @candidate_evidence_digest
end

#candidate_idObject

Returns the value of attribute candidate_id.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def candidate_id
  @candidate_id
end

#evidence_referencesObject

Returns the value of attribute evidence_references.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def evidence_references
  @evidence_references
end

#forwardObject

Returns the value of attribute forward.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def forward
  @forward
end

#idObject

Returns the value of attribute id.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def id
  @id
end

#objectObject

Returns the value of attribute object.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def object
  @object
end

#patch_digestObject

Returns the value of attribute patch_digest.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def patch_digest
  @patch_digest
end

#reciprocalObject

Returns the value of attribute reciprocal.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def reciprocal
  @reciprocal
end

#removed_connectivity_classificationsObject

Returns the value of attribute removed_connectivity_classifications.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def removed_connectivity_classifications
  @removed_connectivity_classifications
end

#review_versionObject

Returns the value of attribute review_version.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def review_version
  @review_version
end

#reviewerObject

Returns the value of attribute reviewer.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def reviewer
  @reviewer
end

#schema_versionObject

Returns the value of attribute schema_version.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def schema_version
  @schema_version
end

#semantic_basisObject

Returns the value of attribute semantic_basis.



26
27
28
# File 'lib/rafflesia/database_join_candidate_reviews/ontology_join_patch_data.rb', line 26

def semantic_basis
  @semantic_basis
end