2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2.descriptors;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import jalview.schemabinding.version2.FeatureSettings;
17 * Class FeatureSettingsDescriptor.
19 * @version $Revision$ $Date$
21 public class FeatureSettingsDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
24 //--------------------------/
25 //- Class/Member Variables -/
26 //--------------------------/
29 * Field _elementDefinition.
31 private boolean _elementDefinition;
36 private java.lang.String _nsPrefix;
41 private java.lang.String _nsURI;
46 private java.lang.String _xmlName;
53 public FeatureSettingsDescriptor() {
55 _nsURI = "www.jalview.org";
56 _xmlName = "FeatureSettings";
57 _elementDefinition = true;
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
66 //-- initialize element descriptors
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
74 FeatureSettings target = (FeatureSettings) object;
75 return target.getSetting();
77 public void setValue( java.lang.Object object, java.lang.Object value)
78 throws IllegalStateException, IllegalArgumentException
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());
87 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
89 FeatureSettings target = (FeatureSettings) object;
90 target.removeAllSetting();
91 } catch (java.lang.Exception ex) {
92 throw new IllegalStateException(ex.toString());
95 public java.lang.Object newInstance(java.lang.Object parent) {
96 return new jalview.schemabinding.version2.Setting();
99 desc.setHandler(handler);
100 desc.setNameSpaceURI("www.jalview.org");
101 desc.setMultivalued(true);
102 addFieldDescriptor(desc);
104 //-- validation code for: _settingList
105 fieldValidator = new org.exolab.castor.xml.FieldValidator();
106 fieldValidator.setMinOccurs(0);
109 desc.setValidator(fieldValidator);
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
116 FeatureSettings target = (FeatureSettings) object;
117 return target.getGroup();
119 public void setValue( java.lang.Object object, java.lang.Object value)
120 throws IllegalStateException, IllegalArgumentException
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());
129 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
131 FeatureSettings target = (FeatureSettings) object;
132 target.removeAllGroup();
133 } catch (java.lang.Exception ex) {
134 throw new IllegalStateException(ex.toString());
137 public java.lang.Object newInstance(java.lang.Object parent) {
138 return new jalview.schemabinding.version2.Group();
141 desc.setHandler(handler);
142 desc.setNameSpaceURI("www.jalview.org");
143 desc.setMultivalued(true);
144 addFieldDescriptor(desc);
146 //-- validation code for: _groupList
147 fieldValidator = new org.exolab.castor.xml.FieldValidator();
148 fieldValidator.setMinOccurs(0);
151 desc.setValidator(fieldValidator);
160 * Method getAccessMode.
162 * @return the access mode specified for this class.
164 public org.exolab.castor.mapping.AccessMode getAccessMode(
170 * Method getIdentity.
172 * @return the identity field, null if this class has no
175 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
177 return super.getIdentity();
181 * Method getJavaClass.
183 * @return the Java class represented by this descriptor.
185 public java.lang.Class getJavaClass(
187 return jalview.schemabinding.version2.FeatureSettings.class;
191 * Method getNameSpacePrefix.
193 * @return the namespace prefix to use when marshaling as XML.
195 public java.lang.String getNameSpacePrefix(
201 * Method getNameSpaceURI.
203 * @return the namespace URI used when marshaling and
204 * unmarshaling as XML.
206 public java.lang.String getNameSpaceURI(
212 * Method getValidator.
214 * @return a specific validator for the class described by this
217 public org.exolab.castor.xml.TypeValidator getValidator(
225 * @return the XML Name for the Class being described.
227 public java.lang.String getXMLName(
233 * Method isElementDefinition.
235 * @return true if XML schema definition of this Class is that
237 * element or element with anonymous type definition.
239 public boolean isElementDefinition(
241 return _elementDefinition;