Improve presentation of job on the web (servlet ServletSequenceProtein)
[proteocache.git] / datadb / compbio / cassandra / CassandraReader.java
index 250c705..28641db 100644 (file)
@@ -73,7 +73,7 @@ public class CassandraReader {
        /*
         * getting whole protein sequence from the db ProteinRow
         */
-       public List<StructureProteinPrediction> ReadWholeSequence(String queryProtein) {
+       public List<AnnotatedProteinSequenceBean> ReadWholeSequence(String queryProtein) {
                final long startTime = System.currentTimeMillis();
                String com = "SELECT JobID, Predictions FROM ProteinRow WHERE Protein = '" + queryProtein + "';";
                System.out.println("Command: " + com);
@@ -84,10 +84,10 @@ public class CassandraReader {
                List<Row> rows = results.all();
                System.out.println("Query time is " + (queryTime - startTime) + " msec");
                System.out.println(" rows analysed,  " + rows.size());
-               List<StructureProteinPrediction> res = new ArrayList<StructureProteinPrediction>();
+               List<AnnotatedProteinSequenceBean> res = new ArrayList<AnnotatedProteinSequenceBean>();
                int c = 0;
                for (Row r : rows) {
-                       StructureProteinPrediction structure = new StructureProteinPrediction(queryProtein, r.getString("JobID"), r.getMap(
+                       AnnotatedProteinSequenceBean structure = new AnnotatedProteinSequenceBean(queryProtein, r.getString("JobID"), r.getMap(
                                        "Predictions", String.class, String.class));
                        res.add(structure);
                        ++c;
@@ -100,7 +100,7 @@ public class CassandraReader {
        /*
         * getting part of protein sequence from the db ProteinRow
         */
-       public List<StructureProteinPrediction> ReadPartOfSequence(String queryProtein) {
+       public List<AnnotatedProteinSequenceBean> ReadPartOfSequence(String queryProtein) {
                final long startTime = System.currentTimeMillis();
                String com = "SELECT * FROM ProteinRow;";
                System.out.println("Command: " + com);
@@ -111,12 +111,12 @@ public class CassandraReader {
                List<Row> rows = results.all();
                System.out.println("Query time is " + (queryTime - startTime) + " msec");
                System.out.println(" rows analysed,  " + rows.size());
-               List<StructureProteinPrediction> res = new ArrayList<StructureProteinPrediction>();
+               List<AnnotatedProteinSequenceBean> res = new ArrayList<AnnotatedProteinSequenceBean>();
                int c = 0;
                for (Row r : rows) {
                        String prot = r.getString("Protein");
                        if (prot.matches("(.*)" + queryProtein + "(.*)")) {
-                               StructureProteinPrediction structure = new StructureProteinPrediction(prot, r.getString("JobID"), r.getMap("Predictions",
+                               AnnotatedProteinSequenceBean structure = new AnnotatedProteinSequenceBean(prot, r.getString("JobID"), r.getMap("Predictions",
                                                String.class, String.class));
                                res.add(structure);
                                ++c;