org.wwbota.identification
Interface Description

All Known Implementing Classes:
StandardDescription

public interface Description

A Description is a list of characters with corresponding criteria. It's like field-value pairs, except that fields (Character) and values (Criterion) have more information than just strings


Method Summary
 void addCriterion(Criterion c)
          Add a Character-Criterion pair
 Criterion getCriterion(Character c)
          Accessor to Criterion from Character.
 java.util.Map getMap()
           
 Taxon getTaxon()
          Accessor to the Taxon (item) being described
 double isCompatibleWith(Description reference)
           
 

Method Detail

getTaxon

public Taxon getTaxon()
Accessor to the Taxon (item) being described

addCriterion

public void addCriterion(Criterion c)
Add a Character-Criterion pair

getCriterion

public Criterion getCriterion(Character c)
Accessor to Criterion from Character. This is a helper function, since the getMap() accessor gives the same information, plus the ability to iterate on all criteria

getMap

public java.util.Map getMap()
Returns:
a Map of Criterion objects; the key is the corresponding Character

isCompatibleWith

public double isCompatibleWith(Description reference)
Returns:
the probability that this Description corresponds to the given reference. This is a helper function, since it gets the information by iterating on all criteria, and calling the same function on each.