/* * This class was automatically generated with * Castor 1.1, using an XML * Schema. * $Id$ */ package jalview.schemabinding.version2; //---------------------------------/ //- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; /** * Class PcaViewer. * * @version $Revision$ $Date$ */ public class PcaViewer implements java.io.Serializable { // --------------------------/ // - Class/Member Variables -/ // --------------------------/ /** * Field _title. */ private java.lang.String _title; /** * Field _scoreModelName. */ private java.lang.String _scoreModelName; /** * Field _xDim. */ private int _xDim; /** * keeps track of state for field: _xDim */ private boolean _has_xDim; /** * Field _yDim. */ private int _yDim; /** * keeps track of state for field: _yDim */ private boolean _has_yDim; /** * Field _zDim. */ private int _zDim; /** * keeps track of state for field: _zDim */ private boolean _has_zDim; /** * Field _bgColour. */ private int _bgColour; /** * keeps track of state for field: _bgColour */ private boolean _has_bgColour; /** * Field _scaleFactor. */ private float _scaleFactor; /** * keeps track of state for field: _scaleFactor */ private boolean _has_scaleFactor; /** * Field _showLabels. */ private boolean _showLabels; /** * keeps track of state for field: _showLabels */ private boolean _has_showLabels; /** * Field _linkToAllViews. */ private boolean _linkToAllViews; /** * keeps track of state for field: _linkToAllViews */ private boolean _has_linkToAllViews; /** * Field _includeGaps. */ private boolean _includeGaps; /** * keeps track of state for field: _includeGaps */ private boolean _has_includeGaps; /** * Field _matchGaps. */ private boolean _matchGaps; /** * keeps track of state for field: _matchGaps */ private boolean _has_matchGaps; /** * Field _includeGappedColumns. */ private boolean _includeGappedColumns; /** * keeps track of state for field: _includeGappedColumns */ private boolean _has_includeGappedColumns; /** * Field _denominateByShortestLength. */ private boolean _denominateByShortestLength; /** * keeps track of state for field: _denominateByShortestLength */ private boolean _has_denominateByShortestLength; /** * Field _width. */ private int _width; /** * keeps track of state for field: _width */ private boolean _has_width; /** * Field _height. */ private int _height; /** * keeps track of state for field: _height */ private boolean _has_height; /** * Field _xpos. */ private int _xpos; /** * keeps track of state for field: _xpos */ private boolean _has_xpos; /** * Field _ypos. */ private int _ypos; /** * keeps track of state for field: _ypos */ private boolean _has_ypos; /** * Field _sequencePointList. */ private java.util.Vector _sequencePointList; /** * endpoints of X, Y and Z axes in that order * */ private java.util.Vector _axisList; /** * Field _seqPointMin. */ private jalview.schemabinding.version2.SeqPointMin _seqPointMin; /** * Field _seqPointMax. */ private jalview.schemabinding.version2.SeqPointMax _seqPointMax; /** * Field _pcaData. */ private jalview.schemabinding.version2.PcaData _pcaData; // ----------------/ // - Constructors -/ // ----------------/ public PcaViewer() { super(); this._sequencePointList = new java.util.Vector(); this._axisList = new java.util.Vector(); } // -----------/ // - Methods -/ // -----------/ /** * * * @param vAxis * @throws java.lang.IndexOutOfBoundsException * if the index given is outside the bounds of the collection */ public void addAxis(final jalview.schemabinding.version2.Axis vAxis) throws java.lang.IndexOutOfBoundsException { // check for the maximum size if (this._axisList.size() >= 3) { throw new IndexOutOfBoundsException("addAxis has a maximum of 3"); } this._axisList.addElement(vAxis); } /** * * * @param index * @param vAxis * @throws java.lang.IndexOutOfBoundsException * if the index given is outside the bounds of the collection */ public void addAxis(final int index, final jalview.schemabinding.version2.Axis vAxis) throws java.lang.IndexOutOfBoundsException { // check for the maximum size if (this._axisList.size() >= 3) { throw new IndexOutOfBoundsException("addAxis has a maximum of 3"); } this._axisList.add(index, vAxis); } /** * * * @param vSequencePoint * @throws java.lang.IndexOutOfBoundsException * if the index given is outside the bounds of the collection */ public void addSequencePoint( final jalview.schemabinding.version2.SequencePoint vSequencePoint) throws java.lang.IndexOutOfBoundsException { this._sequencePointList.addElement(vSequencePoint); } /** * * * @param index * @param vSequencePoint * @throws java.lang.IndexOutOfBoundsException * if the index given is outside the bounds of the collection */ public void addSequencePoint(final int index, final jalview.schemabinding.version2.SequencePoint vSequencePoint) throws java.lang.IndexOutOfBoundsException { this._sequencePointList.add(index, vSequencePoint); } /** */ public void deleteBgColour() { this._has_bgColour = false; } /** */ public void deleteDenominateByShortestLength() { this._has_denominateByShortestLength = false; } /** */ public void deleteHeight() { this._has_height = false; } /** */ public void deleteIncludeGappedColumns() { this._has_includeGappedColumns = false; } /** */ public void deleteIncludeGaps() { this._has_includeGaps = false; } /** */ public void deleteLinkToAllViews() { this._has_linkToAllViews = false; } /** */ public void deleteMatchGaps() { this._has_matchGaps = false; } /** */ public void deleteScaleFactor() { this._has_scaleFactor = false; } /** */ public void deleteShowLabels() { this._has_showLabels = false; } /** */ public void deleteWidth() { this._has_width = false; } /** */ public void deleteXDim() { this._has_xDim = false; } /** */ public void deleteXpos() { this._has_xpos = false; } /** */ public void deleteYDim() { this._has_yDim = false; } /** */ public void deleteYpos() { this._has_ypos = false; } /** */ public void deleteZDim() { this._has_zDim = false; } /** * Method enumerateAxis. * * @return an Enumeration over all jalview.schemabinding.version2.Axis * elements */ public java.util.Enumeration enumerateAxis() { return this._axisList.elements(); } /** * Method enumerateSequencePoint. * * @return an Enumeration over all * jalview.schemabinding.version2.SequencePoint elements */ public java.util.Enumeration enumerateSequencePoint() { return this._sequencePointList.elements(); } /** * Method getAxis. * * @param index * @throws java.lang.IndexOutOfBoundsException * if the index given is outside the bounds of the collection * @return the value of the jalview.schemabinding.version2.Axis at the given * index */ public jalview.schemabinding.version2.Axis getAxis(final int index) throws java.lang.IndexOutOfBoundsException { // check bounds for index if (index < 0 || index >= this._axisList.size()) { throw new IndexOutOfBoundsException("getAxis: Index value '" + index + "' not in range [0.." + (this._axisList.size() - 1) + "]"); } return (jalview.schemabinding.version2.Axis) _axisList.get(index); } /** * Method getAxis.Returns the contents of the collection in an Array. *

* Note: Just in case the collection contents are changing in another thread, * we pass a 0-length Array of the correct type into the API call. This way we * know that the Array returned is of exactly the correct length. * * @return this collection as an Array */ public jalview.schemabinding.version2.Axis[] getAxis() { jalview.schemabinding.version2.Axis[] array = new jalview.schemabinding.version2.Axis[0]; return (jalview.schemabinding.version2.Axis[]) this._axisList .toArray(array); } /** * Method getAxisCount. * * @return the size of this collection */ public int getAxisCount() { return this._axisList.size(); } /** * Returns the value of field 'bgColour'. * * @return the value of field 'BgColour'. */ public int getBgColour() { return this._bgColour; } /** * Returns the value of field 'denominateByShortestLength'. * * @return the value of field 'DenominateByShortestLength'. */ public boolean getDenominateByShortestLength() { return this._denominateByShortestLength; } /** * Returns the value of field 'height'. * * @return the value of field 'Height'. */ public int getHeight() { return this._height; } /** * Returns the value of field 'includeGappedColumns'. * * @return the value of field 'IncludeGappedColumns'. */ public boolean getIncludeGappedColumns() { return this._includeGappedColumns; } /** * Returns the value of field 'includeGaps'. * * @return the value of field 'IncludeGaps'. */ public boolean getIncludeGaps() { return this._includeGaps; } /** * Returns the value of field 'linkToAllViews'. * * @return the value of field 'LinkToAllViews'. */ public boolean getLinkToAllViews() { return this._linkToAllViews; } /** * Returns the value of field 'matchGaps'. * * @return the value of field 'MatchGaps'. */ public boolean getMatchGaps() { return this._matchGaps; } /** * Returns the value of field 'pcaData'. * * @return the value of field 'PcaData'. */ public jalview.schemabinding.version2.PcaData getPcaData() { return this._pcaData; } /** * Returns the value of field 'scaleFactor'. * * @return the value of field 'ScaleFactor'. */ public float getScaleFactor() { return this._scaleFactor; } /** * Returns the value of field 'scoreModelName'. * * @return the value of field 'ScoreModelName'. */ public java.lang.String getScoreModelName() { return this._scoreModelName; } /** * Returns the value of field 'seqPointMax'. * * @return the value of field 'SeqPointMax'. */ public jalview.schemabinding.version2.SeqPointMax getSeqPointMax() { return this._seqPointMax; } /** * Returns the value of field 'seqPointMin'. * * @return the value of field 'SeqPointMin'. */ public jalview.schemabinding.version2.SeqPointMin getSeqPointMin() { return this._seqPointMin; } /** * Method getSequencePoint. * * @param index * @throws java.lang.IndexOutOfBoundsException * if the index given is outside the bounds of the collection * @return the value of the jalview.schemabinding.version2.SequencePoint at * the given index */ public jalview.schemabinding.version2.SequencePoint getSequencePoint( final int index) throws java.lang.IndexOutOfBoundsException { // check bounds for index if (index < 0 || index >= this._sequencePointList.size()) { throw new IndexOutOfBoundsException("getSequencePoint: Index value '" + index + "' not in range [0.." + (this._sequencePointList.size() - 1) + "]"); } return (jalview.schemabinding.version2.SequencePoint) _sequencePointList .get(index); } /** * Method getSequencePoint.Returns the contents of the collection in an Array. *

* Note: Just in case the collection contents are changing in another thread, * we pass a 0-length Array of the correct type into the API call. This way we * know that the Array returned is of exactly the correct length. * * @return this collection as an Array */ public jalview.schemabinding.version2.SequencePoint[] getSequencePoint() { jalview.schemabinding.version2.SequencePoint[] array = new jalview.schemabinding.version2.SequencePoint[0]; return (jalview.schemabinding.version2.SequencePoint[]) this._sequencePointList .toArray(array); } /** * Method getSequencePointCount. * * @return the size of this collection */ public int getSequencePointCount() { return this._sequencePointList.size(); } /** * Returns the value of field 'showLabels'. * * @return the value of field 'ShowLabels'. */ public boolean getShowLabels() { return this._showLabels; } /** * Returns the value of field 'title'. * * @return the value of field 'Title'. */ public java.lang.String getTitle() { return this._title; } /** * Returns the value of field 'width'. * * @return the value of field 'Width'. */ public int getWidth() { return this._width; } /** * Returns the value of field 'xDim'. * * @return the value of field 'XDim'. */ public int getXDim() { return this._xDim; } /** * Returns the value of field 'xpos'. * * @return the value of field 'Xpos'. */ public int getXpos() { return this._xpos; } /** * Returns the value of field 'yDim'. * * @return the value of field 'YDim'. */ public int getYDim() { return this._yDim; } /** * Returns the value of field 'ypos'. * * @return the value of field 'Ypos'. */ public int getYpos() { return this._ypos; } /** * Returns the value of field 'zDim'. * * @return the value of field 'ZDim'. */ public int getZDim() { return this._zDim; } /** * Method hasBgColour. * * @return true if at least one BgColour has been added */ public boolean hasBgColour() { return this._has_bgColour; } /** * Method hasDenominateByShortestLength. * * @return true if at least one DenominateByShortestLength has been added */ public boolean hasDenominateByShortestLength() { return this._has_denominateByShortestLength; } /** * Method hasHeight. * * @return true if at least one Height has been added */ public boolean hasHeight() { return this._has_height; } /** * Method hasIncludeGappedColumns. * * @return true if at least one IncludeGappedColumns has been added */ public boolean hasIncludeGappedColumns() { return this._has_includeGappedColumns; } /** * Method hasIncludeGaps. * * @return true if at least one IncludeGaps has been added */ public boolean hasIncludeGaps() { return this._has_includeGaps; } /** * Method hasLinkToAllViews. * * @return true if at least one LinkToAllViews has been added */ public boolean hasLinkToAllViews() { return this._has_linkToAllViews; } /** * Method hasMatchGaps. * * @return true if at least one MatchGaps has been added */ public boolean hasMatchGaps() { return this._has_matchGaps; } /** * Method hasScaleFactor. * * @return true if at least one ScaleFactor has been added */ public boolean hasScaleFactor() { return this._has_scaleFactor; } /** * Method hasShowLabels. * * @return true if at least one ShowLabels has been added */ public boolean hasShowLabels() { return this._has_showLabels; } /** * Method hasWidth. * * @return true if at least one Width has been added */ public boolean hasWidth() { return this._has_width; } /** * Method hasXDim. * * @return true if at least one XDim has been added */ public boolean hasXDim() { return this._has_xDim; } /** * Method hasXpos. * * @return true if at least one Xpos has been added */ public boolean hasXpos() { return this._has_xpos; } /** * Method hasYDim. * * @return true if at least one YDim has been added */ public boolean hasYDim() { return this._has_yDim; } /** * Method hasYpos. * * @return true if at least one Ypos has been added */ public boolean hasYpos() { return this._has_ypos; } /** * Method hasZDim. * * @return true if at least one ZDim has been added */ public boolean hasZDim() { return this._has_zDim; } /** * Returns the value of field 'denominateByShortestLength'. * * @return the value of field 'DenominateByShortestLength'. */ public boolean isDenominateByShortestLength() { return this._denominateByShortestLength; } /** * Returns the value of field 'includeGappedColumns'. * * @return the value of field 'IncludeGappedColumns'. */ public boolean isIncludeGappedColumns() { return this._includeGappedColumns; } /** * Returns the value of field 'includeGaps'. * * @return the value of field 'IncludeGaps'. */ public boolean isIncludeGaps() { return this._includeGaps; } /** * Returns the value of field 'linkToAllViews'. * * @return the value of field 'LinkToAllViews'. */ public boolean isLinkToAllViews() { return this._linkToAllViews; } /** * Returns the value of field 'matchGaps'. * * @return the value of field 'MatchGaps'. */ public boolean isMatchGaps() { return this._matchGaps; } /** * Returns the value of field 'showLabels'. * * @return the value of field 'ShowLabels'. */ public boolean isShowLabels() { return this._showLabels; } /** * Method isValid. * * @return true if this object is valid according to the schema */ public boolean isValid() { try { validate(); } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; } /** * * * @param out * @throws org.exolab.castor.xml.MarshalException * if object is null or if any SAXException is thrown during * marshaling * @throws org.exolab.castor.xml.ValidationException * if this object is an invalid instance according to the schema */ public void marshal(final java.io.Writer out) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); } /** * * * @param handler * @throws java.io.IOException * if an IOException occurs during marshaling * @throws org.exolab.castor.xml.ValidationException * if this object is an invalid instance according to the schema * @throws org.exolab.castor.xml.MarshalException * if object is null or if any SAXException is thrown during * marshaling */ public void marshal(final org.xml.sax.ContentHandler handler) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, handler); } /** */ public void removeAllAxis() { this._axisList.clear(); } /** */ public void removeAllSequencePoint() { this._sequencePointList.clear(); } /** * Method removeAxis. * * @param vAxis * @return true if the object was removed from the collection. */ public boolean removeAxis(final jalview.schemabinding.version2.Axis vAxis) { boolean removed = _axisList.remove(vAxis); return removed; } /** * Method removeAxisAt. * * @param index * @return the element removed from the collection */ public jalview.schemabinding.version2.Axis removeAxisAt(final int index) { java.lang.Object obj = this._axisList.remove(index); return (jalview.schemabinding.version2.Axis) obj; } /** * Method removeSequencePoint. * * @param vSequencePoint * @return true if the object was removed from the collection. */ public boolean removeSequencePoint( final jalview.schemabinding.version2.SequencePoint vSequencePoint) { boolean removed = _sequencePointList.remove(vSequencePoint); return removed; } /** * Method removeSequencePointAt. * * @param index * @return the element removed from the collection */ public jalview.schemabinding.version2.SequencePoint removeSequencePointAt( final int index) { java.lang.Object obj = this._sequencePointList.remove(index); return (jalview.schemabinding.version2.SequencePoint) obj; } /** * * * @param index * @param vAxis * @throws java.lang.IndexOutOfBoundsException * if the index given is outside the bounds of the collection */ public void setAxis(final int index, final jalview.schemabinding.version2.Axis vAxis) throws java.lang.IndexOutOfBoundsException { // check bounds for index if (index < 0 || index >= this._axisList.size()) { throw new IndexOutOfBoundsException("setAxis: Index value '" + index + "' not in range [0.." + (this._axisList.size() - 1) + "]"); } this._axisList.set(index, vAxis); } /** * * * @param vAxisArray */ public void setAxis( final jalview.schemabinding.version2.Axis[] vAxisArray) { // -- copy array _axisList.clear(); for (int i = 0; i < vAxisArray.length; i++) { this._axisList.add(vAxisArray[i]); } } /** * Sets the value of field 'bgColour'. * * @param bgColour * the value of field 'bgColour'. */ public void setBgColour(final int bgColour) { this._bgColour = bgColour; this._has_bgColour = true; } /** * Sets the value of field 'denominateByShortestLength'. * * @param denominateByShortestLength * the value of field 'denominateByShortestLength'. */ public void setDenominateByShortestLength( final boolean denominateByShortestLength) { this._denominateByShortestLength = denominateByShortestLength; this._has_denominateByShortestLength = true; } /** * Sets the value of field 'height'. * * @param height * the value of field 'height'. */ public void setHeight(final int height) { this._height = height; this._has_height = true; } /** * Sets the value of field 'includeGappedColumns'. * * @param includeGappedColumns * the value of field 'includeGappedColumns'. */ public void setIncludeGappedColumns(final boolean includeGappedColumns) { this._includeGappedColumns = includeGappedColumns; this._has_includeGappedColumns = true; } /** * Sets the value of field 'includeGaps'. * * @param includeGaps * the value of field 'includeGaps'. */ public void setIncludeGaps(final boolean includeGaps) { this._includeGaps = includeGaps; this._has_includeGaps = true; } /** * Sets the value of field 'linkToAllViews'. * * @param linkToAllViews * the value of field 'linkToAllViews'. */ public void setLinkToAllViews(final boolean linkToAllViews) { this._linkToAllViews = linkToAllViews; this._has_linkToAllViews = true; } /** * Sets the value of field 'matchGaps'. * * @param matchGaps * the value of field 'matchGaps'. */ public void setMatchGaps(final boolean matchGaps) { this._matchGaps = matchGaps; this._has_matchGaps = true; } /** * Sets the value of field 'pcaData'. * * @param pcaData * the value of field 'pcaData'. */ public void setPcaData( final jalview.schemabinding.version2.PcaData pcaData) { this._pcaData = pcaData; } /** * Sets the value of field 'scaleFactor'. * * @param scaleFactor * the value of field 'scaleFactor'. */ public void setScaleFactor(final float scaleFactor) { this._scaleFactor = scaleFactor; this._has_scaleFactor = true; } /** * Sets the value of field 'scoreModelName'. * * @param scoreModelName * the value of field 'scoreModelName'. */ public void setScoreModelName(final java.lang.String scoreModelName) { this._scoreModelName = scoreModelName; } /** * Sets the value of field 'seqPointMax'. * * @param seqPointMax * the value of field 'seqPointMax'. */ public void setSeqPointMax( final jalview.schemabinding.version2.SeqPointMax seqPointMax) { this._seqPointMax = seqPointMax; } /** * Sets the value of field 'seqPointMin'. * * @param seqPointMin * the value of field 'seqPointMin'. */ public void setSeqPointMin( final jalview.schemabinding.version2.SeqPointMin seqPointMin) { this._seqPointMin = seqPointMin; } /** * * * @param index * @param vSequencePoint * @throws java.lang.IndexOutOfBoundsException * if the index given is outside the bounds of the collection */ public void setSequencePoint(final int index, final jalview.schemabinding.version2.SequencePoint vSequencePoint) throws java.lang.IndexOutOfBoundsException { // check bounds for index if (index < 0 || index >= this._sequencePointList.size()) { throw new IndexOutOfBoundsException("setSequencePoint: Index value '" + index + "' not in range [0.." + (this._sequencePointList.size() - 1) + "]"); } this._sequencePointList.set(index, vSequencePoint); } /** * * * @param vSequencePointArray */ public void setSequencePoint( final jalview.schemabinding.version2.SequencePoint[] vSequencePointArray) { // -- copy array _sequencePointList.clear(); for (int i = 0; i < vSequencePointArray.length; i++) { this._sequencePointList.add(vSequencePointArray[i]); } } /** * Sets the value of field 'showLabels'. * * @param showLabels * the value of field 'showLabels'. */ public void setShowLabels(final boolean showLabels) { this._showLabels = showLabels; this._has_showLabels = true; } /** * Sets the value of field 'title'. * * @param title * the value of field 'title'. */ public void setTitle(final java.lang.String title) { this._title = title; } /** * Sets the value of field 'width'. * * @param width * the value of field 'width'. */ public void setWidth(final int width) { this._width = width; this._has_width = true; } /** * Sets the value of field 'xDim'. * * @param xDim * the value of field 'xDim'. */ public void setXDim(final int xDim) { this._xDim = xDim; this._has_xDim = true; } /** * Sets the value of field 'xpos'. * * @param xpos * the value of field 'xpos'. */ public void setXpos(final int xpos) { this._xpos = xpos; this._has_xpos = true; } /** * Sets the value of field 'yDim'. * * @param yDim * the value of field 'yDim'. */ public void setYDim(final int yDim) { this._yDim = yDim; this._has_yDim = true; } /** * Sets the value of field 'ypos'. * * @param ypos * the value of field 'ypos'. */ public void setYpos(final int ypos) { this._ypos = ypos; this._has_ypos = true; } /** * Sets the value of field 'zDim'. * * @param zDim * the value of field 'zDim'. */ public void setZDim(final int zDim) { this._zDim = zDim; this._has_zDim = true; } /** * Method unmarshal. * * @param reader * @throws org.exolab.castor.xml.MarshalException * if object is null or if any SAXException is thrown during * marshaling * @throws org.exolab.castor.xml.ValidationException * if this object is an invalid instance according to the schema * @return the unmarshaled jalview.schemabinding.version2.PcaViewer */ public static jalview.schemabinding.version2.PcaViewer unmarshal( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.PcaViewer) Unmarshaller .unmarshal(jalview.schemabinding.version2.PcaViewer.class, reader); } /** * * * @throws org.exolab.castor.xml.ValidationException * if this object is an invalid instance according to the schema */ public void validate() throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); } }