Module: ScientificNameClean::AnnotationIdentification1

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

Instance Method Summary collapse

Instance Method Details

#apply(sp) ⇒ Object



7756
7757
7758
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7756

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

#canonical(sp) ⇒ Object



7760
7761
7762
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7760

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

#details(sp) ⇒ Object



7769
7770
7771
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7769

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

#pos(sp) ⇒ Object



7764
7765
7766
7767
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7764

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

#valueObject



7752
7753
7754
# File 'lib/biodiversity/parser/scientific_name_clean.rb', line 7752

def value
  text_value.strip
end