fr.orsay.lri.varna.models.rna
Class ModeleBasesComparison

java.lang.Object
  extended by fr.orsay.lri.varna.models.rna.ModeleBase
      extended by fr.orsay.lri.varna.models.rna.ModeleBasesComparison
All Implemented Interfaces:
Serializable, Comparable<ModeleBase>

public class ModeleBasesComparison
extends ModeleBase

The RNA base comparison model. In each bases we'll place two characters representing nitrogenous bases of both RNA that have to be compared. So, in each base in the comparison model, we'll have a couple of bases, with the same coordinates on the final drawing.

Author:
Masson
See Also:
Serialized Form

Field Summary
private  int _appartenance
          This ModeleBasesComparison owning statement.
private  Character _base1
          The base of the first RNA associated with the base of the second RNA.
private  Character _base2
          The base of the second RNA associated with the base of the first RNA.
private  int _index
          This base's offset in the sequence
static Color BOTH_RNA_COLOR
           
static Color DEFAULT_RNA_COLOR
           
static Color FIRST_RNA_COLOR
           
static Color SECOND_RNA_COLOR
           
private static long serialVersionUID
           
 
Fields inherited from class fr.orsay.lri.varna.models.rna.ModeleBase
_center, _colorie, _coords, _elementStructure, _realIndex, _styleBase, _value
 
Constructor Summary
ModeleBasesComparison(char base1, char base2, int index)
          Creates a new comparison base with the specified nitrogenous bases.
ModeleBasesComparison(char base1, char base2, int elementStructure, int index)
          Creates a new comparison base with the specified nitrogenous bases.
ModeleBasesComparison(char base1, char base2, Point2D coords, int index)
          Creates a new comparison base with the specified nitrogenous bases, at the specified coordinates.
ModeleBasesComparison(int index)
          Creates a new comparison base with the default display style and no nitrogenous bases.
ModeleBasesComparison(Point2D coords, char base1, char base2, boolean colorie, ModeleStyleBase mb, int elementStructure, int index)
          Creates a new comparison base with the specified nitrogenous bases.
ModeleBasesComparison(Point2D coords, int index)
          Creates a new comparison base at the specified coordinates, with the default display style and no nitrogenous bases.
 
Method Summary
 int get_appartenance()
          Gets this base's related RNA.
 Character get_base1()
          Return the base of the first RNA in this comparison base.
 Character get_base2()
          Return the base of the second RNA in this comparison base.
 Boolean get_colored()
          Allows to know if this comparison base is colored.
 String getBases()
          Gets the string representation of the two bases in this ModeleBasesComparison.
 Boolean getColorie()
          Gets this InterfaceBase color statement.
 String getContent()
           
 int getElementStructure()
          Gets this InterfaceBase assiociated structure element.
 int getIndex()
          The internal index for this Base
 ModeleStyleBase getStyleBase()
          Return the display style associated to this comparison base.
 void set_appartenance(int _appartenance)
          Sets this base's related RNA.
 void set_base1(Character _base1)
          Sets the base of the first RNA in this comparison base.
 void set_base2(Character _base2)
          Sets the base of the second RNA in this comparison base.
 void set_colored(Boolean colored)
          Sets the coloration authorization of this comparison base.
 void setColorie(Boolean _colorie)
          Sets this InterfaceBase color statement.
 void setElementStructure(int structure)
          Sets this InterfaceBase assiociated structure element.
 
Methods inherited from class fr.orsay.lri.varna.models.rna.ModeleBase
compareTo, getBaseNumber, getCenter, getChecker, getCoords, getIntervDroite, getIntervGauche, getNumStrand, getStyleBP, getValue, removeElementStructure, setBaseNumber, setCenter, setChecker, setCoords, setElementStructure, setIntervDroite, setIntervGauche, setNumStrand, setStyleBase, setStyleBP, setValue
 
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
See Also:
Constant Field Values

_base1

private Character _base1
The base of the first RNA associated with the base of the second RNA.


_base2

private Character _base2
The base of the second RNA associated with the base of the first RNA.


_appartenance

private int _appartenance
This ModeleBasesComparison owning statement. It's value will be 0 if this base is common for both RNA that had been compared, 1 if this base is related to the first RNA, 2 if related to the second. Default is -1.


_index

private int _index
This base's offset in the sequence


FIRST_RNA_COLOR

public static Color FIRST_RNA_COLOR

SECOND_RNA_COLOR

public static Color SECOND_RNA_COLOR

BOTH_RNA_COLOR

public static Color BOTH_RNA_COLOR

DEFAULT_RNA_COLOR

public static Color DEFAULT_RNA_COLOR
Constructor Detail

ModeleBasesComparison

public ModeleBasesComparison(int index)
Creates a new comparison base with the default display style and no nitrogenous bases.


ModeleBasesComparison

public ModeleBasesComparison(Point2D coords,
                             int index)
Creates a new comparison base at the specified coordinates, with the default display style and no nitrogenous bases.

Parameters:
coords - - The coordinates in which the comparison base has to be placed.

ModeleBasesComparison

public ModeleBasesComparison(char base1,
                             char base2,
                             int index)
Creates a new comparison base with the specified nitrogenous bases.

Parameters:
base1 - - The first RNA' nitrogenous base
base2 - - The second RNA' nitrogenous base

ModeleBasesComparison

public ModeleBasesComparison(char base1,
                             char base2,
                             Point2D coords,
                             int index)
Creates a new comparison base with the specified nitrogenous bases, at the specified coordinates.

Parameters:
base1 - - The first RNA' nitrogenous base
base2 - - The second RNA' nitrogenous base
coords - - The coordinates in which the comparison base has to be placed.

ModeleBasesComparison

public ModeleBasesComparison(char base1,
                             char base2,
                             int elementStructure,
                             int index)
Creates a new comparison base with the specified nitrogenous bases.

Parameters:
base1 - - The first RNA' nitrogenous base
base2 - - The second RNA' nitrogenous base

ModeleBasesComparison

public ModeleBasesComparison(Point2D coords,
                             char base1,
                             char base2,
                             boolean colorie,
                             ModeleStyleBase mb,
                             int elementStructure,
                             int index)
Creates a new comparison base with the specified nitrogenous bases.

Parameters:
coords - - This base's XY coordinates
base1 - - The first RNA' nitrogenous base
base2 - - The second RNA' nitrogenous base
colorie - - Whether or not this base will be drawn
mb - - The drawing style for this base
elementStructure - - The index of a bp partner in the secondary structure
index - - Index of this base in its initial sequence
Method Detail

getStyleBase

public ModeleStyleBase getStyleBase()
Return the display style associated to this comparison base.

Overrides:
getStyleBase in class ModeleBase
Returns:
The display style associated to this comparison base.

get_colored

public Boolean get_colored()
Allows to know if this comparison base is colored.

Returns:
TRUE if this comparison base is colored, else FALSE.

set_colored

public void set_colored(Boolean colored)
Sets the coloration authorization of this comparison base.

Parameters:
colored - - TRUE if this comparison base has to be colored, else FALSE.

get_base1

public Character get_base1()
Return the base of the first RNA in this comparison base.

Returns:
The base of the first RNA in this comparison base.

set_base1

public void set_base1(Character _base1)
Sets the base of the first RNA in this comparison base.

Parameters:
_base1 - - The base of the first RNA in this comparison base.

get_base2

public Character get_base2()
Return the base of the second RNA in this comparison base.

Returns:
The base of the second RNA in this comparison base.

set_base2

public void set_base2(Character _base2)
Sets the base of the second RNA in this comparison base.

Parameters:
_base2 - - The base of the second RNA in this comparison base.

getBases

public String getBases()
Gets the string representation of the two bases in this ModeleBasesComparison.

Returns:
the string representation of the two bases in this ModeleBasesComparison.

getContent

public String getContent()
Specified by:
getContent in class ModeleBase

getElementStructure

public int getElementStructure()
Gets this InterfaceBase assiociated structure element.

Overrides:
getElementStructure in class ModeleBase
Returns:
this InterfaceBase assiociated structure element.

setElementStructure

public void setElementStructure(int structure)
Sets this InterfaceBase assiociated structure element.

Parameters:
structure - - This new assiociated structure element.

get_appartenance

public int get_appartenance()
Gets this base's related RNA.

Returns:
0 if this base is common for both RNA
1 if this base is related to the first RNA
2 if this base is related to the second RNA

set_appartenance

public void set_appartenance(int _appartenance)
Sets this base's related RNA.

Parameters:
_appartenance - : 0 if this base is common for both RNA
1 if this base is related to the first RNA
2 if this base is related to the second RNA.

getColorie

public Boolean getColorie()
Description copied from class: ModeleBase
Gets this InterfaceBase color statement.

Overrides:
getColorie in class ModeleBase
Returns:
TRUE if this InterfaceBase has to be colored, else FALSE.

setColorie

public void setColorie(Boolean _colorie)
Description copied from class: ModeleBase
Sets this InterfaceBase color statement.

Overrides:
setColorie in class ModeleBase
Parameters:
_colorie - - TRUE if you want this InterfaceBase to be colored, else FALSE

getIndex

public int getIndex()
Description copied from class: ModeleBase
The internal index for this Base

Specified by:
getIndex in class ModeleBase