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: AccessURLTypeUseType.java,v 1.14 2007/01/04 16:26:06 clq2 Exp $
6    */
7   
8   package org.astrogrid.registry.beans.resource.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 AccessURLTypeUseType.
22   * 
23   * @version $Revision: 1.14 $ $Date: 2007/01/04 16:26:06 $
24   */
25  public class AccessURLTypeUseType implements java.io.Serializable {
26  
27  
28        //--------------------------/
29       //- Class/Member Variables -/
30      //--------------------------/
31  
32      /***
33       * The full type
34       */
35      public static final int FULL_TYPE = 0;
36  
37      /***
38       * The instance of the full type
39       */
40      public static final AccessURLTypeUseType FULL = new AccessURLTypeUseType(FULL_TYPE, "full");
41  
42      /***
43       * The base type
44       */
45      public static final int BASE_TYPE = 1;
46  
47      /***
48       * The instance of the base type
49       */
50      public static final AccessURLTypeUseType BASE = new AccessURLTypeUseType(BASE_TYPE, "base");
51  
52      /***
53       * The dir type
54       */
55      public static final int DIR_TYPE = 2;
56  
57      /***
58       * The instance of the dir type
59       */
60      public static final AccessURLTypeUseType DIR = new AccessURLTypeUseType(DIR_TYPE, "dir");
61  
62      /***
63       * Field _memberTable
64       */
65      private static java.util.Hashtable _memberTable = init();
66  
67      /***
68       * Field type
69       */
70      private int type = -1;
71  
72      /***
73       * Field stringValue
74       */
75      private java.lang.String stringValue = null;
76  
77  
78        //----------------/
79       //- Constructors -/
80      //----------------/
81  
82      private AccessURLTypeUseType(int type, java.lang.String value) {
83          super();
84          this.type = type;
85          this.stringValue = value;
86      } //-- org.astrogrid.registry.beans.resource.types.AccessURLTypeUseType(int, java.lang.String)
87  
88  
89        //-----------/
90       //- Methods -/
91      //-----------/
92  
93      /***
94       * Method enumerateReturns an enumeration of all possible
95       * instances of AccessURLTypeUseType
96       */
97      public static java.util.Enumeration enumerate()
98      {
99          return _memberTable.elements();
100     } //-- java.util.Enumeration enumerate() 
101 
102     /***
103      * Method getTypeReturns the type of this AccessURLTypeUseType
104      */
105     public int getType()
106     {
107         return this.type;
108     } //-- int getType() 
109 
110     /***
111      * Method init
112      */
113     private static java.util.Hashtable init()
114     {
115         Hashtable members = new Hashtable();
116         members.put("full", FULL);
117         members.put("base", BASE);
118         members.put("dir", DIR);
119         return members;
120     } //-- java.util.Hashtable init() 
121 
122     /***
123      * Method toStringReturns the String representation of this
124      * AccessURLTypeUseType
125      */
126     public java.lang.String toString()
127     {
128         return this.stringValue;
129     } //-- java.lang.String toString() 
130 
131     /***
132      * Method valueOfReturns a new AccessURLTypeUseType based on
133      * the given String value.
134      * 
135      * @param string
136      */
137     public static org.astrogrid.registry.beans.resource.types.AccessURLTypeUseType valueOf(java.lang.String string)
138     {
139         java.lang.Object obj = null;
140         if (string != null) obj = _memberTable.get(string);
141         if (obj == null) {
142             String err = "'" + string + "' is not a valid AccessURLTypeUseType";
143             throw new IllegalArgumentException(err);
144         }
145         return (AccessURLTypeUseType) obj;
146     } //-- org.astrogrid.registry.beans.resource.types.AccessURLTypeUseType valueOf(java.lang.String) 
147 
148 }