Changeset 164

Show
Ignore:
Timestamp:
08/19/09 13:33:04 (2 years ago)
Author:
martijn
Message:

Javadoc, style issues in corelib and bio

Location:
trunk
Files:
1 added
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/bio/src/org/bridgedb/bio/BioDataSource.java

    r135 r164  
    2828import org.bridgedb.DataSourcePatterns; 
    2929 
     30/** 
     31 * Definition of many common biological DataSources. 
     32 * Meta data about these Data Sources, such as URL templates, 
     33 * are read from a bundled text file. Call the init() method 
     34 * at the start of your program to initialize all meta data.   
     35 */ 
    3036public class BioDataSource  
    3137{ 
     
    454460         
    455461        /** 
    456          * @returns the species-specific Ensembl DataSource corresponding to a given organism, or null if there isn't one known. 
     462         * @return the species-specific Ensembl DataSource corresponding to a given organism, or null if there isn't one known. 
    457463         * @param org an organism 
    458464         */ 
  • trunk/corelib/src/org/bridgedb/IDMapperCapabilities.java

    r157 r164  
    5050     * 
    5151     * @param src source data source 
    52      * @param dest target data source 
     52     * @param tgt target data source 
    5353     * @return true if mapping is supported from src to des 
     54     * @throws IDMapperException if service is unavailable 
    5455     */ 
    55     public boolean isMappingSupported(DataSource src, DataSource tgt) throws IDMapperException ; 
     56    public boolean isMappingSupported(DataSource src, DataSource tgt) throws IDMapperException; 
    5657     
    5758    /** 
  • trunk/corelib/src/org/bridgedb/file/IDMapperFile.java

    r155 r164  
    4141     * by default. 
    4242     * @param reader ID mapping reader 
    43      * @throws java.io.IDMapperException when failed to read 
     43     * @throws IDMapperException when failed to read 
    4444     */ 
    4545    public IDMapperFile(final IDMappingReader reader) throws IDMapperException 
     
    8282        Set<DataSource> tgtDss; 
    8383        if (tgtDataSources==null) { 
    84             tgtDss = new HashSet(cap.getSupportedTgtDataSources()); 
     84            tgtDss = new HashSet<DataSource>(cap.getSupportedTgtDataSources()); 
    8585        } else { 
    86             tgtDss = new HashSet(tgtDataSources); 
     86            tgtDss = new HashSet<DataSource>(tgtDataSources); 
    8787            tgtDss.retainAll(supportedTgtDatasources); 
    8888        } 
     
    108108            Set<Xref> tgtRefs = result.get(srcXref); 
    109109            if (tgtRefs==null) { 
    110                 tgtRefs = new HashSet(); 
     110                tgtRefs = new HashSet<Xref>(); 
    111111                result.put(srcXref, tgtRefs); 
    112112            } 
     
    160160    private boolean isConnected = true; 
    161161    // In the case of IDMapperFile, there is no need to discard associated resources. 
     162     
     163    /** {@inheritDoc} */ 
    162164    public void close() throws IDMapperException { isConnected = false; } 
     165    /** {@inheritDoc} */ 
    163166    public boolean isConnected() { return isConnected; } 
    164167     
  • trunk/corelib/src/org/bridgedb/file/IDMapperText.java

    r156 r164  
    4242        } 
    4343         
    44         private static class Driver implements org.bridgedb.Driver 
     44        /** Knows how to instantiate IDMapperText. */ 
     45        private static final class Driver implements org.bridgedb.Driver 
    4546        { 
    46             private Driver() {} // prevent outside instantiation; 
     47                        /** prevent outside instantiation. */ 
     48            private Driver() {} 
    4749                 
     50            /** {@inheritDoc} */ 
    4851            public IDMapper connect(String location) throws IDMapperException 
    4952            { 
     
    110113            } 
    111114 
     115            /**  
     116             * parse the separator list part of the connection string. 
     117             * \@ or \t will be unescaped. 
     118             * @param config the connection string to parse 
     119             * @param head the section to look for, either dssep or idsep 
     120             * @return separators 
     121             */ 
    112122            private char[] parseConfig(String config, String head) { 
    113                 Set<Character> delimiters = new HashSet(); 
     123                Set<Character> delimiters = new HashSet<Character>(); 
    114124                Pattern p = Pattern.compile(head+"=(.|\\t|\\@),", 
    115125                        Pattern.CASE_INSENSITIVE); 
     
    142152        } 
    143153 
    144     protected final URL url; 
    145     protected char[] dataSourceDelimiters; 
    146     protected char[] idDelimiters; 
    147     protected boolean transitivity; 
     154    private final URL url; 
     155    private char[] dataSourceDelimiters; 
     156    private char[] idDelimiters; 
     157    private boolean transitivity; 
    148158 
    149159    /** 
     
    205215    /** 
    206216     * Free search is not supported for delimiter-text file. 
     217     * This will throw UnsupportedOperationException 
     218     * @param text ignored 
     219     * @param limit ignored 
     220     * @return does not return 
     221     * @throws IDMapperException will not be thrown 
    207222     */ 
    208223    public Set<Xref> freeSearch (String text, int limit) throws IDMapperException { 
  • trunk/corelib/src/org/bridgedb/package.html

    r5 r164  
    1515<p> 
    1616Usually, different DataSources describe the same biological entities. Cross references are 
    17 stored in so called Synonym databases. {@link org.bridgedb.Gdb} has facilities for mapping cross-references 
     17stored in so called Synonym databases. {@link org.bridgedb.IDMapper} has facilities for mapping cross-references 
    1818and mapping between different DataSources. 
    1919<p> 
  • trunk/corelib/src/org/bridgedb/rdb/DBConnectorDerbyServer.java

    r147 r164  
    2929 
    3030/** 
    31  * Database connector that connects to a Derby database server 
     31 * Database connector that connects to a Derby database server. 
    3232 */ 
    3333public class DBConnectorDerbyServer extends DBConnector { 
     
    3535        static private String host; 
    3636        static private int port; 
    37         static boolean inited = false; 
     37        static private boolean inited = false; 
    3838         
    3939        /** 
    40          * Initialize global settings that will be shared by all instances of DBConnectorDerbyServer 
    41          * @param host  The host on which the database resides 
    42          * @param port  The port to create the connection on 
     40         * Initialize global settings that will be shared by all instances of DBConnectorDerbyServer. 
     41         * @param aHost The host on which the database resides 
     42         * @param aPort The port to create the connection on 
    4343         */ 
    4444        static public void init (String aHost, int aPort)