69ed7696ddf2ad5b2c0ce4f096a78385abb0d50f
[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 org.exolab.castor.xml.util.XMLClassDescriptorImpl {
22
23
24       //--------------------------/
25      //- Class/Member Variables -/
26     //--------------------------/
27
28     /**
29      * Field _elementDefinition.
30      */
31     private boolean _elementDefinition;
32
33     /**
34      * Field _nsPrefix.
35      */
36     private java.lang.String _nsPrefix;
37
38     /**
39      * Field _nsURI.
40      */
41     private java.lang.String _nsURI;
42
43     /**
44      * Field _xmlName.
45      */
46     private java.lang.String _xmlName;
47
48
49       //----------------/
50      //- Constructors -/
51     //----------------/
52
53     public FeatureSettingsDescriptor() {
54         super();
55         _nsURI = "www.jalview.org";
56         _xmlName = "FeatureSettings";
57         _elementDefinition = true;
58         
59         //-- set grouping compositor
60         setCompositorAsSequence();
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         //-- _settingList
69         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Setting.class, "_settingList", "setting", org.exolab.castor.xml.NodeType.Element);
70         handler = new org.exolab.castor.xml.XMLFieldHandler() {
71             public java.lang.Object getValue( java.lang.Object object ) 
72                 throws IllegalStateException
73             {
74                 FeatureSettings target = (FeatureSettings) object;
75                 return target.getSetting();
76             }
77             public void setValue( java.lang.Object object, java.lang.Object value) 
78                 throws IllegalStateException, IllegalArgumentException
79             {
80                 try {
81                     FeatureSettings target = (FeatureSettings) object;
82                     target.addSetting( (jalview.schemabinding.version2.Setting) value);
83                 } catch (java.lang.Exception ex) {
84                     throw new IllegalStateException(ex.toString());
85                 }
86             }
87             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
88                 try {
89                     FeatureSettings target = (FeatureSettings) object;
90                     target.removeAllSetting();
91                 } catch (java.lang.Exception ex) {
92                     throw new IllegalStateException(ex.toString());
93                 }
94             }
95             public java.lang.Object newInstance(java.lang.Object parent) {
96                 return new jalview.schemabinding.version2.Setting();
97             }
98         };
99         desc.setHandler(handler);
100         desc.setNameSpaceURI("www.jalview.org");
101         desc.setMultivalued(true);
102         addFieldDescriptor(desc);
103         
104         //-- validation code for: _settingList
105         fieldValidator = new org.exolab.castor.xml.FieldValidator();
106         fieldValidator.setMinOccurs(0);
107         { //-- local scope
108         }
109         desc.setValidator(fieldValidator);
110         //-- _groupList
111         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Group.class, "_groupList", "group", org.exolab.castor.xml.NodeType.Element);
112         handler = new org.exolab.castor.xml.XMLFieldHandler() {
113             public java.lang.Object getValue( java.lang.Object object ) 
114                 throws IllegalStateException
115             {
116                 FeatureSettings target = (FeatureSettings) object;
117                 return target.getGroup();
118             }
119             public void setValue( java.lang.Object object, java.lang.Object value) 
120                 throws IllegalStateException, IllegalArgumentException
121             {
122                 try {
123                     FeatureSettings target = (FeatureSettings) object;
124                     target.addGroup( (jalview.schemabinding.version2.Group) value);
125                 } catch (java.lang.Exception ex) {
126                     throw new IllegalStateException(ex.toString());
127                 }
128             }
129             public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
130                 try {
131                     FeatureSettings target = (FeatureSettings) object;
132                     target.removeAllGroup();
133                 } catch (java.lang.Exception ex) {
134                     throw new IllegalStateException(ex.toString());
135                 }
136             }
137             public java.lang.Object newInstance(java.lang.Object parent) {
138                 return new jalview.schemabinding.version2.Group();
139             }
140         };
141         desc.setHandler(handler);
142         desc.setNameSpaceURI("www.jalview.org");
143         desc.setMultivalued(true);
144         addFieldDescriptor(desc);
145         
146         //-- validation code for: _groupList
147         fieldValidator = new org.exolab.castor.xml.FieldValidator();
148         fieldValidator.setMinOccurs(0);
149         { //-- local scope
150         }
151         desc.setValidator(fieldValidator);
152     }
153
154
155       //-----------/
156      //- Methods -/
157     //-----------/
158
159     /**
160      * Method getAccessMode.
161      * 
162      * @return the access mode specified for this class.
163      */
164     public org.exolab.castor.mapping.AccessMode getAccessMode(
165     ) {
166         return null;
167     }
168
169     /**
170      * Method getIdentity.
171      * 
172      * @return the identity field, null if this class has no
173      * identity.
174      */
175     public org.exolab.castor.mapping.FieldDescriptor getIdentity(
176     ) {
177         return super.getIdentity();
178     }
179
180     /**
181      * Method getJavaClass.
182      * 
183      * @return the Java class represented by this descriptor.
184      */
185     public java.lang.Class getJavaClass(
186     ) {
187         return jalview.schemabinding.version2.FeatureSettings.class;
188     }
189
190     /**
191      * Method getNameSpacePrefix.
192      * 
193      * @return the namespace prefix to use when marshaling as XML.
194      */
195     public java.lang.String getNameSpacePrefix(
196     ) {
197         return _nsPrefix;
198     }
199
200     /**
201      * Method getNameSpaceURI.
202      * 
203      * @return the namespace URI used when marshaling and
204      * 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
236      * of a global
237      * element or element with anonymous type definition.
238      */
239     public boolean isElementDefinition(
240     ) {
241         return _elementDefinition;
242     }
243
244 }