Clover icon

Coverage Report

  1. Project Clover database Thu Nov 7 2024 17:01:39 GMT
  2. Package jalview.datamodel

File StructureViewerModel.java

 

Coverage histogram

../../img/srcFileCovDistChart0.png
0% of files have more coverage

Code metrics

0
38
28
2
225
150
28
0.74
1.36
14
1

Classes

Class Line # Actions
StructureViewerModel 32 29 21
0.00%
StructureViewerModel.StructureData 57 9 7
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ The Jalview Authors
4    *
5    * This file is part of Jalview.
6    *
7    * Jalview is free software: you can redistribute it and/or
8    * modify it under the terms of the GNU General Public License
9    * as published by the Free Software Foundation, either version 3
10    * of the License, or (at your option) any later version.
11    *
12    * Jalview is distributed in the hope that it will be useful, but
13    * WITHOUT ANY WARRANTY; without even the implied warranty
14    * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15    * PURPOSE. See the GNU General Public License for more details.
16    *
17    * You should have received a copy of the GNU General Public License
18    * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19    * The Jalview Authors are detailed in the 'AUTHORS' file.
20    */
21    package jalview.datamodel;
22   
23    import java.io.File;
24    import java.util.ArrayList;
25    import java.util.HashMap;
26    import java.util.List;
27    import java.util.Map;
28   
29    /**
30    * A data bean to hold stored data about a structure viewer.
31    */
 
32    public class StructureViewerModel
33    {
34    private int x;
35   
36    private int y;
37   
38    private int width;
39   
40    private int height;
41   
42    private boolean alignWithPanel;
43   
44    private boolean colourWithAlignPanel;
45   
46    private boolean colourByViewer;
47   
48    private String stateData = "";
49   
50    private String viewId;
51   
52    // CHIMERA or JMOL (for projects from Jalview 2.9 on)
53    private String type;
54   
55    private Map<File, StructureData> fileData = new HashMap<File, StructureData>();
56   
 
57    public class StructureData
58    {
59    private String filePath;
60   
61    private String pdbId;
62   
63    private List<SequenceI> seqList;
64   
65    // TODO and possibly a list of chains?
66   
67    /**
68    * Constructor given structure file path and id.
69    *
70    * @param pdbFile
71    * @param id
72    */
 
73  0 toggle public StructureData(String pdbFile, String id)
74    {
75  0 this.filePath = pdbFile;
76  0 this.pdbId = id;
77  0 this.seqList = new ArrayList<SequenceI>();
78    }
79   
 
80  0 toggle public String getFilePath()
81    {
82  0 return filePath;
83    }
84   
 
85  0 toggle protected void setFilePath(String filePath)
86    {
87  0 this.filePath = filePath;
88    }
89   
 
90  0 toggle public String getPdbId()
91    {
92  0 return pdbId;
93    }
94   
 
95  0 toggle protected void setPdbId(String pdbId)
96    {
97  0 this.pdbId = pdbId;
98    }
99   
 
100  0 toggle public List<SequenceI> getSeqList()
101    {
102  0 return seqList;
103    }
104   
 
105  0 toggle protected void setSeqList(List<SequenceI> seqList)
106    {
107  0 this.seqList = seqList;
108    }
109    }
110   
 
111  0 toggle public StructureViewerModel(int x, int y, int width, int height,
112    boolean alignWithPanel, boolean colourWithAlignPanel,
113    boolean colourByViewer, String viewId, String type)
114    {
115  0 this.x = x;
116  0 this.y = y;
117  0 this.width = width;
118  0 this.height = height;
119  0 this.alignWithPanel = alignWithPanel;
120  0 this.colourWithAlignPanel = colourWithAlignPanel;
121  0 this.colourByViewer = colourByViewer;
122  0 this.viewId = viewId;
123  0 this.type = type;
124    }
125   
 
126  0 toggle public int getX()
127    {
128  0 return x;
129    }
130   
 
131  0 toggle protected void setX(int x)
132    {
133  0 this.x = x;
134    }
135   
 
136  0 toggle public int getY()
137    {
138  0 return y;
139    }
140   
 
141  0 toggle protected void setY(int y)
142    {
143  0 this.y = y;
144    }
145   
 
146  0 toggle public int getWidth()
147    {
148  0 return width;
149    }
150   
 
151  0 toggle protected void setWidth(int width)
152    {
153  0 this.width = width;
154    }
155   
 
156  0 toggle public int getHeight()
157    {
158  0 return height;
159    }
160   
 
161  0 toggle public void setHeight(int height)
162    {
163  0 this.height = height;
164    }
165   
 
166  0 toggle public boolean isAlignWithPanel()
167    {
168  0 return alignWithPanel;
169    }
170   
 
171  0 toggle public void setAlignWithPanel(boolean alignWithPanel)
172    {
173  0 this.alignWithPanel = alignWithPanel;
174    }
175   
 
176  0 toggle public boolean isColourWithAlignPanel()
177    {
178  0 return colourWithAlignPanel;
179    }
180   
 
181  0 toggle public void setColourWithAlignPanel(boolean colourWithAlignPanel)
182    {
183  0 this.colourWithAlignPanel = colourWithAlignPanel;
184    }
185   
 
186  0 toggle public boolean isColourByViewer()
187    {
188  0 return colourByViewer;
189    }
190   
 
191  0 toggle public void setColourByViewer(boolean colourByViewer)
192    {
193  0 this.colourByViewer = colourByViewer;
194    }
195   
 
196  0 toggle public String getStateData()
197    {
198  0 return stateData;
199    }
200   
 
201  0 toggle public void setStateData(String stateData)
202    {
203  0 this.stateData = stateData;
204    }
205   
 
206  0 toggle public Map<File, StructureData> getFileData()
207    {
208  0 return fileData;
209    }
210   
 
211  0 toggle protected void setFileData(Map<File, StructureData> fileData)
212    {
213  0 this.fileData = fileData;
214    }
215   
 
216  0 toggle public String getViewId()
217    {
218  0 return this.viewId;
219    }
220   
 
221  0 toggle public String getType()
222    {
223  0 return this.type;
224    }
225    }