JAL-2316 Restructure identifiers.org download
[jalview.git] / src / jalview / urls / UrlProviderI.java
index 9ecb28a..595f98d 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.urls;
 
+import java.util.List;
 import java.util.Vector;
 
 /**
@@ -31,29 +32,22 @@ import java.util.Vector;
 public interface UrlProviderI
 {
 
-  /*
-   * Default sequence URL link label for EMBL-EBI search
-   */
-  public static final String DEFAULT_LABEL = "EMBL-EBI Search";
-
-  /*
-   * Default sequence URL link string for EMBL-EBI search
-   */
-  public static final String DEFAULT_STRING = DEFAULT_LABEL
-          + "|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$";
-
   /**
    * Get names and urls in as strings for display
    * 
    */
-  Vector<String> getLinksForDisplay();
+  Vector<String> getLinksForMenu();
 
   /**
-   * Get the id of the default URL
+   * Get names and urls as strings for display
    * 
-   * @return id of the default URL
    */
-  String getDefaultUrl();
+  List<UrlLinkDisplay> getLinksForTable();
+
+  /**
+   * Set names and urls from display settings
+   */
+  void setUrlData(List<UrlLinkDisplay> links);
 
   /**
    * Get the link for the default URL
@@ -64,6 +58,13 @@ public interface UrlProviderI
   String getDefaultUrl(String seqid);
 
   /**
+   * Get the default URL id
+   * 
+   * @return id for default URL
+   */
+  String getDefaultUrlId();
+
+  /**
    * Get the target of thelink for the default URL
    * 
    * @seqid sequence id for which to build link
@@ -85,16 +86,7 @@ public interface UrlProviderI
    * 
    * @return string representation of available URLs
    */
-  String writeUrlsAsString();
-
-  /**
-   * Set URL links from pair of collections
-   * 
-   * @param names
-   * @param urls
-   */
-  void setUrlLinks(Vector<String> names, Vector<String> urls)
-          throws IllegalArgumentException;
+  String writeUrlsAsString(boolean selected);
 
   /**
    * Choose the default URL in the event of the selected default being
@@ -103,4 +95,9 @@ public interface UrlProviderI
    * @return id of chosen default url
    */
   String chooseDefaultUrl();
+
+  /**
+   * Determine if id is for a user-defined URL
+   */
+  boolean isUserEntry(String id);
 }