X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FGroupUrlLink.java;h=d0545b9afdd83158595a7659570ab81287bce741;hb=ce039b3f8a0b9a3a266838082a678821507ddcc3;hp=fccf3a4b80f348cc37a88afd880959709fa2d54f;hpb=153dd62dc91da13ae732600e6ea55ddbe15eab39;p=jalview.git diff --git a/src/jalview/util/GroupUrlLink.java b/src/jalview/util/GroupUrlLink.java index fccf3a4..d0545b9 100644 --- a/src/jalview/util/GroupUrlLink.java +++ b/src/jalview/util/GroupUrlLink.java @@ -1,30 +1,38 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6) - * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ 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 currently instantiated because Preferences never puts anything in + * groupURLLinks + */ public class GroupUrlLink { + @SuppressWarnings("serial") public class UrlStringTooLongException extends Exception { public UrlStringTooLongException(int lng) @@ -34,6 +42,7 @@ public class GroupUrlLink public int urlLength; + @Override public String toString() { return "Generated url is estimated to be too long (" + urlLength @@ -63,11 +72,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; @@ -76,33 +80,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 '