Merge branch 'feature/JAL-3063JAXB' into feature/JAL-3063jaxbNoCastor
[jalview.git] / src / jalview / binding / FeatureMatcherSet.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.binding;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * A feature match condition, which may be simple or compound
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class FeatureMatcherSet implements java.io.Serializable
23 {
24
25   // --------------------------/
26   // - Class/Member Variables -/
27   // --------------------------/
28
29   /**
30    * Internal choice value storage
31    */
32   private java.lang.Object _choiceValue;
33
34   /**
35    * Field _matchCondition.
36    */
37   private jalview.binding.MatchCondition _matchCondition;
38
39   /**
40    * Field _compoundMatcher.
41    */
42   private jalview.binding.CompoundMatcher _compoundMatcher;
43
44   // ----------------/
45   // - Constructors -/
46   // ----------------/
47
48   public FeatureMatcherSet()
49   {
50     super();
51   }
52
53   // -----------/
54   // - Methods -/
55   // -----------/
56
57   /**
58    * Returns the value of field 'choiceValue'. The field 'choiceValue' has the
59    * following description: Internal choice value storage
60    * 
61    * @return the value of field 'ChoiceValue'.
62    */
63   public java.lang.Object getChoiceValue()
64   {
65     return this._choiceValue;
66   }
67
68   /**
69    * Returns the value of field 'compoundMatcher'.
70    * 
71    * @return the value of field 'CompoundMatcher'.
72    */
73   public jalview.binding.CompoundMatcher getCompoundMatcher()
74   {
75     return this._compoundMatcher;
76   }
77
78   /**
79    * Returns the value of field 'matchCondition'.
80    * 
81    * @return the value of field 'MatchCondition'.
82    */
83   public jalview.binding.MatchCondition getMatchCondition()
84   {
85     return this._matchCondition;
86   }
87
88   /**
89    * Method isValid.
90    * 
91    * @return true if this object is valid according to the schema
92    */
93   public boolean isValid()
94   {
95     try
96     {
97       validate();
98     } catch (org.exolab.castor.xml.ValidationException vex)
99     {
100       return false;
101     }
102     return true;
103   }
104
105   /**
106    * 
107    * 
108    * @param out
109    * @throws org.exolab.castor.xml.MarshalException
110    *           if object is null or if any SAXException is thrown during
111    *           marshaling
112    * @throws org.exolab.castor.xml.ValidationException
113    *           if this object is an invalid instance according to the schema
114    */
115   public void marshal(final java.io.Writer out)
116           throws org.exolab.castor.xml.MarshalException,
117           org.exolab.castor.xml.ValidationException
118   {
119     Marshaller.marshal(this, out);
120   }
121
122   /**
123    * 
124    * 
125    * @param handler
126    * @throws java.io.IOException
127    *           if an IOException occurs during marshaling
128    * @throws org.exolab.castor.xml.ValidationException
129    *           if this object is an invalid instance according to the schema
130    * @throws org.exolab.castor.xml.MarshalException
131    *           if object is null or if any SAXException is thrown during
132    *           marshaling
133    */
134   public void marshal(final org.xml.sax.ContentHandler handler)
135           throws java.io.IOException,
136           org.exolab.castor.xml.MarshalException,
137           org.exolab.castor.xml.ValidationException
138   {
139     Marshaller.marshal(this, handler);
140   }
141
142   /**
143    * Sets the value of field 'compoundMatcher'.
144    * 
145    * @param compoundMatcher
146    *          the value of field 'compoundMatcher'.
147    */
148   public void setCompoundMatcher(
149           final jalview.binding.CompoundMatcher compoundMatcher)
150   {
151     this._compoundMatcher = compoundMatcher;
152     this._choiceValue = compoundMatcher;
153   }
154
155   /**
156    * Sets the value of field 'matchCondition'.
157    * 
158    * @param matchCondition
159    *          the value of field 'matchCondition'.
160    */
161   public void setMatchCondition(
162           final jalview.binding.MatchCondition matchCondition)
163   {
164     this._matchCondition = matchCondition;
165     this._choiceValue = matchCondition;
166   }
167
168   /**
169    * Method unmarshal.
170    * 
171    * @param reader
172    * @throws org.exolab.castor.xml.MarshalException
173    *           if object is null or if any SAXException is thrown during
174    *           marshaling
175    * @throws org.exolab.castor.xml.ValidationException
176    *           if this object is an invalid instance according to the schema
177    * @return the unmarshaled jalview.binding.FeatureMatcherSet
178    */
179   public static jalview.binding.FeatureMatcherSet unmarshal(
180           final java.io.Reader reader)
181           throws org.exolab.castor.xml.MarshalException,
182           org.exolab.castor.xml.ValidationException
183   {
184     return (jalview.binding.FeatureMatcherSet) Unmarshaller
185             .unmarshal(jalview.binding.FeatureMatcherSet.class, reader);
186   }
187
188   /**
189    * 
190    * 
191    * @throws org.exolab.castor.xml.ValidationException
192    *           if this object is an invalid instance according to the schema
193    */
194   public void validate() throws org.exolab.castor.xml.ValidationException
195   {
196     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
197     validator.validate(this);
198   }
199
200 }