merge from 2_4_Release branch
[jalview.git] / src / org / biojava / dasobert / das2 / DasSourceConverter.java
index 77cda0f..3e4d8e8 100755 (executable)
@@ -22,7 +22,7 @@
  */
 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
@@ -34,20 +34,22 @@ 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();
@@ -65,7 +67,8 @@ public class DasSourceConverter
     // 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++)
     {
@@ -78,7 +81,7 @@ public class DasSourceConverter
       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);