2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 import java.util.List;
24 import java.util.Vector;
25 import java.util.regex.Pattern;
28 * Leaf node of UrlProvider composite
34 public class UrlProviderImpl implements UrlProviderI
36 private static final Pattern MIRIAM_PATTERN = Pattern
37 .compile("^MIR:\\d{8}$");
39 // minimum length of substitution in url link string
40 protected static final int MIN_SUBST_LENGTH = 4;
42 protected String defaultUrl;
45 public Vector<String> getLinksForMenu()
47 // TODO Auto-generated method stub
52 public String getDefaultUrl(String seqid)
54 // TODO Auto-generated method stub
59 public String getDefaultTarget(String seqid)
61 // TODO Auto-generated method stub
66 public boolean setDefaultUrl(String id)
68 // TODO Auto-generated method stub
73 public String writeUrlsAsString()
75 // TODO Auto-generated method stub
80 public String chooseDefaultUrl()
82 // TODO Auto-generated method stub
87 public List<UrlLinkDisplay> getLinksForTable()
93 public void setUrlData(List<UrlLinkDisplay> links)
95 // deliberately left empty
98 protected boolean isMiriamId(String id)
100 return MIRIAM_PATTERN.matcher(id).matches();
104 public boolean isUserEntry(String id)
106 return !isMiriamId(id);
110 public List<String> getDisplayColumnNames()