controller
Class ProcessusOrigin

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by controller.ProcessusOrigin
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ProcessusOrigin
extends javax.servlet.http.HttpServlet

Attention / take care !
This controller is used on the old code made by Stefan Engelen in 2006 (latest version got) for the web interface...
No garanty are given to the results and good work of algorithms as work has been done on it to fix problems and gett same results !

Seen also tests testsorigin to know exactly some uses and limits.
Main controler ; interaction between modele (algorithms implementation) and viewing with JSP/web pages.
Some uses of new model (2008) for conversion and use of JSP/HTML pages. Conversion are made here for comprehension, control of work and tests.
Some "XXX BLACKBOX warning" in the code due to use of Vector... (java 1.4 => 1.5 and changes).
Compilation could be done with flags [-source 1.4 -target 1.4] (1)
Compilation could be done with flags [-source 1.4 -target 1.4] (2)

Since:
August 2008
Author:
Gabriel Chandesris (2008)
See Also:
Processus_old, Processus, ADN1cible, ADN1test, Palindrome1cible, Palindrome, PalindromeListe, PalindromeListeListe, Sequence, SequenceListe, Fichier, FichierFasta, Serialized Form

Field Summary
private  int maxPredictions
           
private  boolean muchpredictions
           
private  boolean searchPseudoknots
           
private static long serialVersionUID
          Servlet serial Number (42).
 
Constructor Summary
ProcessusOrigin()
           
 
Method Summary
static java.lang.String alignmentRecord(java.lang.String alignement)
          Making the recording of alignment in a file.
static void computing(java.util.Vector tabsadn, ADN1cible adncible, boolean morePrediction, boolean searchPseudoknots)
          Computing the main algorithm made by Stefan Engelen.
static java.util.Vector conversionFrom(ADN1test adntcible, SequenceListe[] listes)
          Conversion of a set of sequences listes to a vector of tabs of ADN1test's
and put the target sequence at position 0 on each table.
static ADN1test[] conversionFrom(SequenceListe liste)
          Conversion of a set of sequences listes to a tab of ADN1test's
static java.util.Vector conversionFrom(SequenceListe[] listes)
          Conversion of a set of sequences listes to a vector of tabs of ADN1test's
Do not forget that target sequence must be on position 0 of each table !
static ADN1cible convertFrom(Sequence cible)
          To get a "cible sequence" from an instance of Sequence.
static ADN1test convertFrom(Sequence cible, int diff)
          To get a "test sequence" from an instance of Sequence.
private static java.lang.String decoupeString(java.lang.String chaineDecoupe)
          This method to cut a String by 80 characters length substring.
 void doGet(javax.servlet.http.HttpServletRequest requete, javax.servlet.http.HttpServletResponse reponse)
          To prevent from reload pages of accession without any "normal use".
 void doPost(javax.servlet.http.HttpServletRequest requete, javax.servlet.http.HttpServletResponse reponse)
          To obtain data from POST form.
private static PalindromeListeListe getRecordingStructures(ADN1cible adncible)
          To get the recording structure in a good conversion format.
static java.lang.String getScreenToSee(java.util.Vector tabsadn, ADN1cible adncible)
          Working about what will be on screen
static java.lang.String getScreenToSeeHTML(java.util.Vector tabsadn, ADN1cible adncible)
          Working about what will be on screen
private static java.lang.String getScriptDestination(int numInterface)
          To get the page where to go...
private static void setValues(ADN1cible adncible, boolean optimal, int maximumPredictions, boolean searchingPseudoknots)
          To be sure that good values are set as parameters...
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Servlet serial Number (42).

See Also:
Constant Field Values

muchpredictions

private boolean muchpredictions

maxPredictions

private int maxPredictions

searchPseudoknots

private boolean searchPseudoknots
Constructor Detail

ProcessusOrigin

public ProcessusOrigin()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest requete,
                  javax.servlet.http.HttpServletResponse reponse)
To prevent from reload pages of accession without any "normal use".
Make a redirection to main page of application / servlet.

Overrides:
doGet in class javax.servlet.http.HttpServlet
See Also:
Processus.doPost(HttpServletRequest, HttpServletResponse)

doPost

public void doPost(javax.servlet.http.HttpServletRequest requete,
                   javax.servlet.http.HttpServletResponse reponse)
To obtain data from POST form.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
requete - HttpServletRequest
reponse - HttpServletResponse

setValues

private static void setValues(ADN1cible adncible,
                              boolean optimal,
                              int maximumPredictions,
                              boolean searchingPseudoknots)
To be sure that good values are set as parameters...

Parameters:
adncible - (ADN1cible)
optimal - (boolean) if true : incertitude == 0.0 else : 0.05
maximumPredictions - (int) maximum number of predictions
searchingPseudoknots - (boolean) if searching pseudoknots or not...

getRecordingStructures

private static PalindromeListeListe getRecordingStructures(ADN1cible adncible)
To get the recording structure in a good conversion format.

Parameters:
adncible - (ADN1cible)
Returns:
(PalindromeListeListe)

conversionFrom

public static java.util.Vector conversionFrom(SequenceListe[] listes)
Conversion of a set of sequences listes to a vector of tabs of ADN1test's
Do not forget that target sequence must be on position 0 of each table !

Parameters:
listes - (SequenceListe[])
Returns:
(Vector) Vector of tabs of ADN1tests
See Also:
ADN1test, Sequence, SequenceListe, controller

conversionFrom

public static java.util.Vector conversionFrom(ADN1test adntcible,
                                              SequenceListe[] listes)
Conversion of a set of sequences listes to a vector of tabs of ADN1test's
and put the target sequence at position 0 on each table.

Parameters:
listes - (SequenceListe[])
Returns:
(Vector) Vector of tabs of ADN1tests
See Also:
ADN1test, Sequence, SequenceListe, controller

conversionFrom

public static ADN1test[] conversionFrom(SequenceListe liste)
Conversion of a set of sequences listes to a tab of ADN1test's

Parameters:
liste - (SequenceListe)
Returns:
(ADN1test[]) Tab of ADN1tests
See Also:
ADN1test, Sequence, SequenceListe

convertFrom

public static ADN1cible convertFrom(Sequence cible)
To get a "cible sequence" from an instance of Sequence.

Parameters:
cible - (Sequence)
Returns:
(ADN1cible)

convertFrom

public static ADN1test convertFrom(Sequence cible,
                                   int diff)
To get a "test sequence" from an instance of Sequence.

Parameters:
cible - (Sequence)
diff - (int) [unused]
Returns:
(ADN1test)

computing

public static void computing(java.util.Vector tabsadn,
                             ADN1cible adncible,
                             boolean morePrediction,
                             boolean searchPseudoknots)
Computing the main algorithm made by Stefan Engelen.
Result is structures contained by adncible.
Not static because of need of some parameters in Processsus.

Parameters:
tabsadn - (Vector) Vector of tabs of ADN1tests
adncible - (ADN1test)
morePrediction - (boolean) if more than one structure as result or not
searchPseudoknots - (boolean) Searching pseudoknots or not
See Also:
conversionFrom(SequenceListe[]), getRecordingStructures(ADN1cible), getScreenToSee(Vector, ADN1cible)

getScreenToSee

public static java.lang.String getScreenToSee(java.util.Vector tabsadn,
                                              ADN1cible adncible)
Working about what will be on screen

Parameters:
tabsadn - (Vector) vector of tabs of palindromes
adncible - (ADN1cible)
Returns:
(String)

getScreenToSeeHTML

public static java.lang.String getScreenToSeeHTML(java.util.Vector tabsadn,
                                                  ADN1cible adncible)
Working about what will be on screen

Parameters:
tabsadn - (Vector) vector of tabs of palindromes
adncible - (ADN1cible)
Returns:
(String) HTML format vizualization...

getScriptDestination

private static java.lang.String getScriptDestination(int numInterface)
To get the page where to go...

Parameters:
numInterface - number of the page
Returns:
(String) Path to the JSP page to go...

alignmentRecord

public static java.lang.String alignmentRecord(java.lang.String alignement)
Making the recording of alignment in a file. Could be done with FichierFasta.

Parameters:
alignement - (String)
Returns:
(String) alignement
Since:
July / August 2008
See Also:
FichierFasta

decoupeString

private static java.lang.String decoupeString(java.lang.String chaineDecoupe)
This method to cut a String by 80 characters length substring.

Parameters:
chaineDecoupe - (String)
Returns:
(String)
See Also:
Processus.doPost(HttpServletRequest, HttpServletResponse)