From: Jim Procter Date: Mon, 6 Sep 2021 13:47:41 +0000 (+0100) Subject: JAL-3829 look up column in FTS data X-Git-Tag: Release_2_11_2_0~39^2~17 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=939cbdf4662176507b0d8d7520ce3858a44f964b;p=jalview.git JAL-3829 look up column in FTS data --- diff --git a/src/jalview/fts/core/FTSRestRequest.java b/src/jalview/fts/core/FTSRestRequest.java index 2d9eeb6..bf88d2d 100644 --- a/src/jalview/fts/core/FTSRestRequest.java +++ b/src/jalview/fts/core/FTSRestRequest.java @@ -188,4 +188,23 @@ public class FTSRestRequest { this.offSet = offSet; } + + /** + * locate column given field name + * @param string - field name + * @return -1 if not located + */ + public int getFieldIndex(String string) + { + int i=associatedSequence!=null ? 1 : 0; + for (FTSDataColumnI field:wantedFields) + { + if (field.getName().equals(string)) + { + return i; + } + i++; + } + return -1; + } }