JAL-3181 refactor: extracted buildLinkMenu() for testability
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / MapListFromDescriptor.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.MapListFrom;
15
16 /**
17  * Class MapListFromDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class MapListFromDescriptor 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 MapListFromDescriptor()
54   {
55     super();
56     _nsURI = "www.vamsas.ac.uk/jalview/version2";
57     _xmlName = "mapListFrom";
58     _elementDefinition = true;
59     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
60     org.exolab.castor.mapping.FieldHandler handler = null;
61     org.exolab.castor.xml.FieldValidator fieldValidator = null;
62     // -- initialize attribute descriptors
63
64     // -- _start
65     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
66             java.lang.Integer.TYPE, "_start", "start",
67             org.exolab.castor.xml.NodeType.Attribute);
68     handler = new org.exolab.castor.xml.XMLFieldHandler()
69     {
70       public java.lang.Object getValue(java.lang.Object object)
71               throws IllegalStateException
72       {
73         MapListFrom target = (MapListFrom) object;
74         if (!target.hasStart())
75         {
76           return null;
77         }
78         return new java.lang.Integer(target.getStart());
79       }
80
81       public void setValue(java.lang.Object object, java.lang.Object value)
82               throws IllegalStateException, IllegalArgumentException
83       {
84         try
85         {
86           MapListFrom target = (MapListFrom) object;
87           // ignore null values for non optional primitives
88           if (value == null)
89           {
90             return;
91           }
92
93           target.setStart(((java.lang.Integer) value).intValue());
94         } catch (java.lang.Exception ex)
95         {
96           throw new IllegalStateException(ex.toString());
97         }
98       }
99
100       public java.lang.Object newInstance(java.lang.Object parent)
101       {
102         return null;
103       }
104     };
105     desc.setHandler(handler);
106     desc.setRequired(true);
107     desc.setMultivalued(false);
108     addFieldDescriptor(desc);
109
110     // -- validation code for: _start
111     fieldValidator = new org.exolab.castor.xml.FieldValidator();
112     fieldValidator.setMinOccurs(1);
113     { // -- local scope
114       org.exolab.castor.xml.validators.IntValidator typeValidator;
115       typeValidator = new org.exolab.castor.xml.validators.IntValidator();
116       fieldValidator.setValidator(typeValidator);
117       typeValidator.setMinInclusive(-2147483648);
118       typeValidator.setMaxInclusive(2147483647);
119     }
120     desc.setValidator(fieldValidator);
121     // -- _end
122     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
123             java.lang.Integer.TYPE, "_end", "end",
124             org.exolab.castor.xml.NodeType.Attribute);
125     handler = new org.exolab.castor.xml.XMLFieldHandler()
126     {
127       public java.lang.Object getValue(java.lang.Object object)
128               throws IllegalStateException
129       {
130         MapListFrom target = (MapListFrom) object;
131         if (!target.hasEnd())
132         {
133           return null;
134         }
135         return new java.lang.Integer(target.getEnd());
136       }
137
138       public void setValue(java.lang.Object object, java.lang.Object value)
139               throws IllegalStateException, IllegalArgumentException
140       {
141         try
142         {
143           MapListFrom target = (MapListFrom) object;
144           // ignore null values for non optional primitives
145           if (value == null)
146           {
147             return;
148           }
149
150           target.setEnd(((java.lang.Integer) value).intValue());
151         } catch (java.lang.Exception ex)
152         {
153           throw new IllegalStateException(ex.toString());
154         }
155       }
156
157       public java.lang.Object newInstance(java.lang.Object parent)
158       {
159         return null;
160       }
161     };
162     desc.setHandler(handler);
163     desc.setRequired(true);
164     desc.setMultivalued(false);
165     addFieldDescriptor(desc);
166
167     // -- validation code for: _end
168     fieldValidator = new org.exolab.castor.xml.FieldValidator();
169     fieldValidator.setMinOccurs(1);
170     { // -- local scope
171       org.exolab.castor.xml.validators.IntValidator typeValidator;
172       typeValidator = new org.exolab.castor.xml.validators.IntValidator();
173       fieldValidator.setValidator(typeValidator);
174       typeValidator.setMinInclusive(-2147483648);
175       typeValidator.setMaxInclusive(2147483647);
176     }
177     desc.setValidator(fieldValidator);
178     // -- initialize element descriptors
179
180   }
181
182   // -----------/
183   // - Methods -/
184   // -----------/
185
186   /**
187    * Method getAccessMode.
188    * 
189    * @return the access mode specified for this class.
190    */
191   public org.exolab.castor.mapping.AccessMode getAccessMode()
192   {
193     return null;
194   }
195
196   /**
197    * Method getIdentity.
198    * 
199    * @return the identity field, null if this class has no identity.
200    */
201   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
202   {
203     return super.getIdentity();
204   }
205
206   /**
207    * Method getJavaClass.
208    * 
209    * @return the Java class represented by this descriptor.
210    */
211   public java.lang.Class getJavaClass()
212   {
213     return jalview.schemabinding.version2.MapListFrom.class;
214   }
215
216   /**
217    * Method getNameSpacePrefix.
218    * 
219    * @return the namespace prefix to use when marshaling as XML.
220    */
221   public java.lang.String getNameSpacePrefix()
222   {
223     return _nsPrefix;
224   }
225
226   /**
227    * Method getNameSpaceURI.
228    * 
229    * @return the namespace URI used when marshaling and unmarshaling as XML.
230    */
231   public java.lang.String getNameSpaceURI()
232   {
233     return _nsURI;
234   }
235
236   /**
237    * Method getValidator.
238    * 
239    * @return a specific validator for the class described by this
240    *         ClassDescriptor.
241    */
242   public org.exolab.castor.xml.TypeValidator getValidator()
243   {
244     return this;
245   }
246
247   /**
248    * Method getXMLName.
249    * 
250    * @return the XML Name for the Class being described.
251    */
252   public java.lang.String getXMLName()
253   {
254     return _xmlName;
255   }
256
257   /**
258    * Method isElementDefinition.
259    * 
260    * @return true if XML schema definition of this Class is that of a global
261    *         element or element with anonymous type definition.
262    */
263   public boolean isElementDefinition()
264   {
265     return _elementDefinition;
266   }
267
268 }