2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
22 package jalview.fts.api;
24 import jalview.fts.api.FTSDataColumnI.FTSDataColumnGroupI;
25 import jalview.fts.core.FTSRestRequest;
26 import jalview.fts.core.FTSRestResponse;
28 import java.util.Collection;
31 * Methods for FTS Rest client.
35 public interface FTSRestClientI
39 * Execute a given FTS request, process the response and return it as an
40 * FTSRestResponse object
42 * @param ftsRestRequest
43 * the FTS request to execute
44 * @return FTSRestResponse - the response after executing an FTS request
47 public FTSRestResponse executeRequest(FTSRestRequest ftsRequest)
51 * Return the resource file path for the data columns configuration file
55 public String getColumnDataConfigFileName();
58 * Fetch FTSDataColumnGroupI by the group's Id
61 * @return FTSDataColumnGroupI
64 public FTSDataColumnGroupI getDataColumnGroupById(String groupId)
68 * Fetch FTSDataColumnI by name or code
71 * @return FTSDataColumnI
74 public FTSDataColumnI getDataColumnByNameOrCode(String nameOrCode)
78 * Convert collection of FTSDataColumnI objects to a comma delimited string of
82 * the collection of FTSDataColumnI to process
83 * @return the generated comma delimited string from the supplied
84 * FTSDataColumnI collection
86 public String getDataColumnsFieldsAsCommaDelimitedString(
87 Collection<FTSDataColumnI> wantedFields);
90 * Fetch index of the primary key column for the dynamic table
93 * the available table columns
95 * true if the data columns has an additional column for reference
97 * @return index of the primary key column
100 public int getPrimaryKeyColumIndex(
101 Collection<FTSDataColumnI> wantedFields, boolean hasRefSeq)
105 * Fetch the primary key data column object
107 * @return the FTSDataColumnI object for the primary key column
109 public FTSDataColumnI getPrimaryKeyColumn();
112 * Returns list of FTSDataColumnI objects to be displayed by default
114 * @return list of columns to display by default
116 public Collection<FTSDataColumnI> getAllDefaultDisplayedFTSDataColumns();
119 * Return list of FTSDataColumnI objects that can be used to perform a search
122 * @return list of searchable FTSDataColumnI object
124 public Collection<FTSDataColumnI> getSearchableDataColumns();
127 * Return list of all available FTSDataColumnI object
129 * @return list of all FTSColumnI objcet
131 public Collection<FTSDataColumnI> getAllFTSDataColumns();
134 * Return the default response page limit
136 * @return the default response page size
138 public int getDefaultResponsePageSize();