X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FJPredFile.java;h=e375df7c19e307b79efc5f087c6ad6c7f4f9fa20;hb=a83adb45bdf9554e270921b4baad94defd314b36;hp=fd971fd23df5dff4f90d8c2fec30efb514bcc6fe;hpb=4a5137b64f7ec23db2a09290bfcd392984a52150;p=jalview.git diff --git a/src/jalview/io/JPredFile.java b/src/jalview/io/JPredFile.java index fd971fd..e375df7 100755 --- a/src/jalview/io/JPredFile.java +++ b/src/jalview/io/JPredFile.java @@ -68,6 +68,8 @@ public class JPredFile extends AlignFile /** * Creates a new JPredFile object. * + * BH allows File or String + * * @param inFile * DOCUMENT ME! * @param sourceType @@ -76,7 +78,7 @@ public class JPredFile extends AlignFile * @throws IOException * DOCUMENT ME! */ - public JPredFile(String inFile, DataSourceType sourceType) + public JPredFile(Object inFile, DataSourceType sourceType) throws IOException { super(inFile, sourceType); @@ -219,8 +221,8 @@ public class JPredFile extends AlignFile for (int j = 0; j < i; j++) { - scores.setElementAt( - ((Float) scores.elementAt(j)).toString(), j); + scores.setElementAt(((Float) scores.elementAt(j)).toString(), + j); } scores.addElement(ascore); @@ -299,20 +301,20 @@ public class JPredFile extends AlignFile { // Add all sequence like objects Sequence newSeq = new Sequence(ids.elementAt(i).toString(), - seq_entries.elementAt(i).toString(), 1, seq_entries - .elementAt(i).toString().length()); + seq_entries.elementAt(i).toString(), 1, + seq_entries.elementAt(i).toString().length()); if (maxLength != seq_entries.elementAt(i).toString().length()) { - throw new IOException( - MessageManager - .formatMessage( - "exception.jpredconcide_entry_has_unexpected_number_of_columns", - new String[] { ids.elementAt(i).toString() })); + throw new IOException(MessageManager.formatMessage( + "exception.jpredconcide_entry_has_unexpected_number_of_columns", + new String[] + { ids.elementAt(i).toString() })); } - if ((newSeq.getName().startsWith("QUERY") || newSeq.getName() - .startsWith("align;")) && (QuerySeqPosition == -1)) + if ((newSeq.getName().startsWith("QUERY") + || newSeq.getName().startsWith("align;")) + && (QuerySeqPosition == -1)) { QuerySeqPosition = seqs.size(); } @@ -332,11 +334,10 @@ public class JPredFile extends AlignFile } catch (Exception e) { tal = null; - IOException ex = new IOException( - MessageManager - .formatMessage( - "exception.couldnt_parse_concise_annotation_for_prediction", - new String[] { e.getMessage() })); + IOException ex = new IOException(MessageManager.formatMessage( + "exception.couldnt_parse_concise_annotation_for_prediction", + new String[] + { e.getMessage() })); e.printStackTrace(); // java 1.1 does not have : // ex.setStackTrace(e.getStackTrace()); throw ex; @@ -362,10 +363,9 @@ public class JPredFile extends AlignFile } /** - * DOCUMENT ME! * * @param args - * DOCUMENT ME! + * @j2sIgnore */ public static void main(String[] args) {