/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
+ * Copyright (C) 2015 The Jalview Authors
*
* This file is part of Jalview.
*
*/
package jalview.io;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Vector;
-
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.util.UrlLink;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
/**
* generate HTML reports for a sequence
*
String tmpString;
if (features != null)
{
- for (SequenceFeature feature:features)
+ for (SequenceFeature feature : features)
{
if (feature.getType().equals("disulfide bond"))
{
- if (feature.getBegin() == rpos
- || feature.getEnd() == rpos)
+ if (feature.getBegin() == rpos || feature.getEnd() == rpos)
{
if (tooltipText2.length() > 6)
{
}
if (feature.getDescription() != null
- && !feature.description.equals(feature
- .getType()))
+ && !feature.description.equals(feature.getType()))
{
tmpString = feature.getDescription();
String tmp2up = tmpString.toUpperCase();
}
}
// check score should be shown
- if (feature.getScore() != Float.NaN)
+ if (!Float.isNaN(feature.getScore()))
{
float[][] rng = (minmax == null) ? null : ((float[][]) minmax
.get(feature.getType()));
}
else
{
- for (String urlstring : (Vector<String>) feature.links)
+ for (String urlstring : feature.links)
{
try
{
// collect matching db-refs
DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs(seq.getDBRef(),
- new String[]
- { target });
+ new String[] { target });
// collect id string too
String id = seq.getName();
String descr = seq.getDescription();
String unq = urls[u] + "|" + urls[u + 1];
if (!uniques.contains(unq))
{
- urlSets.add(new String[]
- { target, label, urls[u], urls[u + 1] });
+ urlSets.add(new String[] { target, label, urls[u],
+ urls[u + 1] });
uniques.add(unq);
}
}
String unq = urls[u] + "|" + urls[u + 1];
if (!uniques.contains(unq))
{
- urlSets.add(new String[]
- { target, label, urls[u], urls[u + 1] });
+ urlSets.add(new String[] { target, label, urls[u],
+ urls[u + 1] });
uniques.add(unq);
}
}
String unq = urls[u] + "|" + urls[u + 1];
if (!uniques.contains(unq))
{
- urlSets.add(new String[]
- { target, label, urls[u], urls[u + 1] });
+ urlSets.add(new String[] { target, label, urls[u],
+ urls[u + 1] });
uniques.add(unq);
}
}
{
uniques.add(unq);
// Add a non-dynamic link
- urlSets.add(new String[]
- { target, label, null, urlLink.getUrl_prefix() });
+ urlSets.add(new String[] { target, label, null,
+ urlLink.getUrl_prefix() });
}
}
- return urlSets.toArray(new String[][]
- {});
+ return urlSets.toArray(new String[][] {});
}
public void createSequenceAnnotationReport(final StringBuffer tip,
}
// ADD NON POSITIONAL SEQUENCE INFO
- SequenceFeature[] features = ds.getSequenceFeatures();
+ SequenceFeature[] features = sequence.getSequenceFeatures();
if (showNpFeats && features != null)
{
for (int i = 0; i < features.length; i++)