Disembl and Jronn web services work. Modified to produce raw scores Globplot script...
[jabaws.git] / webservices / compbio / data / msa / SequenceAnnotation.java
@@ -1,6 +1,7 @@
 package compbio.data.msa;\r
 \r
 import java.security.InvalidParameterException;\r
+import java.util.HashMap;\r
 import java.util.HashSet;\r
 import java.util.List;\r
 \r
@@ -21,6 +22,8 @@ import compbio.metadata.WrongParameterException;
 /**\r
  * Interface for tools that results to one or more annotation to sequence(s)\r
  * \r
+ * Single, multiple sequences their groups or alignments can be annotated\r
+ * \r
  * @author Peter Troshin\r
  * \r
  * @param <T>\r
@@ -29,7 +32,11 @@ import compbio.metadata.WrongParameterException;
  * @version 1.0 November 2010\r
  */\r
 @WebService(targetNamespace = "http://msa.data.compbio/01/12/2010/")\r
-public interface Annotation<T> extends JABAService, JManagement, Metadata<T> {\r
+public interface SequenceAnnotation<T>\r
+               extends\r
+                       JABAService,\r
+                       JManagement,\r
+                       Metadata<T> {\r
 \r
        /**\r
         * \r
@@ -167,7 +174,13 @@ public interface Annotation<T> extends JABAService, JManagement, Metadata<T> {
         * \r
         * @param jobId\r
         *            a unique job identifier\r
-        * @return the HashSet of Score objects\r
+        * @return the Map with the sequence names, sequence group names or the word\r
+        *         'Alignment' in case of alignments and values the represented by a\r
+        *         Set of Score objects. The alignment can be represented in as\r
+        *         little as one key->value pair in this map, the list of sequences\r
+        *         will be represented by multiple key->value mappings. If multiple\r
+        *         annotations were calculated, then they are represented as a Set\r
+        *         of Scores.\r
         * @throws ResultNotAvailableException\r
         *             this exception is throw if the job execution was not\r
         *             successful or the result of the execution could not be found.\r
@@ -178,9 +191,16 @@ public interface Annotation<T> extends JABAService, JManagement, Metadata<T> {
         * @throws InvalidParameterException\r
         *             thrown if jobId is empty or cannot be recognised e.g. in\r
         *             invalid format\r
+        * \r
         */\r
        @WebMethod\r
-       HashSet<Score> getAnnotation(@WebParam(name = "jobId") String jobId)\r
+       HashMap<String, HashSet<Score>> getAnnotation(\r
+                       @WebParam(name = "jobId") String jobId)\r
                        throws ResultNotAvailableException;\r
-\r
+       /*\r
+        * The method should really return Map and Set, but unfortunately JAXB\r
+        * cannot serialize interfaces, has a concrete implementation is used Could\r
+        * also specify the generic Set e.g. ? extends Set. But this would require\r
+        * the client cast or operate with generic Set. Keep it simple for now.\r
+        */\r
 }\r