Module: ScientificNameClean::AnnotationIdentification1

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

Instance Method Summary collapse

Instance Method Details

#apply(sp) ⇒ Object



6711
6712
6713
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 6711

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

#canonical(sp) ⇒ Object



6715
6716
6717
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 6715

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

#details(sp) ⇒ Object



6724
6725
6726
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 6724

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

#pos(sp) ⇒ Object



6719
6720
6721
6722
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 6719

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

#valueObject



6707
6708
6709
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 6707

def value
  text_value.strip
end