Changeset 252
- Timestamp:
- 11/06/09 10:45:33 (2 years ago)
- Location:
- trunk/picr/src/org/bridgedb/webservice/picr
- Files:
-
- 2 modified
-
IDMapperPicr.java (modified) (5 diffs)
-
IDMapperPicrRest.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/picr/src/org/bridgedb/webservice/picr/IDMapperPicr.java
r248 r252 151 151 { 152 152 Object[] databases; 153 if (tgtDataSources == null)153 if (tgtDataSources.length == 0) 154 154 databases = supportedDbObjects; 155 155 else … … 158 158 Set<Xref> result = new HashSet<Xref>(); 159 159 if (databases.length == 0) return result; 160 160 if (!supportedDatabases.contains(srcXref.getDataSource())) return result; 161 161 162 List<CrossReference> refs = new ArrayList<CrossReference>(); 162 163 … … 187 188 for (DataSource tgt : ds) 188 189 { 189 if (supportedDatabases.contains( ds))190 if (supportedDatabases.contains(tgt)) 190 191 databases.add(tgt.getFullName()); 191 192 } … … 210 211 throws IDMapperException 211 212 { 213 Set<String> result = new HashSet<String>(); 214 if (!supportedDatabases.contains(ref.getDataSource())) return result; 215 212 216 List<UPEntry> entries = client.performAccessionMapping(ref.getId(), supportedDbObjects); 213 214 Set<String> result = new HashSet<String>();215 216 217 for (UPEntry entry : entries) 217 218 { … … 249 250 throws IDMapperException 250 251 { 252 Map<String, Set<String>> result = new HashMap<String, Set<String>>(); 253 if (!supportedDatabases.contains(ref.getDataSource())) return result; 254 251 255 List<UPEntry> entries = client.performAccessionMapping(ref.getId(), supportedDbObjects); 252 253 Map<String, Set<String>> result = new HashMap<String, Set<String>>();254 255 256 for (UPEntry entry : entries) 256 257 { -
trunk/picr/src/org/bridgedb/webservice/picr/IDMapperPicrRest.java
r241 r252 111 111 isOnlyActive = Boolean.parseBoolean(args.get("only-active")); 112 112 } 113 return new IDMapperPicr (isOnlyActive);113 return new IDMapperPicrRest(isOnlyActive); 114 114 } 115 115 } … … 190 190 // remove unsupported data sources 191 191 Set<String> tgtDss = new HashSet<String>(); 192 if (tgtDataSources !=null) {192 if (tgtDataSources.length > 0) { 193 193 for (DataSource ds : tgtDataSources) { 194 194 if (supportedDatabases.contains(ds)) {
