Class: SimpleBioC::Annotation

Inherits:
NodeBase
  • Object
show all
Defined in:
lib/simple_bioc/annotation.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) ⇒ Annotation

Returns a new instance of Annotation.



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

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

Instance Attribute Details

#locationsObject

Returns the value of attribute locations.



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

def locations
  @locations
end

#textObject

Returns the value of attribute text.



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

def text
  @text
end

Instance Method Details

#to_sObject



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

def to_s
  "Annotation:#{@id} #{@text}"
end