JAL-2609 enabled (still broken/incomplete) fast paint
[jalview.git] / src / jalview / ws / dbsources / Xfam.java
index 26c9997..3554f01 100644 (file)
@@ -22,6 +22,8 @@ package jalview.ws.dbsources;
 
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.DBRefEntry;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormat;
 import jalview.io.FormatAdapter;
 import jalview.ws.seqfetcher.DbSourceProxyImpl;
 
@@ -55,7 +57,8 @@ public abstract class Xfam extends DbSourceProxyImpl
     startQuery();
     // TODO: trap HTTP 404 exceptions and return null
     AlignmentI rcds = new FormatAdapter().readFile(getXFAMURL()
-            + queries.trim().toUpperCase(), FormatAdapter.URL, "STH");
+            + queries.trim().toUpperCase() + getXFAMURLSUFFIX(),
+            DataSourceType.URL, FileFormat.Stockholm);
     for (int s = 0, sNum = rcds.getHeight(); s < sNum; s++)
     {
       rcds.getSequenceAt(s).addDBRef(new DBRefEntry(getXfamSource(),
@@ -81,4 +84,14 @@ public abstract class Xfam extends DbSourceProxyImpl
     return true;
   }
 
+  /**
+   * default suffix to append the retrieval URL for this source.
+   * 
+   * @return "" for most Xfam sources
+   */
+  public String getXFAMURLSUFFIX()
+  {
+    return "";
+  }
+
 }