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 import jalview.schemabinding.version2.CompoundMatcher;
12 //---------------------------------/
13 //- Imported classes and packages -/
14 //---------------------------------/
16 import jalview.schemabinding.version2.FeatureMatcherSet;
17 import jalview.schemabinding.version2.MatchCondition;
20 * Class FeatureMatcherSetDescriptor.
22 * @version $Revision$ $Date$
24 public class FeatureMatcherSetDescriptor
25 extends org.exolab.castor.xml.util.XMLClassDescriptorImpl
28 // --------------------------/
29 // - Class/Member Variables -/
30 // --------------------------/
33 * Field _elementDefinition.
35 private boolean _elementDefinition;
40 private java.lang.String _nsPrefix;
45 private java.lang.String _nsURI;
50 private java.lang.String _xmlName;
56 public FeatureMatcherSetDescriptor()
59 _nsURI = "www.jalview.org/colours";
60 _xmlName = "FeatureMatcherSet";
61 _elementDefinition = false;
63 // -- set grouping compositor
64 setCompositorAsChoice();
65 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
66 org.exolab.castor.mapping.FieldHandler handler = null;
67 org.exolab.castor.xml.FieldValidator fieldValidator = null;
68 // -- initialize attribute descriptors
70 // -- initialize element descriptors
73 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
74 MatchCondition.class, "_matchCondition", "matchCondition",
75 org.exolab.castor.xml.NodeType.Element);
76 handler = new org.exolab.castor.xml.XMLFieldHandler()
79 public java.lang.Object getValue(java.lang.Object object)
80 throws IllegalStateException
82 FeatureMatcherSet target = (FeatureMatcherSet) object;
83 return target.getMatchCondition();
87 public void setValue(java.lang.Object object, java.lang.Object value)
88 throws IllegalStateException, IllegalArgumentException
92 FeatureMatcherSet target = (FeatureMatcherSet) object;
93 target.setMatchCondition((MatchCondition) value);
94 } catch (java.lang.Exception ex)
96 throw new IllegalStateException(ex.toString());
101 public java.lang.Object newInstance(java.lang.Object parent)
103 return new MatchCondition();
106 desc.setHandler(handler);
107 desc.setRequired(true);
108 desc.setMultivalued(false);
109 addFieldDescriptor(desc);
111 // -- validation code for: _matchCondition
112 fieldValidator = new org.exolab.castor.xml.FieldValidator();
113 fieldValidator.setMinOccurs(1);
116 desc.setValidator(fieldValidator);
117 // -- _compoundMatcher
118 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
119 CompoundMatcher.class, "_compoundMatcher", "compoundMatcher",
120 org.exolab.castor.xml.NodeType.Element);
121 handler = new org.exolab.castor.xml.XMLFieldHandler()
124 public java.lang.Object getValue(java.lang.Object object)
125 throws IllegalStateException
127 FeatureMatcherSet target = (FeatureMatcherSet) object;
128 return target.getCompoundMatcher();
132 public void setValue(java.lang.Object object, java.lang.Object value)
133 throws IllegalStateException, IllegalArgumentException
137 FeatureMatcherSet target = (FeatureMatcherSet) object;
138 target.setCompoundMatcher((CompoundMatcher) value);
139 } catch (java.lang.Exception ex)
141 throw new IllegalStateException(ex.toString());
146 public java.lang.Object newInstance(java.lang.Object parent)
148 return new CompoundMatcher();
151 desc.setHandler(handler);
152 desc.setRequired(true);
153 desc.setMultivalued(false);
154 addFieldDescriptor(desc);
156 // -- validation code for: _compoundMatcher
157 fieldValidator = new org.exolab.castor.xml.FieldValidator();
158 fieldValidator.setMinOccurs(1);
161 desc.setValidator(fieldValidator);
169 * Method getAccessMode.
171 * @return the access mode specified for this class.
174 public org.exolab.castor.mapping.AccessMode getAccessMode()
180 * Method getIdentity.
182 * @return the identity field, null if this class has no identity.
185 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
187 return super.getIdentity();
191 * Method getJavaClass.
193 * @return the Java class represented by this descriptor.
196 public java.lang.Class getJavaClass()
198 return jalview.schemabinding.version2.FeatureMatcherSet.class;
202 * Method getNameSpacePrefix.
204 * @return the namespace prefix to use when marshaling as XML.
207 public java.lang.String getNameSpacePrefix()
213 * Method getNameSpaceURI.
215 * @return the namespace URI used when marshaling and unmarshaling as XML.
218 public java.lang.String getNameSpaceURI()
224 * Method getValidator.
226 * @return a specific validator for the class described by this
230 public org.exolab.castor.xml.TypeValidator getValidator()
238 * @return the XML Name for the Class being described.
241 public java.lang.String getXMLName()
247 * Method isElementDefinition.
249 * @return true if XML schema definition of this Class is that of a global
250 * element or element with anonymous type definition.
253 public boolean isElementDefinition()
255 return _elementDefinition;