});
currentservice = new RestServiceDescription("Analysis",
"service description", "service name", "http://localhost/", "",
- null, false, false, '-');
+ null, null, false, false, '-');
initGuiWith(currentservice);
refreshCutnPaste(false);
updateButtons();
{
currentservice = new RestServiceDescription("Analysis",
"service description", "service name", "http://localhost/",
- "", null, false, false, '-');
+ "", null, null, false, false, '-');
}
initGuiWith(currentservice);
refreshCutnPaste(false);
RestServiceDescription newService = new RestServiceDescription(
(String) action.getSelectedItem(), descr.getText().trim(), name
.getText().trim(), url.getText().trim(), urlsuff
- .getText().trim(), inputTypes, hSeparable.isSelected(),
- vSeparable.isSelected(), gc);
+ .getText().trim(), null, inputTypes,
+ hSeparable.isSelected(), vSeparable.isSelected(), gc);
if (newService.isValid())
{
description,
name,
"http://zeus.few.vu.nl/programs/shmrwww/index.php?tool=jalview",// ?tool=jalview&mbjob[method]=shmr&mbjob[description]=step1",
- "?tool=jalview", iparams, true, false, '-');
+ "?tool=jalview", null, iparams, true, false, '-');
// a priori knowledge of the data returned from the service
shmrService.addResultDatatype(JvDataType.ANNOTATION);
return new RestClient(shmrService);
}
/**
- * @param details
* @param postUrl
* @param urlSuffix
+ * @param urlPrefix
+ * null or prefix for forming result URL from job
* @param inputParams
* @param hseparable
* @param vseparable
* @param gapCharacter
+ * @param details
*/
public RestServiceDescription(String action, String description,
String name, String postUrl, String urlSuffix,
- Map<String, InputType> inputParams, boolean hseparable,
- boolean vseparable, char gapCharacter)
+ List<String> urlPrefix,
+ Map<String, InputType> inputParams,
+ boolean hseparable, boolean vseparable, char gapCharacter)
{
super();
this.details = new UIinfo();
details.description = description == null ? "" : description;
details.Name = name == null ? "" : name;
this.postUrl = postUrl == null ? "" : postUrl;
+ // TODO decide if nullable
+ this.rurlPref = urlPrefix;
this.urlSuffix = urlSuffix == null ? "" : urlSuffix;
if (inputParams != null)
{
diff |= hseparable != other.hseparable;
diff |= !(urlSuffix == null && other.urlSuffix == null || (urlSuffix != null
&& other.urlSuffix != null && urlSuffix.equals(other.urlSuffix)));
+ diff |= !(rurlPref == null && other.rurlPref == null || (rurlPref != null
+ && other.rurlPref != null && rurlPref.equals(other.rurlPref)));
// TODO - robust diff that includes constants and reordering of URL
// diff |= !(postUrl.equals(other.postUrl));
// diff |= !inputParams.equals(other.inputParams);
String urlSuffix;
/**
+ * prefix for poll and result URLs when null, urlSuffix is used
+ */
+ List<String> rurlPref = null;
+
+ /**
* input info given as key/value pairs - mapped to post arguments
*/
Map<String, InputType> inputParams = new HashMap<String, InputType>();