public boolean accepts(Object o) {
if (!filterForSpecies) {
return super.accepts(o);
}
if (o instanceof SimpleSpeciesReference) {
SimpleSpeciesReference specRef = (SimpleSpeciesReference) o;
if (specRef.isSetSpecies() && (id != null)
&& specRef.getSpecies().equals(id)) {
return true;
}
}
return false;
}