JAL-2843 schema and code changes to save colour by attribute and filters in user...
[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 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import jalview.schemabinding.version2.FeatureMatcherSet;
15
16 /**
17  * Class FeatureMatcherSetDescriptor.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class FeatureMatcherSetDescriptor
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 FeatureMatcherSetDescriptor()
54   {
55     super();
56     _nsURI = "www.jalview.org/colours";
57     _xmlName = "FeatureMatcherSet";
58     _elementDefinition = false;
59
60     // -- set grouping compositor
61     setCompositorAsChoice();
62     org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63     org.exolab.castor.mapping.FieldHandler handler = null;
64     org.exolab.castor.xml.FieldValidator fieldValidator = null;
65     // -- initialize attribute descriptors
66
67     // -- initialize element descriptors
68
69     // -- _matchCondition
70     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
71             jalview.schemabinding.version2.MatchCondition.class,
72             "_matchCondition", "matchCondition",
73             org.exolab.castor.xml.NodeType.Element);
74     handler = new org.exolab.castor.xml.XMLFieldHandler()
75     {
76       public java.lang.Object getValue(java.lang.Object object)
77               throws IllegalStateException
78       {
79         FeatureMatcherSet target = (FeatureMatcherSet) object;
80         return target.getMatchCondition();
81       }
82
83       public void setValue(java.lang.Object object, java.lang.Object value)
84               throws IllegalStateException, IllegalArgumentException
85       {
86         try
87         {
88           FeatureMatcherSet target = (FeatureMatcherSet) object;
89           target.setMatchCondition(
90                   (jalview.schemabinding.version2.MatchCondition) value);
91         } catch (java.lang.Exception ex)
92         {
93           throw new IllegalStateException(ex.toString());
94         }
95       }
96
97       public java.lang.Object newInstance(java.lang.Object parent)
98       {
99         return new jalview.schemabinding.version2.MatchCondition();
100       }
101     };
102     desc.setHandler(handler);
103     desc.setRequired(true);
104     desc.setMultivalued(false);
105     addFieldDescriptor(desc);
106
107     // -- validation code for: _matchCondition
108     fieldValidator = new org.exolab.castor.xml.FieldValidator();
109     fieldValidator.setMinOccurs(1);
110     { // -- local scope
111     }
112     desc.setValidator(fieldValidator);
113     // -- _compoundMatcher
114     desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
115             jalview.schemabinding.version2.CompoundMatcher.class,
116             "_compoundMatcher", "compoundMatcher",
117             org.exolab.castor.xml.NodeType.Element);
118     handler = new org.exolab.castor.xml.XMLFieldHandler()
119     {
120       public java.lang.Object getValue(java.lang.Object object)
121               throws IllegalStateException
122       {
123         FeatureMatcherSet target = (FeatureMatcherSet) object;
124         return target.getCompoundMatcher();
125       }
126
127       public void setValue(java.lang.Object object, java.lang.Object value)
128               throws IllegalStateException, IllegalArgumentException
129       {
130         try
131         {
132           FeatureMatcherSet target = (FeatureMatcherSet) object;
133           target.setCompoundMatcher(
134                   (jalview.schemabinding.version2.CompoundMatcher) value);
135         } catch (java.lang.Exception ex)
136         {
137           throw new IllegalStateException(ex.toString());
138         }
139       }
140
141       public java.lang.Object newInstance(java.lang.Object parent)
142       {
143         return new jalview.schemabinding.version2.CompoundMatcher();
144       }
145     };
146     desc.setHandler(handler);
147     desc.setRequired(true);
148     desc.setMultivalued(false);
149     addFieldDescriptor(desc);
150
151     // -- validation code for: _compoundMatcher
152     fieldValidator = new org.exolab.castor.xml.FieldValidator();
153     fieldValidator.setMinOccurs(1);
154     { // -- local scope
155     }
156     desc.setValidator(fieldValidator);
157   }
158
159   // -----------/
160   // - Methods -/
161   // -----------/
162
163   /**
164    * Method getAccessMode.
165    * 
166    * @return the access mode specified for this class.
167    */
168   public org.exolab.castor.mapping.AccessMode getAccessMode()
169   {
170     return null;
171   }
172
173   /**
174    * Method getIdentity.
175    * 
176    * @return the identity field, null if this class has no identity.
177    */
178   public org.exolab.castor.mapping.FieldDescriptor getIdentity()
179   {
180     return super.getIdentity();
181   }
182
183   /**
184    * Method getJavaClass.
185    * 
186    * @return the Java class represented by this descriptor.
187    */
188   public java.lang.Class getJavaClass()
189   {
190     return jalview.schemabinding.version2.FeatureMatcherSet.class;
191   }
192
193   /**
194    * Method getNameSpacePrefix.
195    * 
196    * @return the namespace prefix to use when marshaling as XML.
197    */
198   public java.lang.String getNameSpacePrefix()
199   {
200     return _nsPrefix;
201   }
202
203   /**
204    * Method getNameSpaceURI.
205    * 
206    * @return the namespace URI used when marshaling and unmarshaling as XML.
207    */
208   public java.lang.String getNameSpaceURI()
209   {
210     return _nsURI;
211   }
212
213   /**
214    * Method getValidator.
215    * 
216    * @return a specific validator for the class described by this
217    *         ClassDescriptor.
218    */
219   public org.exolab.castor.xml.TypeValidator getValidator()
220   {
221     return this;
222   }
223
224   /**
225    * Method getXMLName.
226    * 
227    * @return the XML Name for the Class being described.
228    */
229   public java.lang.String getXMLName()
230   {
231     return _xmlName;
232   }
233
234   /**
235    * Method isElementDefinition.
236    * 
237    * @return true if XML schema definition of this Class is that of a global
238    *         element or element with anonymous type definition.
239    */
240   public boolean isElementDefinition()
241   {
242     return _elementDefinition;
243   }
244
245 }