X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws2%2Fclient%2Fslivka%2FSlivkaWSClient.java;h=bef502ba00dd8eb3ce6ade3fa649e9aa3d82b345;hb=5d60cda87940311cfff2679e6f0e96890d3e1fd6;hp=b32c188a6ee17ea799fd8a002ad046f99607050c;hpb=1ed4ab57be1800b609f92a394fe4a0382636c780;p=jalview.git diff --git a/src/jalview/ws2/client/slivka/SlivkaWSClient.java b/src/jalview/ws2/client/slivka/SlivkaWSClient.java index b32c188..bef502b 100644 --- a/src/jalview/ws2/client/slivka/SlivkaWSClient.java +++ b/src/jalview/ws2/client/slivka/SlivkaWSClient.java @@ -15,6 +15,7 @@ import java.util.regex.Pattern; import jalview.api.FeatureColourI; import jalview.bin.Cache; +import jalview.bin.Console; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; @@ -94,7 +95,7 @@ public class SlivkaWSClient implements WebServiceClientI } if (format == null) { - Cache.log.warn(String.format( + Console.warn(String.format( "Unknown input format %s, assuming fasta.", fileParam.getMediaType())); format = FileFormat.Fasta; @@ -115,7 +116,7 @@ public class SlivkaWSClient implements WebServiceClientI Parameter param = service.getParameter(paramId); if (param instanceof Parameter.FlagParameter) { - if (arg.getValue() != null && !arg.getValue().isBlank()) + if (arg.getValue() != null && !arg.getValue().isEmpty()) request.addData(paramId, true); else request.addData(paramId, false); @@ -174,7 +175,7 @@ public class SlivkaWSClient implements WebServiceClientI { ByteArrayOutputStream stream = new ByteArrayOutputStream(); f.writeTo(stream); - return stream.toString(StandardCharsets.UTF_8); + return stream.toString("UTF-8"); } } return ""; @@ -190,7 +191,7 @@ public class SlivkaWSClient implements WebServiceClientI { ByteArrayOutputStream stream = new ByteArrayOutputStream(); f.writeTo(stream); - return stream.toString(StandardCharsets.UTF_8); + return stream.toString("UTF-8"); } } return ""; @@ -200,7 +201,7 @@ public class SlivkaWSClient implements WebServiceClientI public void cancel(WebServiceJobHandle job) throws IOException, UnsupportedOperationException { - throw new UnsupportedOperationException( + Console.warn( "slivka client does not support job cancellation"); } } @@ -235,7 +236,7 @@ class SlivkaAlignmentWSClient extends SlivkaWSClient return new FormatAdapter().readFile(f.getContentUrl().toString(), DataSourceType.URL, format); } - Cache.log.warn("No alignment found on the server"); + Console.warn("No alignment found on the server"); throw new IOException("no alignment found"); } @@ -270,7 +271,7 @@ class SlivkaAnnotationWSClient extends SlivkaWSClient aln, service.getId(), f.getContentUrl().toString(), DataSourceType.URL); if (annotPresent) - Cache.log.debug(format("loaded annotations for %s", service.getId())); + Console.debug(format("loaded annotations for %s", service.getId())); } else if (fmt.equalsIgnoreCase("jalview-features")) { @@ -278,13 +279,13 @@ class SlivkaAnnotationWSClient extends SlivkaWSClient DataSourceType.URL); featPresent = ff.parse(aln, colours, true); if (featPresent) - Cache.log.debug(format("loaded features for %s", service.getId())); + Console.debug(format("loaded features for %s", service.getId())); } } if (!annotPresent) - Cache.log.debug(format("no annotations found for %s", service.getId())); + Console.debug(format("no annotations found for %s", service.getId())); if (!featPresent) - Cache.log.debug(format("no features found for %s", service.getId())); + Console.debug(format("no features found for %s", service.getId())); return aln.getAlignmentAnnotation() != null ? Arrays.asList(aln.getAlignmentAnnotation()) : Collections.emptyList(); }