X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Forg%2Fvamsas%2Fobjects%2Fcore%2FPos.java;fp=src%2Forg%2Fvamsas%2Fobjects%2Fcore%2FPos.java;h=a59146d2c0dcb1bf1ad1989e2a451ab4ef461b65;hb=127eed38a79f4e1b56457a3cd5c5de12c9c7d4a2;hp=0000000000000000000000000000000000000000;hpb=b0e8ba054e5c3d3cd256f78d3a7310e6e263630e;p=vamsas.git diff --git a/src/org/vamsas/objects/core/Pos.java b/src/org/vamsas/objects/core/Pos.java new file mode 100644 index 0000000..a59146d --- /dev/null +++ b/src/org/vamsas/objects/core/Pos.java @@ -0,0 +1,205 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * a position within the associated object's + * coordinate system + * + * + * @version $Revision$ $Date$ + */ +public class Pos extends org.vamsas.client.Vobject +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _i + */ + private int _i; + + /** + * keeps track of state for field: _i + */ + private boolean _has_i; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Pos() + { + super(); + } //-- org.vamsas.objects.core.Pos() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteI + * + */ + public void deleteI() + { + this._has_i= false; + } //-- void deleteI() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Pos) { + + Pos temp = (Pos)obj; + if (this._i != temp._i) + return false; + if (this._has_i != temp._has_i) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'i'. + * + * @return int + * @return the value of field 'i'. + */ + public int getI() + { + return this._i; + } //-- int getI() + + /** + * Method hasI + * + * + * + * @return boolean + */ + public boolean hasI() + { + return this._has_i; + } //-- boolean hasI() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'i'. + * + * @param i the value of field 'i'. + */ + public void setI(int i) + { + this._i = i; + this._has_i = true; + } //-- void setI(int) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Pos + */ + public static org.vamsas.objects.core.Pos unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Pos) Unmarshaller.unmarshal(org.vamsas.objects.core.Pos.class, reader); + } //-- org.vamsas.objects.core.Pos unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +}