JAL-2656 JAL-3615 check response headers to test for gzipped url reply
[jalview.git] / src / jalview / ws / dbsources / Pfam.java
index 6cec4ef..47e66ac 100644 (file)
@@ -35,8 +35,14 @@ import com.stevesoft.pat.Regex;
  */
 abstract public class Pfam extends Xfam
 {
-  private static final String PFAM_DOMAIN_KEY = "PFAM_DOMAIN";
-  private static final String DEFAULT_PFAM_DOMAIN = "http://pfam.xfam.org";
+  /*
+   * append to URLs to retrieve as a gzipped file
+   */
+  protected static final String GZIPPED = "/gzipped";
+
+  static final String PFAM_BASEURL_KEY = "PFAM_BASEURL";
+
+  private static final String DEFAULT_PFAM_BASEURL = "https://pfam.xfam.org";
 
   public Pfam()
   {
@@ -96,9 +102,9 @@ abstract public class Pfam extends Xfam
   }
 
   @Override
-  protected String getDomain()
+  protected String getURLPrefix()
   {
-    return Cache.getDefault(PFAM_DOMAIN_KEY, DEFAULT_PFAM_DOMAIN);
+    return Cache.getDefault(PFAM_BASEURL_KEY, DEFAULT_PFAM_BASEURL);
   }
 
   /*