+
+ /*
+ * query protein sequences with number of jobs
+ */
+ public List<TotalByCounterBean> readProteinByCounter(int minimalcounter) {
+ List<TotalByCounterBean> query = new ArrayList<TotalByCounterBean>();
+ Map<String, Integer> map = db.ReadProteinSequenceByCounter();
+ if (map == null)
+ return null;
+ for (Map.Entry<String, Integer> entry : map.entrySet()) {
+ if (entry.getValue() > minimalcounter) {
+ TotalByCounterBean bean = new TotalByCounterBean();
+ bean.setTotaljobs(entry.getValue());
+ bean.setName(entry.getKey());
+ query.add(bean);
+ }
+ }
+ return query;
+ }
+
+ /*
+ * query ip with number of jobs
+ */
+ public List<TotalByCounterBean> readIpByCounter(Integer minimalcounter) {
+ List<TotalByCounterBean> query = new ArrayList<TotalByCounterBean>();
+ Map<String, Integer> map = db.ReadIpByCounter();
+ if (minimalcounter == null)
+ minimalcounter = 0;
+ if (map == null)
+ return null;
+ for (Map.Entry<String, Integer> entry : map.entrySet()) {
+ if (entry.getValue() > minimalcounter) {
+ TotalByCounterBean bean = new TotalByCounterBean();
+ bean.setTotaljobs(entry.getValue());
+ bean.setName(entry.getKey());
+ query.add(bean);
+ }
+ }
+ return query;
+ }
+
+ /*
+ * query jobs log info
+ */
+ public JobBean readJobLog(String jobid) {
+ if (jobid == null)
+ return null;
+ return db.ReadJobLog(jobid);
+ }
+
+ /*
+ * query jobs by ipStructureJobLog
+ */
+ public UserBean readIp(String ip) {
+ if (ip == null)
+ return null;
+ Map<String, String[]> res = db.ReadIpWithJobs(ip);
+ if (res == null)
+ return null;
+ UserBean query = new UserBean(ip);
+ query.setMainInfo(res);
+ return query;
+ }
+
+ /*
+ * create list of parts of protein sequence;
+ */
+ private static List<String> CreateSubprot(String protein, String subprot) {