formatting
[jalview.git] / src / jalview / ws / dbsources / das / datamodel / JalviewSource.java
index 139bafe..f3729a8 100644 (file)
@@ -24,10 +24,13 @@ import jalview.ws.seqfetcher.DbSourceProxy;
 public class JalviewSource implements jalviewSourceI
 {
   SOURCE source;
+
   MultipleConnectionPropertyProviderI connprov;
-  public JalviewSource(SOURCE local2, MultipleConnectionPropertyProviderI connprov, boolean local)
+
+  public JalviewSource(SOURCE local2,
+          MultipleConnectionPropertyProviderI connprov, boolean local)
   {
-    this.connprov=connprov;
+    this.connprov = connprov;
     this.local = local;
     source = local2;
   }
@@ -311,22 +314,26 @@ public class JalviewSource implements jalviewSourceI
   {
     try
     {
-      // kind of dumb, since org.biodas.jdas.dassources.utils.VersionAdapter.getSourceUriFromQueryUri() does this,
-      // but this way, we can access non DAS 1.6 compliant sources (which have to have a URL like <sourcename>/das/ and cause a validation exception)
-      
+      // kind of dumb, since
+      // org.biodas.jdas.dassources.utils.VersionAdapter.getSourceUriFromQueryUri()
+      // does this,
+      // but this way, we can access non DAS 1.6 compliant sources (which have
+      // to have a URL like <sourcename>/das/ and cause a validation exception)
+
       for (CAPABILITY cap : getVersion().getCAPABILITY())
       {
         String capname = cap.getType().substring(
                 cap.getType().indexOf(":") + 1);
-        int p=cap.getQueryUri().lastIndexOf(capname);
-        if (p<-1) {
-          throw new Exception("Invalid das source: "+source.getUri());
-        } 
-        if (cap.getQueryUri().charAt(p)=='/')
+        int p = cap.getQueryUri().lastIndexOf(capname);
+        if (p < -1)
+        {
+          throw new Exception("Invalid das source: " + source.getUri());
+        }
+        if (cap.getQueryUri().charAt(p) == '/')
         {
           p--;
         }
-        return cap.getQueryUri().substring(0,p);
+        return cap.getQueryUri().substring(0, p);
       }
     } catch (Exception x)
     {