// lookup the equivalent state in tb and attach identifiers
for(StateSet tbStateSet : tbMatrix.getStateSets() ) {
for (DiscreteCharState tbState : tbStateSet.getStates() ) {
String tbSymbol = tbState.getSymbol().toString().toUpperCase();
CharacterState xmlState = xmlStateSet.lookupCharacterStateBySymbol(tbSymbol);
if ( null == xmlState ) {
xmlState = xmlStateSet.createCharacterState(tbSymbol);
}
attachTreeBaseID((Annotatable)xmlState,tbState,DiscreteCharState.class);
}