X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Frest%2FRestClient.java;h=3235e7668015921fe4e73596153178d7970c0511;hb=c19d2a91ca05e052e3408bf5852d88eb5d0608f1;hp=41713f1df551f4027c2230d46617722145332933;hpb=ab43013b7e357b84b4abade0dba949668dfb2a0e;p=jalview.git diff --git a/src/jalview/ws/rest/RestClient.java b/src/jalview/ws/rest/RestClient.java index 41713f1..3235e76 100644 --- a/src/jalview/ws/rest/RestClient.java +++ b/src/jalview/ws/rest/RestClient.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -97,7 +97,9 @@ public class RestClient extends WSClient implements WSClientI, public void setWebserviceInfo(boolean headless) { - WebServiceJobTitle = MessageManager.formatMessage("label.webservice_job_title", new String[]{service.details.Action,service.details.Name}); + WebServiceJobTitle = MessageManager.formatMessage( + "label.webservice_job_title", new String[] { + service.details.Action, service.details.Name }); WebServiceName = service.details.Name; WebServiceReference = "No reference - go to url for more info"; if (service.details.description != null) @@ -140,7 +142,9 @@ public class RestClient extends WSClient implements WSClientI, final AlignFrame alignFrame) { JMenuItem submit = new JMenuItem(service.details.Name); - submit.setToolTipText(MessageManager.formatMessage("label.rest_client_submit", new String[]{service.details.Action,service.details.Name})); + submit.setToolTipText(MessageManager.formatMessage( + "label.rest_client_submit", new String[] { + service.details.Action, service.details.Name })); submit.addActionListener(new ActionListener() { @@ -257,7 +261,12 @@ public class RestClient extends WSClient implements WSClientI, _input = new AlignmentView(av.getAlignment(), av.getColumnSelection(), av.getSelectionGroup(), av.hasHiddenColumns(), true, true); - viewTitle = MessageManager.formatMessage("label.select_visible_region_of", new String[]{(av.hasHiddenColumns() ? MessageManager.getString("label.visible") : ""),af.getTitle()}); + viewTitle = MessageManager.formatMessage( + "label.select_visible_region_of", + new String[] { + (av.hasHiddenColumns() ? MessageManager + .getString("label.visible") : ""), + af.getTitle() }); } else { @@ -266,7 +275,12 @@ public class RestClient extends WSClient implements WSClientI, av.getColumnSelection(), av.getSelectionGroup(), av.hasHiddenColumns(), false, true); } - viewTitle = MessageManager.formatMessage("label.select_unselect_visible_regions_from", new String[]{(av.hasHiddenColumns() ? MessageManager.getString("label.visible") : ""),af.getTitle()}); + viewTitle = MessageManager.formatMessage( + "label.select_unselect_visible_regions_from", + new String[] { + (av.hasHiddenColumns() ? MessageManager + .getString("label.visible") : ""), + af.getTitle() }); } else { @@ -274,7 +288,12 @@ public class RestClient extends WSClient implements WSClientI, _input = new AlignmentView(av.getAlignment(), av.getColumnSelection(), av.getSelectionGroup(), av.hasHiddenColumns(), true, true); - viewTitle = MessageManager.formatMessage("label.select_visible_region_of", new String[]{(av.hasHiddenColumns() ? MessageManager.getString("label.visible") : ""),af.getTitle()}); + viewTitle = MessageManager.formatMessage( + "label.select_visible_region_of", + new String[] { + (av.hasHiddenColumns() ? MessageManager + .getString("label.visible") : ""), + af.getTitle() }); } } else @@ -283,8 +302,11 @@ public class RestClient extends WSClient implements WSClientI, _input = new AlignmentView(av.getAlignment(), av.getColumnSelection(), null, av.hasHiddenColumns(), false, true); - viewTitle = "" + (av.hasHiddenColumns() ? (new StringBuffer(" ").append(MessageManager.getString("label.visible_region_of")).toString()) : "") - + af.getTitle(); + viewTitle = "" + + (av.hasHiddenColumns() ? (new StringBuffer(" ") + .append(MessageManager + .getString("label.visible_region_of")) + .toString()) : "") + af.getTitle(); } RestJobThread jobsthread = new RestJobThread(this); @@ -306,15 +328,18 @@ public class RestClient extends WSClient implements WSClientI, .showMessageDialog( Desktop.desktop, (jobsthread.hasWarnings() ? jobsthread.getWarnings() - : MessageManager.getString("label.job_couldnt_be_started_check_input")), - MessageManager.getString("label.unable_start_web_service_analysis"), + : MessageManager + .getString("label.job_couldnt_be_started_check_input")), + MessageManager + .getString("label.unable_start_web_service_analysis"), JOptionPane.WARNING_MESSAGE); } } public static RestClient makeShmmrRestClient() { - String action = "Analysis", description = "Sequence Harmony and Multi-Relief (Brandt et al. 2010)", name = MessageManager.getString("label.multiharmony"); + String action = "Analysis", description = "Sequence Harmony and Multi-Relief (Brandt et al. 2010)", name = MessageManager + .getString("label.multiharmony"); Hashtable iparams = new Hashtable(); jalview.ws.rest.params.JobConstant toolp; // toolp = new jalview.ws.rest.JobConstant("tool","jalview"); @@ -407,33 +432,6 @@ public class RestClient extends WSClient implements WSClientI, return lst; } - public static void main(String args[]) - { - try - { - RestClient[] clients = getRestClients(); - System.out.println("Got " + clients.length + " clients."); - int i = 0; - Vector urls = new Vector(); - for (RestClient cl : clients) - { - System.out.println("" + (++i) + ": " + cl.service.toString()); - urls.add(cl.service.toString()); - } - setRsbsServices(urls); - if (clients.length != getRestClients().length) - { - System.err - .println("Failed. Differing numbers of clients when stringified and parsed again."); - } - - } catch (Throwable x) - { - System.err.println("Failed. Unexpected exception."); - x.printStackTrace(); - } - } - public String getAction() { return service.details.Action;