X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws1%2FJPredClient.java;h=e9c2aeaf5cda98c39a05fcb9f51cf0d183db2346;hb=9d2408483e451285fd555c3cd6e0273977acbaa7;hp=65847e6db6a06e2d9f80ed70fde474f5c8997295;hpb=cd4e2687751aab1c9c5974e6966e610a3332236b;p=jalview.git diff --git a/src/jalview/ws/jws1/JPredClient.java b/src/jalview/ws/jws1/JPredClient.java index 65847e6..e9c2aea 100644 --- a/src/jalview/ws/jws1/JPredClient.java +++ b/src/jalview/ws/jws1/JPredClient.java @@ -20,6 +20,8 @@ */ package jalview.ws.jws1; +import java.util.Locale; + import jalview.analysis.AlignSeq; import jalview.bin.Cache; import jalview.datamodel.AlignmentView; @@ -59,9 +61,8 @@ public class JPredClient extends WS1Client * @param viewonly * TODO */ - public JPredClient(ext.vamsas.ServiceHandle sh, String title, - boolean msa, AlignmentView alview, AlignFrame parentFrame, - boolean viewonly) + public JPredClient(ext.vamsas.ServiceHandle sh, String title, boolean msa, + AlignmentView alview, AlignFrame parentFrame, boolean viewonly) { super(); wsInfo = setWebService(sh); @@ -154,9 +155,8 @@ public class JPredClient extends WS1Client { if (!msa && msf.length > 1) { - throw new Error( - MessageManager - .getString("error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported")); + throw new Error(MessageManager.getString( + "error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported")); } String altitle = getPredictionName(WebServiceName) + " for " @@ -185,8 +185,8 @@ public class JPredClient extends WS1Client private String getPredictionName(String webServiceName) { - if (webServiceName.toLowerCase().indexOf( - "secondary structure prediction") > -1) + if (webServiceName.toLowerCase(Locale.ROOT) + .indexOf("secondary structure prediction") > -1) { return webServiceName; } @@ -243,7 +243,8 @@ public class JPredClient extends WS1Client wsInfo.setProgressText("Job details for MSA based prediction (" + title + ") on sequence :\n>" + seq.getName() + "\n" - + AlignSeq.extractGaps("-. ", seq.getSequenceAsString()) + "\n"); + + AlignSeq.extractGaps("-. ", seq.getSequenceAsString()) + + "\n"); SequenceI aln[] = new SequenceI[msf.length]; for (int i = 0, j = msf.length; i < j; i++) { @@ -274,7 +275,8 @@ public class JPredClient extends WS1Client } wsInfo.setProgressText("Job details for prediction on sequence :\n>" + seq.getName() + "\n" - + AlignSeq.extractGaps("-. ", seq.getSequenceAsString()) + "\n"); + + AlignSeq.extractGaps("-. ", seq.getSequenceAsString()) + + "\n"); String altitle = "JPred prediction for sequence " + seq.getName() + " from " + title; @@ -323,21 +325,17 @@ public class JPredClient extends WS1Client } catch (Exception ex) { - JvOptionPane - .showMessageDialog( - Desktop.desktop, - MessageManager - .formatMessage( - "label.secondary_structure_prediction_service_couldnt_be_located", - new String[] { WebServiceName, WsURL }), - MessageManager - .getString("label.internal_jalview_error"), - JvOptionPane.WARNING_MESSAGE); - wsInfo.setProgressText(MessageManager - .formatMessage( + JvOptionPane.showMessageDialog(Desktop.desktop, + MessageManager.formatMessage( "label.secondary_structure_prediction_service_couldnt_be_located", - new String[] { WebServiceName, WsURL }) - + "\n" + ex.getMessage()); + new String[] + { WebServiceName, WsURL }), + MessageManager.getString("label.internal_jalview_error"), + JvOptionPane.WARNING_MESSAGE); + wsInfo.setProgressText(MessageManager.formatMessage( + "label.secondary_structure_prediction_service_couldnt_be_located", + new String[] + { WebServiceName, WsURL }) + "\n" + ex.getMessage()); wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR); } @@ -360,8 +358,8 @@ public class JPredClient extends WS1Client if (msa.getSequences().length == 1) { // Single Sequence prediction - new jalview.ws.jws1.JPredClient(sh, af.getTitle(), false, msa, - af, true); + new jalview.ws.jws1.JPredClient(sh, af.getTitle(), false, msa, af, + true); } else {