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
26 implements Das2Capability
33 public static String DAS1_CAPABILITY_PREFIX = "das1:";
35 public Das2CapabilityImpl()
40 formats = new String[0];
44 public boolean isDas1Style()
47 if (capability == null)
51 if (capability.length() < DAS1_CAPABILITY_PREFIX.length())
55 if (capability.substring(0,
56 DAS1_CAPABILITY_PREFIX.length()).equals(DAS1_CAPABILITY_PREFIX))
64 public boolean equals(Das2Capability other)
67 boolean status = true;
69 if (!capability.equals(other.getCapability()))
73 if (!queryId.equals(other.getQueryUri()))
84 h = 31 * h + (null == capability ? 0 : capability.hashCode());
85 h = 31 * h + (null == queryId ? 0 : queryId.hashCode());
90 public String toString()
92 String txt = "capability " + capability + " queryId " + queryId;
96 public String getCapability()
102 public String[] getFormats()
107 public String getQueryUri()
112 public void setCapability(String type)
118 public void setFormats(String[] formats)
121 this.formats = formats;
124 public void setQueryUri(String id)