{
return 1;
}
- int comp = s1 == null ? -1 : (s2 == null ? 1 : s1
- .compareToIgnoreCase(s2));
+ int comp = s1 == null ? -1
+ : (s2 == null ? 1 : s1.compareToIgnoreCase(s2));
if (comp == 0)
{
String a1 = ref1.getAccessionId();
String a2 = ref2.getAccessionId();
- comp = a1 == null ? -1 : (a2 == null ? 1 : a1
- .compareToIgnoreCase(a2));
+ comp = a1 == null ? -1
+ : (a2 == null ? 1 : a1.compareToIgnoreCase(a2));
}
return comp;
}
void appendFeature(final StringBuilder sb, int rpos,
Map<String, float[][]> minmax, SequenceFeature feature)
{
- String tmpString;
- if (feature.getType().equals("disulfide bond"))
+ if (feature.isContactFeature())
{
if (feature.getBegin() == rpos || feature.getEnd() == rpos)
{
{
sb.append("<br>");
}
- sb.append("disulfide bond ").append(feature.getBegin()).append(":")
- .append(feature.getEnd());
+ sb.append(feature.getType()).append(" ").append(feature.getBegin())
+ .append(":").append(feature.getEnd());
}
}
else
if (feature.getDescription() != null
&& !feature.description.equals(feature.getType()))
{
- tmpString = feature.getDescription();
+ String tmpString = feature.getDescription();
String tmp2up = tmpString.toUpperCase();
int startTag = tmp2up.indexOf("<HTML>");
if (startTag > -1)
// check score should be shown
if (!Float.isNaN(feature.getScore()))
{
- float[][] rng = (minmax == null) ? null : ((float[][]) minmax
- .get(feature.getType()));
+ float[][] rng = (minmax == null) ? null
+ : minmax.get(feature.getType());
if (rng != null && rng[0] != null && rng[0][0] != rng[0][1])
{
- sb.append(" Score=" + feature.getScore());
+ sb.append(" Score=").append(String.valueOf(feature.getScore()));
}
}
String status = (String) feature.getValue("status");
{
for (List<String> urllink : createLinksFrom(null, urlstring))
{
- sb.append("<br/> <a href=\""
- + urllink.get(3)
- + "\" target=\""
- + urllink.get(0)
- + "\">"
+ sb.append("<br/> <a href=\"" + urllink.get(3) + "\" target=\""
+ + urllink.get(0) + "\">"
+ (urllink.get(0).toLowerCase()
- .equals(urllink.get(1).toLowerCase()) ? urllink
- .get(0) : (urllink.get(0) + ":" + urllink
- .get(1)))
+ .equals(urllink.get(1).toLowerCase())
+ ? urllink.get(0)
+ : (urllink.get(0) + ":"
+ + urllink.get(1)))
+ "</a></br>");
}
} catch (Exception x)
{
- System.err.println("problem when creating links from "
- + urlstring);
+ System.err.println(
+ "problem when creating links from " + urlstring);
x.printStackTrace();
}
}
SequenceI sequence, boolean showDbRefs, boolean showNpFeats,
Map<String, float[][]> minmax)
{
- int maxWidth = createSequenceAnnotationReport(tip, sequence,
- showDbRefs, showNpFeats, minmax, true);
+ int maxWidth = createSequenceAnnotationReport(tip, sequence, showDbRefs,
+ showNpFeats, minmax, true);
if (maxWidth > 60)
{