JAL-3070 core service descriptors for JABAWS services abstracted to jalview.ws.api...
[jalview.git] / src / jalview / ws / api / UIinfo.java
index cd156f2..81c4ff3 100644 (file)
@@ -6,13 +6,33 @@ package jalview.ws.api;
 
 public class UIinfo
 {
-  public UIinfo(String action, String name, String description)
+  private String ServiceType;
+
+  public UIinfo(String serviceType, String action, String name,
+          String description)
   {
+    this.setServiceType(serviceType == null ? "" : serviceType);
     this.Action = action == null ? "" : action;
     this.description = description == null ? "" : description;
     this.Name = name == null ? "" : name;
   }
 
+  /**
+   * The type of analysis the service performs
+   */
+  public String getServiceType()
+  {
+    return ServiceType;
+  }
+
+  public void setServiceType(String serviceType)
+  {
+    ServiceType = serviceType;
+  }
+
+  /**
+   * The action when the service performs the analysis
+   */
   public String getAction()
   {
     return Action;
@@ -23,6 +43,11 @@ public class UIinfo
     Action = action;
   }
 
+  /**
+   * name shown to user
+   * 
+   * @return
+   */
   public String getName()
   {
     return Name;
@@ -33,6 +58,11 @@ public class UIinfo
     Name = name;
   }
 
+  /**
+   * Detailed description (may include references, URLs, html,etc)
+   * 
+   * @return
+   */
   public String getDescription()
   {
     return description;
@@ -52,8 +82,12 @@ public class UIinfo
     }
     UIinfo other = (UIinfo) object;
 
-    return (Name == null && other.getName() == null || Name != null
-            && other.getName() != null && Name.equals(other.getName()))
+    return (ServiceType == null && other.getServiceType() == null
+            || ServiceType != null && other.getServiceType() != null
+                    && ServiceType.equals(other.getServiceType()))
+            && (Name == null && other.getName() == null
+                    || Name != null && other.getName() != null
+                            && Name.equals(other.getName()))
             && (Action == null && other.getAction() == null
                     || Action != null && other.getAction() != null
                             && Action.equals(other.getAction()))