JAL-1645 source formatting and organise imports
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / MappingChoiceDescriptor.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.MappingChoice;
15
16 /**
17  * Class MappingChoiceDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class MappingChoiceDescriptor 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 MappingChoiceDescriptor()
54   {
55     super();
56     _nsURI = "www.vamsas.ac.uk/jalview/version2";
57     _elementDefinition = false;
58
59     // -- set grouping compositor
60     setCompositorAsChoice();
61     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
62     org.exolab.castor.mapping.FieldHandler handler = null;
63     org.exolab.castor.xml.FieldValidator fieldValidator = null;
64     // -- initialize attribute descriptors
65
66     // -- initialize element descriptors
67
68     // -- _sequence
69     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
70             jalview.schemabinding.version2.Sequence.class, "_sequence",
71             "Sequence", org.exolab.castor.xml.NodeType.Element);
72     handler = new org.exolab.castor.xml.XMLFieldHandler()
73     {
74       public java.lang.Object getValue(java.lang.Object object)
75               throws IllegalStateException
76       {
77         MappingChoice target = (MappingChoice) object;
78         return target.getSequence();
79       }
80
81       public void setValue(java.lang.Object object, java.lang.Object value)
82               throws IllegalStateException, IllegalArgumentException
83       {
84         try
85         {
86           MappingChoice target = (MappingChoice) object;
87           target.setSequence((jalview.schemabinding.version2.Sequence) 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 new jalview.schemabinding.version2.Sequence();
97       }
98     };
99     desc.setHandler(handler);
100     desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
101     desc.setMultivalued(false);
102     addFieldDescriptor(desc);
103
104     // -- validation code for: _sequence
105     fieldValidator = new org.exolab.castor.xml.FieldValidator();
106     { // -- local scope
107     }
108     desc.setValidator(fieldValidator);
109     // -- _dseqFor
110     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
111             java.lang.String.class, "_dseqFor", "dseqFor",
112             org.exolab.castor.xml.NodeType.Element);
113     desc.setImmutable(true);
114     handler = new org.exolab.castor.xml.XMLFieldHandler()
115     {
116       public java.lang.Object getValue(java.lang.Object object)
117               throws IllegalStateException
118       {
119         MappingChoice target = (MappingChoice) object;
120         return target.getDseqFor();
121       }
122
123       public void setValue(java.lang.Object object, java.lang.Object value)
124               throws IllegalStateException, IllegalArgumentException
125       {
126         try
127         {
128           MappingChoice target = (MappingChoice) object;
129           target.setDseqFor((java.lang.String) value);
130         } catch (java.lang.Exception ex)
131         {
132           throw new IllegalStateException(ex.toString());
133         }
134       }
135
136       public java.lang.Object newInstance(java.lang.Object parent)
137       {
138         return null;
139       }
140     };
141     desc.setHandler(handler);
142     desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
143     desc.setMultivalued(false);
144     addFieldDescriptor(desc);
145
146     // -- validation code for: _dseqFor
147     fieldValidator = new org.exolab.castor.xml.FieldValidator();
148     { // -- local scope
149       org.exolab.castor.xml.validators.StringValidator typeValidator;
150       typeValidator = new org.exolab.castor.xml.validators.StringValidator();
151       fieldValidator.setValidator(typeValidator);
152       typeValidator.setWhiteSpace("preserve");
153     }
154     desc.setValidator(fieldValidator);
155   }
156
157   // -----------/
158   // - Methods -/
159   // -----------/
160
161   /**
162    * Method getAccessMode.
163    * 
164    * @return the access mode specified for this class.
165    */
166   public org.exolab.castor.mapping.AccessMode getAccessMode()
167   {
168     return null;
169   }
170
171   /**
172    * Method getIdentity.
173    * 
174    * @return the identity field, null if this class has no identity.
175    */
176   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
177   {
178     return super.getIdentity();
179   }
180
181   /**
182    * Method getJavaClass.
183    * 
184    * @return the Java class represented by this descriptor.
185    */
186   public java.lang.Class getJavaClass()
187   {
188     return jalview.schemabinding.version2.MappingChoice.class;
189   }
190
191   /**
192    * Method getNameSpacePrefix.
193    * 
194    * @return the namespace prefix to use when marshaling as XML.
195    */
196   public java.lang.String getNameSpacePrefix()
197   {
198     return _nsPrefix;
199   }
200
201   /**
202    * Method getNameSpaceURI.
203    * 
204    * @return the namespace URI used when marshaling and unmarshaling as XML.
205    */
206   public java.lang.String getNameSpaceURI()
207   {
208     return _nsURI;
209   }
210
211   /**
212    * Method getValidator.
213    * 
214    * @return a specific validator for the class described by this
215    *         ClassDescriptor.
216    */
217   public org.exolab.castor.xml.TypeValidator getValidator()
218   {
219     return this;
220   }
221
222   /**
223    * Method getXMLName.
224    * 
225    * @return the XML Name for the Class being described.
226    */
227   public java.lang.String getXMLName()
228   {
229     return _xmlName;
230   }
231
232   /**
233    * Method isElementDefinition.
234    * 
235    * @return true if XML schema definition of this Class is that of a global
236    *         element or element with anonymous type definition.
237    */
238   public boolean isElementDefinition()
239   {
240     return _elementDefinition;
241   }
242
243 }