+ private static String getAnnotationBriefSummary(Annotation a)
+ {
+ String tt = a.description;
+ if (tt == null || tt.trim().length() == 0)
+ {
+ tt = String.valueOf(a.displayCharacter);
+ }
+ if ((tt == null || tt.length() == 0) && !Float.isNaN(a.value))
+ {
+ if (a.value == Math.floor(a.value)) // likely integer value
+ {
+ tt = String.format("%.0f", a.value);
+ }
+ else // display as is
+ {
+ tt = String.valueOf(a.value);
+ }
+ }
+ if (tt == null || tt.trim().length() == 0)
+ {
+ tt = String.valueOf(a.secondaryStructure);
+ }
+ return tt;
+ }
+