Changeset 155
- Timestamp:
- 08/12/09 07:56:10 (2 years ago)
- Location:
- trunk/corelib/src/org/bridgedb
- Files:
-
- 2 modified
-
file/IDMapperFile.java (modified) (2 diffs)
-
webservice/IDMapperBiomart.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/corelib/src/org/bridgedb/file/IDMapperFile.java
r153 r155 72 72 public Map<Xref, Set<Xref>> mapID(final Set<Xref> srcXrefs, 73 73 final Set<DataSource> tgtDataSources) throws IDMapperException { 74 if (srcXrefs==null || tgtDataSources==null) {74 if (srcXrefs==null) { 75 75 throw new IllegalArgumentException("srcXrefs or tgtDataSources cannot be null"); 76 76 } … … 80 80 // remove unsupported target datasources 81 81 Set<DataSource> supportedTgtDatasources = cap.getSupportedTgtDataSources(); 82 Set<DataSource> tgtDss = new HashSet(tgtDataSources); 83 tgtDss.retainAll(supportedTgtDatasources); 82 Set<DataSource> tgtDss; 83 if (tgtDataSources==null) { 84 tgtDss = new HashSet(cap.getSupportedTgtDataSources()); 85 } else { 86 tgtDss = new HashSet(tgtDataSources); 87 tgtDss.retainAll(supportedTgtDatasources); 88 } 89 84 90 if (tgtDss.isEmpty()) { 85 91 return result; -
trunk/corelib/src/org/bridgedb/webservice/IDMapperBiomart.java
r153 r155 255 255 public Map<Xref, Set<Xref>> mapID(Set<Xref> srcXrefs, 256 256 Set<DataSource> tgtDataSources) throws IDMapperException { 257 if (srcXrefs==null || tgtDataSources==null) {257 if (srcXrefs==null) { 258 258 throw new java.lang.IllegalArgumentException( 259 259 "srcXrefs or tgtDataSources cannot be null");
