private String label;
+ private String dbname;
+
private String regexReplace;
private boolean dynamic = false;
}
/**
- * Alternative constructor for separate name and link
+ * Alternative constructor for separate name, link and description
*
* @param name
+ * The string used to match the link to a DB reference id
* @param url
+ * The url to link to
+ * @param desc
+ * The description of the associated target DB
*/
- public UrlLink(String name, String url)
+ public UrlLink(String name, String url, String desc)
{
this(name + SEP + url);
+ dbname = desc;
}
/**
return label;
}
+ /**
+ * @return the name of this link's associated database
+ */
+ public String getDBName()
+ {
+ return dbname;
+ }
+
public String getUrlWithToken()
{
String var = (usesDBaccession ? DB_ACCESSION : SEQUENCE_ID);
}
/**
+ * Set the description
+ *
+ * @param desc
+ */
+ public void setDescription(String desc)
+ {
+ this.dbname = desc;
+ }
+
+ /**
* return one or more URL strings by applying regex to the given idstring
*
* @param idstring