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

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

public class RNATemplate.RNATemplateUnpairedSequence
extends RNATemplate.RNATemplateElement

A sequence of non-paired bases 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 static double defaultTangentVectorAngle
           
private static double defaultTangentVectorLength
           
private  RNATemplate.RNATemplateElement.EdgeEndPoint in
          The helixes connected on both sides.
private  double inTangentVectorAngle
          The sequence is drawn along a cubic Bezier curve.
private  double inTangentVectorLength
          The sequence is drawn along a cubic Bezier curve.
private  int length
          Number of (non-paired) bases.
private  RNATemplate.RNATemplateElement.EdgeEndPoint out
          The helixes connected on both sides.
private  double outTangentVectorAngle
          The sequence is drawn along a cubic Bezier curve.
private  double outTangentVectorLength
          The sequence is drawn along a cubic Bezier curve.
private  Point2D.Double vertex3
          Position of the end (at the "out" endpoint) of the line.
private  Point2D.Double vertex5
          Position of the begginning (at the "in" endpoint) of the line.
 
Fields inherited from class fr.orsay.lri.varna.models.templates.RNATemplate.RNATemplateElement
_id
 
Constructor Summary
RNATemplate.RNATemplateUnpairedSequence(String name)
           
 
Method Summary
 void disconnectFromAny()
          Disconnect this endpoint from any other elements it may be connected to.
 RNATemplate.RNATemplateElement.EdgeEndPoint getEndPointFromPosition(RNATemplate.EdgeEndPointPosition position)
          Get the EdgeEndPoint object corresponding to the the given position on this endpoint.
 RNATemplate.RNATemplateElement.EdgeEndPoint getIn()
           
 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.
 double getInTangentVectorAngle()
           
 double getInTangentVectorLength()
           
 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 getOut()
           
 double getOutTangentVectorAngle()
           
 double getOutTangentVectorLength()
           
 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 getVertex3()
           
 Point2D.Double getVertex5()
           
 void setInTangentVectorAngle(double inTangentVectorAngle)
           
 void setInTangentVectorLength(double inTangentVectorLength)
           
 void setLength(int length)
           
 void setOutTangentVectorAngle(double outTangentVectorAngle)
           
 void setOutTangentVectorLength(double outTangentVectorLength)
           
 void setVertex3(Point2D.Double vertex3)
           
 void setVertex5(Point2D.Double vertex5)
           
 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 (non-paired) bases.


defaultTangentVectorAngle

private static final double defaultTangentVectorAngle
See Also:
Constant Field Values

defaultTangentVectorLength

private static final double defaultTangentVectorLength
See Also:
Constant Field Values

inTangentVectorAngle

private double inTangentVectorAngle
The sequence is drawn along a cubic Bezier curve. The curve can be defined by 2 vectors, one for the start of the line and the other for the end. They are the tangents to the line at the beginning and the end of the line. Each vector can be defined by its length and its absolute angle. The angles are given in radians.


inTangentVectorLength

private double inTangentVectorLength
The sequence is drawn along a cubic Bezier curve. The curve can be defined by 2 vectors, one for the start of the line and the other for the end. They are the tangents to the line at the beginning and the end of the line. Each vector can be defined by its length and its absolute angle. The angles are given in radians.


outTangentVectorAngle

private double outTangentVectorAngle
The sequence is drawn along a cubic Bezier curve. The curve can be defined by 2 vectors, one for the start of the line and the other for the end. They are the tangents to the line at the beginning and the end of the line. Each vector can be defined by its length and its absolute angle. The angles are given in radians.


outTangentVectorLength

private double outTangentVectorLength
The sequence is drawn along a cubic Bezier curve. The curve can be defined by 2 vectors, one for the start of the line and the other for the end. They are the tangents to the line at the beginning and the end of the line. Each vector can be defined by its length and its absolute angle. The angles are given in radians.


vertex5

private Point2D.Double vertex5
Position of the begginning (at the "in" endpoint) of the line. It is only useful when the sequence is not yet connected to an helix. (Otherwise we can deduce it from this helix position).


vertex3

private Point2D.Double vertex3
Position of the end (at the "out" endpoint) of the line. It is only useful when the sequence is not yet connected to an helix. (Otherwise we can deduce it from this helix position).


in

private final RNATemplate.RNATemplateElement.EdgeEndPoint in
The helixes connected on both sides. They must be helixes because only helixes have absolute positions, and the positions of the starting and ending points of the sequence are those stored in the helixes.


out

private final RNATemplate.RNATemplateElement.EdgeEndPoint out
The helixes connected on both sides. They must be helixes because only helixes have absolute positions, and the positions of the starting and ending points of the sequence are those stored in the helixes.


_name

private String _name
Constructor Detail

RNATemplate.RNATemplateUnpairedSequence

public RNATemplate.RNATemplateUnpairedSequence(String name)
Method Detail

getVertex5

public Point2D.Double getVertex5()

setVertex5

public void setVertex5(Point2D.Double vertex5)

getVertex3

public Point2D.Double getVertex3()

setVertex3

public void setVertex3(Point2D.Double vertex3)

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)

getInTangentVectorAngle

public double getInTangentVectorAngle()

setInTangentVectorAngle

public void setInTangentVectorAngle(double inTangentVectorAngle)

getInTangentVectorLength

public double getInTangentVectorLength()

setInTangentVectorLength

public void setInTangentVectorLength(double inTangentVectorLength)

getOutTangentVectorAngle

public double getOutTangentVectorAngle()

setOutTangentVectorAngle

public void setOutTangentVectorAngle(double outTangentVectorAngle)

getOutTangentVectorLength

public double getOutTangentVectorLength()

setOutTangentVectorLength

public void setOutTangentVectorLength(double outTangentVectorLength)

getIn

public RNATemplate.RNATemplateElement.EdgeEndPoint getIn()

getOut

public RNATemplate.RNATemplateElement.EdgeEndPoint getOut()

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