Apply formatting
authorSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Fri, 10 Jan 2014 16:35:28 +0000 (16:35 +0000)
committerSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Fri, 10 Jan 2014 16:35:28 +0000 (16:35 +0000)
33 files changed:
datadb/compbio/beans/DateBean.java
datadb/compbio/beans/JobBean.java
datadb/compbio/beans/ProteinBean.java
datadb/compbio/beans/Total.java
datadb/compbio/beans/TotalByCounterBean.java
datadb/compbio/beans/TotalJobsStatisticBean.java
datadb/compbio/beans/UserBean.java
datadb/compbio/cassandra/CassandraNativeConnector.java
datadb/compbio/cassandra/CassandraReaderOld.java
datadb/compbio/cassandra/CassandraRemover.java
datadb/compbio/cassandra/CassandraUserManager.java
datadb/compbio/cassandra/CassandraWriter.java
datadb/compbio/cassandra/DataBase.java
datadb/compbio/cassandra/DateFormatter.java
datadb/compbio/cassandra/JpredParser.java
datadb/compbio/cassandra/JpredParserHTTP.java
datadb/compbio/cassandra/JpredParserLocalFile.java
datadb/compbio/cassandra/PredictionIndex.java
datadb/compbio/cassandra/readers/CassandraReader.java
datadb/compbio/cassandra/readers/CassandraReaderExecutionTime.java
datadb/compbio/cassandra/readers/DailyStatisticsReader.java
datadb/compbio/cassandra/readers/IpReader.java
datadb/compbio/cassandra/readers/JobReader.java
datadb/compbio/cassandra/readers/PredictionReader.java
datadb/compbio/cassandra/readers/ProteoDAO.java
datadb/compbio/cassandra/readers/ReaderByCounter.java
datadb/compbio/cassandra/readers/SequenceReader.java
engine/compbio/engine/Job.java
engine/compbio/engine/JpredJob.java
engine/compbio/engine/ProteoCachePropertyHelperManager.java
engine/compbio/engine/archive/Archive.java
engine/compbio/engine/archive/ArchiveManager.java
engine/compbio/engine/archive/ArchivedJob.java

index bddd7de..7c593d3 100644 (file)
@@ -6,28 +6,27 @@ import java.util.Map;
 
 public class DateBean {
        private String date;
-       private Map<String, String> jobidAndSeq;                                // Map for jobid and sequence
-       
+       private Map<String, String> jobidAndSeq; // Map for jobid and sequence
+
        public DateBean() {
                this.jobidAndSeq = new HashMap<String, String>();
        }
-       
+
        public DateBean(String date) {
                this.date = date;
                this.jobidAndSeq = new HashMap<String, String>();
        }
-       
+
        public void setJobidAndSeq(String jobid, String seq) {
                if (jobidAndSeq == null)
                        jobidAndSeq = new HashMap<String, String>();
                jobidAndSeq.put(jobid, seq);
        }
 
-       
        public Map<String, String> getJobidAndSeq() {
                return jobidAndSeq;
        }
-       
+
        public void setDate(String date) {
                this.date = date;
        }
index 0a15062..8176748 100644 (file)
@@ -10,47 +10,48 @@ public class JobBean implements PredictionIndex {
        private String dateStart;
        private String dateEnd;
        private String sequence;
-       private String ip;      
-       private LinkedHashMap<String,String> predictions;
-       
-       public JobBean (String seq, String id, String  dateStart, String  dateEnd, String ip, Map<String,String> pred) {
+       private String ip;
+       private LinkedHashMap<String, String> predictions;
+
+       public JobBean(String seq, String id, String dateStart, String dateEnd, String ip, Map<String, String> pred) {
                this.sequence = seq;
                this.jobid = id;
                this.dateStart = dateStart;
                this.dateEnd = dateEnd;
                this.ip = ip;
-               this.predictions = new LinkedHashMap<String,String>();  
+               this.predictions = new LinkedHashMap<String, String>();
                setPredictions(pred);
        }
-       
-       public void setPredictions(Map<String,String> pred) {
+
+       public void setPredictions(Map<String, String> pred) {
                if (predictions == null)
-                       predictions = new LinkedHashMap<String,String>();       
+                       predictions = new LinkedHashMap<String, String>();
                for (String index : predIndex) {
                        this.predictions.put(index, pred.get(index));
-               }       
+               }
        }
-       public String getSequence () {
+
+       public String getSequence() {
                return sequence;
        }
-       
-       public String getJobid () {
+
+       public String getJobid() {
                return jobid;
        }
-       
-       public String getDateStart () {
+
+       public String getDateStart() {
                return dateStart;
        }
-       
-       public String getDateEnd () {
+
+       public String getDateEnd() {
                return dateEnd;
        }
-       
-       public String getIp () {
+
+       public String getIp() {
                return ip;
        }
-       
-       public Map<String,String> getPrediction () {
+
+       public Map<String, String> getPrediction() {
                return predictions;
        }
 }
index b1e2c2f..c649320 100644 (file)
@@ -7,65 +7,66 @@ import java.util.Map;
 
 import compbio.cassandra.PredictionIndex;
 
-public class ProteinBean implements PredictionIndex{
+public class ProteinBean implements PredictionIndex {
        private String sequence;
        private String jnetpred;
        private List<String> jobid;
-       private LinkedHashMap<String,String> predictions;
-       private List<String> subProt;           // protein sequence divided by several parts for highlighting the particular part
+       private LinkedHashMap<String, String> predictions;
+       private List<String> subProt; // protein sequence divided by several parts
+                                                                       // for highlighting the particular part
        private int size;
-       
-       public ProteinBean (String seq, Map<String,String> pred) {
+
+       public ProteinBean(String seq, Map<String, String> pred) {
                this.sequence = seq;
-               this.predictions = new LinkedHashMap<String,String>();  
+               this.predictions = new LinkedHashMap<String, String>();
                this.jobid = new ArrayList<String>();
                setPredictions(pred);
        }
-       
-       public void setSequence (String seq) {
+
+       public void setSequence(String seq) {
                this.sequence = seq;
        }
-       
-       public void setPredictions(Map<String,String> pred) {
+
+       public void setPredictions(Map<String, String> pred) {
                if (predictions == null)
-                       predictions = new LinkedHashMap<String,String>();       
+                       predictions = new LinkedHashMap<String, String>();
                for (String index : predIndex) {
                        this.predictions.put(index, pred.get(index));
-               }       
+               }
                this.size = predictions.size();
        }
-       
-       public String getSequence () {
+
+       public String getSequence() {
                return sequence;
        }
-       
-       public String getJnetpred () {
+
+       public String getJnetpred() {
                return jnetpred;
        }
-       
-       public void setJnetpred (Map<String,String> pred) {
+
+       public void setJnetpred(Map<String, String> pred) {
                if (pred != null) {
-                       if (pred.containsKey("jnetpred")) 
+                       if (pred.containsKey("jnetpred"))
                                jnetpred = pred.get("jnetpred");
                }
        }
-       
-       public List<String> getJobid () {
+
+       public List<String> getJobid() {
                return jobid;
        }
-       
-       public void setJobid (String id) {
+
+       public void setJobid(String id) {
                this.jobid.add(id);
        }
 
-       public int getSize () {
+       public int getSize() {
                return size;
        }
-       
-       public LinkedHashMap<String,String> getPredictions () {
+
+       public LinkedHashMap<String, String> getPredictions() {
                return predictions;
        }
-       
+
        public void setSubProt(List<String> subProt) {
                this.subProt = subProt;
        }
index 3e819ed..64813ee 100644 (file)
@@ -6,21 +6,21 @@ package compbio.beans;
  * @param total
  *            total number of jobs for a day
  * @param totalOK
- *           number of jobs with execution status OK for a date
+ *            number of jobs with execution status OK for a date
  * @param totalStopped
- *                      number of jobs with execution status STOPPED for a date
+ *            number of jobs with execution status STOPPED for a date
  * @param totalError
- *           number of jobs with execution status Jpred ERROR for a date
+ *            number of jobs with execution status Jpred ERROR for a date
  * @param totalTimeOut
- *                      number of jobs with execution status TIMEDOUT for a date
+ *            number of jobs with execution status TIMEDOUT for a date
  */
 public class Total {
-       private long total;                                     
-       private long totalOK;                           
-       private long totalStopped;                      
-       private long totalError;                                
-       private long totalTimeOut;                      
-               
+       private long total;
+       private long totalOK;
+       private long totalStopped;
+       private long totalError;
+       private long totalTimeOut;
+
        public Total(long total, long totalOK, long totalStopped, long totalError, long totalTimeOut) {
                this.total = total;
                this.totalOK = totalOK;
@@ -28,7 +28,7 @@ public class Total {
                this.totalError = totalError;
                this.totalTimeOut = totalTimeOut;
        }
-       
+
        public void setTotal(long tot) {
                this.total = tot;
        }
index bfe3b23..5ab3d89 100644 (file)
@@ -1,9 +1,9 @@
 package compbio.beans;
 
 public class TotalByCounterBean {
-       private int totaljobs;                          // total jobs for current condition
-       private String name;                                    // name for counter condition (ip or sequence)
-       
+       private int totaljobs; // total jobs for current condition
+       private String name; // name for counter condition (ip or sequence)
+
        public void setTotaljobs(int tot) {
                this.totaljobs = tot;
        }
@@ -11,7 +11,7 @@ public class TotalByCounterBean {
        public int getTotaljobs() {
                return totaljobs;
        }
-       
+
        public void setName(String name) {
                this.name = name;
        }
index 1c74a27..5653f7a 100644 (file)
@@ -7,18 +7,19 @@ import java.util.Map;
  * bean for a report of daily statistics.
  * 
  * @param dateTotal
- *             Map<String, Total> where String - a date, Total - total info for jobs with different status
+ *            Map<String, Total> where String - a date, Total - total info for
+ *            jobs with different status
  * @param wholeTotal
- *          total sum for each parameter from dateTotal
+ *            total sum for each parameter from dateTotal
  */
 public class TotalJobsStatisticBean {
        private Map<String, Total> dateTotal;
        private Total wholeTotal;
-       
+
        public TotalJobsStatisticBean() {
                this.dateTotal = new LinkedHashMap<String, Total>();
        }
-       
+
        public void setDateTotal(String dat, Total tot) {
                if (this.dateTotal == null)
                        dateTotal = new LinkedHashMap<String, Total>();
@@ -28,11 +29,11 @@ public class TotalJobsStatisticBean {
        public Map<String, Total> getDateTotal() {
                return dateTotal;
        }
-       
+
        public void setWholeTotal(Total tot) {
                this.wholeTotal = tot;
        }
-       
+
        public Total getWholeTotal() {
                return wholeTotal;
        }
index 77c6724..a0f396a 100644 (file)
@@ -1,37 +1,35 @@
 package compbio.beans;
-import java.util.ArrayList;
-import java.util.Arrays;
+
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
-
 public class UserBean {
        private String ip;
-       private Map<String,String[]> mainInfo;                  // store jobid, date start and sequence
-       
+       private Map<String, String[]> mainInfo; // store jobid, date start and
+                                                                                       // sequence
+
        public UserBean(String ip) {
                this.ip = ip;
-               mainInfo = new HashMap<String,String[]>();
+               mainInfo = new HashMap<String, String[]>();
        }
 
        public String getIp() {
                return ip;
        }
-       
+
        public void setMainInfo(String jobid, String date, String sequence) {
                if (mainInfo == null)
-                       mainInfo = new HashMap<String,String[]>();
-               mainInfo.put(jobid, new String[] {date, sequence});
+                       mainInfo = new HashMap<String, String[]>();
+               mainInfo.put(jobid, new String[] { date, sequence });
        }
-       
-       public void setMainInfo( Map<String,String[]> info) {
+
+       public void setMainInfo(Map<String, String[]> info) {
                if (mainInfo == null)
-                       mainInfo = new HashMap<String,String[]>();
+                       mainInfo = new HashMap<String, String[]>();
                mainInfo = info;
        }
-       
-       public Map<String,String[]> getMainInfo() {
+
+       public Map<String, String[]> getMainInfo() {
                return mainInfo;
        }
 
index 5e5cf5a..9d8d01d 100644 (file)
@@ -33,7 +33,7 @@ public class CassandraNativeConnector {
 
        public static String CASSANDRA_HOSTNAME = "localhost";
 
-       public static Session getSession () {
+       public static Session getSession() {
                return session;
        }
 
@@ -49,7 +49,7 @@ public class CassandraNativeConnector {
 
                Cluster.Builder builder = Cluster.builder();
                builder.addContactPoint(CASSANDRA_HOSTNAME);
-               //PrintClusterConfiguration( builder.getConfiguration());
+               // PrintClusterConfiguration( builder.getConfiguration());
                cluster = builder.build();
 
                Metadata metadata = cluster.getMetadata();
@@ -66,9 +66,8 @@ public class CassandraNativeConnector {
                session.execute("CREATE KEYSPACE IF NOT EXISTS ProteinKeyspace WITH replication = {'class':'SimpleStrategy', 'replication_factor':3};");
                session.execute("USE ProteinKeyspace");
 
-               session.execute("CREATE TABLE IF NOT EXISTS MainParameters "
-                               + "(Name ascii, Value ascii, PRIMARY KEY(Name));");
-               
+               session.execute("CREATE TABLE IF NOT EXISTS MainParameters " + "(Name ascii, Value ascii, PRIMARY KEY(Name));");
+
                session.execute("CREATE TABLE IF NOT EXISTS ProteinRow "
                                + "(Protein ascii, JobID ascii, Predictions map<ascii,ascii>, PRIMARY KEY(JobID));");
 
@@ -81,7 +80,7 @@ public class CassandraNativeConnector {
 
                session.execute("CREATE TABLE IF NOT EXISTS FailLog "
                                + "(jobtime bigint, JobID ascii, ExecTime int, ip ascii, FinalStatus ascii, PRIMARY KEY(jobtime, JobID));");
-               
+
                session.execute("CREATE TABLE IF NOT EXISTS JpredArchive "
                                + "(JobID ascii, Protein varchar, IP ascii, StartTime bigint, ExecTime int, FinalStatus ascii, ExecutionStatus ascii, alignment map<ascii,ascii>, "
                                + "predictions map<ascii,ascii>, ArchiveLink varchar, LOG varchar, PRIMARY KEY(JobID));");
@@ -91,8 +90,7 @@ public class CassandraNativeConnector {
 
                String com = "CREATE TABLE IF NOT EXISTS Users "
                                + "(name varchar, id bigint, email varchar, password varchar, organisation varchar, position varchar, signedtolist boolean, registrationdate bigint, PRIMARY KEY(id));";
-               
-               
+
                try {
                        session.execute(com);
                } catch (QueryExecutionException e) {
@@ -112,8 +110,8 @@ public class CassandraNativeConnector {
                session.execute("CREATE INDEX IF NOT EXISTS ON ProteinLog (ExecutionStatus);");
                session.execute("CREATE INDEX IF NOT EXISTS ON FailLog (FinalStatus);");
                session.execute("CREATE INDEX IF NOT EXISTS ON Users (email);");
-       //      session.execute("CREATE INDEX IF NOT EXISTS JobDateStamp ON ProteinData (jobtime);");
-       } 
+               // session.execute("CREATE INDEX IF NOT EXISTS JobDateStamp ON ProteinData (jobtime);");
+       }
 
        public void Closing() {
                session.shutdown();
@@ -136,14 +134,14 @@ public class CassandraNativeConnector {
                Calendar cal = Calendar.getInstance();
                return cal.getTimeInMillis();
        }
-       
+
        private void PrintClusterConfiguration(Configuration cc) {
                Policies policies = cc.getPolicies();
                SocketOptions sopt = cc.getSocketOptions();
                ProtocolOptions propt = cc.getProtocolOptions();
                PoolingOptions plopt = cc.getPoolingOptions();
                MetricsOptions mopt = cc.getMetricsOptions();
-               QueryOptions qopt =  cc.getQueryOptions();
+               QueryOptions qopt = cc.getQueryOptions();
                System.out.println("Cluster configuration:");
                System.out.println("   Policies = " + policies.toString());
                System.out.println("   Socket Options = " + sopt.toString());
index 852beb0..c7176b0 100644 (file)
@@ -221,7 +221,7 @@ public class CassandraReaderOld {
                for (Row r : rows) {
                        String prot = r.getString("Protein");
                        String prediction = findJnetpred(r.getMap("Predictions", String.class, String.class));
-                       if (prot != null || prediction != null) 
+                       if (prot != null || prediction != null)
                                res.put(prot, prediction);
                }
                final long endTime = System.currentTimeMillis();
@@ -229,13 +229,14 @@ public class CassandraReaderOld {
                return res;
        }
 
-       private String findJnetpred (Map<String,String> pred) {
+       private String findJnetpred(Map<String, String> pred) {
                if (pred != null) {
-                       if (pred.containsKey("jnetpred")) 
+                       if (pred.containsKey("jnetpred"))
                                return pred.get("jnetpred");
                }
                return null;
        }
+
        /*
         * getting protein sequences by counter
         */
index d7ebd87..48a5893 100644 (file)
@@ -14,19 +14,19 @@ import com.datastax.driver.core.Session;
 
 public class CassandraRemover {
        private Session session;
-       static SimpleDateFormat dateformatter =  new SimpleDateFormat("yyyy/MM/dd");
+       static SimpleDateFormat dateformatter = new SimpleDateFormat("yyyy/MM/dd");
        private static Logger log = Logger.getLogger(CassandraNativeConnector.class);
 
        public CassandraRemover() {
                Session inis = CassandraNativeConnector.getSession();
-               setSession (inis);
+               setSession(inis);
        }
 
        public void setSession(Session s) {
                assert s != null;
                session = s;
        }
-       
+
        /*
         * delete a record from CF for current jobId
         */
@@ -42,7 +42,7 @@ public class CassandraRemover {
                System.out.println("Command: " + com);
                ResultSet results = session.execute(com);
                Row row = results.one();
-               long njobs = row.getLong("Total") -1 ;
+               long njobs = row.getLong("Total") - 1;
                if (status.equals("OK")) {
                        long njobsOK = row.getLong("TotalOK") - 1;
                        String com1 = "DELETE FROM ProteinRow WHERE JobID = '" + jobid + "';";
@@ -69,24 +69,24 @@ public class CassandraRemover {
                }
                System.out.println("Remove jobs: " + jobid);
        }
-       
+
        private void UpdateJobDateInfo(long date, String ColumnName, long totalcol, long total) {
                String com4 = "UPDATE JobDateInfo SET " + ColumnName + " = " + totalcol + ", Total = " + total + " WHERE jobday = " + date + ";";
                System.out.println("Command: " + com4);
                session.execute(com4);
        }
-       
-       public int RemoveJobById (String jobid) {
-               if (jobid == null) 
+
+       public int RemoveJobById(String jobid) {
+               if (jobid == null)
                        return 0;
                Long date = FindDate(jobid);
                RemoveJob(jobid, date);
                return 1;
        }
-       
-       public int RemoveJobByDate (String date1, String date2) {
+
+       public int RemoveJobByDate(String date1, String date2) {
                int numremover = 0;
-               if (date1 == null || date2 == null) 
+               if (date1 == null || date2 == null)
                        return 0;
                Long dateBegin = convertDate(date1);
                Long dateEnd = convertDate(date2);
@@ -127,11 +127,10 @@ public class CassandraRemover {
                }
                return numremover;
        }
-       
-       
-       public int RemoveJobByIp (String ip) {
+
+       public int RemoveJobByIp(String ip) {
                int numremover = 0;
-               if (ip == null) 
+               if (ip == null)
                        return 0;
                String com = "SELECT databegin, JobID FROM ProteinLog WHERE ip = '" + ip + "';";
                ResultSet results = session.execute(com);
@@ -148,10 +147,10 @@ public class CassandraRemover {
                }
                return numremover;
        }
-       
-       public int RemoveJobBySequence (String seq) {
+
+       public int RemoveJobBySequence(String seq) {
                int numremover = 0;
-               if (seq == null) 
+               if (seq == null)
                        return 0;
                String com = "SELECT JobID FROM ProteinRow WHERE Protein = '" + seq + "';";
                ResultSet results = session.execute(com);
@@ -166,14 +165,14 @@ public class CassandraRemover {
                }
                return numremover;
        }
-        
+
        private Long FindDate(String jobid) {
                String com = "SELECT databegin FROM ProteinLog WHERE JobID = '" + jobid + "';";
                ResultSet results = session.execute(com);
                Long date = convertDate(results.one().getString("databegin"));
                return date;
        }
-       
+
        private String FindStatus(String jobid) {
                String com = "SELECT FinalStatus FROM ProteinLog WHERE JobID = '" + jobid + "';";
                System.out.println("Command: " + com);
@@ -182,8 +181,8 @@ public class CassandraRemover {
                System.out.println("*****status: " + status);
                return status;
        }
-       
-       protected long convertDate (String d) {
+
+       protected long convertDate(String d) {
                try {
                        if (null != d) {
                                Date startdate = dateformatter.parse(d);
index e2158f7..f810107 100644 (file)
@@ -37,7 +37,7 @@ public class CassandraUserManager implements UserManager {
                        if (0 < users.all().size()) {
                                throw new DataIntegrityViolationException("A user with email " + user.getEmail() + " exists");
                        }
-                       
+
                } catch (QueryExecutionException e) {
                        String mess = "CassandraUserManagerImpl.addUser: query execution exception...";
                        System.out.println(mess);
@@ -62,7 +62,8 @@ public class CassandraUserManager implements UserManager {
                                        String test = list.get(0).getString("Value");
                                        id = Long.parseLong(test, 10);
                                } else {
-                                       // if the MaxUserId parameter does not exist it is inserted with id = 1
+                                       // if the MaxUserId parameter does not exist it is inserted
+                                       // with id = 1
                                        id = 0;
                                }
                                id++;
@@ -84,9 +85,8 @@ public class CassandraUserManager implements UserManager {
                }
 
                String incom = "INSERT INTO Users (name, id, email, password, organisation, position, signedtolist, registrationdate) VALUES ('"
-                               + user.getFullName() + "'," + id + ",'" + user.getEmail() + "','" + user.getPassword() + "','"
-                               + user.getOrganisation() + "','" + user.getPosition() + "'," + user.isUpdateByEmail() + ","
-                               + user.getRegistrationDate().getTime() + ");";
+                               + user.getFullName() + "'," + id + ",'" + user.getEmail() + "','" + user.getPassword() + "','" + user.getOrganisation()
+                               + "','" + user.getPosition() + "'," + user.isUpdateByEmail() + "," + user.getRegistrationDate().getTime() + ");";
                try {
                        session.execute(incom);
                } catch (QueryExecutionException e) {
index f20f457..710d78b 100644 (file)
@@ -3,7 +3,6 @@ package compbio.cassandra;
 import java.util.List;
 
 import org.apache.log4j.Logger;
-import org.springframework.dao.DataIntegrityViolationException;
 
 import com.datastax.driver.core.Row;
 import com.datastax.driver.core.Session;
index 7c3cc82..e741b39 100644 (file)
@@ -9,16 +9,16 @@ import compbio.beans.ProteinBean;
 
 public class DataBase {
        private String date;
-       private int total;                                      // total number of jobs
-       private int totalOK;                            // number of jobs with execution status OK
-       private int totalStopped;                        // number of jobs with execution status STOPPED
-       private int totalError;                         // number of jobs with execution status Jpred ERROR
-       private int totalTimeOut;                       // number of jobs with execution status TIMEOUT
+       private int total; // total number of jobs
+       private int totalOK; // number of jobs with execution status OK
+       private int totalStopped; // number of jobs with execution status STOPPED
+       private int totalError; // number of jobs with execution status Jpred ERROR
+       private int totalTimeOut; // number of jobs with execution status TIMEOUT
        private int totalJobs;
-       private int totalId;                            // total jobs for current protein sequence
+       private int totalId; // total jobs for current protein sequence
        private String id;
        private String ip;
-       private String prot;                            // protein sequence
+       private String prot; // protein sequence
        private String jpred;
        private List<Integer> timeRez;
        private List<Integer> timeTotalExec;
@@ -82,7 +82,7 @@ public class DataBase {
        public int getTotalTimeOut() {
                return totalTimeOut;
        }
-       
+
        public void setTotalJobs(int totalJobs) {
                this.totalJobs = totalJobs;
        }
@@ -122,7 +122,7 @@ public class DataBase {
        public String getId() {
                return id;
        }
-       
+
        public void setIp(String ip) {
                this.ip = ip;
        }
@@ -138,7 +138,7 @@ public class DataBase {
        public List<Integer> getTimeRez() {
                return timeRez;
        }
-       
+
        public void setTimeTotalExec(List<Integer> timeTotalExec) {
                this.timeTotalExec = timeTotalExec;
        }
@@ -146,19 +146,19 @@ public class DataBase {
        public List<Integer> getTimeTotalExec() {
                return timeTotalExec;
        }
-       
-       public void setLogInfo(JobBean logInfo){
+
+       public void setLogInfo(JobBean logInfo) {
                this.logInfo = logInfo;
        }
-       
+
        public JobBean getLogInfo() {
                return logInfo;
        }
-       
-       public void setPredictions(ProteinBean predictions){
+
+       public void setPredictions(ProteinBean predictions) {
                this.predictions = predictions;
        }
-       
+
        public ProteinBean getPredictions() {
                return predictions;
        }
index 471f2a8..2fa7708 100644 (file)
@@ -7,7 +7,7 @@ import java.util.Date;
 public class DateFormatter {
        private final static SimpleDateFormat formatYYMMDD = new SimpleDateFormat("yyyy/MM/dd");
        private final static SimpleDateFormat formatDDMMYY = new SimpleDateFormat("dd/MM/yyyy");
-       
+
        /*
         * convert String date into long date (miliseconds since the epoch start)
         */
@@ -24,10 +24,9 @@ public class DateFormatter {
                }
                return dateWorkSt;
        }
-       
+
        /*
-        * date validator
-        * true - if valid date, false - if invalid
+        * date validator true - if valid date, false - if invalid
         */
        public static boolean isThisDateValid(String dateToValidate, SimpleDateFormat sdf) {
                if (dateToValidate == null || dateToValidate.equals("")) {
@@ -43,7 +42,7 @@ public class DateFormatter {
                }
                return true;
        }
-       
+
        /*
         * convert date from long to String
         */
@@ -51,11 +50,11 @@ public class DateFormatter {
                String dateString = formatter.format(new Date(indate));
                return dateString;
        }
-       
+
        public static SimpleDateFormat getFormatYYMMDD() {
                return formatYYMMDD;
        }
-       
+
        public static SimpleDateFormat getFormatDDMMYY() {
                return formatDDMMYY;
        }
index 27020ec..ae7abab 100644 (file)
@@ -6,11 +6,11 @@ public interface JpredParser {
 
        /*
         * Defines a source file with metainformation of Jpred Jobs
-        **/
-       void setSource (String newsourceprefix);
-       
+        */
+       void setSource(String newsourceprefix);
+
        /*
         * Makes real parsing of the source file
-        **/
+        */
        void Parsing(String source, int nDays) throws IOException;
 }
index 453f01f..d221209 100644 (file)
@@ -93,6 +93,7 @@ public class JpredParserHTTP implements JpredParser {
                }
                return protein;
        }
+
        private String parseSeqFile(final InputStream stream, String jobid) throws FileNotFoundException {
                final FastaReader fr = new FastaReader(stream);
                String protein = "";
index f48178c..e2e5dc9 100644 (file)
@@ -106,7 +106,9 @@ public class JpredParserLocalFile implements JpredParser {
                                                        } catch (ParseException e) {
                                                                e.printStackTrace();
                                                        }
-                                                       //countinsertions += cw.FormQueryTables(insertdate, starttime, finishtime, ip, id, "OK", "OK", newprotein, seqs);
+                                                       // countinsertions += cw.FormQueryTables(insertdate,
+                                                       // starttime, finishtime, ip, id, "OK", "OK",
+                                                       // newprotein, seqs);
                                                }
                                                fr.close();
                                        } catch (IOException e) {
index d184650..9966668 100644 (file)
@@ -5,6 +5,6 @@ public interface PredictionIndex {
        /**
         * Ordering indexes for predictions
         */
-       public final String[] predIndex =  {"jnetpred", "JNETCONF", "JNETHMM", "JNETPSSM", "JNETSOL0", "JNETSOL5",
-                       "JNETSOL25", "Lupas_14", "Lupas_21", "Lupas_28"};
+       public final String[] predIndex = { "jnetpred", "JNETCONF", "JNETHMM", "JNETPSSM", "JNETSOL0", "JNETSOL5", "JNETSOL25", "Lupas_14",
+                       "Lupas_21", "Lupas_28" };
 }
index 50db7a0..7de48e6 100644 (file)
@@ -22,7 +22,7 @@ public class CassandraReader {
                assert s != null;
                session = s;
        }
-       
+
        protected ResultSet CassandraQuery(String command) {
                try {
                        ResultSet results = session.execute(command);
@@ -40,9 +40,9 @@ public class CassandraReader {
                        log.error(e.getLocalizedMessage(), e.getCause());
                        return null;
                }
-               
+
        }
-       
+
        /*
         * find the earliest date in the database
         */
@@ -51,5 +51,4 @@ public class CassandraReader {
                return earlestDate;
        }
 
-       
 }
index 3e8453e..134a139 100644 (file)
@@ -1,22 +1,14 @@
 package compbio.cassandra.readers;
 
-
 import java.util.Calendar;
 import java.util.List;
 import java.util.ArrayList;
 
-import org.apache.log4j.Logger;
-
 import com.datastax.driver.core.Row;
 import com.datastax.driver.core.Session;
 import com.datastax.driver.core.ResultSet;
-import com.datastax.driver.core.PreparedStatement;
-import com.datastax.driver.core.BoundStatement;
 
-import compbio.cassandra.CassandraReaderOld;
 import compbio.cassandra.Pair;
-import compbio.engine.ProteoCachePropertyHelperManager;
-import compbio.util.PropertyHelper;
 
 public class CassandraReaderExecutionTime {
        private Session session;
index 718a404..4646537 100644 (file)
@@ -18,16 +18,17 @@ public class DailyStatisticsReader extends CassandraReader {
        public DailyStatisticsReader() {
                super();
        }
-       
+
        /**
         * query: total number of jobs for the period from date1 till date2
         * 
         * @param dateStart
-        *           the first date in the period
+        *            the first date in the period
         * @param dateEnd
-        *           the last date in the period
+        *            the last date in the period
         * 
-        * @return TotalJobsStatisticBean to the controller DailyStatisticsController
+        * @return TotalJobsStatisticBean to the controller
+        *         DailyStatisticsController
         **/
        public TotalJobsStatisticBean query(long dateStart, long dateEnd) {
                Calendar start = Calendar.getInstance();
@@ -59,20 +60,20 @@ public class DailyStatisticsReader extends CassandraReader {
                query.setWholeTotal(wholeTotal);
                return query;
        }
-       
+
        /**
         * query: jobs and sequence at a date
         * 
         * @param day
-        *           the date in long format
+        *            the date in long format
         * @param date
-        *           the date in String format
+        *            the date in String format
         * 
         * @param status
-        *           final job status
+        *            final job status
         * @return DateBean to the controller DailyStatisticsController
         **/
-       public DateBean readJobByDay(long day, String date, JobStatus status) { 
+       public DateBean readJobByDay(long day, String date, JobStatus status) {
                DateBean res = new DateBean(date);
                if (status == JobStatus.OK) {
                        ResultSet results = CassandraQuery("SELECT JobID, Protein FROM ProteinData WHERE jobtime = " + day + ";");
@@ -82,9 +83,9 @@ public class DailyStatisticsReader extends CassandraReader {
                        for (Row r : rows) {
                                res.setJobidAndSeq(r.getString("JobID"), r.getString("Protein"));
                        }
-               }
-               else {
-                       ResultSet results = CassandraQuery("SELECT JobID FROM FailLog WHERE jobtime = " + day + " and FinalStatus = '" + status.name() + "';");
+               } else {
+                       ResultSet results = CassandraQuery("SELECT JobID FROM FailLog WHERE jobtime = " + day + " and FinalStatus = '" + status.name()
+                                       + "';");
                        if (results == null || results.isExhausted())
                                return null;
                        List<Row> rows = results.all();
index 2928b70..43c2817 100644 (file)
@@ -10,11 +10,11 @@ import com.datastax.driver.core.Row;
 import compbio.beans.UserBean;
 
 public class IpReader extends CassandraReader {
-       
+
        public IpReader() {
                super();
        }
-       
+
        /**
         * query jobs by ip
         * 
@@ -31,7 +31,7 @@ public class IpReader extends CassandraReader {
                for (Row r : rows) {
                        if (r.getString("FinalStatus").equals("OK")) {
                                String date = r.getString("DataBegin");
-                               res.put(r.getString("JobID"), new String[] { date.substring(0, date.indexOf(":")), r.getString("Protein") });                   
+                               res.put(r.getString("JobID"), new String[] { date.substring(0, date.indexOf(":")), r.getString("Protein") });
                        }
                }
                UserBean query = new UserBean(ip);
index 6d39b04..178ff4b 100644 (file)
@@ -6,7 +6,7 @@ import com.datastax.driver.core.Row;
 import compbio.beans.JobBean;
 
 public class JobReader extends CassandraReader {
-       
+
        public JobReader() {
                super();
        }
index b7613a3..73e7dbf 100644 (file)
@@ -8,19 +8,19 @@ import com.datastax.driver.core.ResultSet;
 import com.datastax.driver.core.Row;
 
 public class PredictionReader extends CassandraReader {
-       
+
        public PredictionReader() {
                super();
        }
-       
+
        /**
         * query: protein feature
         * 
-        *  @param feature
-        *      a feature of secondary structure: Helix or Beta Sheet
-        *  
-        *  @param percent
-        *      fraction the feature in the protein
+        * @param feature
+        *            a feature of secondary structure: Helix or Beta Sheet
+        * 
+        * @param percent
+        *            fraction the feature in the protein
         * 
         * @return Map<String, String> to the controller SSFeaturesController
         * 
@@ -34,8 +34,8 @@ public class PredictionReader extends CassandraReader {
                for (Row r : rows) {
                        String prot = r.getString("Protein");
                        String prediction = findJnetpred(r.getMap("Predictions", String.class, String.class));
-                       if (prot != null || prediction != null) {
-                               if (prediction.replaceAll("[^"+feature+"]", "").length() > prediction.length() * percent / 100) {
+                       if (prot != null || prediction != null) {
+                               if (prediction.replaceAll("[^" + feature + "]", "").length() > prediction.length() * percent / 100) {
                                        query.put(prot, prediction);
                                }
                        }
@@ -43,9 +43,9 @@ public class PredictionReader extends CassandraReader {
                return query;
        }
 
-       private String findJnetpred (Map<String,String> pred) {
+       private String findJnetpred(Map<String, String> pred) {
                if (pred != null) {
-                       if (pred.containsKey("jnetpred")) 
+                       if (pred.containsKey("jnetpred"))
                                return pred.get("jnetpred");
                }
                return null;
index 0b6f689..75755b6 100644 (file)
@@ -1,10 +1,7 @@
 package compbio.cassandra.readers;
 
-
 public interface ProteoDAO<E> {
-       
+
        E query(long dateStart, long dateEnd);
-       
-       
 
 }
index 9a2bd5e..184fd57 100644 (file)
@@ -10,27 +10,25 @@ import com.datastax.driver.core.Row;
 
 import compbio.beans.TotalByCounterBean;
 
-public class ReaderByCounter extends CassandraReader{
-       
+public class ReaderByCounter extends CassandraReader {
+
        public ReaderByCounter() {
                super();
        }
-       
-       
-               
+
        /**
         * query protein sequences with number of jobs
-        *  
+        * 
         * @param minimalcounter
         * 
         * @return List<TotalByCounterBean> to the controller SequenceController
         * 
         **/
-       public List<TotalByCounterBean> readProteinByCounter(int minimalcounter) {              
+       public List<TotalByCounterBean> readProteinByCounter(int minimalcounter) {
                ResultSet results = CassandraQuery("SELECT Protein, JobID FROM ProteinRow;");
                return QueryByCounter(results, "Protein", minimalcounter);
        }
-       
+
        /**
         * query ip with number of jobs
         * 
@@ -43,18 +41,17 @@ public class ReaderByCounter extends CassandraReader{
                ResultSet results = CassandraQuery("SELECT JobID, ip FROM ProteinLog;");
                return QueryByCounter(results, "ip", minimalcounter);
        }
-       
-       
+
        /**
         * query number of jobs by counter and parameter: ip or protein
         * 
         * @param results
-        *                              cassandra query result
+        *            cassandra query result
         * @param counterParameter
-        *                              parameter for a query: ip or proteint
+        *            parameter for a query: ip or proteint
         * @param minimalcounter
-        *                              
-        * @return List<TotalByCounterBean> 
+        * 
+        * @return List<TotalByCounterBean>
         * 
         **/
        public List<TotalByCounterBean> QueryByCounter(ResultSet results, String counterParameter, int minimalcounter) {
@@ -79,6 +76,6 @@ public class ReaderByCounter extends CassandraReader{
                        }
                }
                return query;
-       }       
-                       
+       }
+
 }
index 244902f..0aedbb2 100644 (file)
@@ -13,14 +13,14 @@ public class SequenceReader extends CassandraReader {
        public SequenceReader() {
                super();
        }
-       
+
        /**
         * query: protein sequence
-        *  
+        * 
         * @param protIn
-        *           protein sequence or partial of protein sequence
+        *            protein sequence or partial of protein sequence
         * @param searchtype
-        *           "whole" or "partial" of protein sequence
+        *            "whole" or "partial" of protein sequence
         * 
         * @return List<ProteinBean> to the controller SequenceController
         * 
@@ -58,16 +58,17 @@ public class SequenceReader extends CassandraReader {
                }
                return query;
        }
-       
+
        /**
-        * create a list of parts of protein sequence for highlighting current value in report;
-        *  
+        * create a list of parts of protein sequence for highlighting current value
+        * in report;
+        * 
         * @param protein
-        *           protein sequence 
+        *            protein sequence
         * @param subprot
-        *           partial of protein sequence
+        *            partial of protein sequence
         * 
-        * @return List<String> 
+        * @return List<String>
         * 
         **/
        private static List<String> CreateSubprotein(String protein, String subprot) {
index 309e0e9..e1de779 100644 (file)
@@ -19,14 +19,14 @@ public class Job {
        private long StartingTime;
        private long ExecutionTime;
 
-       static SimpleDateFormat dateformatter =  new SimpleDateFormat("yyyy/MM/dd");;
+       static SimpleDateFormat dateformatter = new SimpleDateFormat("yyyy/MM/dd");;
        static SimpleDateFormat timeformatter = new SimpleDateFormat("yyyy/MM/dd:H:m:s");
 
        public Job() {
                ExecutionStatus = "OK";
                FinalStatus = "OK";
                jobid = "";
-               
+
                StartingDateStr = "1970/1/1";
                StartingTimeStr = "1970/1/1:0:0:0";
                EndTimeStr = "1970/1/1:0:0:0";
@@ -43,7 +43,7 @@ public class Job {
                setDates(date1, date2);
        }
 
-       protected void setDates (String d1, String d2) {
+       protected void setDates(String d1, String d2) {
                StartingTimeStr = d1;
                StartingDateStr = d1.substring(0, d1.indexOf(":"));
                StartingTime = convertTime(StartingTimeStr);
@@ -53,9 +53,8 @@ public class Job {
                EndTime = convertTime(d2);
                ExecutionTime = EndTime - StartingTime;
        }
-       
-       
-       protected long convertDate (String d) {
+
+       protected long convertDate(String d) {
                try {
                        if (null != d) {
                                Date startdate = dateformatter.parse(d);
@@ -66,8 +65,8 @@ public class Job {
                }
                return 0L;
        }
-       
-       protected long convertTime (String d) {
+
+       protected long convertTime(String d) {
                try {
                        if (null != d) {
                                Date startdate = timeformatter.parse(d);
@@ -78,8 +77,7 @@ public class Job {
                }
                return 0L;
        }
-       
-       
+
        public void setStartingDate(String date) {
                this.StartingDateStr = date;
                StartingDate = convertDate(date);
@@ -100,12 +98,15 @@ public class Job {
        public String getStartingDateStr() {
                return StartingDateStr;
        }
+
        public String getStartingTimeStr() {
                return StartingTimeStr;
        }
+
        public long getStartingDate() {
                return StartingDate;
        }
+
        public long getStartingTime() {
                return StartingTime;
        }
@@ -113,6 +114,7 @@ public class Job {
        public String getEndTimeStr() {
                return EndTimeStr;
        }
+
        public long getEndTime() {
                return EndTime;
        }
@@ -124,7 +126,7 @@ public class Job {
        public void setFinalStatus(String status) {
                FinalStatus = status;
        }
-       
+
        public String getExecutionStatus() {
                return ExecutionStatus;
        }
@@ -136,7 +138,7 @@ public class Job {
        public long getExecutionTime() {
                return ExecutionTime;
        }
-       
+
        public void setIP(String IP) {
                this.IP = IP;
        }
@@ -146,7 +148,7 @@ public class Job {
                        return IP;
                return "127.0.0.1";
        }
-       
+
        public void setEmail(String email) {
                this.Email = email;
        }
index db4a7fe..522ad9f 100644 (file)
@@ -19,7 +19,7 @@ public class JpredJob extends Job {
                super(jobid, date1, date2);
                this.protein = protein;
                predictions = new ArrayList<FastaSequence>();
-               alignment  = new ArrayList<FastaSequence>();
+               alignment = new ArrayList<FastaSequence>();
                log = "";
        }
 
@@ -27,7 +27,7 @@ public class JpredJob extends Job {
                super(jobid, date1, date2);
                this.protein = protein;
                this.alignment = alignment;
-               this.predictions = predictions; 
+               this.predictions = predictions;
        }
 
        public void setProtein(String protein) {
index 4615297..f5f67bb 100644 (file)
@@ -34,26 +34,22 @@ public final class ProteoCachePropertyHelperManager {
        private static PropertyHelper ph = null;\r
 \r
        /**\r
-        * Ways to fix path problem: \r
-        * 1) find a path to WEB-INF directory based on the path to a known class. \r
-        * Then prepend this absolute path to the rest of paths \r
-        * pros: no input from user \r
-        * cons: relocation of the source may cause problems \r
+        * Ways to fix path problem: 1) find a path to WEB-INF directory based on\r
+        * the path to a known class. Then prepend this absolute path to the rest of\r
+        * paths pros: no input from user cons: relocation of the source may cause\r
+        * problems\r
         * \r
-        * 2) Require users to add configuration directories to the class\r
-        * path and then load entries from it. \r
-        * pros: \r
-        * cons: Many paths needs to be added. Put significant burden on the user. \r
-        * Hard to tell web appl server to add these entries to its class path. \r
+        * 2) Require users to add configuration directories to the class path and\r
+        * then load entries from it. pros: cons: Many paths needs to be added. Put\r
+        * significant burden on the user. Hard to tell web appl server to add these\r
+        * entries to its class path.\r
         * \r
-        * 3) Ask for project source directory explicitly in the configuration. \r
-        * pros:\r
-        * cons: similar to 1, but this initial configuration file must reside in \r
-        * well known location! Why ask users what can be found automatically?\r
+        * 3) Ask for project source directory explicitly in the configuration.\r
+        * pros: cons: similar to 1, but this initial configuration file must reside\r
+        * in well known location! Why ask users what can be found automatically?\r
         * \r
-        * 4) Have everything in the location already in class path for tomcat. \r
-        * pros:\r
-        * cons: only classes and lib/*.jar are added, Eclipse will remove non \r
+        * 4) Have everything in the location already in class path for tomcat.\r
+        * pros: cons: only classes and lib/*.jar are added, Eclipse will remove non\r
         * classses from classes dir.\r
         * \r
         * Try 1 - succeed.\r
@@ -84,11 +80,8 @@ public final class ProteoCachePropertyHelperManager {
 \r
        /**\r
         * Method return the absolute path to the project root directory. It assumes\r
-        * the following structure of the project:\r
-        * project-root: \r
-        * conf/settings\r
-        * binaries \r
-        * WEB-INF/classes/compbio/engine/conf/PropertyHelperManager.class\r
+        * the following structure of the project: project-root: conf/settings\r
+        * binaries WEB-INF/classes/compbio/engine/conf/PropertyHelperManager.class\r
         * If the structure changes it must be reflected in this method\r
         * \r
         * @return the local path\r
@@ -112,8 +105,8 @@ public final class ProteoCachePropertyHelperManager {
                } catch (IllegalArgumentException e) {\r
                        // Classes are in the jar file, using different method to determine\r
                        // the path new File(INCORRECT URL) throws it\r
-                       String mes = "It looks like classes are in the jar file. " \r
-                                  + "Attempting a different method to determinine the path to the resources";\r
+                       String mes = "It looks like classes are in the jar file. "\r
+                                       + "Attempting a different method to determinine the path to the resources";\r
                        log.debug(mes + e.getLocalizedMessage(), e.getCause());\r
                        try {\r
                                f = new File(ProteoCachePropertyHelperManager.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());\r
@@ -147,4 +140,5 @@ public final class ProteoCachePropertyHelperManager {
                        return Boolean.parseBoolean(propValue);\r
                }\r
                return false;\r
-       }}\r
+       }\r
+}\r
index 392a737..8aad2aa 100644 (file)
@@ -20,7 +20,7 @@ public class Archive {
                String path = ph.getProperty("archive.path");
                assert (null != path);
 
-               if (isAbsolutePath (path)) {
+               if (isAbsolutePath(path)) {
                        archivepath = path;
                } else {
                        String abspath = ProteoCachePropertyHelperManager.getLocalPath();
@@ -31,20 +31,19 @@ public class Archive {
                }
        }
 
-       private boolean isAbsolutePath (String path) {
-                return (new File(path).isAbsolute());
+       private boolean isAbsolutePath(String path) {
+               return (new File(path).isAbsolute());
        }
-       
-       private boolean isDirExists (String path) throws IOException {
+
+       private boolean isDirExists(String path) throws IOException {
                archive = new File(path);
                return archive.getCanonicalFile().isDirectory();
        }
-       
 
-       public boolean addArchivedJob (ArchivedJob job) {
+       public boolean addArchivedJob(ArchivedJob job) {
                return true;
        }
-       
+
        public String createJob(String jobid) {
                return archivepath + "/" + jobid + ".tar.gz";
        }
index dabaf3a..9b9979e 100644 (file)
@@ -1,10 +1,8 @@
 package compbio.engine.archive;
 
-import java.io.File;
 import java.io.FileNotFoundException;
-import java.io.InputStream;
+
 import java.util.Iterator;
-import java.util.Scanner;
 
 //import compbio.util.Util;
 
@@ -17,11 +15,12 @@ import java.util.Scanner;
  */
 public class ArchiveManager implements Iterator<ArchivedJob> {
        Archive archive;
-       //private final Scanner input;
+
+       // private final Scanner input;
        /**
         * Delimiter for the scanner
         */
-       //private final String DELIM = ">";
+       // private final String DELIM = ">";
 
        /**
         * Header data can contain non-ASCII symbols and read in UTF8
@@ -36,25 +35,19 @@ public class ArchiveManager implements Iterator<ArchivedJob> {
         */
        public ArchiveManager(final String mainPath) throws FileNotFoundException {
                /*
-               input = new Scanner(new File(mainPath), "UTF8");
-               input.useDelimiter(DELIM);
-               Runtime.getRuntime().addShutdownHook(new Thread() {
-
-                       @Override
-                       public void run() {
-                               if (input != null) {
-                                       input.close();
-                               }
-                       }
-               });
-               */
+                * input = new Scanner(new File(mainPath), "UTF8");
+                * input.useDelimiter(DELIM); Runtime.getRuntime().addShutdownHook(new
+                * Thread() {
+                * 
+                * @Override public void run() { if (input != null) { input.close(); } }
+                * });
+                */
        }
-       
+
        public ArchiveManager(Archive ar) {
                archive = ar;
        }
 
-
        /**
         * {@inheritDoc}
         * 
@@ -63,7 +56,7 @@ public class ArchiveManager implements Iterator<ArchivedJob> {
         */
        @Override
        public boolean hasNext() {
-               //return input.hasNext();
+               // return input.hasNext();
                return true;
        }
 
@@ -81,12 +74,10 @@ public class ArchiveManager implements Iterator<ArchivedJob> {
        public ArchivedJob next() {
                String path = "bla-bla-bla";
                /*
-               String path = input.next();
-               while (fastaHeader.indexOf("\n") < 0 && input.hasNext()) {
-                       path = fastaHeader.concat(">");
-                       path = fastaHeader.concat(input.next());
-               }
-               */
+                * String path = input.next(); while (fastaHeader.indexOf("\n") < 0 &&
+                * input.hasNext()) { path = fastaHeader.concat(">"); path =
+                * fastaHeader.concat(input.next()); }
+                */
                return new ArchivedJob(path);
        }
 
@@ -105,7 +96,7 @@ public class ArchiveManager implements Iterator<ArchivedJob> {
         * instance of the FastaReader will be possible after calling this method.
         */
        public void close() {
-               //input.close();
+               // input.close();
        }
 
        private static ArchivedJob toFastaSequence(final String singleFastaEntry) {
@@ -115,11 +106,9 @@ public class ArchiveManager implements Iterator<ArchivedJob> {
 
                int nlineidx = singleFastaEntry.indexOf("\n");
                if (nlineidx < 0) {
-                       throw new AssertionError(
-                                       "The FASTA sequence must contain the header information"
-                                                       + " separated by the new line from the sequence. Given sequence does not appear to "
-                                                       + "contain the header! Given data:\n "
-                                                       + singleFastaEntry);
+                       throw new AssertionError("The FASTA sequence must contain the header information"
+                                       + " separated by the new line from the sequence. Given sequence does not appear to "
+                                       + "contain the header! Given data:\n " + singleFastaEntry);
                }
                String header = singleFastaEntry.substring(0, nlineidx);
 
index 08ec64b..a07d77d 100644 (file)
@@ -44,7 +44,7 @@ public class ArchivedJob {
                }
                if (Files.isReadable(Paths.get(thefile))) {
                        Files.copy(Paths.get(thefile), Paths.get(finalpath));
-                       return  resultpath + '/' + jobfilename;
+                       return resultpath + '/' + jobfilename;
                }
                return null;
        }