Class: SimpleBioC::Relation

Inherits:
NodeBase show all
Defined in:
lib/simple_bioc/relation.rb

Instance Attribute Summary collapse

Attributes inherited from NodeBase

#document, #id, #infons, #passage, #sentence

Instance Method Summary collapse

Methods inherited from NodeBase

#clear_sentence

Constructor Details

#initialize(parent) ⇒ Relation

Returns a new instance of Relation.



6
7
8
9
# File 'lib/simple_bioc/relation.rb', line 6

def initialize(parent)
  super(parent)
  @nodes = []
end

Instance Attribute Details

#nodesObject

Returns the value of attribute nodes.



4
5
6
# File 'lib/simple_bioc/relation.rb', line 4

def nodes
  @nodes
end

#originalObject

Returns the value of attribute original.



4
5
6
# File 'lib/simple_bioc/relation.rb', line 4

def original
  @original
end

Instance Method Details

#adjust_refObject



11
12
13
# File 'lib/simple_bioc/relation.rb', line 11

def adjust_ref
  @nodes.each{|n| n.adjust_ref}
end

#to_cObject



15
16
17
# File 'lib/simple_bioc/relation.rb', line 15

def to_c
  "Relation:#{id}"
end