package jalview.ext.ensembl; /** * A data class to model the data and rest version of one Ensembl domain, * currently for rest.ensembl.org and rest.ensemblgenomes.org * * @author gmcarstairs */ class EnsemblInfo { /* * The http domain this object is holding data values for */ String domain; /* * The latest version Jalview has tested for, e.g. "4.5"; a minor version change should be * ok, a major version change may break stuff */ String expectedRestVersion; /* * Major / minor / point version e.g. "4.5.1" * @see http://rest.ensembl.org/info/rest/?content-type=application/json */ String restVersion; /* * data version * @see http://rest.ensembl.org/info/data/?content-type=application/json */ String dataVersion; /* * true when http://rest.ensembl.org/info/ping/?content-type=application/json * returns response code 200 */ boolean restAvailable; /* * absolute time when availability was last checked */ long lastAvailableCheckTime; /* * absolute time when version numbers were last checked */ long lastVersionCheckTime; // flag set to true if REST major version is not the one expected boolean restMajorVersionMismatch; /* * absolute time to wait till if we overloaded the REST service */ long retryAfter; /** * Constructor given expected REST version number e.g 4.5 or 3.4.3 * * @param restExpected */ EnsemblInfo(String theDomain, String restExpected) { domain = theDomain; expectedRestVersion = restExpected; lastAvailableCheckTime = -1; lastVersionCheckTime = -1; } }