X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FFeaturesFile.java;h=462ee22dd65d8260f500437db9f2b22d4abc7bfe;hb=7897c6cb08b496285bcb5fa9ed2d9f7d887d0068;hp=3e0314ae75bb029642b1070d2d579621fd2e4f76;hpb=167476e350f385aa0fcb334b79722ddaa1b3a368;p=jalview.git diff --git a/src/jalview/io/FeaturesFile.java b/src/jalview/io/FeaturesFile.java index 3e0314a..462ee22 100755 --- a/src/jalview/io/FeaturesFile.java +++ b/src/jalview/io/FeaturesFile.java @@ -1,17 +1,17 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle - * + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4) + * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * * This program 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 2 * of the License, or (at your option) any later version. - * + * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA @@ -148,7 +148,7 @@ public class FeaturesFile extends AlignFile } continue; } - String seqId=""; + String seqId = ""; while (st.hasMoreElements()) { @@ -205,7 +205,7 @@ public class FeaturesFile extends AlignFile } seq.addSequenceFeature(sf); - while ((seq=align.findName(seq, seqId, true))!=null) + while ((seq = align.findName(seq, seqId, true)) != null) { seq.addSequenceFeature(new SequenceFeature(sf)); } @@ -234,12 +234,12 @@ public class FeaturesFile extends AlignFile if (!token.equals("ID_NOT_SPECIFIED")) { - seq = align.findName(seqId=token, true); + seq = align.findName(seqId = token, true); st.nextToken(); } else { - seqId=null; + seqId = null; try { index = Integer.parseInt(st.nextToken()); @@ -285,7 +285,8 @@ public class FeaturesFile extends AlignFile seq.addSequenceFeature(sf); - while (seqId!=null && (seq=align.findName(seq, seqId, false))!=null) + while (seqId != null + && (seq = align.findName(seq, seqId, false)) != null) { seq.addSequenceFeature(new SequenceFeature(sf)); } @@ -379,12 +380,15 @@ public class FeaturesFile extends AlignFile } -/** - * generate a features file for seqs - * @param seqs source of sequence features - * @param visible hash of feature types and colours - * @return features file contents - */ + /** + * generate a features file for seqs + * + * @param seqs + * source of sequence features + * @param visible + * hash of feature types and colours + * @return features file contents + */ public String printJalviewFormat(SequenceI[] seqs, Hashtable visible) { return printJalviewFormat(seqs, visible, true); @@ -392,9 +396,13 @@ public class FeaturesFile extends AlignFile /** * generate a features file for seqs with colours from visible (if any) - * @param seqs source of features - * @param visible hash of Colours for each feature type - * @param visOnly when true only feature types in 'visible' will be output + * + * @param seqs + * source of features + * @param visible + * hash of Colours for each feature type + * @param visOnly + * when true only feature types in 'visible' will be output * @return features file contents */ public String printJalviewFormat(SequenceI[] seqs, Hashtable visible, @@ -409,7 +417,8 @@ public class FeaturesFile extends AlignFile } if (visible != null && visOnly) { - // write feature colours only if we're given them and we are generating viewed features + // write feature colours only if we're given them and we are generating + // viewed features Enumeration en = visible.keys(); String type; int color;