X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fdbsources%2FPfam.java;h=91ffbca2d29c4f85539be361f010a656a81673a6;hb=18099e521fde283ebe0f03491876c686333adf81;hp=2075a0bd30502af112f62b66f1816007533925a3;hpb=49685e6426d5ac136dce4907196751680c667670;p=jalview.git diff --git a/src/jalview/ws/dbsources/Pfam.java b/src/jalview/ws/dbsources/Pfam.java index 2075a0b..91ffbca 100644 --- a/src/jalview/ws/dbsources/Pfam.java +++ b/src/jalview/ws/dbsources/Pfam.java @@ -29,23 +29,29 @@ import jalview.io.FastaFile; import jalview.io.StockholmFile; import jalview.ws.seqfetcher.DbSourceProxy; import jalview.ws.seqfetcher.DbSourceProxyImpl; + /** - * TODO: later PFAM is a complex datasource - it could return a tree in addition to an alignment - * TODO: create interface to pass alignment properties and tree back to sequence fetcher + * TODO: later PFAM is a complex datasource - it could return a tree in addition + * to an alignment TODO: create interface to pass alignment properties and tree + * back to sequence fetcher + * * @author JimP - * + * */ -abstract public class Pfam extends DbSourceProxyImpl implements DbSourceProxy +abstract public class Pfam extends DbSourceProxyImpl implements + DbSourceProxy { public Pfam() { super(); - // all extensions of this PFAM source base class are DOMAINDB sources + // all extensions of this PFAM source base class are DOMAINDB sources addDbSourceProperty(jalview.datamodel.DBRefSource.DOMAINDB); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see jalview.ws.DbSourceProxy#getAccessionSeparator() */ public String getAccessionSeparator() @@ -54,7 +60,9 @@ abstract public class Pfam extends DbSourceProxyImpl implements DbSourceProxy return null; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see jalview.ws.DbSourceProxy#getAccessionValidator() */ public Regex getAccessionValidator() @@ -63,27 +71,28 @@ abstract public class Pfam extends DbSourceProxyImpl implements DbSourceProxy return null; } - /* (non-Javadoc) - * @see jalview.ws.DbSourceProxy#getDbSource() - public String getDbSource() - { - ** this doesn't work - DbSource is key for the hash of DbSourceProxy instances - 1:many mapping for DbSource to proxy will be lost. - ** suggest : PFAM is an 'alignment' source - means proxy is higher level than a sequence source. - return jalview.datamodel.DBRefSource.PFAM; - } + /* + * (non-Javadoc) + * + * @see jalview.ws.DbSourceProxy#getDbSource() public String getDbSource() { * + * this doesn't work - DbSource is key for the hash of DbSourceProxy + * instances - 1:many mapping for DbSource to proxy will be lost. * + * suggest : PFAM is an 'alignment' source - means proxy is higher level + * than a sequence source. return jalview.datamodel.DBRefSource.PFAM; } */ - - /* (non-Javadoc) - * @see jalview.ws.DbSourceProxy#getDbSourceProperties() - public Hashtable getDbSourceProperties() - { - - return null; - } - */ - - /* (non-Javadoc) + /* + * (non-Javadoc) + * + * @see jalview.ws.DbSourceProxy#getDbSourceProperties() public Hashtable + * getDbSourceProperties() { + * + * return null; } + */ + + /* + * (non-Javadoc) + * * @see jalview.ws.DbSourceProxy#getDbVersion() */ public String getDbVersion() @@ -91,46 +100,55 @@ abstract public class Pfam extends DbSourceProxyImpl implements DbSourceProxy // TODO Auto-generated method stub return null; } + /** * * @return PFAM URL stub for this DbSource */ protected abstract String getPFAMURL(); - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see jalview.ws.DbSourceProxy#getSequenceRecords(java.lang.String[]) */ public AlignmentI getSequenceRecords(String queries) throws Exception { - // TODO: this is not a perfect implementation. We need to be able to add individual references to each sequence in each family alignment that's retrieved. + // TODO: this is not a perfect implementation. We need to be able to add + // individual references to each sequence in each family alignment that's + // retrieved. startQuery(); - AlignmentI rcds = new jalview.io.FormatAdapter().readFile(getPFAMURL()+queries.trim().toUpperCase(), jalview.io.FormatAdapter.URL,"STH"); - for (int s=0,sNum=rcds.getHeight(); s