From: jprocter Date: Thu, 7 Apr 2011 13:05:39 +0000 (+0000) Subject: resolves JAL-805 X-Git-Tag: Release_2_7~228 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9e0de5f746594b5ccb94b548e4a1bd948ea3acdc;p=jalview.git resolves JAL-805 --- diff --git a/src/jalview/ws/EnfinEnvision2OneWay.java b/src/jalview/ws/EnfinEnvision2OneWay.java index 6a9371b..b5b081d 100644 --- a/src/jalview/ws/EnfinEnvision2OneWay.java +++ b/src/jalview/ws/EnfinEnvision2OneWay.java @@ -35,7 +35,9 @@ import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.io.BufferedReader; import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; import java.net.URL; +import java.net.URLEncoder; import java.util.Hashtable; import java.util.Map; import java.util.Vector; @@ -140,17 +142,28 @@ public class EnfinEnvision2OneWay extends DefaultHandler implements { groupURLdescr.addElement(description); groupURLdescr.addElement(description); + String urlstub=wfname; + if (wfname.indexOf(" ")>-1) + { + // make the name safe! + try { + urlstub = URLEncoder.encode(wfname,"utf-8"); + } catch (UnsupportedEncodingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } groupURLLinks .addElement(wfname + "|" + "http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=" - + wfname + + urlstub + "&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCEIDS$&inputType=0|,"); // #"+description+"#"); groupURLLinks .addElement(wfname + "|" + "http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=" - + wfname + + urlstub + "&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCES=/([A-Za-z]+)+/=$&inputType=1|,"); // #"+description+"#"); } }