- if (cc.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");
- HttpURLConnection httpConnection1 = (HttpURLConnection) dataurl.openConnection();
- HttpURLConnection httpConnection2 = (HttpURLConnection) logurl.openConnection();
- HttpURLConnection httpConnection3 = (HttpURLConnection) archiveurl.openConnection();
- int response1 = httpConnection1.getResponseCode();
- int response2 = httpConnection2.getResponseCode();
- if (199 < response1 && response1 < 300) {
- try {
- String protein = parsePredictions(dataurl.openStream(), id);
- if (protein.equals("")) {
- countUnclearFASTAid++;
- } else {
- SimpleDateFormat dateformatter = new SimpleDateFormat("yyyy/MM/dd");
- SimpleDateFormat timeformatter = new SimpleDateFormat("yyyy/MM/dd:H:m:s");
- String startdatestring = table[0].substring(0, table[0].indexOf(":"));
- try {
- Date startdate = dateformatter.parse(startdatestring);
- Date starttime = timeformatter.parse(table[0]);
- Date endtime = timeformatter.parse(table[1]);
- String ip = table[2];
- String execstatus = "OK";
- String finalstatus = "OK";
- countinsertions += cc.FormQueryTables(startdate.getTime(), table[0], table[1], ip, id, execstatus,
- finalstatus, protein, predictions);
-
- long exectime = (endtime.getTime() - starttime.getTime()) / 1000;
- String log = "";
- if (199 < response2 && response2 < 300) {
- log = parseLogFile(logurl.openStream());
- }
- cc.ArchiveData(startdate.getTime(), exectime, ip, id, execstatus, finalstatus, protein,
- predictions, alignment, log, archiveurl.toString());
- } catch (ParseException e) {
- e.printStackTrace();
- }
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- } else {
- countNoData++;
- }
- httpConnection1.disconnect();
- httpConnection2.disconnect();
- httpConnection3.disconnect();