git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into releases/Release_2_10_2_Branch
[jalview.git]
/
src
/
jalview
/
ws
/
dbsources
/
das
/
datamodel
/
DasSequenceSource.java
diff --git
a/src/jalview/ws/dbsources/das/datamodel/DasSequenceSource.java
b/src/jalview/ws/dbsources/das/datamodel/DasSequenceSource.java
index
32e4f3e
..
84f6d4d
100644
(file)
--- a/
src/jalview/ws/dbsources/das/datamodel/DasSequenceSource.java
+++ b/
src/jalview/ws/dbsources/das/datamodel/DasSequenceSource.java
@@
-57,8
+57,8
@@
import com.stevesoft.pat.Regex;
* @author JimP
*
*/
* @author JimP
*
*/
-public class DasSequenceSource extends DbSourceProxyImpl implements
- DbSourceProxy
+public class DasSequenceSource extends DbSourceProxyImpl
+ implements DbSourceProxy
{
private jalviewSourceI jsrc;
{
private jalviewSourceI jsrc;
@@
-104,7
+104,8
@@
public class DasSequenceSource extends DbSourceProxyImpl implements
{
throw new Exception(MessageManager.formatMessage(
"exception.das_source_doesnt_support_sequence_command",
{
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;
}
this.tier = 1 + ((jsrc.isLocal() || jsrc.isReferenceSource()) ? 0 : 1);
this.source = source;
@@
-147,7
+148,8
@@
public class DasSequenceSource extends DbSourceProxyImpl implements
public AlignmentI getSequenceRecords(String queries) throws Exception
{
StringTokenizer st = new StringTokenizer(queries, "\t");
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;
while (st.hasMoreTokens())
{
String t;
@@
-168,9
+170,8
@@
public class DasSequenceSource extends DbSourceProxyImpl implements
// slow, fetch one at a time.
for (String sr : src)
{
// 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)
org.biodas.jdas.client.SequenceClient sq = new SequenceClient(
connprops.getConnectionPropertyProviderFor(sr));
for (String q : toks)
@@
-182,9
+183,8
@@
public class DasSequenceSource extends DbSourceProxyImpl implements
Map<List<String>, DasSequenceAdapter> dss = resultset.get(sr);
if (dss == null)
{
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)
}
dss.put(qset, s);
} catch (Exception x)
@@
-192,7
+192,8
@@
public class DasSequenceSource extends DbSourceProxyImpl implements
Map<List<String>, Exception> ers = errors.get(sr);
if (ers == null)
{
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);
}
}
ers.put(qset, x);
}
@@
-246,8
+247,8
@@
public class DasSequenceSource extends DbSourceProxyImpl implements
if (acIds.indexOf(lbl) == -1)
{
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
+ lbl + ")");
}
else
@@
-256,11
+257,9
@@
public class DasSequenceSource extends DbSourceProxyImpl implements
{
if (e.getContent().length() == 0)
{
{
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;
}
+ " (source is " + getDbName());
continue;
}
@@
-268,11
+267,11
@@
public class DasSequenceSource extends DbSourceProxyImpl implements
seqs = new java.util.Vector<SequenceI>();
// JDAS returns a sequence complete with any newlines and spaces
// in the XML
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.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);
}
}
seqs.addElement(sq);
}
}
@@
-308,9
+307,9
@@
public class DasSequenceSource extends DbSourceProxyImpl implements
} catch (Exception x)
{
} 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);
}
}
}
}