From 939cbdf4662176507b0d8d7520ce3858a44f964b Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 6 Sep 2021 14:47:41 +0100 Subject: [PATCH] JAL-3829 look up column in FTS data --- src/jalview/fts/core/FTSRestRequest.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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; + } } -- 1.7.10.2