View Javadoc

1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
4    * Schema.
5    * $Id: STREAMActuateType.java,v 1.14 2007/01/04 16:26:15 clq2 Exp $
6    */
7   
8   package org.astrogrid.registry.beans.resource.votable.types;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import java.io.Serializable;
15  import java.util.Enumeration;
16  import java.util.Hashtable;
17  import org.exolab.castor.xml.Marshaller;
18  import org.exolab.castor.xml.Unmarshaller;
19  
20  /***
21   * Class STREAMActuateType.
22   * 
23   * @version $Revision: 1.14 $ $Date: 2007/01/04 16:26:15 $
24   */
25  public class STREAMActuateType implements java.io.Serializable {
26  
27  
28        //--------------------------/
29       //- Class/Member Variables -/
30      //--------------------------/
31  
32      /***
33       * The onLoad type
34       */
35      public static final int ONLOAD_TYPE = 0;
36  
37      /***
38       * The instance of the onLoad type
39       */
40      public static final STREAMActuateType ONLOAD = new STREAMActuateType(ONLOAD_TYPE, "onLoad");
41  
42      /***
43       * The onRequest type
44       */
45      public static final int ONREQUEST_TYPE = 1;
46  
47      /***
48       * The instance of the onRequest type
49       */
50      public static final STREAMActuateType ONREQUEST = new STREAMActuateType(ONREQUEST_TYPE, "onRequest");
51  
52      /***
53       * The other type
54       */
55      public static final int OTHER_TYPE = 2;
56  
57      /***
58       * The instance of the other type
59       */
60      public static final STREAMActuateType OTHER = new STREAMActuateType(OTHER_TYPE, "other");
61  
62      /***
63       * The none type
64       */
65      public static final int NONE_TYPE = 3;
66  
67      /***
68       * The instance of the none type
69       */
70      public static final STREAMActuateType NONE = new STREAMActuateType(NONE_TYPE, "none");
71  
72      /***
73       * Field _memberTable
74       */
75      private static java.util.Hashtable _memberTable = init();
76  
77      /***
78       * Field type
79       */
80      private int type = -1;
81  
82      /***
83       * Field stringValue
84       */
85      private java.lang.String stringValue = null;
86  
87  
88        //----------------/
89       //- Constructors -/
90      //----------------/
91  
92      private STREAMActuateType(int type, java.lang.String value) {
93          super();
94          this.type = type;
95          this.stringValue = value;
96      } //-- org.astrogrid.registry.beans.resource.votable.types.STREAMActuateType(int, java.lang.String)
97  
98  
99        //-----------/
100      //- Methods -/
101     //-----------/
102 
103     /***
104      * Method enumerateReturns an enumeration of all possible
105      * instances of STREAMActuateType
106      */
107     public static java.util.Enumeration enumerate()
108     {
109         return _memberTable.elements();
110     } //-- java.util.Enumeration enumerate() 
111 
112     /***
113      * Method getTypeReturns the type of this STREAMActuateType
114      */
115     public int getType()
116     {
117         return this.type;
118     } //-- int getType() 
119 
120     /***
121      * Method init
122      */
123     private static java.util.Hashtable init()
124     {
125         Hashtable members = new Hashtable();
126         members.put("onLoad", ONLOAD);
127         members.put("onRequest", ONREQUEST);
128         members.put("other", OTHER);
129         members.put("none", NONE);
130         return members;
131     } //-- java.util.Hashtable init() 
132 
133     /***
134      * Method toStringReturns the String representation of this
135      * STREAMActuateType
136      */
137     public java.lang.String toString()
138     {
139         return this.stringValue;
140     } //-- java.lang.String toString() 
141 
142     /***
143      * Method valueOfReturns a new STREAMActuateType based on the
144      * given String value.
145      * 
146      * @param string
147      */
148     public static org.astrogrid.registry.beans.resource.votable.types.STREAMActuateType valueOf(java.lang.String string)
149     {
150         java.lang.Object obj = null;
151         if (string != null) obj = _memberTable.get(string);
152         if (obj == null) {
153             String err = "'" + string + "' is not a valid STREAMActuateType";
154             throw new IllegalArgumentException(err);
155         }
156         return (STREAMActuateType) obj;
157     } //-- org.astrogrid.registry.beans.resource.votable.types.STREAMActuateType valueOf(java.lang.String) 
158 
159 }