/**\r
* DOCUMENT ME!\r
*/\r
- public void parse()\r
+ public void parse() throws IOException\r
{\r
boolean idsFound = false;\r
Vector ids = new Vector();\r
\r
String line = null;\r
\r
- try\r
- {\r
do\r
{\r
line = nextLine();\r
\r
for (int i = 0; i < ids.size(); i++)\r
{\r
- Sequence newSeq = new Sequence(ids.elementAt(i).toString(),\r
- seqstrings[i].toString(),\r
- Integer.parseInt(starts.elementAt(i).toString()),\r
- Integer.parseInt(ends.elementAt(i).toString()));\r
+ Sequence newSeq = new Sequence(ids.elementAt(i).toString(),\r
+ seqstrings[i].toString(),\r
+ Integer.parseInt(starts.elementAt(i).\r
+ toString()),\r
+ Integer.parseInt(ends.elementAt(i).toString()));\r
+\r
+ if (!isValidProteinSequence(newSeq.getSequence()))\r
+ {\r
+ throw new IOException(AppletFormatAdapter.INVALID_CHARACTERS\r
+ +" : "+ newSeq.getName()\r
+ +" : "+invalidCharacter);\r
+\r
+ }\r
+\r
seqs.addElement(newSeq);\r
}\r
- }\r
- catch (Exception ex)\r
- {\r
- ex.printStackTrace();\r
- }\r
+\r
}\r
\r
/**\r