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;
}
{
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)
{