/* * 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; /** * Class AppData. * * @version $Revision$ $Date$ */ public class AppData extends org.vamsas.client.object implements java.io.Serializable { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * Internal choice value storage */ private java.lang.Object _choiceValue; /** * Field _data */ private byte[] _data; /** * Field _dataReference */ private java.lang.String _dataReference; //----------------/ //- Constructors -/ //----------------/ public AppData() { super(); } //-- org.vamsas.objects.core.AppData() //-----------/ //- Methods -/ //-----------/ /** * 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 AppData) { AppData temp = (AppData)obj; if (this._choiceValue != null) { if (temp._choiceValue == null) return false; else if (!(this._choiceValue.equals(temp._choiceValue))) return false; } else if (temp._choiceValue != null) return false; if (this._data != null) { if (temp._data == null) return false; else if (!(this._data.equals(temp._data))) return false; } else if (temp._data != null) return false; if (this._dataReference != null) { if (temp._dataReference == null) return false; else if (!(this._dataReference.equals(temp._dataReference))) return false; } else if (temp._dataReference != null) return false; return true; } return false; } //-- boolean equals(java.lang.Object) /** * Returns the value of field 'choiceValue'. The field * 'choiceValue' has the following description: Internal choice * value storage * * @return Object * @return the value of field 'choiceValue'. */ public java.lang.Object getChoiceValue() { return this._choiceValue; } //-- java.lang.Object getChoiceValue() /** * Returns the value of field 'data'. * * @return byte * @return the value of field 'data'. */ public byte[] getData() { return this._data; } //-- byte[] getData() /** * Returns the value of field 'dataReference'. * * @return String * @return the value of field 'dataReference'. */ public java.lang.String getDataReference() { return this._dataReference; } //-- java.lang.String getDataReference() /** * 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 'data'. * * @param data the value of field 'data'. */ public void setData(byte[] data) { this._data = data; this._choiceValue = data; } //-- void setData(byte) /** * Sets the value of field 'dataReference'. * * @param dataReference the value of field 'dataReference'. */ public void setDataReference(java.lang.String dataReference) { this._dataReference = dataReference; this._choiceValue = dataReference; } //-- void setDataReference(java.lang.String) /** * Method unmarshal * * * * @param reader * @return AppData */ public static org.vamsas.objects.core.AppData unmarshal(java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.vamsas.objects.core.AppData) Unmarshaller.unmarshal(org.vamsas.objects.core.AppData.class, reader); } //-- org.vamsas.objects.core.AppData 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() }