+/*\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)\r
+ * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * \r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ * \r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\r
+ */\r
package jalview.ws.dbsources;\r
\r
import jalview.datamodel.Alignment;\r
public AlignmentI getEmblSequenceRecords(String emprefx, String query) throws Exception\r
{\r
startQuery();\r
- SequenceI seqs[] = null;\r
- Vector alseq = new Vector(); // the sequences that will actually be presented in the alignment\r
- StringBuffer result = new StringBuffer();\r
EBIFetchClient dbFetch = new EBIFetchClient();\r
File reply; \r
try {\r
stopQuery();\r
throw new Exception("EBI EMBL XML retrieval failed on "+emprefx.toLowerCase()+":"+query.trim(),e);\r
}\r
+ return getEmblSequenceRecords(emprefx, query, reply);\r
+ }\r
+ /**\r
+ * parse an emblxml file stored locally\r
+ * @param emprefx either EMBL or EMBLCDS strings are allowed - anything else will not retrieve emblxml\r
+ * @param query\r
+ * @param file the EMBL XML file containing the results of a query\r
+ * @return\r
+ * @throws Exception\r
+ */\r
+ public AlignmentI getEmblSequenceRecords(String emprefx, String query, File reply) throws Exception\r
+ {\r
+ SequenceI seqs[] = null;\r
+ StringBuffer result = new StringBuffer();\r
if (reply != null && reply.exists())\r
{\r
efile=null;\r
return al;\r
}\r
\r
-}
\ No newline at end of file
+}\r