Merge branch 'servlets'
[proteocache.git] / datadb / compbio / cassandra / CassandraReader.java
index b527738..6e3587b 100644 (file)
@@ -97,7 +97,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);
@@ -108,10 +108,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));
                        if (structure.getPrediction().containsKey("jnetpred"))
                                structure.setJnetpred(structure.getPrediction().get("jnetpred"));
@@ -128,7 +128,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);
@@ -139,12 +139,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;