X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fdbsources%2FUniprot.java;h=ab0b10c408ae867a5ab90f0d00b752c23a40f3cd;hb=18099e521fde283ebe0f03491876c686333adf81;hp=1140a1b224be6557b9f04043be620189699d215c;hpb=49685e6426d5ac136dce4907196751680c667670;p=jalview.git diff --git a/src/jalview/ws/dbsources/Uniprot.java b/src/jalview/ws/dbsources/Uniprot.java index 1140a1b..ab0b10c 100644 --- a/src/jalview/ws/dbsources/Uniprot.java +++ b/src/jalview/ws/dbsources/Uniprot.java @@ -51,11 +51,12 @@ import jalview.ws.seqfetcher.DbSourceProxyImpl; */ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy { - public Uniprot() { + public Uniprot() + { super(); addDbSourceProperty(DBRefSource.SEQDB, DBRefSource.SEQDB); addDbSourceProperty(DBRefSource.PROTSEQDB); -// addDbSourceProperty(DBRefSource.MULTIACC, new Integer(50)); + // addDbSourceProperty(DBRefSource.MULTIACC, new Integer(50)); } /* @@ -106,7 +107,8 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy try { // 1. Load the mapping information from the file - org.exolab.castor.mapping.Mapping map = new org.exolab.castor.mapping.Mapping(uni.getClass().getClassLoader()); + org.exolab.castor.mapping.Mapping map = new org.exolab.castor.mapping.Mapping( + uni.getClass().getClassLoader()); java.net.URL url = getClass().getResource("/uniprot_mapping.xml"); map.loadMapping(url); @@ -116,8 +118,7 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy unmar.setMapping(map); uni = (UniprotFile) unmar.unmarshal(new FileReader(file)); - } - catch (Exception e) + } catch (Exception e) { System.out.println("Error getUniprotEntries() " + e); } @@ -135,11 +136,12 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy startQuery(); try { - Alignment al=null; + Alignment al = null; ebi = new EBIFetchClient(); - StringBuffer result=new StringBuffer(); + StringBuffer result = new StringBuffer(); // uniprotxml parameter required since december 2007 - File file = ebi.fetchDataAsFile("uniprot:" + queries, "uniprotxml", null); + File file = ebi.fetchDataAsFile("uniprot:" + queries, "uniprotxml", + null); Vector entries = getUniprotEntries(file); if (entries != null) @@ -164,12 +166,13 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy name.append(en2.nextElement()); } - if (entry.getProtein()!=null && entry.getProtein().getName()!=null) + if (entry.getProtein() != null + && entry.getProtein().getName() != null) { - for (int nm=0,nmSize=entry.getProtein().getName().size(); nm