JAL-3082 one more test condition
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / FilterDescriptor.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.Filter;
15
16 /**
17  * Class FilterDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class FilterDescriptor
22         extends 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 FilterDescriptor()
54   {
55     super();
56     _xmlName = "filter";
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     // -- _featureType
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()
72     {
73       public java.lang.Object getValue(java.lang.Object object)
74               throws IllegalStateException
75       {
76         Filter target = (Filter) object;
77         return target.getFeatureType();
78       }
79
80       public void setValue(java.lang.Object object, java.lang.Object value)
81               throws IllegalStateException, IllegalArgumentException
82       {
83         try
84         {
85           Filter target = (Filter) object;
86           target.setFeatureType((java.lang.String) value);
87         } catch (java.lang.Exception ex)
88         {
89           throw new IllegalStateException(ex.toString());
90         }
91       }
92
93       public java.lang.Object newInstance(java.lang.Object parent)
94       {
95         return null;
96       }
97     };
98     desc.setHandler(handler);
99     desc.setRequired(true);
100     desc.setMultivalued(false);
101     addFieldDescriptor(desc);
102
103     // -- validation code for: _featureType
104     fieldValidator = new org.exolab.castor.xml.FieldValidator();
105     fieldValidator.setMinOccurs(1);
106     { // -- local scope
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");
111     }
112     desc.setValidator(fieldValidator);
113     // -- initialize element descriptors
114
115     // -- _matcherSet
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()
120     {
121       public java.lang.Object getValue(java.lang.Object object)
122               throws IllegalStateException
123       {
124         Filter target = (Filter) object;
125         return target.getMatcherSet();
126       }
127
128       public void setValue(java.lang.Object object, java.lang.Object value)
129               throws IllegalStateException, IllegalArgumentException
130       {
131         try
132         {
133           Filter target = (Filter) object;
134           target.setMatcherSet(
135                   (jalview.schemabinding.version2.MatcherSet) value);
136         } catch (java.lang.Exception ex)
137         {
138           throw new IllegalStateException(ex.toString());
139         }
140       }
141
142       public java.lang.Object newInstance(java.lang.Object parent)
143       {
144         return new jalview.schemabinding.version2.MatcherSet();
145       }
146     };
147     desc.setHandler(handler);
148     desc.setRequired(true);
149     desc.setMultivalued(false);
150     addFieldDescriptor(desc);
151
152     // -- validation code for: _matcherSet
153     fieldValidator = new org.exolab.castor.xml.FieldValidator();
154     fieldValidator.setMinOccurs(1);
155     { // -- local scope
156     }
157     desc.setValidator(fieldValidator);
158   }
159
160   // -----------/
161   // - Methods -/
162   // -----------/
163
164   /**
165    * Method getAccessMode.
166    * 
167    * @return the access mode specified for this class.
168    */
169   public org.exolab.castor.mapping.AccessMode getAccessMode()
170   {
171     return null;
172   }
173
174   /**
175    * Method getIdentity.
176    * 
177    * @return the identity field, null if this class has no identity.
178    */
179   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
180   {
181     return super.getIdentity();
182   }
183
184   /**
185    * Method getJavaClass.
186    * 
187    * @return the Java class represented by this descriptor.
188    */
189   public java.lang.Class getJavaClass()
190   {
191     return jalview.schemabinding.version2.Filter.class;
192   }
193
194   /**
195    * Method getNameSpacePrefix.
196    * 
197    * @return the namespace prefix to use when marshaling as XML.
198    */
199   public java.lang.String getNameSpacePrefix()
200   {
201     return _nsPrefix;
202   }
203
204   /**
205    * Method getNameSpaceURI.
206    * 
207    * @return the namespace URI used when marshaling and unmarshaling as XML.
208    */
209   public java.lang.String getNameSpaceURI()
210   {
211     return _nsURI;
212   }
213
214   /**
215    * Method getValidator.
216    * 
217    * @return a specific validator for the class described by this
218    *         ClassDescriptor.
219    */
220   public org.exolab.castor.xml.TypeValidator getValidator()
221   {
222     return this;
223   }
224
225   /**
226    * Method getXMLName.
227    * 
228    * @return the XML Name for the Class being described.
229    */
230   public java.lang.String getXMLName()
231   {
232     return _xmlName;
233   }
234
235   /**
236    * Method isElementDefinition.
237    * 
238    * @return true if XML schema definition of this Class is that of a global
239    *         element or element with anonymous type definition.
240    */
241   public boolean isElementDefinition()
242   {
243     return _elementDefinition;
244   }
245
246 }