* at:
*
* http://www.biojava.org/
- *
+ *
* Created on Feb 9, 2006
*
*/
package org.biojava.dasobert.das2;
-public class Das2CapabilityImpl
-implements Das2Capability{
-
- String capability;
- String[] formats;
- String queryId;
-
- public static String DAS1_CAPABILITY_PREFIX = "das1:";
-
- public Das2CapabilityImpl() {
- super();
- capability = "undef";
- queryId = "";
- formats = new String[0];
+public class Das2CapabilityImpl
+ implements Das2Capability
+{
+
+ String capability;
+ String[] formats;
+ String queryId;
+
+ public static String DAS1_CAPABILITY_PREFIX = "das1:";
+
+ public Das2CapabilityImpl()
+ {
+ super();
+ capability = "undef";
+ queryId = "";
+ formats = new String[0];
+
+ }
+
+ public boolean isDas1Style()
+ {
+ if (capability == null)
+ {
+ return false;
}
-
- public boolean isDas1Style(){
-
- if ( capability == null)
- return false;
- if ( capability.length() < DAS1_CAPABILITY_PREFIX.length())
- return false;
- if ( capability.substring(0,DAS1_CAPABILITY_PREFIX.length()).equals(DAS1_CAPABILITY_PREFIX))
- return true;
- return false;
-
+ if (capability.length() < DAS1_CAPABILITY_PREFIX.length())
+ {
+ return false;
}
-
- public boolean equals(Das2Capability other){
-
- boolean status = true;
-
- if (! capability.equals(other.getCapability()))
- status = false;
- if ( ! queryId.equals(other.getQueryUri()))
- status = false;
-
- return status;
+ if (capability.substring(0,
+ DAS1_CAPABILITY_PREFIX.length()).equals(DAS1_CAPABILITY_PREFIX))
+ {
+ return true;
}
-
- public int hashCode(){
- int h = 7;
- h = 31 * h + ( null == capability ? 0 : capability.hashCode()) ;
- h = 31 * h + ( null == queryId ? 0 : queryId.hashCode()) ;
-
- return h;
+ return false;
+
+ }
+
+ public boolean equals(Das2Capability other)
+ {
+
+ boolean status = true;
+
+ if (!capability.equals(other.getCapability()))
+ {
+ status = false;
}
-
- public String toString(){
- String txt ="capability " + capability + " queryId " + queryId;
- return txt;
+ if (!queryId.equals(other.getQueryUri()))
+ {
+ status = false;
}
- public String getCapability() {
-
- return capability;
- }
+ return status;
+ }
- public String[] getFormats() {
- return formats;
- }
+ public int hashCode()
+ {
+ int h = 7;
+ h = 31 * h + (null == capability ? 0 : capability.hashCode());
+ h = 31 * h + (null == queryId ? 0 : queryId.hashCode());
- public String getQueryUri() {
- return queryId;
- }
+ return h;
+ }
- public void setCapability(String type) {
- capability = type;
-
- }
+ public String toString()
+ {
+ String txt = "capability " + capability + " queryId " + queryId;
+ return txt;
+ }
- public void setFormats(String[] formats) {
-
- this.formats = formats;
- }
+ public String getCapability()
+ {
- public void setQueryUri(String id) {
- queryId = id;
-
- }
-
-
+ return capability;
+ }
+
+ public String[] getFormats()
+ {
+ return formats;
+ }
+
+ public String getQueryUri()
+ {
+ return queryId;
+ }
+
+ public void setCapability(String type)
+ {
+ capability = type;
+
+ }
+
+ public void setFormats(String[] formats)
+ {
+
+ this.formats = formats;
+ }
+
+ public void setQueryUri(String id)
+ {
+ queryId = id;
+
+ }
}