/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
* @author JimP
*
*/
-public class DasSequenceSource extends DbSourceProxyImpl implements
- DbSourceProxy
+public class DasSequenceSource extends DbSourceProxyImpl
+ implements DbSourceProxy
{
private jalviewSourceI jsrc;
{
throw new Exception(MessageManager.formatMessage(
"exception.das_source_doesnt_support_sequence_command",
- new String[] { source.getTitle() }));
+ new String[]
+ { source.getTitle() }));
}
this.tier = 1 + ((jsrc.isLocal() || jsrc.isReferenceSource()) ? 0 : 1);
this.source = source;
public AlignmentI getSequenceRecords(String queries) throws Exception
{
StringTokenizer st = new StringTokenizer(queries, "\t");
- List<String> toks = new ArrayList<String>(), src = new ArrayList<String>(), acIds = new ArrayList<String>();
+ List<String> toks = new ArrayList<String>(),
+ src = new ArrayList<String>(), acIds = new ArrayList<String>();
while (st.hasMoreTokens())
{
String t;
// slow, fetch one at a time.
for (String sr : src)
{
- System.err
- .println("Retrieving IDs individually from das source: "
- + sr);
+ System.err.println(
+ "Retrieving IDs individually from das source: " + sr);
org.biodas.jdas.client.SequenceClient sq = new SequenceClient(
connprops.getConnectionPropertyProviderFor(sr));
for (String q : toks)
Map<List<String>, DasSequenceAdapter> dss = resultset.get(sr);
if (dss == null)
{
- resultset
- .put(sr,
- dss = new HashMap<List<String>, DasSequenceAdapter>());
+ resultset.put(sr,
+ dss = new HashMap<List<String>, DasSequenceAdapter>());
}
dss.put(qset, s);
} catch (Exception x)
Map<List<String>, Exception> ers = errors.get(sr);
if (ers == null)
{
- errors.put(sr, ers = new HashMap<List<String>, Exception>());
+ errors.put(sr,
+ ers = new HashMap<List<String>, Exception>());
}
ers.put(qset, x);
}
if (acIds.indexOf(lbl) == -1)
{
- System.err
- .println("Warning - received sequence event for strange accession code ("
+ System.err.println(
+ "Warning - received sequence event for strange accession code ("
+ lbl + ")");
}
else
{
if (e.getContent().length() == 0)
{
- System.err
- .println("Empty sequence returned for accession code ("
- + lbl
- + ") from "
- + resset.getKey()
+ System.err.println(
+ "Empty sequence returned for accession code ("
+ + lbl + ") from " + resset.getKey()
+ " (source is " + getDbName());
continue;
}
seqs = new java.util.Vector<SequenceI>();
// JDAS returns a sequence complete with any newlines and spaces
// in the XML
- Sequence sq = new Sequence(lbl, e.getContent().replaceAll(
- "\\s+", ""));
+ Sequence sq = new Sequence(lbl,
+ e.getContent().replaceAll("\\s+", ""));
sq.setStart(e.getStart().intValue());
- sq.addDBRef(new DBRefEntry(getDbSource(), getDbVersion()
- + ":" + e.getVersion(), lbl));
+ sq.addDBRef(new DBRefEntry(getDbSource(),
+ getDbVersion() + ":" + e.getVersion(), lbl));
seqs.addElement(sq);
}
}
} catch (Exception x)
{
- Cache.log
- .error("Couldn't retrieve features for sequence from its source.",
- x);
+ Cache.log.error(
+ "Couldn't retrieve features for sequence from its source.",
+ x);
}
}