X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Forg%2Fbiojava%2Fdasobert%2Fdasregistry%2FDasSource.java;h=892963b48af4b547056fd49fd82bc7e3a4fab988;hb=ec4ef38882bce0469ce7c65cd70ceb85421cfbd2;hp=c9aee5dad45f4e0bb70be35720ec921e9a87f7b6;hpb=ac8acb905e84708b759ae1e87eaf6691d9376d57;p=jalview.git diff --git a/src/org/biojava/dasobert/dasregistry/DasSource.java b/src/org/biojava/dasobert/dasregistry/DasSource.java index c9aee5d..892963b 100755 --- a/src/org/biojava/dasobert/dasregistry/DasSource.java +++ b/src/org/biojava/dasobert/dasregistry/DasSource.java @@ -16,89 +16,115 @@ * 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 true 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