+ for (int c = 0, clen = orig.length(); c < clen; c++)
+ {
+ char origchar = orig.charAt(c);
+ String orig3 = ResidueProperties.aa2Triplet.get("" + origchar);
+ sb.append(orig3 == null ? origchar
+ : StringUtils.toSentenceCase(orig3));
+ }
+ }
+ else
+ {
+ sb.append(orig);
+ }
+
+ LocationType location = feature.getLocation();
+ PositionType start = location.getPosition() == null
+ ? location.getBegin()
+ : location.getPosition();
+ sb.append(Integer.toString(start.getPosition().intValue()));
+
+ if (var.length() < 4)
+ {
+ for (int c = 0, clen = var.length(); c < clen; c++)
+ {
+ char varchar = var.charAt(c);
+ String var3 = ResidueProperties.aa2Triplet.get("" + varchar);
+
+ sb.append(var3 != null ? StringUtils.toSentenceCase(var3)
+ : "" + varchar);
+ }
+ }
+ else
+ {
+ sb.append(var);
+ }
+ if (++p != variants.size())
+ {
+ sb.append("<br/> ");
+ asHtml = true;
+ }
+ else
+ {
+ sb.append(" ");
+ }
+ }
+ }
+ String description = feature.getDescription();
+ if (description != null)
+ {
+ sb.append(description);
+ }
+ if (asHtml)
+ {
+ sb.insert(0, "<html>");
+ sb.append("</html>");
+ }
+
+ return sb.toString();
+ }
+
+ /**
+ * A helper method that searches the list of properties for one with the given
+ * key, and if found returns the property value, else returns null
+ *
+ * @param properties
+ * @param key
+ * @return
+ */
+ static String getProperty(List<PropertyType> properties, String key)
+ {
+ String value = null;
+ if (properties != null)
+ {
+ for (PropertyType prop : properties)
+ {
+ if (key.equals(prop.getType()))
+ {
+ value = prop.getValue();
+ break;