Show
Ignore:
Timestamp:
08/07/09 10:57:34 (3 years ago)
Author:
martijn
Message:

WIP on improving biomart webservice

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/corelib/src/org/bridgedb/webservice/IDMapperBiomart.java

    r136 r146  
    250250     */ 
    251251    public Map<Xref, Set<Xref>> mapID(Set<Xref> srcXrefs, Set<DataSource> tgtDataSources) throws IDMapperException { 
    252         if (srcXrefs==null || tgtDataSources==null) { 
    253             throw new java.lang.IllegalArgumentException("srcXrefs or tgtDataSources cannot be null"); 
     252        if (srcXrefs==null) { 
     253            throw new java.lang.IllegalArgumentException("srcXrefs cannot be null"); 
    254254        } 
    255255 
     
    272272        // remove unsupported target datasources 
    273273        Set<DataSource> supportedTgtDatasources = cap.getSupportedTgtDataSources(); 
    274         Vector<DataSource> tgtDss = new Vector(tgtDataSources); 
    275         tgtDss.retainAll(supportedTgtDatasources); 
     274        Vector<DataSource> tgtDss; 
     275        if (tgtDataSources == null) 
     276                tgtDss = new Vector(supportedSrcDatasources); 
     277        else 
     278        { 
     279                tgtDss = new Vector(tgtDataSources); 
     280                tgtDss.retainAll(supportedTgtDatasources); 
     281        } 
    276282        if (tgtDss.isEmpty()) { 
    277283            return result;