/* * This class was automatically generated with * Castor 1.0.5, using an XML * Schema. * $Id$ */ package org.oagis.codelists.types; //---------------------------------/ //- Imported classes and packages -/ //---------------------------------/ import java.util.Hashtable; /** * The action values that OAGi defines for OAGIS. * * @version $Revision$ $Date$ */ public class ActionCodeEnumerationType implements java.io.Serializable { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * The Add type */ public static final int ADD_TYPE = 0; /** * The instance of the Add type */ public static final ActionCodeEnumerationType ADD = new ActionCodeEnumerationType(ADD_TYPE, "Add"); /** * The Change type */ public static final int CHANGE_TYPE = 1; /** * The instance of the Change type */ public static final ActionCodeEnumerationType CHANGE = new ActionCodeEnumerationType(CHANGE_TYPE, "Change"); /** * The Delete type */ public static final int DELETE_TYPE = 2; /** * The instance of the Delete type */ public static final ActionCodeEnumerationType DELETE = new ActionCodeEnumerationType(DELETE_TYPE, "Delete"); /** * The Replace type */ public static final int REPLACE_TYPE = 3; /** * The instance of the Replace type */ public static final ActionCodeEnumerationType REPLACE = new ActionCodeEnumerationType(REPLACE_TYPE, "Replace"); /** * The Accepted type */ public static final int ACCEPTED_TYPE = 4; /** * The instance of the Accepted type */ public static final ActionCodeEnumerationType ACCEPTED = new ActionCodeEnumerationType(ACCEPTED_TYPE, "Accepted"); /** * The Modified type */ public static final int MODIFIED_TYPE = 5; /** * The instance of the Modified type */ public static final ActionCodeEnumerationType MODIFIED = new ActionCodeEnumerationType(MODIFIED_TYPE, "Modified"); /** * The Rejected type */ public static final int REJECTED_TYPE = 6; /** * The instance of the Rejected type */ public static final ActionCodeEnumerationType REJECTED = new ActionCodeEnumerationType(REJECTED_TYPE, "Rejected"); /** * Field _memberTable */ private static java.util.Hashtable _memberTable = init(); /** * Field type */ private int type = -1; /** * Field stringValue */ private java.lang.String stringValue = null; //----------------/ //- Constructors -/ //----------------/ private ActionCodeEnumerationType(int type, java.lang.String value) { super(); this.type = type; this.stringValue = value; } //-- org.oagis.codelists.types.ActionCodeEnumerationType(int, java.lang.String) //-----------/ //- Methods -/ //-----------/ /** * Method enumerate * * Returns an enumeration of all possible instances of * ActionCodeEnumerationType * * @return an Enumeration over all possible instances of * ActionCodeEnumerationType */ public static java.util.Enumeration enumerate() { return _memberTable.elements(); } //-- java.util.Enumeration enumerate() /** * Method getType * * Returns the type of this ActionCodeEnumerationType * * @return the type of this ActionCodeEnumerationType */ public int getType() { return this.type; } //-- int getType() /** * Method init * * * * @return the initialized Hashtable for the member table */ private static java.util.Hashtable init() { Hashtable members = new Hashtable(); members.put("Add", ADD); members.put("Change", CHANGE); members.put("Delete", DELETE); members.put("Replace", REPLACE); members.put("Accepted", ACCEPTED); members.put("Modified", MODIFIED); members.put("Rejected", REJECTED); return members; } //-- java.util.Hashtable init() /** * Method readResolve * * will be called during deserialization to replace the * deserialized object with the correct constant instance. * * @return this deserialized object */ private java.lang.Object readResolve() { return valueOf(this.stringValue); } //-- java.lang.Object readResolve() /** * Method toString * * Returns the String representation of this * ActionCodeEnumerationType * * @return the String representation of this * ActionCodeEnumerationType */ public java.lang.String toString() { return this.stringValue; } //-- java.lang.String toString() /** * Method valueOf * * Returns a new ActionCodeEnumerationType based on the given * String value. * * @param string * @return the ActionCodeEnumerationType value of parameter * 'string' */ public static org.oagis.codelists.types.ActionCodeEnumerationType valueOf(java.lang.String string) { java.lang.Object obj = null; if (string != null) obj = _memberTable.get(string); if (obj == null) { String err = "'" + string + "' is not a valid ActionCodeEnumerationType"; throw new IllegalArgumentException(err); } return (ActionCodeEnumerationType) obj; } //-- org.oagis.codelists.types.ActionCodeEnumerationType valueOf(java.lang.String) }