Module: ScientificNameClean::AnnotationIdentification1

Defined in:
lib/biodiversity/parser/scientific_name_clean.rb

Instance Method Summary collapse

Instance Method Details

#apply(sp) ⇒ Object



7286
7287
7288
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7286

def apply(sp)
  " " + value + " " + sp.value
end

#canonical(sp) ⇒ Object



7290
7291
7292
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7290

def canonical(sp)
  " " + sp.canonical
end

#details(sp) ⇒ Object



7299
7300
7301
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7299

def details(sp)
  {:annotation_identification => value, :species => sp.details}
end

#pos(sp) ⇒ Object



7294
7295
7296
7297
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7294

def pos(sp)
  interval_end = text_value[-1] == " " ? interval.end - 1 : interval.end
  {interval.begin => ["annotation_identification", interval.end]}.merge(sp.pos)
end

#valueObject



7282
7283
7284
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7282

def value
  text_value.strip
end