/**
*
*/
-public class DasSourceRegistry implements DasSourceRegistryI,
- MultipleConnectionPropertyProviderI
+public class DasSourceRegistry
+ implements DasSourceRegistryI, MultipleConnectionPropertyProviderI
{
// private org.biodas.jdas.schema.sources.SOURCE[] dasSources = null;
private List<jalviewSourceI> dasSources = null;
return loadingDasSources;
}
+ @Override
public String getDasRegistryURL()
{
String registry = jalview.bin.Cache.getDefault("DAS_REGISTRY_URL",
if (registry.lastIndexOf("sources.xml") == registry.length() - 11)
{
// no trailing sources.xml document for registry in JDAS
- jalview.bin.Cache.setProperty(
- jalview.bin.Cache.DAS_REGISTRY_URL,
+ jalview.bin.Cache.setProperty(jalview.bin.Cache.DAS_REGISTRY_URL,
registry = registry.substring(0,
registry.lastIndexOf("sources.xml")));
}
}
else
{
- System.out.println("Debug: Ignored older source "
- + jsrc.getTitle());
+ System.out.println(
+ "Debug: Ignored older source " + jsrc.getTitle());
}
}
else
return dsrc;
} catch (Exception ex)
{
- System.err.println("Failed to contact DAS1 registry at "
- + registryURL);
- ex.printStackTrace();
+ System.out.println(
+ "DAS1 registry at " + registryURL + " no longer exists");
return new ArrayList<jalviewSourceI>();
}
}
int bar = token.indexOf("|");
if (bar == -1)
{
- System.err
- .println("Warning: DAS user local source appears to have no nickname (expected a '|' followed by nickname)\nOffending definition: '"
+ System.err.println(
+ "Warning: DAS user local source appears to have no nickname (expected a '|' followed by nickname)\nOffending definition: '"
+ token + "'");
}
String url = token.substring(bar + 1);
}
} catch (Exception q)
{
- System.err
- .println("Unexpected exception when creating local source from '"
+ System.err.println(
+ "Unexpected exception when creating local source from '"
+ token + "'");
q.printStackTrace();
}
}
/*
- *
- */
+ *
+ */
@Override
public jalviewSourceI createLocalSource(String url, String name,
{
String token = en.nextElement().toString();
jalviewSourceI srco = localSources.get(token);
- sb.append(token + "|"
- + (srco.isSequenceSource() ? "sequence:" : "")
+ sb.append(token + "|" + (srco.isSequenceSource() ? "sequence:" : "")
+ srco.getUri() + "\t");
}
return sb.toString();
try
{
// TODO: allow same credentials for https and http
- authStash.put(new URL(
- "http://www.compbio.dundee.ac.uk/geneweb/das/myseq/"),
+ authStash.put(
+ new URL("http://www.compbio.dundee.ac.uk/geneweb/das/myseq/"),
"Basic SmltOm1pSg==");
} catch (MalformedURLException e)
{