X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FMSFfile.java;h=c3ee382a004d9e8577b8d06e872644d27e26821d;hb=28787d9646cca5dd77190930f59b7ff32cf995b4;hp=6b584a80f16363d2cc452db9dca1e6853049eee1;hpb=797df64fa2a0a30773d0f48f5494d4155e5a8be3;p=jalview.git diff --git a/src/jalview/io/MSFfile.java b/src/jalview/io/MSFfile.java index 6b584a8..c3ee382 100755 --- a/src/jalview/io/MSFfile.java +++ b/src/jalview/io/MSFfile.java @@ -1,13 +1,13 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) - * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle * * 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 @@ -20,6 +20,15 @@ package jalview.io; import java.io.*; import java.util.*; +import javax.xml.parsers.ParserConfigurationException; + +import org.xml.sax.SAXException; + +import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax; +import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed; +import fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied; +import fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses; + import jalview.datamodel.*; import jalview.util.*; @@ -49,13 +58,20 @@ public class MSFfile extends AlignFile * * @throws IOException * DOCUMENT ME! + * @throws SAXException + * @throws ParserConfigurationException + * @throws ExceptionFileFormatOrSyntax + * @throws ExceptionLoadingFailed + * @throws ExceptionPermissionDenied + * @throws InterruptedException + * @throws ExceptionUnmatchedClosingParentheses */ - public MSFfile(String inFile, String type) throws IOException + public MSFfile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException, ExceptionUnmatchedClosingParentheses { super(inFile, type); } - public MSFfile(FileParse source) throws IOException + public MSFfile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException, ExceptionUnmatchedClosingParentheses { super(source); } @@ -217,7 +233,7 @@ public class MSFfile extends AlignFile StringBuffer out = new StringBuffer("!!" + (is_NA ? "NA" : "AA") + "_MULTIPLE_ALIGNMENT 1.0"); - // TODO: JBPNote : Jalview doesn't remember NA or AA yet. + // TODO: JBPNote : Jalview doesn't remember NA or AA yet. out.append(newline); out.append(newline); int max = 0; @@ -228,7 +244,7 @@ public class MSFfile extends AlignFile { // Replace all internal gaps with . and external spaces with ~ s[i] = new Sequence(seqs[i].getName(), seqs[i].getSequenceAsString() - .replace('-', '.'), seqs[i].getStart(),seqs[i].getEnd()); + .replace('-', '.'), seqs[i].getStart(), seqs[i].getEnd()); StringBuffer sb = new StringBuffer(); sb.append(s[i].getSequence()); @@ -301,7 +317,7 @@ public class MSFfile extends AlignFile idBlock[i] = new String("Len: " + maxLenpad.form(s[i].getSequence().length) + " Check: " - + maxChkpad.form(checksums[i]) + " Weight: 1.00"+newline); + + maxChkpad.form(checksums[i]) + " Weight: 1.00" + newline); if (s[i].getName().length() > maxid) { @@ -335,7 +351,8 @@ public class MSFfile extends AlignFile maxid++; out.append(newline); - out.append(newline);out.append("//"); + out.append(newline); + out.append("//"); out.append(newline); out.append(newline); int len = 50;