X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FSequenceAnnotationReport.java;h=9c42c9e31610a21ecac7de66d135b00e9e74429a;hb=a8f483d04205bb8273ee311c12968b7e86d205fa;hp=7f46c671ba71443eac0e6ad7f0810edc30a31933;hpb=c0f6c4074d66aa9563dceab4f63d3b4f37e53c33;p=jalview.git
diff --git a/src/jalview/io/SequenceAnnotationReport.java b/src/jalview/io/SequenceAnnotationReport.java
index 7f46c67..9c42c9e 100644
--- a/src/jalview/io/SequenceAnnotationReport.java
+++ b/src/jalview/io/SequenceAnnotationReport.java
@@ -1,3 +1,21 @@
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Copyright (C) 2014 The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
package jalview.io;
import java.util.ArrayList;
@@ -164,9 +182,15 @@ public class SequenceAnnotationReport
{
for (String[] urllink : createLinksFrom(null, urlstring))
{
- tooltipText2.append("
"
- + (urllink[0].toLowerCase().equals(urllink[1].toLowerCase()) ? urllink[0] : (urllink[0]+ ":" + urllink[1])) + "");
+ tooltipText2.append("
"
+ + (urllink[0].toLowerCase().equals(
+ urllink[1].toLowerCase()) ? urllink[0]
+ : (urllink[0] + ":" + urllink[1]))
+ + "");
}
} catch (Exception x)
{
@@ -192,7 +216,7 @@ public class SequenceAnnotationReport
public String[][] createLinksFrom(SequenceI seq, String link)
{
ArrayList urlSets = new ArrayList();
- ArrayList uniques=new ArrayList();
+ ArrayList uniques = new ArrayList();
UrlLink urlLink = new UrlLink(link);
if (!urlLink.isValid())
{
@@ -232,11 +256,11 @@ public class SequenceAnnotationReport
{
for (int u = 0; u < urls.length; u += 2)
{
- String unq=urls[u]+"|"+urls[u+1];
+ String unq = urls[u] + "|" + urls[u + 1];
if (!uniques.contains(unq))
{
urlSets.add(new String[]
- { target, label, urls[u], urls[u + 1] });
+ { target, label, urls[u], urls[u + 1] });
uniques.add(unq);
}
}
@@ -251,11 +275,11 @@ public class SequenceAnnotationReport
{
for (int u = 0; u < urls.length; u += 2)
{
- String unq=urls[u]+"|"+urls[u+1];
+ String unq = urls[u] + "|" + urls[u + 1];
if (!uniques.contains(unq))
{
urlSets.add(new String[]
- { target, label, urls[u], urls[u + 1] });
+ { target, label, urls[u], urls[u + 1] });
uniques.add(unq);
}
}
@@ -269,23 +293,27 @@ public class SequenceAnnotationReport
{
for (int u = 0; u < urls.length; u += 2)
{
- String unq=urls[u]+"|"+urls[u+1];
+ String unq = urls[u] + "|" + urls[u + 1];
if (!uniques.contains(unq))
{
urlSets.add(new String[]
- { target, label, urls[u], urls[u + 1] });
+ { target, label, urls[u], urls[u + 1] });
uniques.add(unq);
}
}
}
}
- } else {
- String unq=label + "|" + urlLink.getUrl_prefix();
- if (!uniques.contains(unq)){
+ }
+ else
+ {
+ String unq = label + "|" + urlLink.getUrl_prefix();
+ if (!uniques.contains(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() });
}
}
@@ -293,17 +321,17 @@ public class SequenceAnnotationReport
{});
}
-
public void createSequenceAnnotationReport(final StringBuffer tip,
SequenceI sequence, boolean showDbRefs, boolean showNpFeats,
Hashtable minmax)
{
- createSequenceAnnotationReport(tip, sequence, showDbRefs, showNpFeats, true, minmax);
+ createSequenceAnnotationReport(tip, sequence, showDbRefs, showNpFeats,
+ true, minmax);
}
public void createSequenceAnnotationReport(final StringBuffer tip,
- SequenceI sequence, boolean showDbRefs, boolean showNpFeats, boolean tableWrap,
- Hashtable minmax)
+ SequenceI sequence, boolean showDbRefs, boolean showNpFeats,
+ boolean tableWrap, Hashtable minmax)
{
String tmp;
tip.append("");
@@ -315,10 +343,10 @@ public class SequenceAnnotationReport
tip.append("
" + tmp);
maxWidth = Math.max(maxWidth, tmp.length());
}
- SequenceI ds=sequence;
- while (ds.getDatasetSequence()!=null)
+ SequenceI ds = sequence;
+ while (ds.getDatasetSequence() != null)
{
- ds=ds.getDatasetSequence();
+ ds = ds.getDatasetSequence();
}
DBRefEntry[] dbrefs = ds.getDBRef();
if (showDbRefs && dbrefs != null)