Show
Ignore:
Timestamp:
08/19/09 17:47:05 (3 years ago)
Author:
jgao
Message:

checkstyle fix

Files:
1 modified

Legend:

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

    r161 r166  
    2323import java.util.HashMap; 
    2424import java.util.HashSet; 
    25 import java.util.Iterator; 
    2625import java.util.Map; 
    2726import java.util.Set; 
    28 import java.util.Vector; 
    2927 
    3028import javax.xml.parsers.ParserConfigurationException; 
    3129 
    32 import org.bridgedb.DataSource; 
    3330import org.bridgedb.IDMapperException; 
    34 import org.bridgedb.Xref; 
    35 import org.bridgedb.file.IDMappingReaderFromDelimitedReader; 
    3631import org.bridgedb.webservice.biomart.util.Attribute; 
    3732import org.bridgedb.webservice.biomart.util.BiomartClient; 
     
    4439 
    4540/** 
    46  * Cache for SynergizerClient 
     41 * Wrapp-up for BiomartClient. 
    4742 * @author gjj 
    4843 */ 
    49 public class BiomartStub { 
     44public final class BiomartStub { 
    5045    public static final String defaultBaseURL 
    5146            = BiomartClient.defaultBaseURL; 
    5247 
    53     // cache data 
    54 //    private Map<String,Map<String,Map<String,Set<String>>>> 
    55 //            mapAuthSpeciesDomainRange = null; 
    56  
    5748    // one instance per url 
    5849    private static Map<String, BiomartStub> instances = new HashMap(); 
     
    6051    /** 
    6152     * 
    62      * @return SynergizerStub with the default server url 
     53     * @return BiomartStub with the default server url 
    6354     * @throws IOException if failed to connect 
    6455     */ 
     
    7061     * 
    7162     * @param baseUrl server url 
    72      * @return SynergizerStub from the server 
     63     * @return BiomartStub from the server 
    7364     * @throws IOException if failed to connect 
    7465     */ 
     
    129120     * @param mart mart name 
    130121     * @return mart display name or null if not exist 
    131      * @throws IDMapperException if failed to connect 
    132122     */ 
    133123    public String martDisplayName(String mart) { 
     
    142132    /** 
    143133     * 
    144      * @param authority mart name 
     134     * @param mart mart name 
    145135     * @return available datasets from this mart 
    146      * @throws IDMapperException if failed 
    147136     */ 
    148137    public Set<String> availableDatasets(String mart) 
     
    170159     * @param dataset dataset name 
    171160     * @return dataset display name or null if not exist 
    172      * @throws IDMapperException if failed to connect 
    173161     */ 
    174162    public String datasetDisplayName(String dataset) { 
     
    211199    /** 
    212200     * 
    213      * @param mart mart name 
    214      * @param dataset dataset name 
     201     * @param mart mart name. 
     202     * @param dataset dataset name. 
     203     * @param idOnly filter the attributes ending with "ID" or "Accession" 
     204     *        if true; no filter otherwise. 
    215205     * @return attribute names / target id types of the dataset from this 
    216      *         mart 
     206     *         mart. 
    217207     * @throws IDMapperException if failed. 
    218208     */ 
     
    239229            result = new HashSet(); 
    240230            for (String name : attributes.keySet()) { 
    241                 String displayName = client.getAttribute(dataset, name).getDisplayName(); 
     231                String displayName = client.getAttribute(dataset, name) 
     232                        .getDisplayName(); 
    242233                if (displayName.endsWith("ID") 
    243234                        || displayName.endsWith("Accession") 
     
    264255     *         key: source id 
    265256     *         value: corresponding target ids 
    266      * @throws IDMapperException 
     257     * @throws IDMapperException if failed to connect 
    267258     */ 
    268259    public Map<String,Set<String>[]> translate(final String mart,