+++ /dev/null
-/*
- * This class was automatically generated with
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, 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 java.util.Enumeration;
-import java.util.Vector;
-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 Application.
- *
- * @version $Revision$ $Date$
- */
-public class Application extends org.vamsas.client.object
-implements java.io.Serializable
-{
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _version
- */
- private java.lang.String _version;
-
- /**
- * Field _name
- */
- private java.lang.String _name;
-
- /**
- * Field _urn
- */
- private java.lang.String _urn;
-
- /**
- * Field _data
- */
- private java.lang.String _data;
-
- /**
- * Field _userList
- */
- private java.util.Vector _userList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Application()
- {
- super();
- _userList = new Vector();
- } //-- org.vamsas.objects.core.Application()
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Method addUser
- *
- *
- *
- * @param vUser
- */
- public void addUser(org.vamsas.objects.core.User vUser)
- throws java.lang.IndexOutOfBoundsException
- {
- _userList.addElement(vUser);
- } //-- void addUser(org.vamsas.objects.core.User)
-
- /**
- * Method addUser
- *
- *
- *
- * @param index
- * @param vUser
- */
- public void addUser(int index, org.vamsas.objects.core.User vUser)
- throws java.lang.IndexOutOfBoundsException
- {
- _userList.insertElementAt(vUser, index);
- } //-- void addUser(int, org.vamsas.objects.core.User)
-
- /**
- * Method enumerateUser
- *
- *
- *
- * @return Enumeration
- */
- public java.util.Enumeration enumerateUser()
- {
- return _userList.elements();
- } //-- java.util.Enumeration enumerateUser()
-
- /**
- * 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 Application) {
-
- Application temp = (Application)obj;
- if (this._version != null) {
- if (temp._version == null) return false;
- else if (!(this._version.equals(temp._version)))
- return false;
- }
- else if (temp._version != null)
- return false;
- if (this._name != null) {
- if (temp._name == null) return false;
- else if (!(this._name.equals(temp._name)))
- return false;
- }
- else if (temp._name != null)
- return false;
- if (this._urn != null) {
- if (temp._urn == null) return false;
- else if (!(this._urn.equals(temp._urn)))
- return false;
- }
- else if (temp._urn != 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._userList != null) {
- if (temp._userList == null) return false;
- else if (!(this._userList.equals(temp._userList)))
- return false;
- }
- else if (temp._userList != null)
- return false;
- return true;
- }
- return false;
- } //-- boolean equals(java.lang.Object)
-
- /**
- * Returns the value of field 'data'.
- *
- * @return String
- * @return the value of field 'data'.
- */
- public java.lang.String getData()
- {
- return this._data;
- } //-- java.lang.String getData()
-
- /**
- * Returns the value of field 'name'.
- *
- * @return String
- * @return the value of field 'name'.
- */
- public java.lang.String getName()
- {
- return this._name;
- } //-- java.lang.String getName()
-
- /**
- * Returns the value of field 'urn'.
- *
- * @return String
- * @return the value of field 'urn'.
- */
- public java.lang.String getUrn()
- {
- return this._urn;
- } //-- java.lang.String getUrn()
-
- /**
- * Method getUser
- *
- *
- *
- * @param index
- * @return User
- */
- public org.vamsas.objects.core.User getUser(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _userList.size())) {
- throw new IndexOutOfBoundsException("getUser: Index value '"+index+"' not in range [0.."+_userList.size()+ "]");
- }
-
- return (org.vamsas.objects.core.User) _userList.elementAt(index);
- } //-- org.vamsas.objects.core.User getUser(int)
-
- /**
- * Method getUser
- *
- *
- *
- * @return User
- */
- public org.vamsas.objects.core.User[] getUser()
- {
- int size = _userList.size();
- org.vamsas.objects.core.User[] mArray = new org.vamsas.objects.core.User[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (org.vamsas.objects.core.User) _userList.elementAt(index);
- }
- return mArray;
- } //-- org.vamsas.objects.core.User[] getUser()
-
- /**
- * Method getUserCount
- *
- *
- *
- * @return int
- */
- public int getUserCount()
- {
- return _userList.size();
- } //-- int getUserCount()
-
- /**
- * Returns the value of field 'version'.
- *
- * @return String
- * @return the value of field 'version'.
- */
- public java.lang.String getVersion()
- {
- return this._version;
- } //-- java.lang.String getVersion()
-
- /**
- * 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)
-
- /**
- * Method removeAllUser
- *
- */
- public void removeAllUser()
- {
- _userList.removeAllElements();
- } //-- void removeAllUser()
-
- /**
- * Method removeUser
- *
- *
- *
- * @param index
- * @return User
- */
- public org.vamsas.objects.core.User removeUser(int index)
- {
- java.lang.Object obj = _userList.elementAt(index);
- _userList.removeElementAt(index);
- return (org.vamsas.objects.core.User) obj;
- } //-- org.vamsas.objects.core.User removeUser(int)
-
- /**
- * Sets the value of field 'data'.
- *
- * @param data the value of field 'data'.
- */
- public void setData(java.lang.String data)
- {
- this._data = data;
- } //-- void setData(java.lang.String)
-
- /**
- * Sets the value of field 'name'.
- *
- * @param name the value of field 'name'.
- */
- public void setName(java.lang.String name)
- {
- this._name = name;
- } //-- void setName(java.lang.String)
-
- /**
- * Sets the value of field 'urn'.
- *
- * @param urn the value of field 'urn'.
- */
- public void setUrn(java.lang.String urn)
- {
- this._urn = urn;
- } //-- void setUrn(java.lang.String)
-
- /**
- * Method setUser
- *
- *
- *
- * @param index
- * @param vUser
- */
- public void setUser(int index, org.vamsas.objects.core.User vUser)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _userList.size())) {
- throw new IndexOutOfBoundsException("setUser: Index value '"+index+"' not in range [0.."+_userList.size()+ "]");
- }
- _userList.setElementAt(vUser, index);
- } //-- void setUser(int, org.vamsas.objects.core.User)
-
- /**
- * Method setUser
- *
- *
- *
- * @param userArray
- */
- public void setUser(org.vamsas.objects.core.User[] userArray)
- {
- //-- copy array
- _userList.removeAllElements();
- for (int i = 0; i < userArray.length; i++) {
- _userList.addElement(userArray[i]);
- }
- } //-- void setUser(org.vamsas.objects.core.User)
-
- /**
- * Sets the value of field 'version'.
- *
- * @param version the value of field 'version'.
- */
- public void setVersion(java.lang.String version)
- {
- this._version = version;
- } //-- void setVersion(java.lang.String)
-
- /**
- * Method unmarshal
- *
- *
- *
- * @param reader
- * @return Application
- */
- public static org.vamsas.objects.core.Application unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
- return (org.vamsas.objects.core.Application) Unmarshaller.unmarshal(org.vamsas.objects.core.Application.class, reader);
- } //-- org.vamsas.objects.core.Application 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()
-
-}
+++ /dev/null
-/*
- * This class was automatically generated with
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
- * Schema.
- * $Id$
- */
-
-package org.vamsas.objects.core;
-
- //---------------------------------/
- //- Imported classes and packages -/
-//---------------------------------/
-
-import org.exolab.castor.mapping.AccessMode;
-import org.exolab.castor.xml.TypeValidator;
-import org.exolab.castor.xml.XMLFieldDescriptor;
-import org.exolab.castor.xml.validators.*;
-
-/**
- * Class ApplicationDescriptor.
- *
- * @version $Revision$ $Date$
- */
-public class ApplicationDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field nsPrefix
- */
- private java.lang.String nsPrefix;
-
- /**
- * Field nsURI
- */
- private java.lang.String nsURI;
-
- /**
- * Field xmlName
- */
- private java.lang.String xmlName;
-
- /**
- * Field identity
- */
- private org.exolab.castor.xml.XMLFieldDescriptor identity;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public ApplicationDescriptor()
- {
- super();
- nsURI = "http://www.vamsas.org";
- xmlName = "Application";
-
- //-- set grouping compositor
- setCompositorAsSequence();
- org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
- org.exolab.castor.mapping.FieldHandler handler = null;
- org.exolab.castor.xml.FieldValidator fieldValidator = null;
- //-- initialize attribute descriptors
-
- //-- _version
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_version", "version", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Application target = (Application) object;
- return target.getVersion();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Application target = (Application) object;
- target.setVersion( (java.lang.String) value);
- }
- catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance( java.lang.Object parent ) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setRequired(true);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _version
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- StringValidator typeValidator = new StringValidator();
- typeValidator.setWhiteSpace("preserve");
- fieldValidator.setValidator(typeValidator);
- }
- desc.setValidator(fieldValidator);
- //-- _name
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Application target = (Application) object;
- return target.getName();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Application target = (Application) object;
- target.setName( (java.lang.String) value);
- }
- catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance( java.lang.Object parent ) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setRequired(true);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _name
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- StringValidator typeValidator = new StringValidator();
- typeValidator.setWhiteSpace("preserve");
- fieldValidator.setValidator(typeValidator);
- }
- desc.setValidator(fieldValidator);
- //-- _urn
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_urn", "urn", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Application target = (Application) object;
- return target.getUrn();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Application target = (Application) object;
- target.setUrn( (java.lang.String) value);
- }
- catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance( java.lang.Object parent ) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setRequired(true);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _urn
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- StringValidator typeValidator = new StringValidator();
- typeValidator.setWhiteSpace("preserve");
- fieldValidator.setValidator(typeValidator);
- }
- desc.setValidator(fieldValidator);
- //-- _data
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_data", "data", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Application target = (Application) object;
- return target.getData();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Application target = (Application) object;
- target.setData( (java.lang.String) value);
- }
- catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance( java.lang.Object parent ) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setRequired(true);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _data
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- StringValidator typeValidator = new StringValidator();
- typeValidator.setWhiteSpace("preserve");
- fieldValidator.setValidator(typeValidator);
- }
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- //-- _userList
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.User.class, "_userList", "User", org.exolab.castor.xml.NodeType.Element);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Application target = (Application) object;
- return target.getUser();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Application target = (Application) object;
- target.addUser( (org.vamsas.objects.core.User) value);
- }
- catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance( java.lang.Object parent ) {
- return new org.vamsas.objects.core.User();
- }
- };
- desc.setHandler(handler);
- desc.setNameSpaceURI("http://www.vamsas.org");
- desc.setRequired(true);
- desc.setMultivalued(true);
- addFieldDescriptor(desc);
-
- //-- validation code for: _userList
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- }
- desc.setValidator(fieldValidator);
- } //-- org.vamsas.objects.core.ApplicationDescriptor()
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Method getAccessMode
- *
- *
- *
- * @return AccessMode
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode()
- {
- return null;
- } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
-
- /**
- * Method getExtends
- *
- *
- *
- * @return ClassDescriptor
- */
- public org.exolab.castor.mapping.ClassDescriptor getExtends()
- {
- return null;
- } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
-
- /**
- * Method getIdentity
- *
- *
- *
- * @return FieldDescriptor
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity()
- {
- return identity;
- } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
-
- /**
- * Method getJavaClass
- *
- *
- *
- * @return Class
- */
- public java.lang.Class getJavaClass()
- {
- return org.vamsas.objects.core.Application.class;
- } //-- java.lang.Class getJavaClass()
-
- /**
- * Method getNameSpacePrefix
- *
- *
- *
- * @return String
- */
- public java.lang.String getNameSpacePrefix()
- {
- return nsPrefix;
- } //-- java.lang.String getNameSpacePrefix()
-
- /**
- * Method getNameSpaceURI
- *
- *
- *
- * @return String
- */
- public java.lang.String getNameSpaceURI()
- {
- return nsURI;
- } //-- java.lang.String getNameSpaceURI()
-
- /**
- * Method getValidator
- *
- *
- *
- * @return TypeValidator
- */
- public org.exolab.castor.xml.TypeValidator getValidator()
- {
- return this;
- } //-- org.exolab.castor.xml.TypeValidator getValidator()
-
- /**
- * Method getXMLName
- *
- *
- *
- * @return String
- */
- public java.lang.String getXMLName()
- {
- return xmlName;
- } //-- java.lang.String getXMLName()
-
-}