prevent duplicate service submission links
[jalview.git] / src / jalview / util / UrlLink.java
index c2df608..00e33b2 100644 (file)
@@ -1,6 +1,6 @@
 /*\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
+ * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)\r
+ * Copyright (C) 2009 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
@@ -29,6 +29,7 @@ public class UrlLink
    * strings and replace the result in the URL. Regex's operate on the whole ID\r
    * string given to the matchURL method, if no regex is supplied, then only\r
    * text following the first pipe symbol will be susbstituted.\r
+   * Usage documentation todo.\r
    */\r
   private String url_suffix, url_prefix, target, label, regexReplace;\r
 \r
@@ -171,8 +172,8 @@ public class UrlLink
   }\r
 \r
   /**\r
-   * \r
-   * @return true if URL string could not be parsed properly.\r
+   * Check if URL string was parsed properly.\r
+   * @return boolean - if false then <code>getInvalidMessage</code> returns an error message\r
    */\r
   public boolean isValid()\r
   {\r
@@ -344,7 +345,7 @@ public class UrlLink
      * //"123123312", "123123 ABCDE foo", "PFAM:PF23943",\r
      */\r
     "Label:gi|9234|pdb|102L|A" };\r
-\r
+    // TODO: test the setLabel method.\r
     for (int i = 0; i < links.length; i++)\r
     {\r
       UrlLink ul = new UrlLink(links[i]);\r
@@ -384,4 +385,9 @@ public class UrlLink
     // TODO Auto-generated method stub\r
     return dynamic;\r
   }\r
+\r
+  public void setLabel(String newlabel)\r
+  {\r
+    this.label = newlabel;\r
+  }\r
 }\r