merge from 2_4_Release branch
[jalview.git] / src / org / biojava / dasobert / dasregistry / DasSource.java
1 /*
2  *                  BioJava development code
3  *
4  * This code may be freely distributed and modified under the
5  * terms of the GNU Lesser General Public Licence.  This should
6  * be distributed with the code.  If you do not have a copy,
7  * see:
8  *
9  *      http://www.gnu.org/copyleft/lesser.html
10  *
11  * Copyright for this code is held jointly by the individual
12  * authors.  These should be listed in @author doc comments.
13  *
14  * For more information on the BioJava project and its aims,
15  * or to join the biojava-l mailing list, visit the home page
16  * at:
17  *
18  *      http://www.biojava.org/
19  *
20  * Created on Feb 8, 2006
21  *
22  */
23 package org.biojava.dasobert.dasregistry;
24
25 import java.util.*;
26
27 public interface DasSource
28 {
29
30   public void setLocal(boolean flag);
31
32   public boolean isLocal();
33
34   /**
35    * compare if two das sources are equal
36    * 
37    * @param ds
38    * @return returns true if two DAS sources are equivalent
39    */
40   public boolean equals(DasSource ds);
41
42   /**
43    * classes that implement equals, should also implement hashKey
44    * 
45    * @return the hash code of a das source
46    */
47   public int hashCode();
48
49   public void setId(String i);
50
51   /**
52    * get a the Id of the DasSource. The Id is a unique db identifier. The public
53    * DAS-Registry has Auto_Ids that look like DASSOURCE:12345; public look like
54    * XYZ:12345, where the XYZ prefix can be configured in the config file.
55    * 
56    * @return String the ID of a Das Source
57    */
58   public String getId();
59
60   public void setNickname(String name);
61
62   public String getNickname();
63
64   public void setUrl(String u);
65
66   public void setAdminemail(String u);
67
68   public void setDescription(String u);
69
70   public void setCoordinateSystem(DasCoordinateSystem[] u);
71
72   public void setCapabilities(String[] u);
73
74   /**
75    * test if a this source has a particular capability
76    * 
77    * @param testCapability
78    * @return <code>true</code> if the server has this capability.
79    */
80   public boolean hasCapability(String testCapability);
81
82   public String getUrl();
83
84   public String getAdminemail();
85
86   public String getDescription();
87
88   public String[] getCapabilities();
89
90   public DasCoordinateSystem[] getCoordinateSystem();
91
92   public void setRegisterDate(Date d);
93
94   public Date getRegisterDate();
95
96   public void setLeaseDate(Date d);
97
98   public Date getLeaseDate();
99
100   public void setLabels(String[] ls);
101
102   public String[] getLabels();
103
104   public void setHelperurl(String url);
105
106   public String getHelperurl();
107
108   // TestCode is now part of the coordinate system!
109   // public void setTestCode(String code);
110   // public String getTestCode();
111
112   public void setAlertAdmin(boolean flag);
113
114   public boolean getAlertAdmin();
115
116   /**
117    * set Properties for this DAS source, e.g. project name
118    * 
119    * @param properties
120    */
121   public void setProperties(Map properties);
122
123   /**
124    * get Properties for this DAS source
125    * 
126    * @return Properties
127    */
128   public Map getProperties();
129
130 }