Class 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • dataSource

        protected javax.sql.DataSource dataSource
    • Constructor Detail

      • PDBMSDReader

        public PDBMSDReader()
    • 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 string
        dbUsername - the username in the db
        dbPassword - 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 - ...