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.Filter;
17 * Class FilterDescriptor.
19 * @version $Revision$ $Date$
21 public class FilterDescriptor
22 extends org.exolab.castor.xml.util.XMLClassDescriptorImpl
25 // --------------------------/
26 // - Class/Member Variables -/
27 // --------------------------/
30 * Field _elementDefinition.
32 private boolean _elementDefinition;
37 private java.lang.String _nsPrefix;
42 private java.lang.String _nsURI;
47 private java.lang.String _xmlName;
53 public FilterDescriptor()
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
67 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
68 java.lang.String.class, "_featureType", "featureType",
69 org.exolab.castor.xml.NodeType.Attribute);
70 desc.setImmutable(true);
71 handler = new org.exolab.castor.xml.XMLFieldHandler()
73 public java.lang.Object getValue(java.lang.Object object)
74 throws IllegalStateException
76 Filter target = (Filter) object;
77 return target.getFeatureType();
80 public void setValue(java.lang.Object object, java.lang.Object value)
81 throws IllegalStateException, IllegalArgumentException
85 Filter target = (Filter) object;
86 target.setFeatureType((java.lang.String) value);
87 } catch (java.lang.Exception ex)
89 throw new IllegalStateException(ex.toString());
93 public java.lang.Object newInstance(java.lang.Object parent)
98 desc.setHandler(handler);
99 desc.setRequired(true);
100 desc.setMultivalued(false);
101 addFieldDescriptor(desc);
103 // -- validation code for: _featureType
104 fieldValidator = new org.exolab.castor.xml.FieldValidator();
105 fieldValidator.setMinOccurs(1);
107 org.exolab.castor.xml.validators.StringValidator typeValidator;
108 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
109 fieldValidator.setValidator(typeValidator);
110 typeValidator.setWhiteSpace("preserve");
112 desc.setValidator(fieldValidator);
113 // -- initialize element descriptors
116 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
117 jalview.schemabinding.version2.MatcherSet.class, "_matcherSet",
118 "matcherSet", org.exolab.castor.xml.NodeType.Element);
119 handler = new org.exolab.castor.xml.XMLFieldHandler()
121 public java.lang.Object getValue(java.lang.Object object)
122 throws IllegalStateException
124 Filter target = (Filter) object;
125 return target.getMatcherSet();
128 public void setValue(java.lang.Object object, java.lang.Object value)
129 throws IllegalStateException, IllegalArgumentException
133 Filter target = (Filter) object;
134 target.setMatcherSet(
135 (jalview.schemabinding.version2.MatcherSet) value);
136 } catch (java.lang.Exception ex)
138 throw new IllegalStateException(ex.toString());
142 public java.lang.Object newInstance(java.lang.Object parent)
144 return new jalview.schemabinding.version2.MatcherSet();
147 desc.setHandler(handler);
148 desc.setRequired(true);
149 desc.setMultivalued(false);
150 addFieldDescriptor(desc);
152 // -- validation code for: _matcherSet
153 fieldValidator = new org.exolab.castor.xml.FieldValidator();
154 fieldValidator.setMinOccurs(1);
157 desc.setValidator(fieldValidator);
165 * Method getAccessMode.
167 * @return the access mode specified for this class.
169 public org.exolab.castor.mapping.AccessMode getAccessMode()
175 * Method getIdentity.
177 * @return the identity field, null if this class has no identity.
179 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
181 return super.getIdentity();
185 * Method getJavaClass.
187 * @return the Java class represented by this descriptor.
189 public java.lang.Class getJavaClass()
191 return jalview.schemabinding.version2.Filter.class;
195 * Method getNameSpacePrefix.
197 * @return the namespace prefix to use when marshaling as XML.
199 public java.lang.String getNameSpacePrefix()
205 * Method getNameSpaceURI.
207 * @return the namespace URI used when marshaling and unmarshaling as XML.
209 public java.lang.String getNameSpaceURI()
215 * Method getValidator.
217 * @return a specific validator for the class described by this
220 public org.exolab.castor.xml.TypeValidator getValidator()
228 * @return the XML Name for the Class being described.
230 public java.lang.String getXMLName()
236 * Method isElementDefinition.
238 * @return true if XML schema definition of this Class is that of a global
239 * element or element with anonymous type definition.
241 public boolean isElementDefinition()
243 return _elementDefinition;