X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FGroupUrlLink.java;h=e4c4ad05bda134e535426307d02059f2832dc425;hb=990ed4ffbaa7a95b2ebb6bf6ab0440310f6e83ab;hp=e8af4cd7e2e8bb54117e6a9583ba3147203694a0;hpb=aced09c4feeaf3406269442c14e54abeeb4cad81;p=jalview.git diff --git a/src/jalview/util/GroupUrlLink.java b/src/jalview/util/GroupUrlLink.java index e8af4cd..e4c4ad0 100644 --- a/src/jalview/util/GroupUrlLink.java +++ b/src/jalview/util/GroupUrlLink.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -20,14 +20,22 @@ */ package jalview.util; -import jalview.datamodel.Sequence; import jalview.datamodel.SequenceI; import java.util.Hashtable; -import java.util.Vector; +import com.stevesoft.pat.Regex; + +/** + * This class is not implemented because Preferences never puts anything in + * groupURLLinks. + * + * @author hansonr + * + */ public class GroupUrlLink { + @SuppressWarnings("serial") public class UrlStringTooLongException extends Exception { public UrlStringTooLongException(int lng) @@ -37,6 +45,7 @@ public class GroupUrlLink public int urlLength; + @Override public String toString() { return "Generated url is estimated to be too long (" + urlLength @@ -66,11 +75,6 @@ public class GroupUrlLink private String invalidMessage = null; /** - * tokens that can be replaced in the URL. - */ - private static String[] tokens; - - /** * position of each token (which can appear once only) in the url */ private int[] segs; @@ -79,33 +83,34 @@ public class GroupUrlLink * contains tokens in the order they appear in the URL template. */ private String[] mtch; - static - { - if (tokens == null) - { - tokens = new String[] - { "SEQUENCEIDS", "SEQUENCES", "DATASETID" }; - } - } - - /** - * test for GroupURLType bitfield (with default tokens) - */ - public static final int SEQUENCEIDS = 1; - - /** - * test for GroupURLType bitfield (with default tokens) - */ - public static final int SEQUENCES = 2; /** - * test for GroupURLType bitfield (with default tokens) + * tokens that can be replaced in the URL. */ - public static final int DATASETID = 4; - + private static final String[] tokens = new String[] { "SEQUENCEIDS", + "SEQUENCES", "DATASETID" }; + + // /** + // * test for GroupURLType bitfield (with default tokens) + // */ + // private static final int SEQUENCEIDS = 1; + // + // /** + // * test for GroupURLType bitfield (with default tokens) + // */ + // private static final int SEQUENCES = 2; + // + // /** + // * test for GroupURLType bitfield (with default tokens) + // */ + // private static final int DATASETID = 4; + // // private int idseg = -1, seqseg = -1; /** + * + * called by PopupMenu.buildGroupURLMenu() + * * parse the given linkString of the form '