args for emblfile parser main method
authorjprocter <Jim Procter>
Thu, 6 Sep 2007 17:30:09 +0000 (17:30 +0000)
committerjprocter <Jim Procter>
Thu, 6 Sep 2007 17:30:09 +0000 (17:30 +0000)
src/jalview/datamodel/xdb/embl/EmblFile.java

index 3b04396..691cbad 100644 (file)
@@ -85,8 +85,17 @@ public class EmblFile {
         return record;
       }
     public static void main(String args[]) {
-        EmblFile myfile = EmblFile.getEmblFile(new File("C:\\Documents and Settings\\JimP\\workspace-3.2\\Jalview Release\\schemas\\embleRecordV1.1.xml"));
+      File mf = null; 
+        if (args.length==1)
+        {
+          mf = new File(args[0]);
+        }
+        if (!mf.exists())
+        {
+          mf = new File("C:\\Documents and Settings\\JimP\\workspace-3.2\\Jalview Release\\schemas\\embleRecordV1.1.xml");    
+        }
+        EmblFile myfile = EmblFile.getEmblFile(mf);
         if (myfile!=null && myfile.entries!=null && myfile.entries.size()>0)
-            System.out.println(myfile.entries.size()+" Records read.");
+            System.out.println(myfile.entries.size()+" Records read. ("+mf+")");
         }
 }