import jalview.datamodel.UniprotEntry;
import jalview.datamodel.UniprotFile;
import jalview.ws.ebi.EBIFetchClient;
-import jalview.ws.seqfetcher.DbSourceProxy;
import jalview.ws.seqfetcher.DbSourceProxyImpl;
import java.io.File;
import java.io.FileReader;
import java.io.Reader;
+import java.net.URL;
import java.util.Vector;
+import org.exolab.castor.mapping.Mapping;
import org.exolab.castor.xml.Unmarshaller;
import com.stevesoft.pat.Regex;
* @author JimP
*
*/
-public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy
+public class Uniprot extends DbSourceProxyImpl
{
private static final String BAR_DELIMITER = "|";
private static final String NEWLINE = "\n";
- private static org.exolab.castor.mapping.Mapping map;
+ private static Mapping map;
/**
* Constructor
public Uniprot()
{
super();
- addDbSourceProperty(DBRefSource.SEQDB, DBRefSource.SEQDB);
- addDbSourceProperty(DBRefSource.PROTSEQDB);
- // addDbSourceProperty(DBRefSource.MULTIACC, new Integer(50));
}
/*
*
* @see jalview.ws.DbSourceProxy#getAccessionSeparator()
*/
+ @Override
public String getAccessionSeparator()
{
return null; // ";";
*
* @see jalview.ws.DbSourceProxy#getAccessionValidator()
*/
+ @Override
public Regex getAccessionValidator()
{
return new Regex("([A-Z]+[0-9]+[A-Z0-9]+|[A-Z0-9]+_[A-Z0-9]+)");
*
* @see jalview.ws.DbSourceProxy#getDbSource()
*/
+ @Override
public String getDbSource()
{
return DBRefSource.UNIPROT;
*
* @see jalview.ws.DbSourceProxy#getDbVersion()
*/
+ @Override
public String getDbVersion()
{
return "0"; // we really don't know what version we're on.
if (map == null)
{
// 1. Load the mapping information from the file
- map = new org.exolab.castor.mapping.Mapping(uni.getClass()
- .getClassLoader());
- java.net.URL url = getClass().getResource("/uniprot_mapping.xml");
+ map = new Mapping(uni.getClass().getClassLoader());
+ URL url = getClass().getResource("/uniprot_mapping.xml");
map.loadMapping(url);
}
*
* @see jalview.ws.DbSourceProxy#getSequenceRecords(java.lang.String[])
*/
+ @Override
public AlignmentI getSequenceRecords(String queries) throws Exception
{
startQuery();
*
* @see jalview.ws.DbSourceProxy#isValidReference(java.lang.String)
*/
+ @Override
public boolean isValidReference(String accession)
{
// TODO: make the following a standard validator
/**
* return LDHA_CHICK uniprot entry
*/
+ @Override
public String getTestQuery()
{
return "P00340";
}
+ @Override
public String getDbName()
{
return "Uniprot"; // getDbSource();
{
return 0;
}
+
+ @Override
+ public int getMaximumQueryCount()
+ {
+ // relocated this commented out code...
+ // addDbSourceProperty(DBRefSource.MULTIACC, new Integer(50));
+ // return 50;
+ return super.getMaximumQueryCount();
+ }
}