*/
package org.biojava.dasobert.das2;
-//import org.biojava.bio.program.das.dasalignment.DASException;
+// import org.biojava.bio.program.das.dasalignment.DASException;
import org.biojava.dasobert.dasregistry.*;
public class DasSourceConverter
}
- /** convert a das2 source to a das 1 source.
- * This only will work if is passes the Das2Source.isDas1Source() test
- * i.e. this is really a das1 server there
- *
- * @param das2source a DAS2Source to be converted
+ /**
+ * convert a das2 source to a das 1 source. This only will work if is passes
+ * the Das2Source.isDas1Source() test i.e. this is really a das1 server there
+ *
+ * @param das2source
+ * a DAS2Source to be converted
* @return a Das1Source
* @throws DASException
*/
public static Das1Source toDas1Source(Das2Source das2source)
- throws Exception
+ throws Exception
{
if (!das2source.hasDas1Capabilities())
{
- throw new Exception("this das source does not have das1 capabilitites");
+ throw new Exception(
+ "this das source does not have das1 capabilitites");
}
Das1Source ds = new Das1Source();
// convert the capabilitites to das1 capabiltities and get the url
Das2Capability[] caps = das2source.getDas2Capabilities();
String[] das1capabilitites = new String[caps.length];
- int DASPREFIXLENGTH = Das2CapabilityImpl.DAS1_CAPABILITY_PREFIX.length();
+ int DASPREFIXLENGTH = Das2CapabilityImpl.DAS1_CAPABILITY_PREFIX
+ .length();
for (int i = 0; i < caps.length; i++)
{
String query_uri = cap.getQueryUri();
String url = query_uri.substring(0,
- (query_uri.length() - c.length() + DASPREFIXLENGTH));
+ (query_uri.length() - c.length() + DASPREFIXLENGTH));
ds.setUrl(url);
}
ds.setCapabilities(das1capabilitites);