import compbio.cassandra.JpredParser;
public class JpredParserHTTP implements JpredParser {
- private CassandraNativeConnector cc = new CassandraNativeConnector();
+ private CassandraWriter cw = new CassandraWriter();
private String dirprefix;
private List<FastaSequence> alignment;
private List<FastaSequence> predictions;
private String jnetpred;
- JpredParserHTTP() {
+ public JpredParserHTTP() {
dirprefix = "http://www.compbio.dundee.ac.uk/www-jpred/results";
}
- JpredParserHTTP(String sourceurl) {
+ public JpredParserHTTP(String sourceurl) {
dirprefix = sourceurl;
}
// unknown_email jp_J9HBCBT
String id = table[table.length - 1];
totalcount++;
- if (cc.JobisNotInsterted(id)) {
+ if (cw.JobisNotInsterted(id)) {
URL dataurl = new URL(dirprefix + "/" + id + "/" + id + ".concise.fasta");
URL archiveurl = new URL(dirprefix + "/" + id + "/" + id + ".tar.gz");
URL logurl = new URL(dirprefix + "/" + id + "/LOG");
String ip = table[2];
String execstatus = "OK";
String finalstatus = "OK";
- countinsertions += cc.FormQueryTables(startdate.getTime(), table[0], table[1], ip, id, execstatus,
+ countinsertions += cw.FormQueryTables(startdate.getTime(), table[0], table[1], ip, id, execstatus,
finalstatus, protein, predictions);
long exectime = (endtime.getTime() - starttime.getTime()) / 1000;
if (199 < response2 && response2 < 300) {
log = parseLogFile(logurl.openStream());
}
- cc.ArchiveData(startdate.getTime(), exectime, ip, id, execstatus, finalstatus, protein,
+ cw.ArchiveData(startdate.getTime(), exectime, ip, id, execstatus, finalstatus, protein,
predictions, alignment, log, archiveurl.toString());
} catch (ParseException e) {
e.printStackTrace();