JAL-2316 GUI updates to Connections tab in Preferences dialog
[jalview.git] / src / jalview / urls / UrlProviderImpl.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
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.
11  *  
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.
16  * 
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.
20  */
21 package jalview.urls;
22
23 import java.util.List;
24 import java.util.Vector;
25 import java.util.regex.Pattern;
26
27 /**
28  * Leaf node of UrlProvider composite
29  * 
30  * @author $author$
31  * @version $Revision$
32  */
33
34 public class UrlProviderImpl implements UrlProviderI
35 {
36   private static final Pattern MIRIAM_PATTERN = Pattern
37           .compile("^MIR:\\d{8}$");
38   protected String defaultUrl;
39
40   @Override
41   public Vector<String> getLinksForDisplay()
42   {
43     // TODO Auto-generated method stub
44     return null;
45   }
46
47   @Override
48   public String getDefaultUrl()
49   {
50     return defaultUrl;
51   }
52
53   @Override
54   public String getDefaultUrl(String seqid)
55   {
56     // TODO Auto-generated method stub
57     return null;
58   }
59
60   @Override
61   public String getDefaultTarget(String seqid)
62   {
63     // TODO Auto-generated method stub
64     return null;
65   }
66
67   @Override
68   public boolean setDefaultUrl(String id)
69   {
70     // TODO Auto-generated method stub
71     return false;
72   }
73
74   @Override
75   public String writeUrlsAsString()
76   {
77     // TODO Auto-generated method stub
78     return null;
79   }
80
81   @Override
82   public void setUrlLinks(Vector<String> names, Vector<String> urls)
83   {
84     // TODO Auto-generated method stub
85
86   }
87
88   @Override
89   public String chooseDefaultUrl()
90   {
91     // TODO Auto-generated method stub
92     return null;
93   }
94
95   @Override
96   public List<UrlLinkDisplay> getLinksForTable()
97   {
98     return null;
99   }
100
101   @Override
102   public void setUrlData(List<UrlLinkDisplay> links)
103   {
104     // deliberately left empty
105   }
106
107   protected boolean isMiriamId(String id)
108   {
109     return MIRIAM_PATTERN.matcher(id).matches();
110   }
111
112   @Override
113   public boolean isUserEntry(String id)
114   {
115     return !isMiriamId(id);
116   }
117
118 }