X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FSequenceAnnotationReport.java;h=72f804409a0596a87e4c803c9be31ea41be58734;hb=d579f105e3feca4b77ac93c52bb45f8cc39c39cd;hp=e60e7e50a79b55bcfa9b6b211081494c52e9aa1c;hpb=b13f521553582ef2fbfd7815ae25e23284babdea;p=jalview.git diff --git a/src/jalview/io/SequenceAnnotationReport.java b/src/jalview/io/SequenceAnnotationReport.java index e60e7e5..72f8044 100644 --- a/src/jalview/io/SequenceAnnotationReport.java +++ b/src/jalview/io/SequenceAnnotationReport.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -28,7 +28,6 @@ import jalview.util.UrlLink; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; -import java.util.Vector; /** * generate HTML reports for a sequence @@ -66,12 +65,11 @@ public class SequenceAnnotationReport 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) { @@ -103,8 +101,7 @@ public class SequenceAnnotationReport } if (feature.getDescription() != null - && !feature.description.equals(feature - .getType())) + && !feature.description.equals(feature.getType())) { tmpString = feature.getDescription(); String tmp2up = tmpString.toUpperCase(); @@ -151,7 +148,7 @@ public class SequenceAnnotationReport } } // 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())); @@ -179,7 +176,7 @@ public class SequenceAnnotationReport } else { - for (String urlstring : (Vector) feature.links) + for (String urlstring : feature.links) { try { @@ -234,8 +231,7 @@ public class SequenceAnnotationReport // 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(); @@ -262,8 +258,8 @@ public class SequenceAnnotationReport 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); } } @@ -281,8 +277,8 @@ public class SequenceAnnotationReport 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); } } @@ -299,8 +295,8 @@ public class SequenceAnnotationReport 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); } } @@ -315,13 +311,12 @@ public class SequenceAnnotationReport { 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,