2 * BioJava development code
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,
9 * http://www.gnu.org/copyleft/lesser.html
11 * Copyright for this code is held jointly by the individual
12 * authors. These should be listed in @author doc comments.
14 * For more information on the BioJava project and its aims,
15 * or to join the biojava-l mailing list, visit the home page
18 * http://www.biojava.org/
20 * Created on Feb 9, 2006
23 package org.biojava.dasobert.das2;
25 public class Das2CapabilityImpl implements Das2Capability
34 public static String DAS1_CAPABILITY_PREFIX = "das1:";
36 public Das2CapabilityImpl()
41 formats = new String[0];
45 public boolean isDas1Style()
48 if (capability == null)
52 if (capability.length() < DAS1_CAPABILITY_PREFIX.length())
56 if (capability.substring(0, DAS1_CAPABILITY_PREFIX.length()).equals(
57 DAS1_CAPABILITY_PREFIX))
65 public boolean equals(Das2Capability other)
68 boolean status = true;
70 if (!capability.equals(other.getCapability()))
74 if (!queryId.equals(other.getQueryUri()))
85 h = 31 * h + (null == capability ? 0 : capability.hashCode());
86 h = 31 * h + (null == queryId ? 0 : queryId.hashCode());
91 public String toString()
93 String txt = "capability " + capability + " queryId " + queryId;
97 public String getCapability()
103 public String[] getFormats()
108 public String getQueryUri()
113 public void setCapability(String type)
119 public void setFormats(String[] formats)
122 this.formats = formats;
125 public void setQueryUri(String id)