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: CategoryType.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 CategoryType.
22   * 
23   * @version $Revision: 1.14 $ $Date: 2007/01/04 16:26:06 $
24   */
25  public class CategoryType implements java.io.Serializable {
26  
27  
28        //--------------------------/
29       //- Class/Member Variables -/
30      //--------------------------/
31  
32      /***
33       * The Other type
34       */
35      public static final int OTHER_TYPE = 0;
36  
37      /***
38       * The instance of the Other type
39       */
40      public static final CategoryType OTHER = new CategoryType(OTHER_TYPE, "Other");
41  
42      /***
43       * The Archive type
44       */
45      public static final int ARCHIVE_TYPE = 1;
46  
47      /***
48       * The instance of the Archive type
49       */
50      public static final CategoryType ARCHIVE = new CategoryType(ARCHIVE_TYPE, "Archive");
51  
52      /***
53       * The Bibliography type
54       */
55      public static final int BIBLIOGRAPHY_TYPE = 2;
56  
57      /***
58       * The instance of the Bibliography type
59       */
60      public static final CategoryType BIBLIOGRAPHY = new CategoryType(BIBLIOGRAPHY_TYPE, "Bibliography");
61  
62      /***
63       * The Catalog type
64       */
65      public static final int CATALOG_TYPE = 3;
66  
67      /***
68       * The instance of the Catalog type
69       */
70      public static final CategoryType CATALOG = new CategoryType(CATALOG_TYPE, "Catalog");
71  
72      /***
73       * The Journal type
74       */
75      public static final int JOURNAL_TYPE = 4;
76  
77      /***
78       * The instance of the Journal type
79       */
80      public static final CategoryType JOURNAL = new CategoryType(JOURNAL_TYPE, "Journal");
81  
82      /***
83       * The Library type
84       */
85      public static final int LIBRARY_TYPE = 5;
86  
87      /***
88       * The instance of the Library type
89       */
90      public static final CategoryType LIBRARY = new CategoryType(LIBRARY_TYPE, "Library");
91  
92      /***
93       * The Simulation type
94       */
95      public static final int SIMULATION_TYPE = 6;
96  
97      /***
98       * The instance of the Simulation type
99       */
100     public static final CategoryType SIMULATION = new CategoryType(SIMULATION_TYPE, "Simulation");
101 
102     /***
103      * The Survey type
104      */
105     public static final int SURVEY_TYPE = 7;
106 
107     /***
108      * The instance of the Survey type
109      */
110     public static final CategoryType SURVEY = new CategoryType(SURVEY_TYPE, "Survey");
111 
112     /***
113      * The Transformation type
114      */
115     public static final int TRANSFORMATION_TYPE = 8;
116 
117     /***
118      * The instance of the Transformation type
119      */
120     public static final CategoryType TRANSFORMATION = new CategoryType(TRANSFORMATION_TYPE, "Transformation");
121 
122     /***
123      * The Education type
124      */
125     public static final int EDUCATION_TYPE = 9;
126 
127     /***
128      * The instance of the Education type
129      */
130     public static final CategoryType EDUCATION = new CategoryType(EDUCATION_TYPE, "Education");
131 
132     /***
133      * The Outreach type
134      */
135     public static final int OUTREACH_TYPE = 10;
136 
137     /***
138      * The instance of the Outreach type
139      */
140     public static final CategoryType OUTREACH = new CategoryType(OUTREACH_TYPE, "Outreach");
141 
142     /***
143      * The EPOResource type
144      */
145     public static final int EPORESOURCE_TYPE = 11;
146 
147     /***
148      * The instance of the EPOResource type
149      */
150     public static final CategoryType EPORESOURCE = new CategoryType(EPORESOURCE_TYPE, "EPOResource");
151 
152     /***
153      * The Animation type
154      */
155     public static final int ANIMATION_TYPE = 12;
156 
157     /***
158      * The instance of the Animation type
159      */
160     public static final CategoryType ANIMATION = new CategoryType(ANIMATION_TYPE, "Animation");
161 
162     /***
163      * The Artwork type
164      */
165     public static final int ARTWORK_TYPE = 13;
166 
167     /***
168      * The instance of the Artwork type
169      */
170     public static final CategoryType ARTWORK = new CategoryType(ARTWORK_TYPE, "Artwork");
171 
172     /***
173      * The Background type
174      */
175     public static final int BACKGROUND_TYPE = 14;
176 
177     /***
178      * The instance of the Background type
179      */
180     public static final CategoryType BACKGROUND = new CategoryType(BACKGROUND_TYPE, "Background");
181 
182     /***
183      * The BasicData type
184      */
185     public static final int BASICDATA_TYPE = 15;
186 
187     /***
188      * The instance of the BasicData type
189      */
190     public static final CategoryType BASICDATA = new CategoryType(BASICDATA_TYPE, "BasicData");
191 
192     /***
193      * The Historical type
194      */
195     public static final int HISTORICAL_TYPE = 16;
196 
197     /***
198      * The instance of the Historical type
199      */
200     public static final CategoryType HISTORICAL = new CategoryType(HISTORICAL_TYPE, "Historical");
201 
202     /***
203      * The Photographic type
204      */
205     public static final int PHOTOGRAPHIC_TYPE = 17;
206 
207     /***
208      * The instance of the Photographic type
209      */
210     public static final CategoryType PHOTOGRAPHIC = new CategoryType(PHOTOGRAPHIC_TYPE, "Photographic");
211 
212     /***
213      * The Press type
214      */
215     public static final int PRESS_TYPE = 18;
216 
217     /***
218      * The instance of the Press type
219      */
220     public static final CategoryType PRESS = new CategoryType(PRESS_TYPE, "Press");
221 
222     /***
223      * The Organisation type
224      */
225     public static final int ORGANISATION_TYPE = 19;
226 
227     /***
228      * The instance of the Organisation type
229      */
230     public static final CategoryType ORGANISATION = new CategoryType(ORGANISATION_TYPE, "Organisation");
231 
232     /***
233      * The Project type
234      */
235     public static final int PROJECT_TYPE = 20;
236 
237     /***
238      * The instance of the Project type
239      */
240     public static final CategoryType PROJECT = new CategoryType(PROJECT_TYPE, "Project");
241 
242     /***
243      * The Person type
244      */
245     public static final int PERSON_TYPE = 21;
246 
247     /***
248      * The instance of the Person type
249      */
250     public static final CategoryType PERSON = new CategoryType(PERSON_TYPE, "Person");
251 
252     /***
253      * Field _memberTable
254      */
255     private static java.util.Hashtable _memberTable = init();
256 
257     /***
258      * Field type
259      */
260     private int type = -1;
261 
262     /***
263      * Field stringValue
264      */
265     private java.lang.String stringValue = null;
266 
267 
268       //----------------/
269      //- Constructors -/
270     //----------------/
271 
272     private CategoryType(int type, java.lang.String value) {
273         super();
274         this.type = type;
275         this.stringValue = value;
276     } //-- org.astrogrid.registry.beans.resource.types.CategoryType(int, java.lang.String)
277 
278 
279       //-----------/
280      //- Methods -/
281     //-----------/
282 
283     /***
284      * Method enumerateReturns an enumeration of all possible
285      * instances of CategoryType
286      */
287     public static java.util.Enumeration enumerate()
288     {
289         return _memberTable.elements();
290     } //-- java.util.Enumeration enumerate() 
291 
292     /***
293      * Method getTypeReturns the type of this CategoryType
294      */
295     public int getType()
296     {
297         return this.type;
298     } //-- int getType() 
299 
300     /***
301      * Method init
302      */
303     private static java.util.Hashtable init()
304     {
305         Hashtable members = new Hashtable();
306         members.put("Other", OTHER);
307         members.put("Archive", ARCHIVE);
308         members.put("Bibliography", BIBLIOGRAPHY);
309         members.put("Catalog", CATALOG);
310         members.put("Journal", JOURNAL);
311         members.put("Library", LIBRARY);
312         members.put("Simulation", SIMULATION);
313         members.put("Survey", SURVEY);
314         members.put("Transformation", TRANSFORMATION);
315         members.put("Education", EDUCATION);
316         members.put("Outreach", OUTREACH);
317         members.put("EPOResource", EPORESOURCE);
318         members.put("Animation", ANIMATION);
319         members.put("Artwork", ARTWORK);
320         members.put("Background", BACKGROUND);
321         members.put("BasicData", BASICDATA);
322         members.put("Historical", HISTORICAL);
323         members.put("Photographic", PHOTOGRAPHIC);
324         members.put("Press", PRESS);
325         members.put("Organisation", ORGANISATION);
326         members.put("Project", PROJECT);
327         members.put("Person", PERSON);
328         return members;
329     } //-- java.util.Hashtable init() 
330 
331     /***
332      * Method toStringReturns the String representation of this
333      * CategoryType
334      */
335     public java.lang.String toString()
336     {
337         return this.stringValue;
338     } //-- java.lang.String toString() 
339 
340     /***
341      * Method valueOfReturns a new CategoryType based on the given
342      * String value.
343      * 
344      * @param string
345      */
346     public static org.astrogrid.registry.beans.resource.types.CategoryType valueOf(java.lang.String string)
347     {
348         java.lang.Object obj = null;
349         if (string != null) obj = _memberTable.get(string);
350         if (obj == null) {
351             String err = "'" + string + "' is not a valid CategoryType";
352             throw new IllegalArgumentException(err);
353         }
354         return (CategoryType) obj;
355     } //-- org.astrogrid.registry.beans.resource.types.CategoryType valueOf(java.lang.String) 
356 
357 }