Changeset 106

Show
Ignore:
Timestamp:
07/19/09 19:24:43 (3 years ago)
Author:
martijn
Message:

Fixed style and javadoc issues

Location:
trunk/corelib/src/org/bridgedb
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/corelib/src/org/bridgedb/file/IDMapperFile.java

    r105 r106  
    1717package org.bridgedb.file; 
    1818 
    19 import java.util.List; 
    20 import java.util.Set; 
     19import java.util.HashMap; 
    2120import java.util.HashSet; 
    2221import java.util.Map; 
    23 import java.util.HashMap; 
    24  
    25 import java.io.IOException; 
     22import java.util.Set; 
    2623 
    2724import org.bridgedb.DataSource; 
     
    3229 
    3330/** 
    34  * Interface for ID mapping from files 
     31 * Interface for ID mapping from files. 
    3532 *  
    3633 */  
     
    189186        } 
    190187 
     188        /** {@inheritDoc} */ 
    191189        public boolean isFreeSearchSupported() { 
    192190            return freeSearch; 
    193191        } 
    194192 
     193        /** {@inheritDoc} */ 
    195194        public Set<DataSource> getSupportedSrcDataSources() throws IDMapperException { 
    196195            return IDMapperFile.this.reader.getDataSources(); 
    197196        } 
    198197 
     198        /** {@inheritDoc} */ 
    199199        public Set<DataSource> getSupportedTgtDataSources() throws IDMapperException { 
    200200            return getSupportedSrcDataSources(); // 
  • trunk/corelib/src/org/bridgedb/file/IDMapperText.java

    r105 r106  
    1717package org.bridgedb.file; 
    1818 
     19import java.util.HashSet; 
    1920import java.util.Set; 
    20 import java.util.HashSet; 
    2121 
    2222import java.util.regex.Matcher; 
     
    2727 
    2828import org.bridgedb.BridgeDb; 
    29 import org.bridgedb.Driver; 
    3029import org.bridgedb.IDMapper; 
    3130import org.bridgedb.IDMapperException; 
     
    3332 
    3433/** 
    35  * Class for mapping ID from delimited text file 
     34 * Class for mapping ID from delimited text file. 
    3635 * @author gjj 
    3736 */ 
  • trunk/corelib/src/org/bridgedb/file/IDMappingReader.java

    r105 r106  
    1717package org.bridgedb.file; 
    1818 
     19import java.util.Map; 
    1920import java.util.Set; 
    20 import java.util.Map; 
    2121 
    2222import org.bridgedb.DataSource; 
     
    2626 
    2727/** 
    28  * Interface for reading ID mapping data 
     28 * Interface for reading ID mapping data. 
    2929 *  
    3030 */ 
  • trunk/corelib/src/org/bridgedb/file/IDMappingReaderFromDelimitedReader.java

    r105 r106  
    1717package org.bridgedb.file; 
    1818 
    19 import java.util.Vector; 
    20 import java.util.Set; 
     19import java.io.BufferedReader; 
     20import java.io.IOException; 
     21import java.io.Reader; 
     22 
     23import java.util.HashMap; 
    2124import java.util.HashSet; 
    2225import java.util.Map; 
    23 import java.util.HashMap; 
    24  
    25 import java.io.Reader; 
    26 import java.io.BufferedReader; 
    27 import java.io.IOException; 
     26import java.util.Set; 
     27import java.util.Vector; 
    2828 
    2929import org.bridgedb.DataSource; 
     
    3232 
    3333/** 
    34  * Class for reading ID mapping data from delimited buffered reader 
     34 * Class for reading ID mapping data from delimited buffered reader. 
    3535 * @author gjj 
    3636 */ 
  • trunk/corelib/src/org/bridgedb/file/IDMappingReaderFromText.java

    r105 r106  
    1717package org.bridgedb.file; 
    1818 
     19import java.io.IOException; 
     20import java.io.InputStream; 
     21import java.io.InputStreamReader; 
    1922import java.io.Reader; 
    20 import java.io.InputStreamReader; 
    21 import java.io.InputStream; 
    22 import java.io.IOException; 
    2323 
     24import java.net.URL; 
    2425import java.net.URLConnection; 
    25 import java.net.URL; 
    2626 
    2727import org.bridgedb.IDMapperException; 
     
    2929 
    3030/** 
    31  * Class for reading ID mapping data from delimited text file 
     31 * Class for reading ID mapping data from delimited text file. 
    3232 * @author gjj 
    3333 */ 
  • trunk/corelib/src/org/bridgedb/rdb/DBConnector.java

    r105 r106  
    4242         
    4343        /** 
    44          * Type for gene database 
     44         * Type for gene database. 
    4545         */ 
    4646        public static final int TYPE_GDB = 0; 
    4747        /** 
    48          * Type for expression database 
     48         * Type for expression database. 
    4949         */ 
    5050        public static final int TYPE_GEX = 1; 
     
    5353         
    5454        /** 
    55          * Close the given connection 
     55         * Close the given connection. 
    5656         * @param con The connection to be closed 
    57          * @throws Exception 
     57         * @throws IDMapperException when there was a database error 
    5858         */ 
    5959        public void closeConnection(Connection con) throws IDMapperException  
     
    6363         
    6464        /** 
    65          * Close the given connection, and optionally finalize it after creation (using {@link #PROP_FINALIZE}) 
     65         * Close the given connection, and optionally finalize it after creation (using {@link #PROP_FINALIZE}). 
    6666         * @param con The connection to be closed 
    6767         * @param props Close properties (one of {@link #PROP_NONE}, {@link #PROP_FINALIZE} or {@link #PROP_RECREATE}) 
    68          * @throws Exception 
     68         * @throws IDMapperException when there was a database error 
    6969         */ 
    7070        public void closeConnection(Connection con, int props) throws IDMapperException  
     
    8383 
    8484        /** 
    85          * Set the database type (one of {@link #TYPE_GDB} or {@link #TYPE_GEX}) 
     85         * Set the database type (one of {@link #TYPE_GDB} or {@link #TYPE_GEX}). 
    8686         * @param type The type of the database that will be used for this class 
    8787         */ 
     
    8989         
    9090        /** 
    91          * Get the database type (one of {@link #TYPE_GDB} or {@link #TYPE_GEX}) 
    92          * return The type of the database that is used for this class 
     91         * Get the database type (one of {@link #TYPE_GDB} or {@link #TYPE_GEX}). 
     92         * @return The type of the database that is used for this class 
    9393         */ 
    9494        public int getDbType() { return dbType; } 
    9595         
    96  
    97                  
    9896        /** 
    9997         * This method is called to finalize the given database after creation 
     
    103101         * The database connection needs to be closed before running this method. 
    104102         * @param dbName The name of the database to finalize    
    105          * @throws Exception 
    106103         * @return The name of the finalized database 
     104         * @throws IDMapperException when there was a database error 
    107105         */ 
    108106        public abstract String finalizeNewDatabase(String dbName) throws IDMapperException; 
     
    113111         * after all data is added to the database. 
    114112         * @param con A connection to the database 
    115          * @throws SQLException 
     113         * @throws IDMapperException when there was a database error 
    116114         */ 
    117115        public void compact(Connection con) throws IDMapperException 
  • trunk/corelib/src/org/bridgedb/rdb/SimpleGdb.java

    r105 r106  
    2020import java.sql.ResultSet; 
    2121import java.sql.SQLException; 
    22 import java.util.List; 
    2322 
    2423import org.bridgedb.IDMapperException; 
    25 import org.bridgedb.Xref; 
    2624 
    2725/** 
  • trunk/corelib/src/org/bridgedb/rdb/SimpleGdbImpl2.java

    r105 r106  
    103103                        "id = ? AND code = ?" 
    104104                ); 
    105         private final LazyPst pstGeneSymbol = new LazyPst( 
    106                         "SELECT attrvalue FROM attribute WHERE " + 
    107                         "attrname = 'Symbol' AND id = ? " + 
    108                         "AND code = ?" 
    109                 ); 
    110105        private final LazyPst pstBackpage = new LazyPst( 
    111106                        "SELECT backpageText FROM datanode " + 
     
    165160         * get Backpage info. In Schema v2, this was not stored in  
    166161         * the attribute table but as a separate column, so this is treated 
    167          * as a special case. 
     162         * as a special case. This method is called by <pre>getAttribute (ref, "Backpage")</pre> 
     163         * @param ref the entity to get backpage info for. 
     164         * @return Backpage info as string 
     165         * @throws IDMapperException when database is unavailable 
    168166         */ 
    169167        private String getBpInfo(Xref ref) throws IDMapperException  
     
    245243        /** 
    246244         * Opens a connection to the Gene Database located in the given file. 
     245         * A new instance of this class is created automatically. 
    247246         * @param dbName The file containing the Gene Database.  
    248          * @param connector An instance of DBConnector, to determine the type of database (e.g. DataDerby). 
    249          * A new instance of this class is created automatically. 
     247         * @param newDbConnector An instance of DBConnector, to determine the type of database (e.g. DataDerby). 
     248         * @param props PROP_RECREATE if you want to create a new database (possibly overwriting an existing one)  
     249         *      or PROP_NONE if you want to connect read-only 
     250         * @throws IDMapperException when the database could not be created or connected to 
    250251         */ 
    251252        public SimpleGdbImpl2(String dbName, DBConnector newDbConnector, int props) throws IDMapperException 
     
    539540        /** 
    540541         * @return a list of data sources present in this database.  
     542           @throws IDMapperException when the database is unavailable 
    541543         */ 
    542544        private Set<DataSource> getDataSources() throws IDMapperException