Merge branch 'feature/JAL-3063JAXB' into feature/JAL-3063jaxbNoCastor
[jalview.git] / src / jalview / schemabinding / version2 / descriptors / FeatureMatcherSetDescriptor.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 import jalview.schemabinding.version2.CompoundMatcher;
11
12 //---------------------------------/
13 //- Imported classes and packages -/
14 //---------------------------------/
15
16 import jalview.schemabinding.version2.FeatureMatcherSet;
17 import jalview.schemabinding.version2.MatchCondition;
18
19 /**
20  * Class FeatureMatcherSetDescriptor.
21  * 
22  * @version $Revision$ $Date$
23  */
24 public class FeatureMatcherSetDescriptor
25         extends org.exolab.castor.xml.util.XMLClassDescriptorImpl
26 {
27
28   // --------------------------/
29   // - Class/Member Variables -/
30   // --------------------------/
31
32   /**
33    * Field _elementDefinition.
34    */
35   private boolean _elementDefinition;
36
37   /**
38    * Field _nsPrefix.
39    */
40   private java.lang.String _nsPrefix;
41
42   /**
43    * Field _nsURI.
44    */
45   private java.lang.String _nsURI;
46
47   /**
48    * Field _xmlName.
49    */
50   private java.lang.String _xmlName;
51
52   // ----------------/
53   // - Constructors -/
54   // ----------------/
55
56   public FeatureMatcherSetDescriptor()
57   {
58     super();
59     _nsURI = "www.jalview.org/colours";
60     _xmlName = "FeatureMatcherSet";
61     _elementDefinition = false;
62
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
69
70     // -- initialize element descriptors
71
72     // -- _matchCondition
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()
77     {
78       @Override
79       public java.lang.Object getValue(java.lang.Object object)
80               throws IllegalStateException
81       {
82         FeatureMatcherSet target = (FeatureMatcherSet) object;
83         return target.getMatchCondition();
84       }
85
86       @Override
87       public void setValue(java.lang.Object object, java.lang.Object value)
88               throws IllegalStateException, IllegalArgumentException
89       {
90         try
91         {
92           FeatureMatcherSet target = (FeatureMatcherSet) object;
93           target.setMatchCondition((MatchCondition) value);
94         } catch (java.lang.Exception ex)
95         {
96           throw new IllegalStateException(ex.toString());
97         }
98       }
99
100       @Override
101       public java.lang.Object newInstance(java.lang.Object parent)
102       {
103         return new MatchCondition();
104       }
105     };
106     desc.setHandler(handler);
107     desc.setRequired(true);
108     desc.setMultivalued(false);
109     addFieldDescriptor(desc);
110
111     // -- validation code for: _matchCondition
112     fieldValidator = new org.exolab.castor.xml.FieldValidator();
113     fieldValidator.setMinOccurs(1);
114     { // -- local scope
115     }
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()
122     {
123       @Override
124       public java.lang.Object getValue(java.lang.Object object)
125               throws IllegalStateException
126       {
127         FeatureMatcherSet target = (FeatureMatcherSet) object;
128         return target.getCompoundMatcher();
129       }
130
131       @Override
132       public void setValue(java.lang.Object object, java.lang.Object value)
133               throws IllegalStateException, IllegalArgumentException
134       {
135         try
136         {
137           FeatureMatcherSet target = (FeatureMatcherSet) object;
138           target.setCompoundMatcher((CompoundMatcher) value);
139         } catch (java.lang.Exception ex)
140         {
141           throw new IllegalStateException(ex.toString());
142         }
143       }
144
145       @Override
146       public java.lang.Object newInstance(java.lang.Object parent)
147       {
148         return new CompoundMatcher();
149       }
150     };
151     desc.setHandler(handler);
152     desc.setRequired(true);
153     desc.setMultivalued(false);
154     addFieldDescriptor(desc);
155
156     // -- validation code for: _compoundMatcher
157     fieldValidator = new org.exolab.castor.xml.FieldValidator();
158     fieldValidator.setMinOccurs(1);
159     { // -- local scope
160     }
161     desc.setValidator(fieldValidator);
162   }
163
164   // -----------/
165   // - Methods -/
166   // -----------/
167
168   /**
169    * Method getAccessMode.
170    * 
171    * @return the access mode specified for this class.
172    */
173   @Override
174   public org.exolab.castor.mapping.AccessMode getAccessMode()
175   {
176     return null;
177   }
178
179   /**
180    * Method getIdentity.
181    * 
182    * @return the identity field, null if this class has no identity.
183    */
184   @Override
185   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
186   {
187     return super.getIdentity();
188   }
189
190   /**
191    * Method getJavaClass.
192    * 
193    * @return the Java class represented by this descriptor.
194    */
195   @Override
196   public java.lang.Class getJavaClass()
197   {
198     return jalview.schemabinding.version2.FeatureMatcherSet.class;
199   }
200
201   /**
202    * Method getNameSpacePrefix.
203    * 
204    * @return the namespace prefix to use when marshaling as XML.
205    */
206   @Override
207   public java.lang.String getNameSpacePrefix()
208   {
209     return _nsPrefix;
210   }
211
212   /**
213    * Method getNameSpaceURI.
214    * 
215    * @return the namespace URI used when marshaling and unmarshaling as XML.
216    */
217   @Override
218   public java.lang.String getNameSpaceURI()
219   {
220     return _nsURI;
221   }
222
223   /**
224    * Method getValidator.
225    * 
226    * @return a specific validator for the class described by this
227    *         ClassDescriptor.
228    */
229   @Override
230   public org.exolab.castor.xml.TypeValidator getValidator()
231   {
232     return this;
233   }
234
235   /**
236    * Method getXMLName.
237    * 
238    * @return the XML Name for the Class being described.
239    */
240   @Override
241   public java.lang.String getXMLName()
242   {
243     return _xmlName;
244   }
245
246   /**
247    * Method isElementDefinition.
248    * 
249    * @return true if XML schema definition of this Class is that of a global
250    *         element or element with anonymous type definition.
251    */
252   @Override
253   public boolean isElementDefinition()
254   {
255     return _elementDefinition;
256   }
257
258 }