fr.orsay.lri.varna.models.templates
Class RNATemplate.RNATemplateHelix

java.lang.Object
  extended by fr.orsay.lri.varna.models.templates.RNATemplate.RNATemplateElement
      extended by fr.orsay.lri.varna.models.templates.RNATemplate.RNATemplateHelix
Enclosing class:
RNATemplate

public class RNATemplate.RNATemplateHelix
extends RNATemplate.RNATemplateElement

An helix in an RNA template.

Author:
Raphael Champeimont

Nested Class Summary
 
Nested classes/interfaces inherited from class fr.orsay.lri.varna.models.templates.RNATemplate.RNATemplateElement
RNATemplate.RNATemplateElement.EdgeEndPoint
 
Field Summary
private  String _name
           
private  String caption
          A string displayed on the helix.
private  Point2D.Double endPosition
          Position of the helix end point, ie.
private  boolean flipped
          Tells whether the helix is flipped.
private  RNATemplate.RNATemplateElement.EdgeEndPoint in1
          If we go through all bases of the RNA from first to last, we will pass twice through this helix.
private  RNATemplate.In1Is in1Is
          For an helix, tells us whether IN1/OUT1 is the 5' strand (the first strand we meet if we follow the RNA sequence) or the 3' strand (the second we meet if we follow the RNA sequence).
private  RNATemplate.RNATemplateElement.EdgeEndPoint in2
          If we go through all bases of the RNA from first to last, we will pass twice through this helix.
private  int length
          Number of base pairs in the helix.
private  RNATemplate.RNATemplateElement.EdgeEndPoint out1
          If we go through all bases of the RNA from first to last, we will pass twice through this helix.
private  RNATemplate.RNATemplateElement.EdgeEndPoint out2
          If we go through all bases of the RNA from first to last, we will pass twice through this helix.
private  Point2D.Double startPosition
          Position of the helix start point, ie.
 
Fields inherited from class fr.orsay.lri.varna.models.templates.RNATemplate.RNATemplateElement
_id
 
Constructor Summary
RNATemplate.RNATemplateHelix(String name)
           
 
Method Summary
 void disconnectFromAny()
          Disconnect this endpoint from any other elements it may be connected to.
 String getCaption()
           
 RNATemplate.RNATemplateElement.EdgeEndPoint getEndPointFromPosition(RNATemplate.EdgeEndPointPosition position)
          Get the EdgeEndPoint object corresponding to the the given position on this endpoint.
 Point2D.Double getEndPosition()
           
 RNATemplate.RNATemplateElement.EdgeEndPoint getIn1()
           
 RNATemplate.RNATemplateElement.EdgeEndPoint getIn1EndPoint()
          Get the the IN endpoint in the case of a sequence and the IN1 endpoint in the case of an helix.
 RNATemplate.In1Is getIn1Is()
           
 RNATemplate.RNATemplateElement.EdgeEndPoint getIn2()
           
 int getLength()
           
 String getName()
           
protected  RNATemplate.RNATemplateElement.EdgeEndPoint getNextEndPoint(RNATemplate.RNATemplateElement.EdgeEndPoint endpoint)
          Provided endpoint is an endpoint of this endpoint, get the next endpoint, either on this same endpoint, or or the connected endpoint.
 RNATemplate.RNATemplateElement.EdgeEndPoint getOut1()
           
 RNATemplate.RNATemplateElement.EdgeEndPoint getOut2()
           
 RNATemplate.EdgeEndPointPosition getPositionFromEndPoint(RNATemplate.RNATemplateElement.EdgeEndPoint endPoint)
          The inverse of getEndPointFromPosition.
protected  RNATemplate.RNATemplateElement.EdgeEndPoint getPreviousEndPoint(RNATemplate.RNATemplateElement.EdgeEndPoint endpoint)
          Provided endpoint is an endpoint of this endpoint, get the previous endpoint, either on this same endpoint, or or the connected endpoint.
 Point2D.Double getStartPosition()
           
 boolean hasCaption()
           
 boolean isFlipped()
           
 void setCaption(String caption)
           
 void setEndPosition(Point2D.Double endPosition)
           
 void setFlipped(boolean flipped)
           
 void setIn1Is(RNATemplate.In1Is in1Is)
           
 void setLength(int length)
           
 void setStartPosition(Point2D.Double startPosition)
           
 String toString()
           
 
Methods inherited from class fr.orsay.lri.varna.models.templates.RNATemplate.RNATemplateElement
connectTo, connectTo, getParentTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

length

private int length
Number of base pairs in the helix.


startPosition

private Point2D.Double startPosition
Position of the helix start point, ie. the middle in the line [x,y] where (x,y) x is the base at the IN1 edge endpoint and y is the base at the OUT2 edge endpoint.


endPosition

private Point2D.Double endPosition
Position of the helix end point, ie. the middle in the line [x,y] where (x,y) x is the base at the OUT1 edge endpoint and y is the base at the IN2 edge endpoint.


flipped

private boolean flipped
Tells whether the helix is flipped.


in1Is

private RNATemplate.In1Is in1Is
For an helix, tells us whether IN1/OUT1 is the 5' strand (the first strand we meet if we follow the RNA sequence) or the 3' strand (the second we meet if we follow the RNA sequence). This information cannot be known locally, we need the complete template to compute it, see RNATemplate.computeIn1Is().


caption

private String caption
A string displayed on the helix.


in1

private final RNATemplate.RNATemplateElement.EdgeEndPoint in1
If we go through all bases of the RNA from first to last, we will pass twice through this helix. On time, we arrive from in1, and leave by out2, and the other time we arrive from in2 and leave by out2. Whether we go through in1/out1 or in2/out2 the first time is written in the in1Is field.


out1

private final RNATemplate.RNATemplateElement.EdgeEndPoint out1
If we go through all bases of the RNA from first to last, we will pass twice through this helix. On time, we arrive from in1, and leave by out2, and the other time we arrive from in2 and leave by out2. Whether we go through in1/out1 or in2/out2 the first time is written in the in1Is field.


in2

private final RNATemplate.RNATemplateElement.EdgeEndPoint in2
If we go through all bases of the RNA from first to last, we will pass twice through this helix. On time, we arrive from in1, and leave by out2, and the other time we arrive from in2 and leave by out2. Whether we go through in1/out1 or in2/out2 the first time is written in the in1Is field.


out2

private final RNATemplate.RNATemplateElement.EdgeEndPoint out2
If we go through all bases of the RNA from first to last, we will pass twice through this helix. On time, we arrive from in1, and leave by out2, and the other time we arrive from in2 and leave by out2. Whether we go through in1/out1 or in2/out2 the first time is written in the in1Is field.


_name

private String _name
Constructor Detail

RNATemplate.RNATemplateHelix

public RNATemplate.RNATemplateHelix(String name)
Method Detail

isFlipped

public boolean isFlipped()

setFlipped

public void setFlipped(boolean flipped)

getIn1Is

public RNATemplate.In1Is getIn1Is()

setIn1Is

public void setIn1Is(RNATemplate.In1Is in1Is)

getCaption

public String getCaption()

setCaption

public void setCaption(String caption)

hasCaption

public boolean hasCaption()

toString

public String toString()
Overrides:
toString in class Object

getName

public String getName()
Overrides:
getName in class RNATemplate.RNATemplateElement

getLength

public int getLength()

setLength

public void setLength(int length)

getStartPosition

public Point2D.Double getStartPosition()

setStartPosition

public void setStartPosition(Point2D.Double startPosition)

getEndPosition

public Point2D.Double getEndPosition()

setEndPosition

public void setEndPosition(Point2D.Double endPosition)

getIn1

public RNATemplate.RNATemplateElement.EdgeEndPoint getIn1()

getOut1

public RNATemplate.RNATemplateElement.EdgeEndPoint getOut1()

getIn2

public RNATemplate.RNATemplateElement.EdgeEndPoint getIn2()

getOut2

public RNATemplate.RNATemplateElement.EdgeEndPoint getOut2()

disconnectFromAny

public void disconnectFromAny()
Description copied from class: RNATemplate.RNATemplateElement
Disconnect this endpoint from any other elements it may be connected to.

Specified by:
disconnectFromAny in class RNATemplate.RNATemplateElement

getNextEndPoint

protected RNATemplate.RNATemplateElement.EdgeEndPoint getNextEndPoint(RNATemplate.RNATemplateElement.EdgeEndPoint endpoint)
Description copied from class: RNATemplate.RNATemplateElement
Provided endpoint is an endpoint of this endpoint, get the next endpoint, either on this same endpoint, or or the connected endpoint. Note that you should use the getNextEndPoint() method of the endpoint itself directly.

Specified by:
getNextEndPoint in class RNATemplate.RNATemplateElement

getPreviousEndPoint

protected RNATemplate.RNATemplateElement.EdgeEndPoint getPreviousEndPoint(RNATemplate.RNATemplateElement.EdgeEndPoint endpoint)
Description copied from class: RNATemplate.RNATemplateElement
Provided endpoint is an endpoint of this endpoint, get the previous endpoint, either on this same endpoint, or or the connected endpoint. Note that you should use the getPreviousEndPoint() method of the endpoint itself directly.

Specified by:
getPreviousEndPoint in class RNATemplate.RNATemplateElement

getIn1EndPoint

public RNATemplate.RNATemplateElement.EdgeEndPoint getIn1EndPoint()
Description copied from class: RNATemplate.RNATemplateElement
Get the the IN endpoint in the case of a sequence and the IN1 endpoint in the case of an helix.

Specified by:
getIn1EndPoint in class RNATemplate.RNATemplateElement

getEndPointFromPosition

public RNATemplate.RNATemplateElement.EdgeEndPoint getEndPointFromPosition(RNATemplate.EdgeEndPointPosition position)
Description copied from class: RNATemplate.RNATemplateElement
Get the EdgeEndPoint object corresponding to the the given position on this endpoint.

Specified by:
getEndPointFromPosition in class RNATemplate.RNATemplateElement

getPositionFromEndPoint

public RNATemplate.EdgeEndPointPosition getPositionFromEndPoint(RNATemplate.RNATemplateElement.EdgeEndPoint endPoint)
Description copied from class: RNATemplate.RNATemplateElement
The inverse of getEndPointFromPosition.

Specified by:
getPositionFromEndPoint in class RNATemplate.RNATemplateElement