/* * 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; /** * endpoints of X, Y and Z axes in that order * * * @version $Revision$ $Date$ */ public class Axis implements java.io.Serializable { // --------------------------/ // - Class/Member Variables -/ // --------------------------/ /** * Field _xPos. */ private float _xPos; /** * keeps track of state for field: _xPos */ private boolean _has_xPos; /** * Field _yPos. */ private float _yPos; /** * keeps track of state for field: _yPos */ private boolean _has_yPos; /** * Field _zPos. */ private float _zPos; /** * keeps track of state for field: _zPos */ private boolean _has_zPos; // ----------------/ // - Constructors -/ // ----------------/ public Axis() { super(); } // -----------/ // - Methods -/ // -----------/ /** */ public void deleteXPos() { this._has_xPos = false; } /** */ public void deleteYPos() { this._has_yPos = false; } /** */ public void deleteZPos() { this._has_zPos = false; } /** * Returns the value of field 'xPos'. * * @return the value of field 'XPos'. */ public float getXPos() { return this._xPos; } /** * Returns the value of field 'yPos'. * * @return the value of field 'YPos'. */ public float getYPos() { return this._yPos; } /** * Returns the value of field 'zPos'. * * @return the value of field 'ZPos'. */ public float getZPos() { return this._zPos; } /** * Method hasXPos. * * @return true if at least one XPos has been added */ public boolean hasXPos() { return this._has_xPos; } /** * Method hasYPos. * * @return true if at least one YPos has been added */ public boolean hasYPos() { return this._has_yPos; } /** * Method hasZPos. * * @return true if at least one ZPos has been added */ public boolean hasZPos() { return this._has_zPos; } /** * 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); } /** * Sets the value of field 'xPos'. * * @param xPos * the value of field 'xPos'. */ public void setXPos(final float xPos) { this._xPos = xPos; this._has_xPos = true; } /** * Sets the value of field 'yPos'. * * @param yPos * the value of field 'yPos'. */ public void setYPos(final float yPos) { this._yPos = yPos; this._has_yPos = true; } /** * Sets the value of field 'zPos'. * * @param zPos * the value of field 'zPos'. */ public void setZPos(final float zPos) { this._zPos = zPos; this._has_zPos = 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.Axis */ public static jalview.schemabinding.version2.Axis unmarshal( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.Axis) Unmarshaller .unmarshal(jalview.schemabinding.version2.Axis.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); } }