2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
20 * @version $Revision$ $Date$
22 public class PcaViewer implements java.io.Serializable
25 // --------------------------/
26 // - Class/Member Variables -/
27 // --------------------------/
32 private java.lang.String _title;
35 * Field _scoreModelName.
37 private java.lang.String _scoreModelName;
45 * keeps track of state for field: _xDim
47 private boolean _has_xDim;
55 * keeps track of state for field: _yDim
57 private boolean _has_yDim;
65 * keeps track of state for field: _zDim
67 private boolean _has_zDim;
72 private int _bgColour;
75 * keeps track of state for field: _bgColour
77 private boolean _has_bgColour;
82 private float _scaleFactor;
85 * keeps track of state for field: _scaleFactor
87 private boolean _has_scaleFactor;
92 private boolean _showLabels;
95 * keeps track of state for field: _showLabels
97 private boolean _has_showLabels;
100 * Field _linkToAllViews.
102 private boolean _linkToAllViews;
105 * keeps track of state for field: _linkToAllViews
107 private boolean _has_linkToAllViews;
110 * Field _includeGaps.
112 private boolean _includeGaps;
115 * keeps track of state for field: _includeGaps
117 private boolean _has_includeGaps;
122 private boolean _matchGaps;
125 * keeps track of state for field: _matchGaps
127 private boolean _has_matchGaps;
130 * Field _includeGappedColumns.
132 private boolean _includeGappedColumns;
135 * keeps track of state for field: _includeGappedColumns
137 private boolean _has_includeGappedColumns;
140 * Field _denominateByShortestLength.
142 private boolean _denominateByShortestLength;
145 * keeps track of state for field: _denominateByShortestLength
147 private boolean _has_denominateByShortestLength;
155 * keeps track of state for field: _width
157 private boolean _has_width;
165 * keeps track of state for field: _height
167 private boolean _has_height;
175 * keeps track of state for field: _xpos
177 private boolean _has_xpos;
185 * keeps track of state for field: _ypos
187 private boolean _has_ypos;
190 * Field _sequencePointList.
192 private java.util.Vector _sequencePointList;
195 * endpoints of X, Y and Z axes in that order
198 private java.util.Vector _axisList;
201 * Field _seqPointMin.
203 private jalview.schemabinding.version2.SeqPointMin _seqPointMin;
206 * Field _seqPointMax.
208 private jalview.schemabinding.version2.SeqPointMax _seqPointMax;
213 private jalview.schemabinding.version2.PcaData _pcaData;
222 this._sequencePointList = new java.util.Vector();
223 this._axisList = new java.util.Vector();
234 * @throws java.lang.IndexOutOfBoundsException
235 * if the index given is outside the bounds of the collection
237 public void addAxis(final jalview.schemabinding.version2.Axis vAxis)
238 throws java.lang.IndexOutOfBoundsException
240 // check for the maximum size
241 if (this._axisList.size() >= 3)
243 throw new IndexOutOfBoundsException("addAxis has a maximum of 3");
246 this._axisList.addElement(vAxis);
254 * @throws java.lang.IndexOutOfBoundsException
255 * if the index given is outside the bounds of the collection
257 public void addAxis(final int index,
258 final jalview.schemabinding.version2.Axis vAxis)
259 throws java.lang.IndexOutOfBoundsException
261 // check for the maximum size
262 if (this._axisList.size() >= 3)
264 throw new IndexOutOfBoundsException("addAxis has a maximum of 3");
267 this._axisList.add(index, vAxis);
273 * @param vSequencePoint
274 * @throws java.lang.IndexOutOfBoundsException
275 * if the index given is outside the bounds of the collection
277 public void addSequencePoint(
278 final jalview.schemabinding.version2.SequencePoint vSequencePoint)
279 throws java.lang.IndexOutOfBoundsException
281 this._sequencePointList.addElement(vSequencePoint);
288 * @param vSequencePoint
289 * @throws java.lang.IndexOutOfBoundsException
290 * if the index given is outside the bounds of the collection
292 public void addSequencePoint(final int index,
293 final jalview.schemabinding.version2.SequencePoint vSequencePoint)
294 throws java.lang.IndexOutOfBoundsException
296 this._sequencePointList.add(index, vSequencePoint);
301 public void deleteBgColour()
303 this._has_bgColour = false;
308 public void deleteDenominateByShortestLength()
310 this._has_denominateByShortestLength = false;
315 public void deleteHeight()
317 this._has_height = false;
322 public void deleteIncludeGappedColumns()
324 this._has_includeGappedColumns = false;
329 public void deleteIncludeGaps()
331 this._has_includeGaps = false;
336 public void deleteLinkToAllViews()
338 this._has_linkToAllViews = false;
343 public void deleteMatchGaps()
345 this._has_matchGaps = false;
350 public void deleteScaleFactor()
352 this._has_scaleFactor = false;
357 public void deleteShowLabels()
359 this._has_showLabels = false;
364 public void deleteWidth()
366 this._has_width = false;
371 public void deleteXDim()
373 this._has_xDim = false;
378 public void deleteXpos()
380 this._has_xpos = false;
385 public void deleteYDim()
387 this._has_yDim = false;
392 public void deleteYpos()
394 this._has_ypos = false;
399 public void deleteZDim()
401 this._has_zDim = false;
405 * Method enumerateAxis.
407 * @return an Enumeration over all jalview.schemabinding.version2.Axis
410 public java.util.Enumeration enumerateAxis()
412 return this._axisList.elements();
416 * Method enumerateSequencePoint.
418 * @return an Enumeration over all
419 * jalview.schemabinding.version2.SequencePoint elements
421 public java.util.Enumeration enumerateSequencePoint()
423 return this._sequencePointList.elements();
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
435 public jalview.schemabinding.version2.Axis getAxis(final int index)
436 throws java.lang.IndexOutOfBoundsException
438 // check bounds for index
439 if (index < 0 || index >= this._axisList.size())
441 throw new IndexOutOfBoundsException("getAxis: Index value '" + index
442 + "' not in range [0.." + (this._axisList.size() - 1) + "]");
445 return (jalview.schemabinding.version2.Axis) _axisList.get(index);
449 * Method getAxis.Returns the contents of the collection in an Array.
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.
455 * @return this collection as an Array
457 public jalview.schemabinding.version2.Axis[] getAxis()
459 jalview.schemabinding.version2.Axis[] array = new jalview.schemabinding.version2.Axis[0];
460 return (jalview.schemabinding.version2.Axis[]) this._axisList
465 * Method getAxisCount.
467 * @return the size of this collection
469 public int getAxisCount()
471 return this._axisList.size();
475 * Returns the value of field 'bgColour'.
477 * @return the value of field 'BgColour'.
479 public int getBgColour()
481 return this._bgColour;
485 * Returns the value of field 'denominateByShortestLength'.
487 * @return the value of field 'DenominateByShortestLength'.
489 public boolean getDenominateByShortestLength()
491 return this._denominateByShortestLength;
495 * Returns the value of field 'height'.
497 * @return the value of field 'Height'.
499 public int getHeight()
505 * Returns the value of field 'includeGappedColumns'.
507 * @return the value of field 'IncludeGappedColumns'.
509 public boolean getIncludeGappedColumns()
511 return this._includeGappedColumns;
515 * Returns the value of field 'includeGaps'.
517 * @return the value of field 'IncludeGaps'.
519 public boolean getIncludeGaps()
521 return this._includeGaps;
525 * Returns the value of field 'linkToAllViews'.
527 * @return the value of field 'LinkToAllViews'.
529 public boolean getLinkToAllViews()
531 return this._linkToAllViews;
535 * Returns the value of field 'matchGaps'.
537 * @return the value of field 'MatchGaps'.
539 public boolean getMatchGaps()
541 return this._matchGaps;
545 * Returns the value of field 'pcaData'.
547 * @return the value of field 'PcaData'.
549 public jalview.schemabinding.version2.PcaData getPcaData()
551 return this._pcaData;
555 * Returns the value of field 'scaleFactor'.
557 * @return the value of field 'ScaleFactor'.
559 public float getScaleFactor()
561 return this._scaleFactor;
565 * Returns the value of field 'scoreModelName'.
567 * @return the value of field 'ScoreModelName'.
569 public java.lang.String getScoreModelName()
571 return this._scoreModelName;
575 * Returns the value of field 'seqPointMax'.
577 * @return the value of field 'SeqPointMax'.
579 public jalview.schemabinding.version2.SeqPointMax getSeqPointMax()
581 return this._seqPointMax;
585 * Returns the value of field 'seqPointMin'.
587 * @return the value of field 'SeqPointMin'.
589 public jalview.schemabinding.version2.SeqPointMin getSeqPointMin()
591 return this._seqPointMin;
595 * Method getSequencePoint.
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
603 public jalview.schemabinding.version2.SequencePoint getSequencePoint(
604 final int index) throws java.lang.IndexOutOfBoundsException
606 // check bounds for index
607 if (index < 0 || index >= this._sequencePointList.size())
609 throw new IndexOutOfBoundsException("getSequencePoint: Index value '"
610 + index + "' not in range [0.."
611 + (this._sequencePointList.size() - 1) + "]");
614 return (jalview.schemabinding.version2.SequencePoint) _sequencePointList
619 * Method getSequencePoint.Returns the contents of the collection in an Array.
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.
625 * @return this collection as an Array
627 public jalview.schemabinding.version2.SequencePoint[] getSequencePoint()
629 jalview.schemabinding.version2.SequencePoint[] array = new jalview.schemabinding.version2.SequencePoint[0];
630 return (jalview.schemabinding.version2.SequencePoint[]) this._sequencePointList
635 * Method getSequencePointCount.
637 * @return the size of this collection
639 public int getSequencePointCount()
641 return this._sequencePointList.size();
645 * Returns the value of field 'showLabels'.
647 * @return the value of field 'ShowLabels'.
649 public boolean getShowLabels()
651 return this._showLabels;
655 * Returns the value of field 'title'.
657 * @return the value of field 'Title'.
659 public java.lang.String getTitle()
665 * Returns the value of field 'width'.
667 * @return the value of field 'Width'.
669 public int getWidth()
675 * Returns the value of field 'xDim'.
677 * @return the value of field 'XDim'.
685 * Returns the value of field 'xpos'.
687 * @return the value of field 'Xpos'.
695 * Returns the value of field 'yDim'.
697 * @return the value of field 'YDim'.
705 * Returns the value of field 'ypos'.
707 * @return the value of field 'Ypos'.
715 * Returns the value of field 'zDim'.
717 * @return the value of field 'ZDim'.
725 * Method hasBgColour.
727 * @return true if at least one BgColour has been added
729 public boolean hasBgColour()
731 return this._has_bgColour;
735 * Method hasDenominateByShortestLength.
737 * @return true if at least one DenominateByShortestLength has been added
739 public boolean hasDenominateByShortestLength()
741 return this._has_denominateByShortestLength;
747 * @return true if at least one Height has been added
749 public boolean hasHeight()
751 return this._has_height;
755 * Method hasIncludeGappedColumns.
757 * @return true if at least one IncludeGappedColumns has been added
759 public boolean hasIncludeGappedColumns()
761 return this._has_includeGappedColumns;
765 * Method hasIncludeGaps.
767 * @return true if at least one IncludeGaps has been added
769 public boolean hasIncludeGaps()
771 return this._has_includeGaps;
775 * Method hasLinkToAllViews.
777 * @return true if at least one LinkToAllViews has been added
779 public boolean hasLinkToAllViews()
781 return this._has_linkToAllViews;
785 * Method hasMatchGaps.
787 * @return true if at least one MatchGaps has been added
789 public boolean hasMatchGaps()
791 return this._has_matchGaps;
795 * Method hasScaleFactor.
797 * @return true if at least one ScaleFactor has been added
799 public boolean hasScaleFactor()
801 return this._has_scaleFactor;
805 * Method hasShowLabels.
807 * @return true if at least one ShowLabels has been added
809 public boolean hasShowLabels()
811 return this._has_showLabels;
817 * @return true if at least one Width has been added
819 public boolean hasWidth()
821 return this._has_width;
827 * @return true if at least one XDim has been added
829 public boolean hasXDim()
831 return this._has_xDim;
837 * @return true if at least one Xpos has been added
839 public boolean hasXpos()
841 return this._has_xpos;
847 * @return true if at least one YDim has been added
849 public boolean hasYDim()
851 return this._has_yDim;
857 * @return true if at least one Ypos has been added
859 public boolean hasYpos()
861 return this._has_ypos;
867 * @return true if at least one ZDim has been added
869 public boolean hasZDim()
871 return this._has_zDim;
875 * Returns the value of field 'denominateByShortestLength'.
877 * @return the value of field 'DenominateByShortestLength'.
879 public boolean isDenominateByShortestLength()
881 return this._denominateByShortestLength;
885 * Returns the value of field 'includeGappedColumns'.
887 * @return the value of field 'IncludeGappedColumns'.
889 public boolean isIncludeGappedColumns()
891 return this._includeGappedColumns;
895 * Returns the value of field 'includeGaps'.
897 * @return the value of field 'IncludeGaps'.
899 public boolean isIncludeGaps()
901 return this._includeGaps;
905 * Returns the value of field 'linkToAllViews'.
907 * @return the value of field 'LinkToAllViews'.
909 public boolean isLinkToAllViews()
911 return this._linkToAllViews;
915 * Returns the value of field 'matchGaps'.
917 * @return the value of field 'MatchGaps'.
919 public boolean isMatchGaps()
921 return this._matchGaps;
925 * Returns the value of field 'showLabels'.
927 * @return the value of field 'ShowLabels'.
929 public boolean isShowLabels()
931 return this._showLabels;
937 * @return true if this object is valid according to the schema
939 public boolean isValid()
944 } catch (org.exolab.castor.xml.ValidationException vex)
955 * @throws org.exolab.castor.xml.MarshalException
956 * if object is null or if any SAXException is thrown during
958 * @throws org.exolab.castor.xml.ValidationException
959 * if this object is an invalid instance according to the schema
961 public void marshal(final java.io.Writer out)
962 throws org.exolab.castor.xml.MarshalException,
963 org.exolab.castor.xml.ValidationException
965 Marshaller.marshal(this, out);
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
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
985 Marshaller.marshal(this, handler);
990 public void removeAllAxis()
992 this._axisList.clear();
997 public void removeAllSequencePoint()
999 this._sequencePointList.clear();
1003 * Method removeAxis.
1006 * @return true if the object was removed from the collection.
1008 public boolean removeAxis(final jalview.schemabinding.version2.Axis vAxis)
1010 boolean removed = _axisList.remove(vAxis);
1015 * Method removeAxisAt.
1018 * @return the element removed from the collection
1020 public jalview.schemabinding.version2.Axis removeAxisAt(final int index)
1022 java.lang.Object obj = this._axisList.remove(index);
1023 return (jalview.schemabinding.version2.Axis) obj;
1027 * Method removeSequencePoint.
1029 * @param vSequencePoint
1030 * @return true if the object was removed from the collection.
1032 public boolean removeSequencePoint(
1033 final jalview.schemabinding.version2.SequencePoint vSequencePoint)
1035 boolean removed = _sequencePointList.remove(vSequencePoint);
1040 * Method removeSequencePointAt.
1043 * @return the element removed from the collection
1045 public jalview.schemabinding.version2.SequencePoint removeSequencePointAt(
1048 java.lang.Object obj = this._sequencePointList.remove(index);
1049 return (jalview.schemabinding.version2.SequencePoint) obj;
1057 * @throws java.lang.IndexOutOfBoundsException
1058 * if the index given is outside the bounds of the collection
1060 public void setAxis(final int index,
1061 final jalview.schemabinding.version2.Axis vAxis)
1062 throws java.lang.IndexOutOfBoundsException
1064 // check bounds for index
1065 if (index < 0 || index >= this._axisList.size())
1067 throw new IndexOutOfBoundsException("setAxis: Index value '" + index
1068 + "' not in range [0.." + (this._axisList.size() - 1) + "]");
1071 this._axisList.set(index, vAxis);
1079 public void setAxis(
1080 final jalview.schemabinding.version2.Axis[] vAxisArray)
1085 for (int i = 0; i < vAxisArray.length; i++)
1087 this._axisList.add(vAxisArray[i]);
1092 * Sets the value of field 'bgColour'.
1095 * the value of field 'bgColour'.
1097 public void setBgColour(final int bgColour)
1099 this._bgColour = bgColour;
1100 this._has_bgColour = true;
1104 * Sets the value of field 'denominateByShortestLength'.
1106 * @param denominateByShortestLength
1107 * the value of field 'denominateByShortestLength'.
1109 public void setDenominateByShortestLength(
1110 final boolean denominateByShortestLength)
1112 this._denominateByShortestLength = denominateByShortestLength;
1113 this._has_denominateByShortestLength = true;
1117 * Sets the value of field 'height'.
1120 * the value of field 'height'.
1122 public void setHeight(final int height)
1124 this._height = height;
1125 this._has_height = true;
1129 * Sets the value of field 'includeGappedColumns'.
1131 * @param includeGappedColumns
1132 * the value of field 'includeGappedColumns'.
1134 public void setIncludeGappedColumns(final boolean includeGappedColumns)
1136 this._includeGappedColumns = includeGappedColumns;
1137 this._has_includeGappedColumns = true;
1141 * Sets the value of field 'includeGaps'.
1143 * @param includeGaps
1144 * the value of field 'includeGaps'.
1146 public void setIncludeGaps(final boolean includeGaps)
1148 this._includeGaps = includeGaps;
1149 this._has_includeGaps = true;
1153 * Sets the value of field 'linkToAllViews'.
1155 * @param linkToAllViews
1156 * the value of field 'linkToAllViews'.
1158 public void setLinkToAllViews(final boolean linkToAllViews)
1160 this._linkToAllViews = linkToAllViews;
1161 this._has_linkToAllViews = true;
1165 * Sets the value of field 'matchGaps'.
1168 * the value of field 'matchGaps'.
1170 public void setMatchGaps(final boolean matchGaps)
1172 this._matchGaps = matchGaps;
1173 this._has_matchGaps = true;
1177 * Sets the value of field 'pcaData'.
1180 * the value of field 'pcaData'.
1182 public void setPcaData(
1183 final jalview.schemabinding.version2.PcaData pcaData)
1185 this._pcaData = pcaData;
1189 * Sets the value of field 'scaleFactor'.
1191 * @param scaleFactor
1192 * the value of field 'scaleFactor'.
1194 public void setScaleFactor(final float scaleFactor)
1196 this._scaleFactor = scaleFactor;
1197 this._has_scaleFactor = true;
1201 * Sets the value of field 'scoreModelName'.
1203 * @param scoreModelName
1204 * the value of field 'scoreModelName'.
1206 public void setScoreModelName(final java.lang.String scoreModelName)
1208 this._scoreModelName = scoreModelName;
1212 * Sets the value of field 'seqPointMax'.
1214 * @param seqPointMax
1215 * the value of field 'seqPointMax'.
1217 public void setSeqPointMax(
1218 final jalview.schemabinding.version2.SeqPointMax seqPointMax)
1220 this._seqPointMax = seqPointMax;
1224 * Sets the value of field 'seqPointMin'.
1226 * @param seqPointMin
1227 * the value of field 'seqPointMin'.
1229 public void setSeqPointMin(
1230 final jalview.schemabinding.version2.SeqPointMin seqPointMin)
1232 this._seqPointMin = seqPointMin;
1239 * @param vSequencePoint
1240 * @throws java.lang.IndexOutOfBoundsException
1241 * if the index given is outside the bounds of the collection
1243 public void setSequencePoint(final int index,
1244 final jalview.schemabinding.version2.SequencePoint vSequencePoint)
1245 throws java.lang.IndexOutOfBoundsException
1247 // check bounds for index
1248 if (index < 0 || index >= this._sequencePointList.size())
1250 throw new IndexOutOfBoundsException("setSequencePoint: Index value '"
1251 + index + "' not in range [0.."
1252 + (this._sequencePointList.size() - 1) + "]");
1255 this._sequencePointList.set(index, vSequencePoint);
1261 * @param vSequencePointArray
1263 public void setSequencePoint(
1264 final jalview.schemabinding.version2.SequencePoint[] vSequencePointArray)
1267 _sequencePointList.clear();
1269 for (int i = 0; i < vSequencePointArray.length; i++)
1271 this._sequencePointList.add(vSequencePointArray[i]);
1276 * Sets the value of field 'showLabels'.
1279 * the value of field 'showLabels'.
1281 public void setShowLabels(final boolean showLabels)
1283 this._showLabels = showLabels;
1284 this._has_showLabels = true;
1288 * Sets the value of field 'title'.
1291 * the value of field 'title'.
1293 public void setTitle(final java.lang.String title)
1295 this._title = title;
1299 * Sets the value of field 'width'.
1302 * the value of field 'width'.
1304 public void setWidth(final int width)
1306 this._width = width;
1307 this._has_width = true;
1311 * Sets the value of field 'xDim'.
1314 * the value of field 'xDim'.
1316 public void setXDim(final int xDim)
1319 this._has_xDim = true;
1323 * Sets the value of field 'xpos'.
1326 * the value of field 'xpos'.
1328 public void setXpos(final int xpos)
1331 this._has_xpos = true;
1335 * Sets the value of field 'yDim'.
1338 * the value of field 'yDim'.
1340 public void setYDim(final int yDim)
1343 this._has_yDim = true;
1347 * Sets the value of field 'ypos'.
1350 * the value of field 'ypos'.
1352 public void setYpos(final int ypos)
1355 this._has_ypos = true;
1359 * Sets the value of field 'zDim'.
1362 * the value of field 'zDim'.
1364 public void setZDim(final int zDim)
1367 this._has_zDim = true;
1374 * @throws org.exolab.castor.xml.MarshalException
1375 * if object is null or if any SAXException is thrown during
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
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
1386 return (jalview.schemabinding.version2.PcaViewer) Unmarshaller
1387 .unmarshal(jalview.schemabinding.version2.PcaViewer.class,
1394 * @throws org.exolab.castor.xml.ValidationException
1395 * if this object is an invalid instance according to the schema
1397 public void validate() throws org.exolab.castor.xml.ValidationException
1399 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1400 validator.validate(this);