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.
21 package jalview.ext.ensembl;
24 * A data class to model the data and rest version of one Ensembl domain,
25 * currently for rest.ensembl.org and rest.ensemblgenomes.org
32 * The http domain this object is holding data values for
37 * The latest version Jalview has tested for, e.g. "4.5"; a minor version change should be
38 * ok, a major version change may break stuff
40 String expectedRestVersion;
43 * Major / minor / point version e.g. "4.5.1"
44 * @see http://rest.ensembl.org/info/rest/?content-type=application/json
50 * @see http://rest.ensembl.org/info/data/?content-type=application/json
55 * true when http://rest.ensembl.org/info/ping/?content-type=application/json
56 * returns response code 200 and not {"error":"Database is unavailable"}
58 boolean restAvailable;
61 * absolute time when availability was last checked
63 long lastAvailableCheckTime;
66 * absolute time when version numbers were last checked
68 long lastVersionCheckTime;
70 // flag set to true if REST major version is not the one expected
71 boolean restMajorVersionMismatch;
74 * absolute time to wait till if we overloaded the REST service
79 * Constructor given expected REST version number e.g 4.5 or 3.4.3
83 EnsemblData(String theDomain, String restExpected)
86 expectedRestVersion = restExpected;
87 lastAvailableCheckTime = -1;
88 lastVersionCheckTime = -1;