JAL-2316 Refactoring of functionality to provide urls to gui
[jalview.git] / src / jalview / util / 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.util;
22
23 import java.util.Vector;
24 import java.util.regex.Pattern;
25
26 public class UrlProviderImpl implements UrlProviderI
27 {
28   private static final Pattern MIRIAM_PATTERN = Pattern
29           .compile("^MIR:\\d{8}$");
30   protected String defaultUrl;
31
32   @Override
33   public Vector<String> getLinksForDisplay()
34   {
35     // TODO Auto-generated method stub
36     return null;
37   }
38
39   @Override
40   public String getDefaultUrl()
41   {
42     return defaultUrl;
43   }
44
45   @Override
46   public String getDefaultUrl(String seqid)
47   {
48     // TODO Auto-generated method stub
49     return null;
50   }
51
52   @Override
53   public String getDefaultTarget(String seqid)
54   {
55     // TODO Auto-generated method stub
56     return null;
57   }
58
59   @Override
60   public boolean setDefaultUrl(String id)
61   {
62     // TODO Auto-generated method stub
63     return false;
64   }
65
66   @Override
67   public String writeUrlsAsString()
68   {
69     // TODO Auto-generated method stub
70     return null;
71   }
72
73   @Override
74   public void setUrlLinks(Vector<String> names, Vector<String> urls)
75   {
76     // TODO Auto-generated method stub
77
78   }
79
80   @Override
81   public String chooseDefaultUrl()
82   {
83     // TODO Auto-generated method stub
84     return null;
85   }
86
87   protected boolean isMiriamId(String id)
88   {
89     return MIRIAM_PATTERN.matcher(id).matches();
90   }
91
92
93
94 }