org.biojava.bio.structure.io
Class PDBMSDReader
java.lang.Object
org.biojava.bio.structure.io.PDBMSDReader
- All Implemented Interfaces:
- StructureIO
public class PDBMSDReader
- extends java.lang.Object
- implements StructureIO
retreive a structure from an installation of the MSD - search
database ( http://www.ebi.ac.uk/msd/index.html ,
http://www.ebi.ac.uk/msd-srv/docs/dbdoc/ )
Field Summary |
protected javax.sql.DataSource |
dataSource
|
Method Summary |
Structure |
getStructureById(java.lang.String pdbId)
Get a structure by providing a PDB code. |
void |
setDBConnection(java.lang.String dbDriver,
java.lang.String dbUrl,
java.lang.String dbUsername,
java.lang.String dbPassword)
open a database conenction to the MSD search database |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dataSource
protected javax.sql.DataSource dataSource
PDBMSDReader
public PDBMSDReader()
setDBConnection
public void setDBConnection(java.lang.String dbDriver,
java.lang.String dbUrl,
java.lang.String dbUsername,
java.lang.String dbPassword)
throws java.sql.SQLException
- open a database conenction to the MSD search database
- Parameters:
dbDriver
- specified which JDBC driver to use e.g.dbUrl
- connection stringdbUsername
- the username in the dbdbPassword
- password to use
- Throws:
java.sql.SQLException
getStructureById
public Structure getStructureById(java.lang.String pdbId)
throws java.io.IOException
- Get a structure by providing a PDB code.
expects connections parameters to be set a system properties.
- Specified by:
getStructureById
in interface StructureIO
- Parameters:
pdbId
- a String specifying the id value (PDB code)
- Returns:
- a Structure object, or null if no structure with matching PDB code has been found
- Throws:
java.io.IOException
- ...