merge from 2_4_Release branch
[jalview.git] / src / jalview / ws / seqfetcher / DbSourceProxyImpl.java
index 21272be..10aaf7d 100644 (file)
@@ -1,3 +1,21 @@
+/*\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.seqfetcher;\r
 \r
 import jalview.datamodel.Alignment;\r
@@ -11,7 +29,7 @@ import java.util.Hashtable;
  * common methods for implementations of the DbSourceProxy interface.\r
  * \r
  * @author JimP\r
- *\r
+ * \r
  */\r
 public abstract class DbSourceProxyImpl implements DbSourceProxy\r
 {\r
@@ -19,14 +37,19 @@ public abstract class DbSourceProxyImpl implements DbSourceProxy
   {\r
     // default constructor - do nothing probably.\r
   }\r
-  private Hashtable props=null;\r
-  /* (non-Javadoc)\r
+\r
+  private Hashtable props = null;\r
+\r
+  /*\r
+   * (non-Javadoc)\r
+   * \r
    * @see jalview.ws.DbSourceProxy#getDbSourceProperties()\r
    */\r
   public Hashtable getDbSourceProperties()\r
   {\r
     return props;\r
   }\r
+\r
   protected void addDbSourceProperty(Object propname)\r
   {\r
     addDbSourceProperty(propname, propname);\r
@@ -34,14 +57,17 @@ public abstract class DbSourceProxyImpl implements DbSourceProxy
 \r
   protected void addDbSourceProperty(Object propname, Object propvalue)\r
   {\r
-    if (props==null)\r
+    if (props == null)\r
     {\r
       props = new Hashtable();\r
     }\r
     props.put(propname, propvalue);\r
   }\r
-  boolean queryInProgress=false;\r
+\r
+  boolean queryInProgress = false;\r
+\r
   protected StringBuffer results = null;\r
+\r
   /*\r
    * (non-Javadoc)\r
    * \r
@@ -52,45 +78,51 @@ public abstract class DbSourceProxyImpl implements DbSourceProxy
     return results;\r
   }\r
 \r
-  /* (non-Javadoc)\r
+  /*\r
+   * (non-Javadoc)\r
+   * \r
    * @see jalview.ws.DbSourceProxy#queryInProgress()\r
    */\r
   public boolean queryInProgress()\r
   {\r
     return queryInProgress;\r
   }\r
+\r
   /**\r
    * call to set the queryInProgress flag\r
-   *\r
+   * \r
    */\r
   protected void startQuery()\r
   {\r
-    queryInProgress=true;\r
+    queryInProgress = true;\r
   }\r
+\r
   /**\r
    * call to clear the queryInProgress flag\r
-   *\r
+   * \r
    */\r
   protected void stopQuery()\r
   {\r
-    queryInProgress=false;\r
+    queryInProgress = false;\r
   }\r
 \r
   /**\r
    * create an alignment from raw text file...\r
+   * \r
    * @param result\r
    * @return null or a valid alignment\r
    * @throws Exception\r
    */\r
-  protected Alignment parseResult(String result) throws Exception {\r
+  protected Alignment parseResult(String result) throws Exception\r
+  {\r
     Alignment sequences = null;\r
     String format = new IdentifyFile().Identify(result, "Paste");\r
     if (FormatAdapter.isValidFormat(format))\r
     {\r
       sequences = new FormatAdapter().readFile(result.toString(), "Paste",\r
-            format);\r
+              format);\r
     }\r
     return sequences;\r
   }\r
-  \r
+\r
 }\r