/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*/
package jalview.ws.dbsources;
-import jalview.ws.seqfetcher.DbSourceProxy;
+import jalview.bin.Cache;
+import jalview.datamodel.DBRefSource;
+import jalview.util.Platform;
import com.stevesoft.pat.Regex;
*
* @author Lauren Michelle Lui
*/
-abstract public class Rfam extends Xfam implements DbSourceProxy
+abstract public class Rfam extends Xfam
{
+ static final String RFAM_BASEURL_KEY = "RFAM_BASEURL";
+
+ private static final String DEFAULT_RFAM_BASEURL = "https://rfam.xfam.org";
+
+ static
+ {
+ Platform.addJ2SDirectDatabaseCall(DEFAULT_RFAM_BASEURL);
+ }
+
+ /*
+ * append to URLs to retrieve as a gzipped file
+ */
+ protected static final String GZIPPED = "?gzip=1&download=1";
+
+ @Override
+ protected String getURLPrefix()
+ {
+ return Cache.getDefault(RFAM_BASEURL_KEY, DEFAULT_RFAM_BASEURL);
+ }
public Rfam()
{
super();
- // all extensions of this RFAM source base class are DOMAINDB sources
- addDbSourceProperty(jalview.datamodel.DBRefSource.DOMAINDB);
- addDbSourceProperty(jalview.datamodel.DBRefSource.ALIGNMENTDB);
}
/*
* @see jalview.ws.DbSourceProxy#getAccessionSeparator() Left here for
* consistency with Pfam class
*/
+ @Override
public String getAccessionSeparator()
{
- // TODO Auto-generated method stub
return null;
}
*
* @see jalview.ws.DbSourceProxy#getAccessionValidator() * Left here for
*/
+ @Override
public Regex getAccessionValidator()
{
- // TODO Auto-generated method stub
return null;
}
@Override
public String getDbVersion()
{
- // TODO Auto-generated method stub
return null;
}
- /**
- * Returns base URL for selected Rfam alignment type
- *
- * @return RFAM URL stub for this DbSource
- */
- @Override
- protected abstract String getXFAMURL();
-
/*
* (non-Javadoc)
*
* @see jalview.ws.DbSourceProxy#isValidReference(java.lang.String)
*/
+ @Override
public boolean isValidReference(String accession)
{
return accession.indexOf("RF") == 0;
*
* @see jalview.ws.dbsources.Xfam#getXfamSource()
*/
+ @Override
public String getXfamSource()
{
- return jalview.datamodel.DBRefSource.RFAM;
+ return DBRefSource.RFAM;
}
}