From: <rv...@us...> - 2011-08-25 09:08:54
|
Revision: 937 http://treebase.svn.sourceforge.net/treebase/?rev=937&view=rev Author: rvos Date: 2011-08-25 09:08:48 +0000 (Thu, 25 Aug 2011) Log Message: ----------- TreeBASE uses singleton PhyloChar objects for matrices (as a space-saving hack), so it is no good to use the PhyloChar.id to create PhyloWS URIs. Instead, we should use MatrixColumn identifiers. 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-11 19:44:41 UTC (rev 936) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlMatrixConverter.java 2011-08-25 09:08:48 UTC (rev 937) @@ -195,7 +195,7 @@ if ( null != tbCharacter.getDescription() ) { xmlCharacter.setLabel(tbCharacter.getDescription()); } - attachTreeBaseID((Annotatable)xmlCharacter,tbCharacter,PhyloChar.class); + attachTreeBaseID((Annotatable)xmlCharacter,tbColumns.get(i),MatrixColumn.class); } return xmlMatrix; } @@ -233,10 +233,8 @@ } if ( null != tbCharacter.getDescription() && ! tbCharacter.getDescription().equals(tbDataType) ) { ((Annotatable)xmlCharacter).addAnnotationValue("dcterms:description", Constants.DCTermsURI, tbCharacter.getDescription()); - } - if ( null != tbCharacter.getId() && tbCharacter.getId() != 2 ) { // XXX is PhyloChar.id 2 some sort of magic number? - attachTreeBaseID((Annotatable)xmlCharacter,tbCharacter,PhyloChar.class); } + attachTreeBaseID((Annotatable)xmlCharacter,tbColumn,MatrixColumn.class); } return xmlMatrix; } @@ -259,7 +257,7 @@ xmlCharacter.setLabel(tbCharacter.getDescription()); ((Annotatable)xmlCharacter).addAnnotationValue("dcterms:description", Constants.DCTermsURI, tbCharacter.getDescription()); } - attachTreeBaseID((Annotatable)xmlCharacter,tbCharacter,PhyloChar.class); + attachTreeBaseID((Annotatable)xmlCharacter,tbColumn,MatrixColumn.class); //coerce the tbMatrix into a character matrix to get its character sets CharacterMatrix tbCharacterMatrix = (CharacterMatrix)tbMatrix; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |