Disembl and Jronn web services work. Modified to produce raw scores Globplot script...
[jabaws.git] / testsrc / compbio / ws / client / AAConWSClientExample.java
index 98c2dfc..4178ada 100644 (file)
@@ -3,10 +3,11 @@ package compbio.ws.client;
 import java.io.ByteArrayInputStream;\r
 import java.io.FileNotFoundException;\r
 import java.io.IOException;\r
+import java.util.HashSet;\r
 import java.util.List;\r
-import java.util.Set;\r
+import java.util.Map;\r
 \r
-import compbio.data.msa.Annotation;\r
+import compbio.data.msa.SequenceAnnotation;\r
 import compbio.data.sequence.FastaSequence;\r
 import compbio.data.sequence.Score;\r
 import compbio.data.sequence.SequenceUtil;\r
@@ -70,8 +71,9 @@ public class AAConWSClientExample {
                /*\r
                 * Annotation interface for AAConWS web service instance\r
                 */\r
-               Annotation<AACon> client = (Annotation<AACon>) Jws2Client.connect(\r
-                               "http://www.compbio.dundee.ac.uk/aacon", Services.AAConWS);\r
+               SequenceAnnotation<AACon> client = (SequenceAnnotation<AACon>) Jws2Client\r
+                               .connect("http://www.compbio.dundee.ac.uk/aacon",\r
+                                               Services.AAConWS);\r
 \r
                /* Get the list of available presets */\r
                PresetManager presetman = client.getPresets();\r
@@ -94,7 +96,7 @@ public class AAConWSClientExample {
                String jobId = client.presetAnalize(fastalist, preset);\r
 \r
                /* This method will block for the duration of the calculation */\r
-               Set<Score> result = client.getAnnotation(jobId);\r
+               Map<String, HashSet<Score>> result = client.getAnnotation(jobId);\r
 \r
                /*\r
                 * This is a better way of obtaining results, it does not involve\r
@@ -108,7 +110,8 @@ public class AAConWSClientExample {
                // }\r
 \r
                /* Output the alignment to standard out */\r
-               Score.write(result, System.out);\r
+               IOHelper.writeOut(System.out, result);\r
+               // Score.write(result, System.out);\r
 \r
                /* Alternatively, you can record retrieved alignment into the file */\r
                // FileOutputStream out = new FileOutputStream("result.txt");\r