Class: Rafflesia::OntologyTypedKeyEdge

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

Constant Summary collapse

HASH_ATTRS =
{
  cardinality: :cardinality,
  definition_source: :definition_source,
  from_key_id: :from_key_id,
  from_relation: :from_relation,
  id: :id,
  is_strict: :is_strict,
  key_variant: :key_variant,
  kind: :kind,
  to_key_id: :to_key_id,
  to_relation: :to_relation
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OntologyTypedKeyEdge

Returns a new instance of OntologyTypedKeyEdge.



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/rafflesia/ontology/ontology_typed_key_edge.rb', line 33

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @cardinality = hash[:cardinality]
  @definition_source = hash[:definition_source]
  @from_key_id = hash[:from_key_id]
  @from_relation = hash[:from_relation]
  @id = hash[:id]
  @is_strict = hash[:is_strict]
  @key_variant = hash[:key_variant]
  @kind = hash[:kind]
  @to_key_id = hash[:to_key_id]
  @to_relation = hash[:to_relation]
end

Instance Attribute Details

#cardinalityObject

Returns the value of attribute cardinality.



21
22
23
# File 'lib/rafflesia/ontology/ontology_typed_key_edge.rb', line 21

def cardinality
  @cardinality
end

#definition_sourceObject

Returns the value of attribute definition_source.



21
22
23
# File 'lib/rafflesia/ontology/ontology_typed_key_edge.rb', line 21

def definition_source
  @definition_source
end

#from_key_idObject

Returns the value of attribute from_key_id.



21
22
23
# File 'lib/rafflesia/ontology/ontology_typed_key_edge.rb', line 21

def from_key_id
  @from_key_id
end

#from_relationObject

Returns the value of attribute from_relation.



21
22
23
# File 'lib/rafflesia/ontology/ontology_typed_key_edge.rb', line 21

def from_relation
  @from_relation
end

#idObject

Returns the value of attribute id.



21
22
23
# File 'lib/rafflesia/ontology/ontology_typed_key_edge.rb', line 21

def id
  @id
end

#is_strictObject

Returns the value of attribute is_strict.



21
22
23
# File 'lib/rafflesia/ontology/ontology_typed_key_edge.rb', line 21

def is_strict
  @is_strict
end

#key_variantObject

Returns the value of attribute key_variant.



21
22
23
# File 'lib/rafflesia/ontology/ontology_typed_key_edge.rb', line 21

def key_variant
  @key_variant
end

#kindObject

Returns the value of attribute kind.



21
22
23
# File 'lib/rafflesia/ontology/ontology_typed_key_edge.rb', line 21

def kind
  @kind
end

#to_key_idObject

Returns the value of attribute to_key_id.



21
22
23
# File 'lib/rafflesia/ontology/ontology_typed_key_edge.rb', line 21

def to_key_id
  @to_key_id
end

#to_relationObject

Returns the value of attribute to_relation.



21
22
23
# File 'lib/rafflesia/ontology/ontology_typed_key_edge.rb', line 21

def to_relation
  @to_relation
end