X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAlignFile.java;h=a603ccac45d6d9577a076be41a481c2bf253230c;hb=9f327c52e2dc32b445f87c1852b7f5ffa0196870;hp=d36a5880f860b7f1a2a600445af52893cae4cb90;hpb=4a5137b64f7ec23db2a09290bfcd392984a52150;p=jalview.git diff --git a/src/jalview/io/AlignFile.java b/src/jalview/io/AlignFile.java index d36a588..a603cca 100755 --- a/src/jalview/io/AlignFile.java +++ b/src/jalview/io/AlignFile.java @@ -40,7 +40,8 @@ import java.util.Vector; * @author $author$ * @version $Revision$ */ -public abstract class AlignFile extends FileParse implements AlignmentFileI +public abstract class AlignFile extends FileParse + implements AlignmentFileReaderI, AlignmentFileWriterI { int noSeqs = 0; @@ -65,7 +66,7 @@ public abstract class AlignFile extends FileParse implements AlignmentFileI /** * Properties to be added to generated alignment object */ - protected Hashtable properties; + private Hashtable properties; long start; @@ -117,8 +118,7 @@ public abstract class AlignFile extends FileParse implements AlignmentFileI * @throws IOException */ public AlignFile(boolean parseImmediately, String dataObject, - DataSourceType sourceType) - throws IOException + DataSourceType sourceType) throws IOException { super(dataObject, sourceType); initData(); @@ -281,9 +281,8 @@ public abstract class AlignFile extends FileParse implements AlignmentFileI { if (key == null) { - throw new Error( - MessageManager - .getString("error.implementation_error_cannot_have_null_alignment")); + throw new Error(MessageManager.getString( + "error.implementation_error_cannot_have_null_alignment")); } if (value == null) { @@ -370,8 +369,8 @@ public abstract class AlignFile extends FileParse implements AlignmentFileI } /** - * Creates the output id. Adds prefix Uniprot format source|id And suffix - * Jalview /start-end + * Creates the output id. Adds prefix Uniprot format source|id and optionally + * suffix Jalview /start-end * * @param jvsuffix * @@ -382,6 +381,11 @@ public abstract class AlignFile extends FileParse implements AlignmentFileI return seq.getDisplayId(jvsuffix); } + String printId(SequenceI seq) + { + return printId(seq, true); + } + /** * vector of String[] treeName, newickString pairs */ @@ -411,4 +415,8 @@ public abstract class AlignFile extends FileParse implements AlignmentFileI } } + protected void addSequence(SequenceI seq) + { + seqs.add(seq); + } }