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