Package 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
Fields Modifier and Type Field Description protected javax.sql.DataSource
dataSource
-
Constructor Summary
Constructors Constructor Description PDBMSDReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
Method Detail
-
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 interfaceStructureIO
- 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
- ...
-
-