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: ImageServiceTypeType.java,v 1.14 2007/01/04 16:26:37 clq2 Exp $
6    */
7   
8   package org.astrogrid.registry.beans.resource.sia.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 ImageServiceTypeType.
22   * 
23   * @version $Revision: 1.14 $ $Date: 2007/01/04 16:26:37 $
24   */
25  public class ImageServiceTypeType implements java.io.Serializable {
26  
27  
28        //--------------------------/
29       //- Class/Member Variables -/
30      //--------------------------/
31  
32      /***
33       * The Cutout type
34       */
35      public static final int CUTOUT_TYPE = 0;
36  
37      /***
38       * The instance of the Cutout type
39       */
40      public static final ImageServiceTypeType CUTOUT = new ImageServiceTypeType(CUTOUT_TYPE, "Cutout");
41  
42      /***
43       * The Mosaic type
44       */
45      public static final int MOSAIC_TYPE = 1;
46  
47      /***
48       * The instance of the Mosaic type
49       */
50      public static final ImageServiceTypeType MOSAIC = new ImageServiceTypeType(MOSAIC_TYPE, "Mosaic");
51  
52      /***
53       * The Atlas type
54       */
55      public static final int ATLAS_TYPE = 2;
56  
57      /***
58       * The instance of the Atlas type
59       */
60      public static final ImageServiceTypeType ATLAS = new ImageServiceTypeType(ATLAS_TYPE, "Atlas");
61  
62      /***
63       * The Pointed type
64       */
65      public static final int POINTED_TYPE = 3;
66  
67      /***
68       * The instance of the Pointed type
69       */
70      public static final ImageServiceTypeType POINTED = new ImageServiceTypeType(POINTED_TYPE, "Pointed");
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 ImageServiceTypeType(int type, java.lang.String value) {
93          super();
94          this.type = type;
95          this.stringValue = value;
96      } //-- org.astrogrid.registry.beans.resource.sia.types.ImageServiceTypeType(int, java.lang.String)
97  
98  
99        //-----------/
100      //- Methods -/
101     //-----------/
102 
103     /***
104      * Method enumerateReturns an enumeration of all possible
105      * instances of ImageServiceTypeType
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 ImageServiceTypeType
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("Cutout", CUTOUT);
127         members.put("Mosaic", MOSAIC);
128         members.put("Atlas", ATLAS);
129         members.put("Pointed", POINTED);
130         return members;
131     } //-- java.util.Hashtable init() 
132 
133     /***
134      * Method toStringReturns the String representation of this
135      * ImageServiceTypeType
136      */
137     public java.lang.String toString()
138     {
139         return this.stringValue;
140     } //-- java.lang.String toString() 
141 
142     /***
143      * Method valueOfReturns a new ImageServiceTypeType based on
144      * the given String value.
145      * 
146      * @param string
147      */
148     public static org.astrogrid.registry.beans.resource.sia.types.ImageServiceTypeType 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 ImageServiceTypeType";
154             throw new IllegalArgumentException(err);
155         }
156         return (ImageServiceTypeType) obj;
157     } //-- org.astrogrid.registry.beans.resource.sia.types.ImageServiceTypeType valueOf(java.lang.String) 
158 
159 }