Fix problem with unknown services ("forward" compatibility)
[jabaws.git] / webservices / compbio / data / msa / Category.java
index 05e6873..fa9968b 100644 (file)
@@ -1,14 +1,3 @@
-package compbio.data.msa;\r
-\r
-import java.util.HashSet;\r
-import java.util.Set;\r
-import java.util.TreeSet;\r
-\r
-import javax.xml.bind.annotation.XmlAccessType;\r
-import javax.xml.bind.annotation.XmlAccessorType;\r
-\r
-import compbio.ws.client.Services;\r
-\r
 /**\r
  * Class that splits {@link Services} to categories. Services themselves have no\r
  * knowledge which category they belongs to.\r
@@ -21,6 +10,18 @@ import compbio.ws.client.Services;
  * @author pvtroshin\r
  * @version 1.0 September 2011\r
  */\r
+\r
+package compbio.data.msa;\r
+\r
+import java.util.HashSet;\r
+import java.util.Set;\r
+import java.util.TreeSet;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+\r
+import compbio.ws.client.Services;\r
+\r
 @XmlAccessorType(XmlAccessType.FIELD)\r
 public class Category {\r
        /*\r
@@ -34,8 +35,9 @@ public class Category {
        public static final String CATEGORY_ALIGNMENT = "Alignment";\r
        public static final String CATEGORY_DISORDER = "Protein Disorder";\r
        public static final String CATEGORY_CONSERVATION = "Conservation";\r
+       public static final String CATEGORY_PREDICTION = "Prediction";\r
 \r
-       String name;\r
+       public String name;\r
        Set<Services> services;\r
 \r
        private Category(String name, Set<Services> services) {\r
@@ -47,7 +49,7 @@ public class Category {
                // Default constructor for JAXB\r
        }\r
 \r
-       Set<Services> getServices() {\r
+       public Set<Services> getServices() {\r
                return new TreeSet<Services>(services);\r
        }\r
 \r
@@ -70,18 +72,22 @@ public class Category {
                disorder_services.add(Services.GlobPlotWS);\r
                disorder_services.add(Services.IUPredWS);\r
                disorder_services.add(Services.JronnWS);\r
-\r
                Category disorder = new Category(CATEGORY_DISORDER, disorder_services);\r
+\r
                Set<Services> conservation_services = new HashSet<Services>();\r
                conservation_services.add(Services.AAConWS);\r
+               Category conservation = new Category(CATEGORY_CONSERVATION, conservation_services);\r
 \r
-               Category conservation = new Category(CATEGORY_CONSERVATION,\r
-                               conservation_services);\r
+               Set<Services> prediction_services = new HashSet<Services>();\r
+               prediction_services.add(Services.JpredWS);\r
+               prediction_services.add(Services.RNAalifoldWS);\r
+               Category prediction = new Category(CATEGORY_PREDICTION, prediction_services);\r
 \r
                Set<Category> categories = new HashSet<Category>();\r
                categories.add(alignment);\r
                categories.add(disorder);\r
                categories.add(conservation);\r
+               categories.add(prediction);\r
 \r
                return categories;\r
        }\r