- Timestamp:
- 08/09/09 05:23:13 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/corelib/src/org/bridgedb/webservice/IDMapperBiomart.java
r146 r149 81 81 } 82 82 83 pr otectedString datasetName;84 pr otectedBiomartStub stub;85 pr otectedboolean transitivity;86 pr otectedboolean idOnlyForTgtDataSource;87 88 pr otectedString baseURL;83 private String datasetName; 84 private BiomartStub stub; 85 private boolean transitivity; 86 private boolean idOnlyForTgtDataSource; 87 88 private String baseURL; 89 89 90 90 private Map<DataSource, Filter> mapSrcDSFilter; … … 242 242 } 243 243 244 /** 245 * 246 * @return URL of the dataset 247 */ 244 248 public String toString() { 245 249 return getBaseURL()+"?dataset="+getDataset(); … … 249 253 * {@inheritDoc} 250 254 */ 251 public Map<Xref, Set<Xref>> mapID(Set<Xref> srcXrefs, Set<DataSource> tgtDataSources) throws IDMapperException { 252 if (srcXrefs==null) { 253 throw new java.lang.IllegalArgumentException("srcXrefs cannot be null"); 255 public Map<Xref, Set<Xref>> mapID(Set<Xref> srcXrefs, 256 Set<DataSource> tgtDataSources) throws IDMapperException { 257 if (srcXrefs==null || tgtDataSources==null) { 258 throw new java.lang.IllegalArgumentException( 259 "srcXrefs or tgtDataSources cannot be null"); 254 260 } 255 261 … … 257 263 258 264 // remove unsupported source datasources 259 Set<DataSource> supportedSrcDatasources = cap.getSupportedSrcDataSources(); 265 Set<DataSource> supportedSrcDatasources 266 = cap.getSupportedSrcDataSources(); 260 267 Map<DataSource, String> queryFilters = getQueryFilters(srcXrefs); 261 268 Iterator<DataSource> it = queryFilters.keySet().iterator(); … … 345 352 /** 346 353 * Create filters from the source xrefs. 347 * @param srcXrefs 354 * @param srcXrefs source xrefs 348 355 * @return map from data source to IDs 349 356 */ … … 382 389 /** 383 390 * This code is bollowed from IDMapperClient from Cytoscape. 384 * @param tgtDataSources 391 * @param tgtDataSources target data sources 392 * @param filterName filter name 385 393 * @return attributes 386 394 */ … … 435 443 } 436 444 445 /** 446 * Get supported source data sources 447 * @return supported source data sources 448 * @throws IOException if failed to read the filters 449 */ 437 450 protected Set<DataSource> getSupportedSrcDataSources() throws IOException { 438 451 Set<DataSource> dss = new HashSet(); … … 452 465 } 453 466 467 /** 468 * Get supported target data sources 469 * @return supported target data sources 470 * @throws IOException if failed to read the filters 471 */ 454 472 protected Set<DataSource> getSupportedTgtDataSources() throws IOException { 455 473 Map<String, Attribute> attributeVals = stub.getAttributes(datasetName);
