- public static String Identify(String file, String protocol)\r
- {\r
- String reply = "error";\r
- try{\r
-\r
- BufferedReader reader = null;\r
-\r
- if(protocol.equals("File"))\r
- reader = new BufferedReader(new FileReader(file));\r
-\r
- else if (protocol.equals("URL"))\r
- {\r
- reply = "URL NOT FOUND";\r
- URL url = new URL(file);\r
- reader = new BufferedReader(new InputStreamReader( url.openStream() ) );\r
- reply = "error";\r
- }\r
- else if( protocol.equals("Paste"))\r
- reader = new BufferedReader( new StringReader(file) );\r
-\r
-\r
- String data;\r
- while( (data=reader.readLine())!=null)\r
- {\r
- data = data.toUpperCase();\r
- if(data.indexOf("#")==0 || data.length()<1)\r
- continue;\r
-\r
- if(data.indexOf("PILEUP")>-1)\r
- {\r
- reply = "MSF";\r
- break;\r
- }\r
- else if(data.indexOf("CLUSTAL")>-1)\r
- {\r
- reply = "CLUSTAL";\r
- break;\r
- }\r
- else if(data.indexOf(">P1;")>-1 || data.indexOf(">DL;")>-1)\r
- {\r
- reply = "PIR";\r
- break;\r
- }\r
- else if(data.indexOf(">")==0)\r
- {\r
- // could be BLC file\r
- data = reader.readLine();\r
- if(data.indexOf(">")==0)\r
- reply = "BLC";\r
- else\r
- reply = "FASTA";\r
-\r
- break;\r
- }\r
- else\r
+ /**\r
+ * DOCUMENT ME!\r
+ *\r
+ * @param file DOCUMENT ME!\r
+ * @param protocol DOCUMENT ME!\r
+ *\r
+ * @return DOCUMENT ME!\r
+ */\r
+ public static String Identify(String file, String protocol)\r
+ {\r
+ String reply = "PFAM";\r
+ String error = "FILE NOT FOUND";\r
+\r
+ try\r