(JAL-1016) noted position where race condition occurs
[jalview.git] / src / org / biojava / dasobert / dasregistry / DasSource.java
index c9aee5d..892963b 100755 (executable)
  * at:
  *
  *      http://www.biojava.org/
- * 
+ *
  * Created on Feb 8, 2006
  *
  */
 package org.biojava.dasobert.dasregistry;
 
-import java.util.Date;
+import java.util.*;
+
+public interface DasSource
+{
+
+  public void setLocal(boolean flag);
+
+  public boolean isLocal();
+
+  /**
+   * compare if two das sources are equal
+   * 
+   * @param ds
+   * @return returns true if two DAS sources are equivalent
+   */
+  public boolean equals(DasSource ds);
+
+  /**
+   * classes that implement equals, should also implement hashKey
+   * 
+   * @return the hash code of a das source
+   */
+  public int hashCode();
 
-public interface DasSource {
+  public void setId(String i);
 
-    public  void setLocal(boolean flag);
+  /**
+   * get a the Id of the DasSource. The Id is a unique db identifier. The public
+   * DAS-Registry has Auto_Ids that look like DASSOURCE:12345; public look like
+   * XYZ:12345, where the XYZ prefix can be configured in the config file.
+   * 
+   * @return String the ID of a Das Source
+   */
+  public String getId();
 
-    public  boolean isLocal();
+  public void setNickname(String name);
 
-    /** compare if two das sources are equal
-     * 
-     * @param ds
-     * @return
-     */
-    public boolean equals(DasSource ds);
-    
-    /** classes that implement equals, should also implement hashKey
-     * 
-     * @return
-     */
-    public int hashCode();
-    
-    
-    public  void setId(String i);
+  public String getNickname();
 
-    /** get a the Id of the DasSource. The Id is a unique db
-     * identifier. The public DAS-Registry has Auto_Ids that look like
-     * DASSOURCE:12345; public look like XYZ:12345, where the XYZ
-     * prefix can be configured in the config file.
-     */
-    public  String getId();
+  public void setUrl(String u);
 
-    public  void setNickname(String name);
+  public void setAdminemail(String u);
 
-    public  String getNickname();
+  public void setDescription(String u);
 
-    public  void setUrl(String u);
+  public void setCoordinateSystem(DasCoordinateSystem[] u);
 
-    public  void setAdminemail(String u);
+  public void setCapabilities(String[] u);
 
-    public  void setDescription(String u);
+  /**
+   * test if a this source has a particular capability
+   * 
+   * @param testCapability
+   * @return <code>true</code> if the server has this capability.
+   */
+  public boolean hasCapability(String testCapability);
 
-    public  void setCoordinateSystem(DasCoordinateSystem[] u);
+  public String getUrl();
 
-    public  void setCapabilities(String[] u);
+  public String getAdminemail();
 
-    public  String getUrl();
+  public String getDescription();
 
-    public  String getAdminemail();
+  public String[] getCapabilities();
 
-    public  String getDescription();
+  public DasCoordinateSystem[] getCoordinateSystem();
 
-    public  String[] getCapabilities();
+  public void setRegisterDate(Date d);
 
-    public  DasCoordinateSystem[] getCoordinateSystem();
+  public Date getRegisterDate();
 
-    public  void setRegisterDate(Date d);
+  public void setLeaseDate(Date d);
 
-    public  Date getRegisterDate();
+  public Date getLeaseDate();
 
-    public  void setLeaseDate(Date d);
+  public void setLabels(String[] ls);
 
-    public  Date getLeaseDate();
+  public String[] getLabels();
 
-    public  void setLabels(String[] ls);
+  public void setHelperurl(String url);
 
-    public  String[] getLabels();
+  public String getHelperurl();
 
-    public  void setHelperurl(String url);
+  // TestCode is now part of the coordinate system!
+  // public void setTestCode(String code);
+  // public String getTestCode();
 
-    public  String getHelperurl();
+  public void setAlertAdmin(boolean flag);
 
-    // TestCode is now part of the coordinate system!
-    //public  void setTestCode(String code);
-    //public  String getTestCode();
+  public boolean getAlertAdmin();
 
-    public  void setAlertAdmin(boolean flag);
+  /**
+   * set Properties for this DAS source, e.g. project name
+   * 
+   * @param properties
+   */
+  public void setProperties(Map properties);
 
-    public  boolean getAlertAdmin();
+  /**
+   * get Properties for this DAS source
+   * 
+   * @return Properties
+   */
+  public Map getProperties();
 
 }
\ No newline at end of file