JAL-1645 source formatting and organise imports
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / UserColoursDescriptor.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2.descriptors;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import jalview.schemabinding.version2.UserColours;
15
16 /**
17  * Class UserColoursDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class UserColoursDescriptor extends
22         org.exolab.castor.xml.util.XMLClassDescriptorImpl
23 {
24
25   // --------------------------/
26   // - Class/Member Variables -/
27   // --------------------------/
28
29   /**
30    * Field _elementDefinition.
31    */
32   private boolean _elementDefinition;
33
34   /**
35    * Field _nsPrefix.
36    */
37   private java.lang.String _nsPrefix;
38
39   /**
40    * Field _nsURI.
41    */
42   private java.lang.String _nsURI;
43
44   /**
45    * Field _xmlName.
46    */
47   private java.lang.String _xmlName;
48
49   // ----------------/
50   // - Constructors -/
51   // ----------------/
52
53   public UserColoursDescriptor()
54   {
55     super();
56     _nsURI = "www.jalview.org";
57     _xmlName = "UserColours";
58     _elementDefinition = true;
59
60     // -- set grouping compositor
61     setCompositorAsSequence();
62     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63     org.exolab.castor.mapping.FieldHandler handler = null;
64     org.exolab.castor.xml.FieldValidator fieldValidator = null;
65     // -- initialize attribute descriptors
66
67     // -- _id
68     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
69             java.lang.String.class, "_id", "id",
70             org.exolab.castor.xml.NodeType.Attribute);
71     desc.setImmutable(true);
72     handler = new org.exolab.castor.xml.XMLFieldHandler()
73     {
74       public java.lang.Object getValue(java.lang.Object object)
75               throws IllegalStateException
76       {
77         UserColours target = (UserColours) object;
78         return target.getId();
79       }
80
81       public void setValue(java.lang.Object object, java.lang.Object value)
82               throws IllegalStateException, IllegalArgumentException
83       {
84         try
85         {
86           UserColours target = (UserColours) object;
87           target.setId((java.lang.String) value);
88         } catch (java.lang.Exception ex)
89         {
90           throw new IllegalStateException(ex.toString());
91         }
92       }
93
94       public java.lang.Object newInstance(java.lang.Object parent)
95       {
96         return null;
97       }
98     };
99     desc.setHandler(handler);
100     desc.setMultivalued(false);
101     addFieldDescriptor(desc);
102
103     // -- validation code for: _id
104     fieldValidator = new org.exolab.castor.xml.FieldValidator();
105     { // -- local scope
106       org.exolab.castor.xml.validators.StringValidator typeValidator;
107       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
108       fieldValidator.setValidator(typeValidator);
109       typeValidator.setWhiteSpace("preserve");
110     }
111     desc.setValidator(fieldValidator);
112     // -- initialize element descriptors
113
114     // -- _userColourScheme
115     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
116             jalview.schemabinding.version2.UserColourScheme.class,
117             "_userColourScheme", "UserColourScheme",
118             org.exolab.castor.xml.NodeType.Element);
119     handler = new org.exolab.castor.xml.XMLFieldHandler()
120     {
121       public java.lang.Object getValue(java.lang.Object object)
122               throws IllegalStateException
123       {
124         UserColours target = (UserColours) object;
125         return target.getUserColourScheme();
126       }
127
128       public void setValue(java.lang.Object object, java.lang.Object value)
129               throws IllegalStateException, IllegalArgumentException
130       {
131         try
132         {
133           UserColours target = (UserColours) object;
134           target.setUserColourScheme((jalview.schemabinding.version2.UserColourScheme) value);
135         } catch (java.lang.Exception ex)
136         {
137           throw new IllegalStateException(ex.toString());
138         }
139       }
140
141       public java.lang.Object newInstance(java.lang.Object parent)
142       {
143         return new jalview.schemabinding.version2.UserColourScheme();
144       }
145     };
146     desc.setHandler(handler);
147     desc.setNameSpaceURI("www.jalview.org");
148     desc.setRequired(true);
149     desc.setMultivalued(false);
150     addFieldDescriptor(desc);
151
152     // -- validation code for: _userColourScheme
153     fieldValidator = new org.exolab.castor.xml.FieldValidator();
154     fieldValidator.setMinOccurs(1);
155     { // -- local scope
156     }
157     desc.setValidator(fieldValidator);
158   }
159
160   // -----------/
161   // - Methods -/
162   // -----------/
163
164   /**
165    * Method getAccessMode.
166    * 
167    * @return the access mode specified for this class.
168    */
169   public org.exolab.castor.mapping.AccessMode getAccessMode()
170   {
171     return null;
172   }
173
174   /**
175    * Method getIdentity.
176    * 
177    * @return the identity field, null if this class has no identity.
178    */
179   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
180   {
181     return super.getIdentity();
182   }
183
184   /**
185    * Method getJavaClass.
186    * 
187    * @return the Java class represented by this descriptor.
188    */
189   public java.lang.Class getJavaClass()
190   {
191     return jalview.schemabinding.version2.UserColours.class;
192   }
193
194   /**
195    * Method getNameSpacePrefix.
196    * 
197    * @return the namespace prefix to use when marshaling as XML.
198    */
199   public java.lang.String getNameSpacePrefix()
200   {
201     return _nsPrefix;
202   }
203
204   /**
205    * Method getNameSpaceURI.
206    * 
207    * @return the namespace URI used when marshaling and unmarshaling as XML.
208    */
209   public java.lang.String getNameSpaceURI()
210   {
211     return _nsURI;
212   }
213
214   /**
215    * Method getValidator.
216    * 
217    * @return a specific validator for the class described by this
218    *         ClassDescriptor.
219    */
220   public org.exolab.castor.xml.TypeValidator getValidator()
221   {
222     return this;
223   }
224
225   /**
226    * Method getXMLName.
227    * 
228    * @return the XML Name for the Class being described.
229    */
230   public java.lang.String getXMLName()
231   {
232     return _xmlName;
233   }
234
235   /**
236    * Method isElementDefinition.
237    * 
238    * @return true if XML schema definition of this Class is that of a global
239    *         element or element with anonymous type definition.
240    */
241   public boolean isElementDefinition()
242   {
243     return _elementDefinition;
244   }
245
246 }