infogenomics
Class MySqlGenomesDbDAO

java.lang.Object
  extended by infogenomics.MySqlGenomesDbDAO

public class MySqlGenomesDbDAO
extends java.lang.Object

Manages connections to database. Each method performs a query on the database and returns suitable results to be used by callers.


Constructor Summary
MySqlGenomesDbDAO()
          Constructor: generates the connection (variable conn) with the database
 
Method Summary
 void closeConnection()
          Closes the connection with the db
 boolean insertDictionary(Dictionary dict)
          Insert a new dictionary of nucleotide words in the database
 boolean insertExperiment(ExpLZ77 exp, java.lang.String expName, java.lang.String expDesc, boolean saveWordPos)
          Insert a "LZ77 experiment" into the genomes database and assigns to it a name (expName) and a description (expDesc)
 boolean insertExperiment(Exp exp, java.lang.String expName, java.lang.String expDesc)
          Inserts an experiment exp into the genomes database and assigns to it a name (expName) and a description (expDesc)
 boolean insertExperiment(ExpTypSeqProf exp, java.lang.String expName, java.lang.String expDesc)
          Insert a "typical sequence profile experiment" into the genomes database and assigns to it a name (expName) and a description (expDesc)
 boolean insertExperiment(ExpTypSeq exp, java.lang.String expName, java.lang.String expDesc)
          Insert a "typical sequence experiment" into the genomes database and assigns to it a name (expName) and a description (expDesc)
 java.util.Vector<java.lang.String> selectAllDictionaryNames()
          Selects from db the name of every dictionary
 java.util.Vector<java.lang.String[]> selectAllExperimentBasicInfo()
          Selects all the basic info af every experiment in the db
 void selectCompressorDictionary(LZ77v02 comp)
          Selects from db words and positions related to LZ77 compressor comp
 Dictionary selectDictionary(java.lang.String dictName)
          Selects from db the name of every dictionary
 void selectExp(Exp exp, java.lang.String name)
          Selects from db all the basic information of experiment name and put them in Exp
 void selectExpLZ77BasicInfo(ExpLZ77 exp, java.lang.String name)
          Selects from db all the information of an Exp experiment
 void selectExpTypSeq(ExpTypSeq exp, java.lang.String name)
          Selects from db all the information of an Exp experiment
 void selectExpTypSeqProf(ExpTypSeqProf exp, java.lang.String name)
          Selects from db all the information of experiment called expName and put them in Exp exp
 int selectGenLen(java.lang.String name)
          Selects from db the length of genome in experiment name
 java.util.Vector<double[]> selectTypSeqs(java.lang.String name)
          Selects from db all typical sequences of experiment name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MySqlGenomesDbDAO

public MySqlGenomesDbDAO()
Constructor: generates the connection (variable conn) with the database

Method Detail

insertExperiment

public boolean insertExperiment(Exp exp,
                                java.lang.String expName,
                                java.lang.String expDesc)
Inserts an experiment exp into the genomes database and assigns to it a name (expName) and a description (expDesc)


insertExperiment

public boolean insertExperiment(ExpTypSeq exp,
                                java.lang.String expName,
                                java.lang.String expDesc)
Insert a "typical sequence experiment" into the genomes database and assigns to it a name (expName) and a description (expDesc)


insertExperiment

public boolean insertExperiment(ExpLZ77 exp,
                                java.lang.String expName,
                                java.lang.String expDesc,
                                boolean saveWordPos)
Insert a "LZ77 experiment" into the genomes database and assigns to it a name (expName) and a description (expDesc)


insertExperiment

public boolean insertExperiment(ExpTypSeqProf exp,
                                java.lang.String expName,
                                java.lang.String expDesc)
Insert a "typical sequence profile experiment" into the genomes database and assigns to it a name (expName) and a description (expDesc)


insertDictionary

public boolean insertDictionary(Dictionary dict)
Insert a new dictionary of nucleotide words in the database


selectAllExperimentBasicInfo

public java.util.Vector<java.lang.String[]> selectAllExperimentBasicInfo()
Selects all the basic info af every experiment in the db


selectExp

public void selectExp(Exp exp,
                      java.lang.String name)
Selects from db all the basic information of experiment name and put them in Exp


selectExpTypSeq

public void selectExpTypSeq(ExpTypSeq exp,
                            java.lang.String name)
Selects from db all the information of an Exp experiment


selectExpLZ77BasicInfo

public void selectExpLZ77BasicInfo(ExpLZ77 exp,
                                   java.lang.String name)
Selects from db all the information of an Exp experiment


selectExpTypSeqProf

public void selectExpTypSeqProf(ExpTypSeqProf exp,
                                java.lang.String name)
Selects from db all the information of experiment called expName and put them in Exp exp


selectCompressorDictionary

public void selectCompressorDictionary(LZ77v02 comp)
Selects from db words and positions related to LZ77 compressor comp


selectTypSeqs

public java.util.Vector<double[]> selectTypSeqs(java.lang.String name)
Selects from db all typical sequences of experiment name


selectGenLen

public int selectGenLen(java.lang.String name)
Selects from db the length of genome in experiment name


selectAllDictionaryNames

public java.util.Vector<java.lang.String> selectAllDictionaryNames()
Selects from db the name of every dictionary


selectDictionary

public Dictionary selectDictionary(java.lang.String dictName)
Selects from db the name of every dictionary


closeConnection

public void closeConnection()
Closes the connection with the db