From: Jim Procter Date: Thu, 23 May 2013 10:58:20 +0000 (+0100) Subject: JAL-1295 relaxed test for Annotation element equivalence and javadoc to clarify forma... X-Git-Tag: Jalview_2_9~249^2~9 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=323663120848253cb367f13d7e470790ec451219;p=jalview.git JAL-1295 relaxed test for Annotation element equivalence and javadoc to clarify format for Annotation.toString --- diff --git a/src/jalview/datamodel/Annotation.java b/src/jalview/datamodel/Annotation.java index c9a623b..f692234 100755 --- a/src/jalview/datamodel/Annotation.java +++ b/src/jalview/datamodel/Annotation.java @@ -122,6 +122,15 @@ public class Annotation this(null, null, ' ', val); } + /** + * human readable representation of an annotation row element. + * + * Format is 'display Char','secondary Structure + * Char',"description",score,[colourstring] + * + * fields may be missing if they are null, whitespace, or equivalent to + * Float.NaN + */ @Override public String toString() { diff --git a/test/jalview/io/StockholmFileTest.java b/test/jalview/io/StockholmFileTest.java index d831b08..a0c9336 100644 --- a/test/jalview/io/StockholmFileTest.java +++ b/test/jalview/io/StockholmFileTest.java @@ -277,9 +277,9 @@ public class StockholmFileTest if (an_or != null && an_new!= null) { - if (!an_or.displayCharacter - .equals(an_new.displayCharacter) - || an_or.secondaryStructure != an_new.secondaryStructure + if (!an_or.displayCharacter.trim() + .equals(an_new.displayCharacter.trim()) + || !(""+an_or.secondaryStructure).trim().equals((""+an_new.secondaryStructure).trim()) || (an_or.description != an_new.description && (an_or.description == null || an_new.description == null || !an_or.description .equals(an_new.description))))