- // TODO - find a better way of maintaining this classlist
- for (Class type : new Class[]
- { jalview.ws.rest.params.Alignment.class,
- jalview.ws.rest.params.AnnotationFile.class,
- SeqGroupIndexVector.class,
- jalview.ws.rest.params.SeqIdVector.class,
- jalview.ws.rest.params.SeqVector.class,
- jalview.ws.rest.params.Tree.class })
- {
- try
- {
- jinput = (InputType) (type.getConstructor().newInstance(null));
- if (iprm.equalsIgnoreCase(jinput.getURLtokenPrefix()))
- {
- ArrayList<String> al = new ArrayList<String>();
- for (String prprm : separatorListToArray(iprmparams, ","))
- {
- al.add(prprm);
- }
- if (!jinput.configureFromURLtokenString(al, warnings))
- {
- valid = false;
- warnings.append("Failed to parse '" + prms.group(0)
- + "' as a " + jinput.getURLtokenPrefix()
- + " input tag.\n");
- }
- else
- {
- jinput.token = tok;
- iparams.put(tok, jinput);
- }
- break;
- }
-
- } catch (Throwable thr)
- {
- }
- ;
- }
+ valid = parseTypeString(prms.group(0), tok, iprm, iprmparams,
+ iparams, warnings);