X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Ffts%2Fservice%2Funiprot%2FUniProtFTSRestClient.java;h=df48c0dada875119da08d5a7c547cbe3bc4e6cae;hb=c932f0e85a8852824cdd8ce790af68682732c85c;hp=88397f5c740e92ad9c286370fd9a132ea7aaae35;hpb=3c3ec5343b9e441517c817c22d1b7ff36f4a78be;p=jalview.git diff --git a/src/jalview/fts/service/uniprot/UniProtFTSRestClient.java b/src/jalview/fts/service/uniprot/UniProtFTSRestClient.java index 88397f5..df48c0d 100644 --- a/src/jalview/fts/service/uniprot/UniProtFTSRestClient.java +++ b/src/jalview/fts/service/uniprot/UniProtFTSRestClient.java @@ -19,32 +19,6 @@ * The Jalview Authors are detailed in the 'AUTHORS' file. */ -/* - * 2022-07-20 bsoares - * See https://issues.jalview.org/browse/JAL-4036 - * The new Uniprot API is not dissimilar to the old one, but has some important changes. - * Some group names have changed slightly, some old groups have gone and there are quite a few new groups. - * - * Most changes are mappings of old column ids to new field ids. There are a handful of old - * columns not mapped to new fields, and new fields without an old column. - * [aside: not all possible columns were listed in the resources/fts/uniprot_data_columns.txt file. - * These were presumably additions after the file was created] - * For existing/mapped fields, the same preferences found in the resource file have been migrated to - * the new file with the new field name, id and group. - * - * The new mapped groups and files are stored and read from resources/fts/uniprot_data_columns-2022.txt. - * - * There is now no "sort" query string parameter. - * - * See https://www.uniprot.org/help/api_queries - * - * SIGNIFICANT CHANGE: Pagination is no longer performed using a record offset, but with a "cursor" - * query string parameter that is not really a cursor. The value is an opaque string that is passed (or - * rather a whole URL is passed) in the "Link" header of the HTTP response of the previous page. - * Where such a link is passed it is put into the cursors ArrayList. - * There are @Overridden methods in UniprotFTSPanel. - */ - package jalview.fts.service.uniprot; import java.lang.invoke.MethodHandles; @@ -73,6 +47,32 @@ import jalview.util.ChannelProperties; import jalview.util.MessageManager; import jalview.util.Platform; +/* + * 2022-07-20 bsoares + * See https://issues.jalview.org/browse/JAL-4036 + * The new Uniprot API is not dissimilar to the old one, but has some important changes. + * Some group names have changed slightly, some old groups have gone and there are quite a few new groups. + * + * Most changes are mappings of old column ids to new field ids. There are a handful of old + * columns not mapped to new fields, and new fields without an old column. + * [aside: not all possible columns were listed in the resources/fts/uniprot_data_columns.txt file. + * These were presumably additions after the file was created] + * For existing/mapped fields, the same preferences found in the resource file have been migrated to + * the new file with the new field name, id and group. + * + * The new mapped groups and files are stored and read from resources/fts/uniprot_data_columns-2022.txt. + * + * There is now no "sort" query string parameter. + * + * See https://www.uniprot.org/help/api_queries + * + * SIGNIFICANT CHANGE: Pagination is no longer performed using a record offset, but with a "cursor" + * query string parameter that is not really a cursor. The value is an opaque string that is passed (or + * rather a whole URL is passed) in the "Link" header of the HTTP response of the previous page. + * Where such a link is passed it is put into the cursors ArrayList. + * There are @Overridden methods in UniprotFTSPanel. + */ + public class UniProtFTSRestClient extends FTSRestClient { private static final String DEFAULT_UNIPROT_DOMAIN = "https://rest.uniprot.org"; @@ -219,7 +219,7 @@ public class UniProtFTSRestClient extends FTSRestClient .getEntity(String.class); // Make redundant objects eligible for garbage collection to conserve // memory - // System.out.println(">>>>> response : " + // jalview.bin.Console.outPrintln(">>>>> response : " // + uniProtTabDelimittedResponseString); if (clientResponse.getStatus() != 200) { @@ -307,7 +307,7 @@ public class UniProtFTSRestClient extends FTSRestClient firstRow = false; continue; } - // System.out.println(dataRow); + // jalview.bin.Console.outPrintln(dataRow); result.add(getFTSData(dataRow, uniprotRestRequest)); } searchResult.setNumberOfItemsFound(xTotalResults); @@ -389,7 +389,7 @@ public class UniProtFTSRestClient extends FTSRestClient } catch (Exception e) { e.printStackTrace(); - System.out.println("offending value:" + fieldData); + jalview.bin.Console.outPrintln("offending value:" + fieldData); } } } catch (Exception e)