JAL-633, JAL-591 - refactored ArgumentI.getValue from jabaws .getDefaultValue
[jalview.git] / src / jalview / ws / rest / params / Tree.java
1 package jalview.ws.rest.params;
2
3 import jalview.datamodel.AlignmentI;
4 import jalview.ws.rest.InputType;
5 import jalview.ws.rest.RestJob;
6 import jalview.ws.rest.RestServiceDescription;
7 import jalview.ws.rest.InputType.molType;
8
9 import java.io.UnsupportedEncodingException;
10 import java.util.ArrayList;
11 import java.util.List;
12
13 import org.apache.http.entity.mime.content.ContentBody;
14
15 /**
16  * format a tree for input to a rest service
17  * @author JimP
18  *
19  */
20 public class Tree extends InputType {
21   public Tree()
22   {
23     super(new Class[] { jalview.analysis.NJTree.class} );
24   }
25
26   // TODO specify modifiers for tree output format
27   @Override
28   public ContentBody formatForInput(RestJob rj) throws UnsupportedEncodingException
29   {
30     // TODO: implement tree inputType
31     /*rj.getTreeForInput(token);
32     return new StringBody(new ) */
33     throw new Error("Tree InputType not yet implemented");
34     //return null;
35   }
36   public String getURLtokenPrefix()
37   {
38     return "NEWICK"; 
39   }
40   
41   @Override
42   public List<String> getURLEncodedParameter()
43   {
44     ArrayList<String> prms = new ArrayList<String>();
45     super.addBaseParams(prms);
46     return prms;
47   }
48
49   @Override
50   public boolean configureProperty(String tok, String val,
51           StringBuffer warnings)
52   {
53     return true;
54   }
55
56 }