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: COOSYSSystemType.java,v 1.14 2007/01/04 16:26:14 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 COOSYSSystemType.
22   * 
23   * @version $Revision: 1.14 $ $Date: 2007/01/04 16:26:14 $
24   */
25  public class COOSYSSystemType implements java.io.Serializable {
26  
27  
28        //--------------------------/
29       //- Class/Member Variables -/
30      //--------------------------/
31  
32      /***
33       * The eq_FK4 type
34       */
35      public static final int EQ_FK4_TYPE = 0;
36  
37      /***
38       * The instance of the eq_FK4 type
39       */
40      public static final COOSYSSystemType EQ_FK4 = new COOSYSSystemType(EQ_FK4_TYPE, "eq_FK4");
41  
42      /***
43       * The eq_FK5 type
44       */
45      public static final int EQ_FK5_TYPE = 1;
46  
47      /***
48       * The instance of the eq_FK5 type
49       */
50      public static final COOSYSSystemType EQ_FK5 = new COOSYSSystemType(EQ_FK5_TYPE, "eq_FK5");
51  
52      /***
53       * The ICRS type
54       */
55      public static final int ICRS_TYPE = 2;
56  
57      /***
58       * The instance of the ICRS type
59       */
60      public static final COOSYSSystemType ICRS = new COOSYSSystemType(ICRS_TYPE, "ICRS");
61  
62      /***
63       * The ecl_FK4 type
64       */
65      public static final int ECL_FK4_TYPE = 3;
66  
67      /***
68       * The instance of the ecl_FK4 type
69       */
70      public static final COOSYSSystemType ECL_FK4 = new COOSYSSystemType(ECL_FK4_TYPE, "ecl_FK4");
71  
72      /***
73       * The ecl_FK5 type
74       */
75      public static final int ECL_FK5_TYPE = 4;
76  
77      /***
78       * The instance of the ecl_FK5 type
79       */
80      public static final COOSYSSystemType ECL_FK5 = new COOSYSSystemType(ECL_FK5_TYPE, "ecl_FK5");
81  
82      /***
83       * The galactic type
84       */
85      public static final int GALACTIC_TYPE = 5;
86  
87      /***
88       * The instance of the galactic type
89       */
90      public static final COOSYSSystemType GALACTIC = new COOSYSSystemType(GALACTIC_TYPE, "galactic");
91  
92      /***
93       * The supergalactic type
94       */
95      public static final int SUPERGALACTIC_TYPE = 6;
96  
97      /***
98       * The instance of the supergalactic type
99       */
100     public static final COOSYSSystemType SUPERGALACTIC = new COOSYSSystemType(SUPERGALACTIC_TYPE, "supergalactic");
101 
102     /***
103      * The xy type
104      */
105     public static final int XY_TYPE = 7;
106 
107     /***
108      * The instance of the xy type
109      */
110     public static final COOSYSSystemType XY = new COOSYSSystemType(XY_TYPE, "xy");
111 
112     /***
113      * The barycentric type
114      */
115     public static final int BARYCENTRIC_TYPE = 8;
116 
117     /***
118      * The instance of the barycentric type
119      */
120     public static final COOSYSSystemType BARYCENTRIC = new COOSYSSystemType(BARYCENTRIC_TYPE, "barycentric");
121 
122     /***
123      * The geo_app type
124      */
125     public static final int GEO_APP_TYPE = 9;
126 
127     /***
128      * The instance of the geo_app type
129      */
130     public static final COOSYSSystemType GEO_APP = new COOSYSSystemType(GEO_APP_TYPE, "geo_app");
131 
132     /***
133      * Field _memberTable
134      */
135     private static java.util.Hashtable _memberTable = init();
136 
137     /***
138      * Field type
139      */
140     private int type = -1;
141 
142     /***
143      * Field stringValue
144      */
145     private java.lang.String stringValue = null;
146 
147 
148       //----------------/
149      //- Constructors -/
150     //----------------/
151 
152     private COOSYSSystemType(int type, java.lang.String value) {
153         super();
154         this.type = type;
155         this.stringValue = value;
156     } //-- org.astrogrid.registry.beans.resource.votable.types.COOSYSSystemType(int, java.lang.String)
157 
158 
159       //-----------/
160      //- Methods -/
161     //-----------/
162 
163     /***
164      * Method enumerateReturns an enumeration of all possible
165      * instances of COOSYSSystemType
166      */
167     public static java.util.Enumeration enumerate()
168     {
169         return _memberTable.elements();
170     } //-- java.util.Enumeration enumerate() 
171 
172     /***
173      * Method getTypeReturns the type of this COOSYSSystemType
174      */
175     public int getType()
176     {
177         return this.type;
178     } //-- int getType() 
179 
180     /***
181      * Method init
182      */
183     private static java.util.Hashtable init()
184     {
185         Hashtable members = new Hashtable();
186         members.put("eq_FK4", EQ_FK4);
187         members.put("eq_FK5", EQ_FK5);
188         members.put("ICRS", ICRS);
189         members.put("ecl_FK4", ECL_FK4);
190         members.put("ecl_FK5", ECL_FK5);
191         members.put("galactic", GALACTIC);
192         members.put("supergalactic", SUPERGALACTIC);
193         members.put("xy", XY);
194         members.put("barycentric", BARYCENTRIC);
195         members.put("geo_app", GEO_APP);
196         return members;
197     } //-- java.util.Hashtable init() 
198 
199     /***
200      * Method toStringReturns the String representation of this
201      * COOSYSSystemType
202      */
203     public java.lang.String toString()
204     {
205         return this.stringValue;
206     } //-- java.lang.String toString() 
207 
208     /***
209      * Method valueOfReturns a new COOSYSSystemType based on the
210      * given String value.
211      * 
212      * @param string
213      */
214     public static org.astrogrid.registry.beans.resource.votable.types.COOSYSSystemType valueOf(java.lang.String string)
215     {
216         java.lang.Object obj = null;
217         if (string != null) obj = _memberTable.get(string);
218         if (obj == null) {
219             String err = "'" + string + "' is not a valid COOSYSSystemType";
220             throw new IllegalArgumentException(err);
221         }
222         return (COOSYSSystemType) obj;
223     } //-- org.astrogrid.registry.beans.resource.votable.types.COOSYSSystemType valueOf(java.lang.String) 
224 
225 }