2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
3 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
18 package jalview.ws.jws2.dm;
20 import jalview.ws.jws2.ParameterUtils;
21 import jalview.ws.params.OptionI;
24 import java.util.List;
26 import compbio.metadata.Option;
28 public class JabaOption implements jalview.ws.params.OptionI
30 public JabaOption(Option rg)
38 public String getDefaultValue()
40 return opt.getDefaultValue();
44 public String getName()
50 public URL getFurtherDetails()
52 return opt.getFurtherDetails();
56 public boolean isRequired()
58 return opt.isRequired();
62 public String getDescription()
64 return opt.getDescription();
68 public List<String> getPossibleValues()
70 // TODO: assert typesafety
71 return opt.getPossibleValues();
75 public void setDefaultValue(String selectedItem)
79 opt.setDefaultValue(selectedItem);
84 "Implementation error: cannot set Jaba Option to a value outside its allowed value range!");
91 return new JabaOption(ParameterUtils.copyOption(opt));
95 * get the underlying Jaba option or parameter object. Note - use copy first
96 * if you want to modify the value of the option.
100 public Option getOption()