Merge branch 'features/pca_jaxb_datasetrefs_JAL-3171_JAL-3063_JAL-1767' into develop
[jalview.git] / src / jalview / schemabinding / version2 / PcaViewer.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * Class PcaViewer.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class PcaViewer implements java.io.Serializable
23 {
24
25   // --------------------------/
26   // - Class/Member Variables -/
27   // --------------------------/
28
29   /**
30    * Field _title.
31    */
32   private java.lang.String _title;
33
34   /**
35    * Field _scoreModelName.
36    */
37   private java.lang.String _scoreModelName;
38
39   /**
40    * Field _xDim.
41    */
42   private int _xDim;
43
44   /**
45    * keeps track of state for field: _xDim
46    */
47   private boolean _has_xDim;
48
49   /**
50    * Field _yDim.
51    */
52   private int _yDim;
53
54   /**
55    * keeps track of state for field: _yDim
56    */
57   private boolean _has_yDim;
58
59   /**
60    * Field _zDim.
61    */
62   private int _zDim;
63
64   /**
65    * keeps track of state for field: _zDim
66    */
67   private boolean _has_zDim;
68
69   /**
70    * Field _bgColour.
71    */
72   private int _bgColour;
73
74   /**
75    * keeps track of state for field: _bgColour
76    */
77   private boolean _has_bgColour;
78
79   /**
80    * Field _scaleFactor.
81    */
82   private float _scaleFactor;
83
84   /**
85    * keeps track of state for field: _scaleFactor
86    */
87   private boolean _has_scaleFactor;
88
89   /**
90    * Field _showLabels.
91    */
92   private boolean _showLabels;
93
94   /**
95    * keeps track of state for field: _showLabels
96    */
97   private boolean _has_showLabels;
98
99   /**
100    * Field _linkToAllViews.
101    */
102   private boolean _linkToAllViews;
103
104   /**
105    * keeps track of state for field: _linkToAllViews
106    */
107   private boolean _has_linkToAllViews;
108
109   /**
110    * Field _includeGaps.
111    */
112   private boolean _includeGaps;
113
114   /**
115    * keeps track of state for field: _includeGaps
116    */
117   private boolean _has_includeGaps;
118
119   /**
120    * Field _matchGaps.
121    */
122   private boolean _matchGaps;
123
124   /**
125    * keeps track of state for field: _matchGaps
126    */
127   private boolean _has_matchGaps;
128
129   /**
130    * Field _includeGappedColumns.
131    */
132   private boolean _includeGappedColumns;
133
134   /**
135    * keeps track of state for field: _includeGappedColumns
136    */
137   private boolean _has_includeGappedColumns;
138
139   /**
140    * Field _denominateByShortestLength.
141    */
142   private boolean _denominateByShortestLength;
143
144   /**
145    * keeps track of state for field: _denominateByShortestLength
146    */
147   private boolean _has_denominateByShortestLength;
148
149   /**
150    * Field _width.
151    */
152   private int _width;
153
154   /**
155    * keeps track of state for field: _width
156    */
157   private boolean _has_width;
158
159   /**
160    * Field _height.
161    */
162   private int _height;
163
164   /**
165    * keeps track of state for field: _height
166    */
167   private boolean _has_height;
168
169   /**
170    * Field _xpos.
171    */
172   private int _xpos;
173
174   /**
175    * keeps track of state for field: _xpos
176    */
177   private boolean _has_xpos;
178
179   /**
180    * Field _ypos.
181    */
182   private int _ypos;
183
184   /**
185    * keeps track of state for field: _ypos
186    */
187   private boolean _has_ypos;
188
189   /**
190    * Field _sequencePointList.
191    */
192   private java.util.Vector _sequencePointList;
193
194   /**
195    * endpoints of X, Y and Z axes in that order
196    * 
197    */
198   private java.util.Vector _axisList;
199
200   /**
201    * Field _seqPointMin.
202    */
203   private jalview.schemabinding.version2.SeqPointMin _seqPointMin;
204
205   /**
206    * Field _seqPointMax.
207    */
208   private jalview.schemabinding.version2.SeqPointMax _seqPointMax;
209
210   /**
211    * Field _pcaData.
212    */
213   private jalview.schemabinding.version2.PcaData _pcaData;
214
215   // ----------------/
216   // - Constructors -/
217   // ----------------/
218
219   public PcaViewer()
220   {
221     super();
222     this._sequencePointList = new java.util.Vector();
223     this._axisList = new java.util.Vector();
224   }
225
226   // -----------/
227   // - Methods -/
228   // -----------/
229
230   /**
231    * 
232    * 
233    * @param vAxis
234    * @throws java.lang.IndexOutOfBoundsException
235    *           if the index given is outside the bounds of the collection
236    */
237   public void addAxis(final jalview.schemabinding.version2.Axis vAxis)
238           throws java.lang.IndexOutOfBoundsException
239   {
240     // check for the maximum size
241     if (this._axisList.size() >= 3)
242     {
243       throw new IndexOutOfBoundsException("addAxis has a maximum of 3");
244     }
245
246     this._axisList.addElement(vAxis);
247   }
248
249   /**
250    * 
251    * 
252    * @param index
253    * @param vAxis
254    * @throws java.lang.IndexOutOfBoundsException
255    *           if the index given is outside the bounds of the collection
256    */
257   public void addAxis(final int index,
258           final jalview.schemabinding.version2.Axis vAxis)
259           throws java.lang.IndexOutOfBoundsException
260   {
261     // check for the maximum size
262     if (this._axisList.size() >= 3)
263     {
264       throw new IndexOutOfBoundsException("addAxis has a maximum of 3");
265     }
266
267     this._axisList.add(index, vAxis);
268   }
269
270   /**
271    * 
272    * 
273    * @param vSequencePoint
274    * @throws java.lang.IndexOutOfBoundsException
275    *           if the index given is outside the bounds of the collection
276    */
277   public void addSequencePoint(
278           final jalview.schemabinding.version2.SequencePoint vSequencePoint)
279           throws java.lang.IndexOutOfBoundsException
280   {
281     this._sequencePointList.addElement(vSequencePoint);
282   }
283
284   /**
285    * 
286    * 
287    * @param index
288    * @param vSequencePoint
289    * @throws java.lang.IndexOutOfBoundsException
290    *           if the index given is outside the bounds of the collection
291    */
292   public void addSequencePoint(final int index,
293           final jalview.schemabinding.version2.SequencePoint vSequencePoint)
294           throws java.lang.IndexOutOfBoundsException
295   {
296     this._sequencePointList.add(index, vSequencePoint);
297   }
298
299   /**
300    */
301   public void deleteBgColour()
302   {
303     this._has_bgColour = false;
304   }
305
306   /**
307    */
308   public void deleteDenominateByShortestLength()
309   {
310     this._has_denominateByShortestLength = false;
311   }
312
313   /**
314    */
315   public void deleteHeight()
316   {
317     this._has_height = false;
318   }
319
320   /**
321    */
322   public void deleteIncludeGappedColumns()
323   {
324     this._has_includeGappedColumns = false;
325   }
326
327   /**
328    */
329   public void deleteIncludeGaps()
330   {
331     this._has_includeGaps = false;
332   }
333
334   /**
335    */
336   public void deleteLinkToAllViews()
337   {
338     this._has_linkToAllViews = false;
339   }
340
341   /**
342    */
343   public void deleteMatchGaps()
344   {
345     this._has_matchGaps = false;
346   }
347
348   /**
349    */
350   public void deleteScaleFactor()
351   {
352     this._has_scaleFactor = false;
353   }
354
355   /**
356    */
357   public void deleteShowLabels()
358   {
359     this._has_showLabels = false;
360   }
361
362   /**
363    */
364   public void deleteWidth()
365   {
366     this._has_width = false;
367   }
368
369   /**
370    */
371   public void deleteXDim()
372   {
373     this._has_xDim = false;
374   }
375
376   /**
377    */
378   public void deleteXpos()
379   {
380     this._has_xpos = false;
381   }
382
383   /**
384    */
385   public void deleteYDim()
386   {
387     this._has_yDim = false;
388   }
389
390   /**
391    */
392   public void deleteYpos()
393   {
394     this._has_ypos = false;
395   }
396
397   /**
398    */
399   public void deleteZDim()
400   {
401     this._has_zDim = false;
402   }
403
404   /**
405    * Method enumerateAxis.
406    * 
407    * @return an Enumeration over all jalview.schemabinding.version2.Axis
408    *         elements
409    */
410   public java.util.Enumeration enumerateAxis()
411   {
412     return this._axisList.elements();
413   }
414
415   /**
416    * Method enumerateSequencePoint.
417    * 
418    * @return an Enumeration over all
419    *         jalview.schemabinding.version2.SequencePoint elements
420    */
421   public java.util.Enumeration enumerateSequencePoint()
422   {
423     return this._sequencePointList.elements();
424   }
425
426   /**
427    * Method getAxis.
428    * 
429    * @param index
430    * @throws java.lang.IndexOutOfBoundsException
431    *           if the index given is outside the bounds of the collection
432    * @return the value of the jalview.schemabinding.version2.Axis at the given
433    *         index
434    */
435   public jalview.schemabinding.version2.Axis getAxis(final int index)
436           throws java.lang.IndexOutOfBoundsException
437   {
438     // check bounds for index
439     if (index < 0 || index >= this._axisList.size())
440     {
441       throw new IndexOutOfBoundsException("getAxis: Index value '" + index
442               + "' not in range [0.." + (this._axisList.size() - 1) + "]");
443     }
444
445     return (jalview.schemabinding.version2.Axis) _axisList.get(index);
446   }
447
448   /**
449    * Method getAxis.Returns the contents of the collection in an Array.
450    * <p>
451    * Note: Just in case the collection contents are changing in another thread,
452    * we pass a 0-length Array of the correct type into the API call. This way we
453    * <i>know</i> that the Array returned is of exactly the correct length.
454    * 
455    * @return this collection as an Array
456    */
457   public jalview.schemabinding.version2.Axis[] getAxis()
458   {
459     jalview.schemabinding.version2.Axis[] array = new jalview.schemabinding.version2.Axis[0];
460     return (jalview.schemabinding.version2.Axis[]) this._axisList
461             .toArray(array);
462   }
463
464   /**
465    * Method getAxisCount.
466    * 
467    * @return the size of this collection
468    */
469   public int getAxisCount()
470   {
471     return this._axisList.size();
472   }
473
474   /**
475    * Returns the value of field 'bgColour'.
476    * 
477    * @return the value of field 'BgColour'.
478    */
479   public int getBgColour()
480   {
481     return this._bgColour;
482   }
483
484   /**
485    * Returns the value of field 'denominateByShortestLength'.
486    * 
487    * @return the value of field 'DenominateByShortestLength'.
488    */
489   public boolean getDenominateByShortestLength()
490   {
491     return this._denominateByShortestLength;
492   }
493
494   /**
495    * Returns the value of field 'height'.
496    * 
497    * @return the value of field 'Height'.
498    */
499   public int getHeight()
500   {
501     return this._height;
502   }
503
504   /**
505    * Returns the value of field 'includeGappedColumns'.
506    * 
507    * @return the value of field 'IncludeGappedColumns'.
508    */
509   public boolean getIncludeGappedColumns()
510   {
511     return this._includeGappedColumns;
512   }
513
514   /**
515    * Returns the value of field 'includeGaps'.
516    * 
517    * @return the value of field 'IncludeGaps'.
518    */
519   public boolean getIncludeGaps()
520   {
521     return this._includeGaps;
522   }
523
524   /**
525    * Returns the value of field 'linkToAllViews'.
526    * 
527    * @return the value of field 'LinkToAllViews'.
528    */
529   public boolean getLinkToAllViews()
530   {
531     return this._linkToAllViews;
532   }
533
534   /**
535    * Returns the value of field 'matchGaps'.
536    * 
537    * @return the value of field 'MatchGaps'.
538    */
539   public boolean getMatchGaps()
540   {
541     return this._matchGaps;
542   }
543
544   /**
545    * Returns the value of field 'pcaData'.
546    * 
547    * @return the value of field 'PcaData'.
548    */
549   public jalview.schemabinding.version2.PcaData getPcaData()
550   {
551     return this._pcaData;
552   }
553
554   /**
555    * Returns the value of field 'scaleFactor'.
556    * 
557    * @return the value of field 'ScaleFactor'.
558    */
559   public float getScaleFactor()
560   {
561     return this._scaleFactor;
562   }
563
564   /**
565    * Returns the value of field 'scoreModelName'.
566    * 
567    * @return the value of field 'ScoreModelName'.
568    */
569   public java.lang.String getScoreModelName()
570   {
571     return this._scoreModelName;
572   }
573
574   /**
575    * Returns the value of field 'seqPointMax'.
576    * 
577    * @return the value of field 'SeqPointMax'.
578    */
579   public jalview.schemabinding.version2.SeqPointMax getSeqPointMax()
580   {
581     return this._seqPointMax;
582   }
583
584   /**
585    * Returns the value of field 'seqPointMin'.
586    * 
587    * @return the value of field 'SeqPointMin'.
588    */
589   public jalview.schemabinding.version2.SeqPointMin getSeqPointMin()
590   {
591     return this._seqPointMin;
592   }
593
594   /**
595    * Method getSequencePoint.
596    * 
597    * @param index
598    * @throws java.lang.IndexOutOfBoundsException
599    *           if the index given is outside the bounds of the collection
600    * @return the value of the jalview.schemabinding.version2.SequencePoint at
601    *         the given index
602    */
603   public jalview.schemabinding.version2.SequencePoint getSequencePoint(
604           final int index) throws java.lang.IndexOutOfBoundsException
605   {
606     // check bounds for index
607     if (index < 0 || index >= this._sequencePointList.size())
608     {
609       throw new IndexOutOfBoundsException("getSequencePoint: Index value '"
610               + index + "' not in range [0.."
611               + (this._sequencePointList.size() - 1) + "]");
612     }
613
614     return (jalview.schemabinding.version2.SequencePoint) _sequencePointList
615             .get(index);
616   }
617
618   /**
619    * Method getSequencePoint.Returns the contents of the collection in an Array.
620    * <p>
621    * Note: Just in case the collection contents are changing in another thread,
622    * we pass a 0-length Array of the correct type into the API call. This way we
623    * <i>know</i> that the Array returned is of exactly the correct length.
624    * 
625    * @return this collection as an Array
626    */
627   public jalview.schemabinding.version2.SequencePoint[] getSequencePoint()
628   {
629     jalview.schemabinding.version2.SequencePoint[] array = new jalview.schemabinding.version2.SequencePoint[0];
630     return (jalview.schemabinding.version2.SequencePoint[]) this._sequencePointList
631             .toArray(array);
632   }
633
634   /**
635    * Method getSequencePointCount.
636    * 
637    * @return the size of this collection
638    */
639   public int getSequencePointCount()
640   {
641     return this._sequencePointList.size();
642   }
643
644   /**
645    * Returns the value of field 'showLabels'.
646    * 
647    * @return the value of field 'ShowLabels'.
648    */
649   public boolean getShowLabels()
650   {
651     return this._showLabels;
652   }
653
654   /**
655    * Returns the value of field 'title'.
656    * 
657    * @return the value of field 'Title'.
658    */
659   public java.lang.String getTitle()
660   {
661     return this._title;
662   }
663
664   /**
665    * Returns the value of field 'width'.
666    * 
667    * @return the value of field 'Width'.
668    */
669   public int getWidth()
670   {
671     return this._width;
672   }
673
674   /**
675    * Returns the value of field 'xDim'.
676    * 
677    * @return the value of field 'XDim'.
678    */
679   public int getXDim()
680   {
681     return this._xDim;
682   }
683
684   /**
685    * Returns the value of field 'xpos'.
686    * 
687    * @return the value of field 'Xpos'.
688    */
689   public int getXpos()
690   {
691     return this._xpos;
692   }
693
694   /**
695    * Returns the value of field 'yDim'.
696    * 
697    * @return the value of field 'YDim'.
698    */
699   public int getYDim()
700   {
701     return this._yDim;
702   }
703
704   /**
705    * Returns the value of field 'ypos'.
706    * 
707    * @return the value of field 'Ypos'.
708    */
709   public int getYpos()
710   {
711     return this._ypos;
712   }
713
714   /**
715    * Returns the value of field 'zDim'.
716    * 
717    * @return the value of field 'ZDim'.
718    */
719   public int getZDim()
720   {
721     return this._zDim;
722   }
723
724   /**
725    * Method hasBgColour.
726    * 
727    * @return true if at least one BgColour has been added
728    */
729   public boolean hasBgColour()
730   {
731     return this._has_bgColour;
732   }
733
734   /**
735    * Method hasDenominateByShortestLength.
736    * 
737    * @return true if at least one DenominateByShortestLength has been added
738    */
739   public boolean hasDenominateByShortestLength()
740   {
741     return this._has_denominateByShortestLength;
742   }
743
744   /**
745    * Method hasHeight.
746    * 
747    * @return true if at least one Height has been added
748    */
749   public boolean hasHeight()
750   {
751     return this._has_height;
752   }
753
754   /**
755    * Method hasIncludeGappedColumns.
756    * 
757    * @return true if at least one IncludeGappedColumns has been added
758    */
759   public boolean hasIncludeGappedColumns()
760   {
761     return this._has_includeGappedColumns;
762   }
763
764   /**
765    * Method hasIncludeGaps.
766    * 
767    * @return true if at least one IncludeGaps has been added
768    */
769   public boolean hasIncludeGaps()
770   {
771     return this._has_includeGaps;
772   }
773
774   /**
775    * Method hasLinkToAllViews.
776    * 
777    * @return true if at least one LinkToAllViews has been added
778    */
779   public boolean hasLinkToAllViews()
780   {
781     return this._has_linkToAllViews;
782   }
783
784   /**
785    * Method hasMatchGaps.
786    * 
787    * @return true if at least one MatchGaps has been added
788    */
789   public boolean hasMatchGaps()
790   {
791     return this._has_matchGaps;
792   }
793
794   /**
795    * Method hasScaleFactor.
796    * 
797    * @return true if at least one ScaleFactor has been added
798    */
799   public boolean hasScaleFactor()
800   {
801     return this._has_scaleFactor;
802   }
803
804   /**
805    * Method hasShowLabels.
806    * 
807    * @return true if at least one ShowLabels has been added
808    */
809   public boolean hasShowLabels()
810   {
811     return this._has_showLabels;
812   }
813
814   /**
815    * Method hasWidth.
816    * 
817    * @return true if at least one Width has been added
818    */
819   public boolean hasWidth()
820   {
821     return this._has_width;
822   }
823
824   /**
825    * Method hasXDim.
826    * 
827    * @return true if at least one XDim has been added
828    */
829   public boolean hasXDim()
830   {
831     return this._has_xDim;
832   }
833
834   /**
835    * Method hasXpos.
836    * 
837    * @return true if at least one Xpos has been added
838    */
839   public boolean hasXpos()
840   {
841     return this._has_xpos;
842   }
843
844   /**
845    * Method hasYDim.
846    * 
847    * @return true if at least one YDim has been added
848    */
849   public boolean hasYDim()
850   {
851     return this._has_yDim;
852   }
853
854   /**
855    * Method hasYpos.
856    * 
857    * @return true if at least one Ypos has been added
858    */
859   public boolean hasYpos()
860   {
861     return this._has_ypos;
862   }
863
864   /**
865    * Method hasZDim.
866    * 
867    * @return true if at least one ZDim has been added
868    */
869   public boolean hasZDim()
870   {
871     return this._has_zDim;
872   }
873
874   /**
875    * Returns the value of field 'denominateByShortestLength'.
876    * 
877    * @return the value of field 'DenominateByShortestLength'.
878    */
879   public boolean isDenominateByShortestLength()
880   {
881     return this._denominateByShortestLength;
882   }
883
884   /**
885    * Returns the value of field 'includeGappedColumns'.
886    * 
887    * @return the value of field 'IncludeGappedColumns'.
888    */
889   public boolean isIncludeGappedColumns()
890   {
891     return this._includeGappedColumns;
892   }
893
894   /**
895    * Returns the value of field 'includeGaps'.
896    * 
897    * @return the value of field 'IncludeGaps'.
898    */
899   public boolean isIncludeGaps()
900   {
901     return this._includeGaps;
902   }
903
904   /**
905    * Returns the value of field 'linkToAllViews'.
906    * 
907    * @return the value of field 'LinkToAllViews'.
908    */
909   public boolean isLinkToAllViews()
910   {
911     return this._linkToAllViews;
912   }
913
914   /**
915    * Returns the value of field 'matchGaps'.
916    * 
917    * @return the value of field 'MatchGaps'.
918    */
919   public boolean isMatchGaps()
920   {
921     return this._matchGaps;
922   }
923
924   /**
925    * Returns the value of field 'showLabels'.
926    * 
927    * @return the value of field 'ShowLabels'.
928    */
929   public boolean isShowLabels()
930   {
931     return this._showLabels;
932   }
933
934   /**
935    * Method isValid.
936    * 
937    * @return true if this object is valid according to the schema
938    */
939   public boolean isValid()
940   {
941     try
942     {
943       validate();
944     } catch (org.exolab.castor.xml.ValidationException vex)
945     {
946       return false;
947     }
948     return true;
949   }
950
951   /**
952    * 
953    * 
954    * @param out
955    * @throws org.exolab.castor.xml.MarshalException
956    *           if object is null or if any SAXException is thrown during
957    *           marshaling
958    * @throws org.exolab.castor.xml.ValidationException
959    *           if this object is an invalid instance according to the schema
960    */
961   public void marshal(final java.io.Writer out)
962           throws org.exolab.castor.xml.MarshalException,
963           org.exolab.castor.xml.ValidationException
964   {
965     Marshaller.marshal(this, out);
966   }
967
968   /**
969    * 
970    * 
971    * @param handler
972    * @throws java.io.IOException
973    *           if an IOException occurs during marshaling
974    * @throws org.exolab.castor.xml.ValidationException
975    *           if this object is an invalid instance according to the schema
976    * @throws org.exolab.castor.xml.MarshalException
977    *           if object is null or if any SAXException is thrown during
978    *           marshaling
979    */
980   public void marshal(final org.xml.sax.ContentHandler handler)
981           throws java.io.IOException,
982           org.exolab.castor.xml.MarshalException,
983           org.exolab.castor.xml.ValidationException
984   {
985     Marshaller.marshal(this, handler);
986   }
987
988   /**
989    */
990   public void removeAllAxis()
991   {
992     this._axisList.clear();
993   }
994
995   /**
996    */
997   public void removeAllSequencePoint()
998   {
999     this._sequencePointList.clear();
1000   }
1001
1002   /**
1003    * Method removeAxis.
1004    * 
1005    * @param vAxis
1006    * @return true if the object was removed from the collection.
1007    */
1008   public boolean removeAxis(final jalview.schemabinding.version2.Axis vAxis)
1009   {
1010     boolean removed = _axisList.remove(vAxis);
1011     return removed;
1012   }
1013
1014   /**
1015    * Method removeAxisAt.
1016    * 
1017    * @param index
1018    * @return the element removed from the collection
1019    */
1020   public jalview.schemabinding.version2.Axis removeAxisAt(final int index)
1021   {
1022     java.lang.Object obj = this._axisList.remove(index);
1023     return (jalview.schemabinding.version2.Axis) obj;
1024   }
1025
1026   /**
1027    * Method removeSequencePoint.
1028    * 
1029    * @param vSequencePoint
1030    * @return true if the object was removed from the collection.
1031    */
1032   public boolean removeSequencePoint(
1033           final jalview.schemabinding.version2.SequencePoint vSequencePoint)
1034   {
1035     boolean removed = _sequencePointList.remove(vSequencePoint);
1036     return removed;
1037   }
1038
1039   /**
1040    * Method removeSequencePointAt.
1041    * 
1042    * @param index
1043    * @return the element removed from the collection
1044    */
1045   public jalview.schemabinding.version2.SequencePoint removeSequencePointAt(
1046           final int index)
1047   {
1048     java.lang.Object obj = this._sequencePointList.remove(index);
1049     return (jalview.schemabinding.version2.SequencePoint) obj;
1050   }
1051
1052   /**
1053    * 
1054    * 
1055    * @param index
1056    * @param vAxis
1057    * @throws java.lang.IndexOutOfBoundsException
1058    *           if the index given is outside the bounds of the collection
1059    */
1060   public void setAxis(final int index,
1061           final jalview.schemabinding.version2.Axis vAxis)
1062           throws java.lang.IndexOutOfBoundsException
1063   {
1064     // check bounds for index
1065     if (index < 0 || index >= this._axisList.size())
1066     {
1067       throw new IndexOutOfBoundsException("setAxis: Index value '" + index
1068               + "' not in range [0.." + (this._axisList.size() - 1) + "]");
1069     }
1070
1071     this._axisList.set(index, vAxis);
1072   }
1073
1074   /**
1075    * 
1076    * 
1077    * @param vAxisArray
1078    */
1079   public void setAxis(
1080           final jalview.schemabinding.version2.Axis[] vAxisArray)
1081   {
1082     // -- copy array
1083     _axisList.clear();
1084
1085     for (int i = 0; i < vAxisArray.length; i++)
1086     {
1087       this._axisList.add(vAxisArray[i]);
1088     }
1089   }
1090
1091   /**
1092    * Sets the value of field 'bgColour'.
1093    * 
1094    * @param bgColour
1095    *          the value of field 'bgColour'.
1096    */
1097   public void setBgColour(final int bgColour)
1098   {
1099     this._bgColour = bgColour;
1100     this._has_bgColour = true;
1101   }
1102
1103   /**
1104    * Sets the value of field 'denominateByShortestLength'.
1105    * 
1106    * @param denominateByShortestLength
1107    *          the value of field 'denominateByShortestLength'.
1108    */
1109   public void setDenominateByShortestLength(
1110           final boolean denominateByShortestLength)
1111   {
1112     this._denominateByShortestLength = denominateByShortestLength;
1113     this._has_denominateByShortestLength = true;
1114   }
1115
1116   /**
1117    * Sets the value of field 'height'.
1118    * 
1119    * @param height
1120    *          the value of field 'height'.
1121    */
1122   public void setHeight(final int height)
1123   {
1124     this._height = height;
1125     this._has_height = true;
1126   }
1127
1128   /**
1129    * Sets the value of field 'includeGappedColumns'.
1130    * 
1131    * @param includeGappedColumns
1132    *          the value of field 'includeGappedColumns'.
1133    */
1134   public void setIncludeGappedColumns(final boolean includeGappedColumns)
1135   {
1136     this._includeGappedColumns = includeGappedColumns;
1137     this._has_includeGappedColumns = true;
1138   }
1139
1140   /**
1141    * Sets the value of field 'includeGaps'.
1142    * 
1143    * @param includeGaps
1144    *          the value of field 'includeGaps'.
1145    */
1146   public void setIncludeGaps(final boolean includeGaps)
1147   {
1148     this._includeGaps = includeGaps;
1149     this._has_includeGaps = true;
1150   }
1151
1152   /**
1153    * Sets the value of field 'linkToAllViews'.
1154    * 
1155    * @param linkToAllViews
1156    *          the value of field 'linkToAllViews'.
1157    */
1158   public void setLinkToAllViews(final boolean linkToAllViews)
1159   {
1160     this._linkToAllViews = linkToAllViews;
1161     this._has_linkToAllViews = true;
1162   }
1163
1164   /**
1165    * Sets the value of field 'matchGaps'.
1166    * 
1167    * @param matchGaps
1168    *          the value of field 'matchGaps'.
1169    */
1170   public void setMatchGaps(final boolean matchGaps)
1171   {
1172     this._matchGaps = matchGaps;
1173     this._has_matchGaps = true;
1174   }
1175
1176   /**
1177    * Sets the value of field 'pcaData'.
1178    * 
1179    * @param pcaData
1180    *          the value of field 'pcaData'.
1181    */
1182   public void setPcaData(
1183           final jalview.schemabinding.version2.PcaData pcaData)
1184   {
1185     this._pcaData = pcaData;
1186   }
1187
1188   /**
1189    * Sets the value of field 'scaleFactor'.
1190    * 
1191    * @param scaleFactor
1192    *          the value of field 'scaleFactor'.
1193    */
1194   public void setScaleFactor(final float scaleFactor)
1195   {
1196     this._scaleFactor = scaleFactor;
1197     this._has_scaleFactor = true;
1198   }
1199
1200   /**
1201    * Sets the value of field 'scoreModelName'.
1202    * 
1203    * @param scoreModelName
1204    *          the value of field 'scoreModelName'.
1205    */
1206   public void setScoreModelName(final java.lang.String scoreModelName)
1207   {
1208     this._scoreModelName = scoreModelName;
1209   }
1210
1211   /**
1212    * Sets the value of field 'seqPointMax'.
1213    * 
1214    * @param seqPointMax
1215    *          the value of field 'seqPointMax'.
1216    */
1217   public void setSeqPointMax(
1218           final jalview.schemabinding.version2.SeqPointMax seqPointMax)
1219   {
1220     this._seqPointMax = seqPointMax;
1221   }
1222
1223   /**
1224    * Sets the value of field 'seqPointMin'.
1225    * 
1226    * @param seqPointMin
1227    *          the value of field 'seqPointMin'.
1228    */
1229   public void setSeqPointMin(
1230           final jalview.schemabinding.version2.SeqPointMin seqPointMin)
1231   {
1232     this._seqPointMin = seqPointMin;
1233   }
1234
1235   /**
1236    * 
1237    * 
1238    * @param index
1239    * @param vSequencePoint
1240    * @throws java.lang.IndexOutOfBoundsException
1241    *           if the index given is outside the bounds of the collection
1242    */
1243   public void setSequencePoint(final int index,
1244           final jalview.schemabinding.version2.SequencePoint vSequencePoint)
1245           throws java.lang.IndexOutOfBoundsException
1246   {
1247     // check bounds for index
1248     if (index < 0 || index >= this._sequencePointList.size())
1249     {
1250       throw new IndexOutOfBoundsException("setSequencePoint: Index value '"
1251               + index + "' not in range [0.."
1252               + (this._sequencePointList.size() - 1) + "]");
1253     }
1254
1255     this._sequencePointList.set(index, vSequencePoint);
1256   }
1257
1258   /**
1259    * 
1260    * 
1261    * @param vSequencePointArray
1262    */
1263   public void setSequencePoint(
1264           final jalview.schemabinding.version2.SequencePoint[] vSequencePointArray)
1265   {
1266     // -- copy array
1267     _sequencePointList.clear();
1268
1269     for (int i = 0; i < vSequencePointArray.length; i++)
1270     {
1271       this._sequencePointList.add(vSequencePointArray[i]);
1272     }
1273   }
1274
1275   /**
1276    * Sets the value of field 'showLabels'.
1277    * 
1278    * @param showLabels
1279    *          the value of field 'showLabels'.
1280    */
1281   public void setShowLabels(final boolean showLabels)
1282   {
1283     this._showLabels = showLabels;
1284     this._has_showLabels = true;
1285   }
1286
1287   /**
1288    * Sets the value of field 'title'.
1289    * 
1290    * @param title
1291    *          the value of field 'title'.
1292    */
1293   public void setTitle(final java.lang.String title)
1294   {
1295     this._title = title;
1296   }
1297
1298   /**
1299    * Sets the value of field 'width'.
1300    * 
1301    * @param width
1302    *          the value of field 'width'.
1303    */
1304   public void setWidth(final int width)
1305   {
1306     this._width = width;
1307     this._has_width = true;
1308   }
1309
1310   /**
1311    * Sets the value of field 'xDim'.
1312    * 
1313    * @param xDim
1314    *          the value of field 'xDim'.
1315    */
1316   public void setXDim(final int xDim)
1317   {
1318     this._xDim = xDim;
1319     this._has_xDim = true;
1320   }
1321
1322   /**
1323    * Sets the value of field 'xpos'.
1324    * 
1325    * @param xpos
1326    *          the value of field 'xpos'.
1327    */
1328   public void setXpos(final int xpos)
1329   {
1330     this._xpos = xpos;
1331     this._has_xpos = true;
1332   }
1333
1334   /**
1335    * Sets the value of field 'yDim'.
1336    * 
1337    * @param yDim
1338    *          the value of field 'yDim'.
1339    */
1340   public void setYDim(final int yDim)
1341   {
1342     this._yDim = yDim;
1343     this._has_yDim = true;
1344   }
1345
1346   /**
1347    * Sets the value of field 'ypos'.
1348    * 
1349    * @param ypos
1350    *          the value of field 'ypos'.
1351    */
1352   public void setYpos(final int ypos)
1353   {
1354     this._ypos = ypos;
1355     this._has_ypos = true;
1356   }
1357
1358   /**
1359    * Sets the value of field 'zDim'.
1360    * 
1361    * @param zDim
1362    *          the value of field 'zDim'.
1363    */
1364   public void setZDim(final int zDim)
1365   {
1366     this._zDim = zDim;
1367     this._has_zDim = true;
1368   }
1369
1370   /**
1371    * Method unmarshal.
1372    * 
1373    * @param reader
1374    * @throws org.exolab.castor.xml.MarshalException
1375    *           if object is null or if any SAXException is thrown during
1376    *           marshaling
1377    * @throws org.exolab.castor.xml.ValidationException
1378    *           if this object is an invalid instance according to the schema
1379    * @return the unmarshaled jalview.schemabinding.version2.PcaViewer
1380    */
1381   public static jalview.schemabinding.version2.PcaViewer unmarshal(
1382           final java.io.Reader reader)
1383           throws org.exolab.castor.xml.MarshalException,
1384           org.exolab.castor.xml.ValidationException
1385   {
1386     return (jalview.schemabinding.version2.PcaViewer) Unmarshaller
1387             .unmarshal(jalview.schemabinding.version2.PcaViewer.class,
1388                     reader);
1389   }
1390
1391   /**
1392    * 
1393    * 
1394    * @throws org.exolab.castor.xml.ValidationException
1395    *           if this object is an invalid instance according to the schema
1396    */
1397   public void validate() throws org.exolab.castor.xml.ValidationException
1398   {
1399     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1400     validator.validate(this);
1401   }
1402
1403 }