From 743075ad19dc11ae8456491c51a0c8808b996dc1 Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 9 Feb 2010 17:36:37 +0000 Subject: [PATCH] groupURL link preference variables --- src/jalview/bin/Cache.java | 2 ++ src/jalview/gui/Preferences.java | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index caf6bc1..621ded0 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -98,6 +98,8 @@ import org.biojava.dasobert.dasregistry.Das1Source; *
  • SORT_ALIGNMENT (No sort|Id|Pairwise Identity)
  • *
  • SEQUENCE_LINKS list of name|URL pairs for opening a url with * $SEQUENCE_ID$
  • + *
  • GROUP_LINKS list of name|URL[|<separator>] tuples - see jalview.utils.GroupURLLink for more info + *
  • *
  • DAS_REGISTRY_URL the registry to query
  • *
  • DEFAULT_BROWSER for unix
  • *
  • DAS_ACTIVE_SOURCE list of active sources
  • diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index b96fb71..8868832 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -44,6 +44,14 @@ public class Preferences extends GPreferences * $SEQUENCE_ID$ or $SEQUENCE_ID=/.possible | chars ./=$ */ public static Vector sequenceURLLinks; + /** + * Holds name and link separated with | character. Sequence IDS and Sequences must be + * $SEQUENCEIDS$ or $SEQUENCEIDS=/.possible | chars ./=$ and $SEQUENCES$ or $SEQUENCES=/.possible | chars ./=$ + * and separation character for first and second token specified after a pipe character at end |,|. + * (TODO: proper escape for using | to separate ids or sequences + */ + + public static Vector groupURLLinks; static { String string = Cache @@ -51,7 +59,7 @@ public class Preferences extends GPreferences "SEQUENCE_LINKS", "SRS|http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+(([uniprot-all:$SEQUENCE_ID$]))+-view+SwissEntry"); sequenceURLLinks = new Vector(); - + try { StringTokenizer st = new StringTokenizer(string, "|"); @@ -71,6 +79,14 @@ public class Preferences extends GPreferences { System.out.println(ex + "\nError parsing sequence links"); } + /** + * TODO: reformulate groupURL encoding so two or more can be stored in the .properties file as '|' separated strings + */ + + groupURLLinks = new Vector(); + groupURLLinks.addElement("UNIPROT|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?workflow=Default&datasetName=JalviewIDs$DATASETID$&input=$SEQUENCEIDS$&inputType=0|,"); + groupURLLinks.addElement("Seqs|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?workflow=Default&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCES=/([A-Za-z]+)+/=$&inputType=1|,"); + } Vector nameLinks, urlLinks; -- 1.7.10.2