JAL-1620 version bump and release notes
[jalview.git] / src / jalview / ws / rest / RestServiceDescription.java
index 6828f2d..9c39b37 100644 (file)
@@ -1,19 +1,22 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
- * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
+ * Copyright (C) 2014 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
  * Jalview is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License 
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
  *  
  * Jalview is distributed in the hope that it will be useful, but 
  * WITHOUT ANY WARRANTY; without even the implied warranty 
  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
  * PURPOSE.  See the GNU General Public License for more details.
  * 
- * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
 package jalview.ws.rest;
 
@@ -873,100 +876,6 @@ public class RestServiceDescription
     return valid;
   }
 
-  public static void main(String argv[])
-  {
-    // test separator list
-    try
-    {
-      assert (separatorListToArray("foo=',',min='foo',max='1,2,3',fa=','",
-              ",").length == 4);
-      if (separatorListToArray("minsize='2', sep=','", ",").length == 2)
-      {
-        assert (false);
-      }
-
-    } catch (AssertionError x)
-    {
-      System.err.println("separatorListToArray is faulty.");
-    }
-    if (argv.length == 0)
-    {
-      if (!testRsdExchange("Test using default Shmmr service",
-              RestClient.makeShmmrRestClient().service))
-      {
-        System.err.println("default test failed.");
-      }
-      else
-      {
-        System.err.println("default test passed.");
-      }
-    }
-    else
-    {
-      int i = 0, p = 0;
-      for (String svc : argv)
-      {
-        p += testRsdExchange("Test " + (++i), svc) ? 1 : 0;
-      }
-      System.err.println("" + p + " out of " + i + " tests passed.");
-
-    }
-  }
-
-  private static boolean testRsdExchange(String desc, String servicestring)
-  {
-    try
-    {
-      RestServiceDescription newService = new RestServiceDescription(
-              servicestring);
-      if (!newService.isValid())
-      {
-        throw new Error("Failed to create service from '" + servicestring
-                + "'.\n" + newService.getInvalidMessage());
-      }
-      return testRsdExchange(desc, newService);
-    } catch (Throwable x)
-    {
-      System.err.println("Failed for service (" + desc + "): "
-              + servicestring);
-      x.printStackTrace();
-      return false;
-    }
-  }
-
-  private static boolean testRsdExchange(String desc,
-          RestServiceDescription service)
-  {
-    try
-    {
-      String fromservicetostring = service.toString();
-      RestServiceDescription newService = new RestServiceDescription(
-              fromservicetostring);
-      if (!newService.isValid())
-      {
-        throw new Error("Failed to create service from '"
-                + fromservicetostring + "'.\n"
-                + newService.getInvalidMessage());
-      }
-
-      if (!service.equals(newService))
-      {
-        System.err.println("Failed for service (" + desc + ").");
-        System.err.println("Original service and parsed service differ.");
-        System.err.println("Original: " + fromservicetostring);
-        System.err.println("Parsed  : " + newService.toString());
-        return false;
-      }
-    } catch (Throwable x)
-    {
-      System.err.println("Failed for service (" + desc + "): "
-              + service.toString());
-      x.printStackTrace();
-      return false;
-    }
-    return true;
-  }
-
   /**
    * covenience method to generate the id and sequence string vector from a set
    * of seuqences using each sequence's getName() and getSequenceAsString()