2 VARNA is a tool for the automated drawing, visualization and annotation of the secondary structure of RNA, designed as a companion software for web servers and databases.
3 Copyright (C) 2008 Kevin Darty, Alain Denise and Yann Ponty.
4 electronic mail : Yann.Ponty@lri.fr
5 paper mail : LRI, bat 490 Université Paris-Sud 91405 Orsay Cedex France
7 This file is part of VARNA version 3.1.
8 VARNA version 3.1 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 VARNA version 3.1 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along with VARNA version 3.1.
16 If not, see http://www.gnu.org/licenses.
18 package fr.orsay.lri.varna.models.naView;
20 import java.util.ArrayList;
21 import java.util.Hashtable;
24 private int nconnection;
25 private ArrayList<Connection> connections = new ArrayList<Connection>();
26 private Hashtable<Integer,Connection> _connections = new Hashtable<Integer,Connection>();
30 private double x, y, radius;
32 public int getNconnection() {
36 public void setNconnection(int nconnection) {
37 this.nconnection = nconnection;
40 public void setConnection(int i, Connection c)
42 Integer n = new Integer(i);
44 _connections.put(n, c);
47 if (!_connections.containsKey(n))
49 _connections.put(n, new Connection());
51 _connections.get(i).setNull(true);
55 public Connection getConnection(int i)
57 Integer n = new Integer(i);
58 if (!_connections.containsKey(n))
59 { _connections.put(n, new Connection()); }
60 Connection c = _connections.get(n);
67 public void addConnection(int i, Connection c)
69 _connections.put(_connections.size(),c);
73 public int getNumber() {
77 public void setNumber(int number) {
81 public int getDepth() {
85 public void setDepth(int depth) {
89 public boolean isMark() {
93 public void setMark(boolean mark) {
97 public double getX() {
101 public void setX(double x) {
105 public double getY() {
109 public void setY(double y) {
113 public double getRadius() {
117 public void setRadius(double radius) {
118 this.radius = radius;
121 public String toString()
123 String result = "Loop:";
124 result += " nconnection "+nconnection;
125 result += " depth "+depth;