From: <rv...@us...> - 2011-08-25 13:59:08
|
Revision: 941 http://treebase.svn.sourceforge.net/treebase/?rev=941&view=rev Author: rvos Date: 2011-08-25 13:59:02 +0000 (Thu, 25 Aug 2011) Log Message: ----------- Actually, in order to be valid xsi:type subclasses, they should spell out all possible states for dna/rna/protein, not just the ones we've seen in the database Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java 2011-08-25 13:57:44 UTC (rev 940) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java 2011-08-25 13:59:02 UTC (rev 941) @@ -229,8 +229,7 @@ // attach base uri xmlMatrix.setBaseURI(mMatrixBaseURI); - // lookup the equivalent state in tb and attach identifiers, only keep those in matrix - Set<CharacterState> seenStates = new HashSet<CharacterState>(); + // 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(); @@ -239,10 +238,8 @@ xmlState = xmlStateSet.createCharacterState(tbSymbol); } attachTreeBaseID((Annotatable)xmlState,tbState,DiscreteCharState.class); - seenStates.add(xmlState); } } - xmlStateSet.setCharacterStates(seenStates); // create columns and attach identifiers for ( MatrixColumn tbColumn : tbMatrix.getColumnsReadOnly() ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |