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
/**\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
* @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
* \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
* @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