2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML
\r
8 package jalview.schemabinding.version2;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import java.io.IOException;
\r
15 import java.io.Reader;
\r
16 import java.io.Serializable;
\r
17 import java.io.Writer;
\r
18 import java.util.Enumeration;
\r
19 import java.util.Vector;
\r
20 import org.exolab.castor.xml.MarshalException;
\r
21 import org.exolab.castor.xml.Marshaller;
\r
22 import org.exolab.castor.xml.Unmarshaller;
\r
23 import org.exolab.castor.xml.ValidationException;
\r
24 import org.xml.sax.ContentHandler;
\r
29 * @version $Revision$ $Date$
\r
31 public class Annotation implements java.io.Serializable {
\r
34 //--------------------------/
\r
35 //- Class/Member Variables -/
\r
36 //--------------------------/
\r
41 private boolean _graph;
\r
44 * keeps track of state for field: _graph
\r
46 private boolean _has_graph;
\r
51 private int _graphType;
\r
54 * keeps track of state for field: _graphType
\r
56 private boolean _has_graphType;
\r
59 * Field _sequenceRef
\r
61 private java.lang.String _sequenceRef;
\r
64 * Field _graphColour
\r
66 private int _graphColour;
\r
69 * keeps track of state for field: _graphColour
\r
71 private boolean _has_graphColour;
\r
76 private int _graphGroup;
\r
79 * keeps track of state for field: _graphGroup
\r
81 private boolean _has_graphGroup;
\r
86 private java.lang.String _id;
\r
89 * Field _annotationElementList
\r
91 private java.util.Vector _annotationElementList;
\r
96 private java.lang.String _label;
\r
99 * Field _description
\r
101 private java.lang.String _description;
\r
104 * Field _thresholdLine
\r
106 private jalview.schemabinding.version2.ThresholdLine _thresholdLine;
\r
109 //----------------/
\r
110 //- Constructors -/
\r
111 //----------------/
\r
113 public Annotation() {
\r
115 _annotationElementList = new Vector();
\r
116 } //-- jalview.schemabinding.version2.Annotation()
\r
124 * Method addAnnotationElement
\r
128 * @param vAnnotationElement
\r
130 public void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
131 throws java.lang.IndexOutOfBoundsException
\r
133 _annotationElementList.addElement(vAnnotationElement);
\r
134 } //-- void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement)
\r
137 * Method addAnnotationElement
\r
142 * @param vAnnotationElement
\r
144 public void addAnnotationElement(int index, jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
145 throws java.lang.IndexOutOfBoundsException
\r
147 _annotationElementList.insertElementAt(vAnnotationElement, index);
\r
148 } //-- void addAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement)
\r
151 * Method deleteGraph
\r
154 public void deleteGraph()
\r
156 this._has_graph= false;
\r
157 } //-- void deleteGraph()
\r
160 * Method deleteGraphColour
\r
163 public void deleteGraphColour()
\r
165 this._has_graphColour= false;
\r
166 } //-- void deleteGraphColour()
\r
169 * Method deleteGraphGroup
\r
172 public void deleteGraphGroup()
\r
174 this._has_graphGroup= false;
\r
175 } //-- void deleteGraphGroup()
\r
178 * Method deleteGraphType
\r
181 public void deleteGraphType()
\r
183 this._has_graphType= false;
\r
184 } //-- void deleteGraphType()
\r
187 * Method enumerateAnnotationElement
\r
191 * @return Enumeration
\r
193 public java.util.Enumeration enumerateAnnotationElement()
\r
195 return _annotationElementList.elements();
\r
196 } //-- java.util.Enumeration enumerateAnnotationElement()
\r
199 * Method getAnnotationElement
\r
204 * @return AnnotationElement
\r
206 public jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int index)
\r
207 throws java.lang.IndexOutOfBoundsException
\r
209 //-- check bounds for index
\r
210 if ((index < 0) || (index > _annotationElementList.size())) {
\r
211 throw new IndexOutOfBoundsException();
\r
214 return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.elementAt(index);
\r
215 } //-- jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int)
\r
218 * Method getAnnotationElement
\r
222 * @return AnnotationElement
\r
224 public jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement()
\r
226 int size = _annotationElementList.size();
\r
227 jalview.schemabinding.version2.AnnotationElement[] mArray = new jalview.schemabinding.version2.AnnotationElement[size];
\r
228 for (int index = 0; index < size; index++) {
\r
229 mArray[index] = (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.elementAt(index);
\r
232 } //-- jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement()
\r
235 * Method getAnnotationElementCount
\r
241 public int getAnnotationElementCount()
\r
243 return _annotationElementList.size();
\r
244 } //-- int getAnnotationElementCount()
\r
247 * Returns the value of field 'description'.
\r
250 * @return the value of field 'description'.
\r
252 public java.lang.String getDescription()
\r
254 return this._description;
\r
255 } //-- java.lang.String getDescription()
\r
258 * Returns the value of field 'graph'.
\r
261 * @return the value of field 'graph'.
\r
263 public boolean getGraph()
\r
265 return this._graph;
\r
266 } //-- boolean getGraph()
\r
269 * Returns the value of field 'graphColour'.
\r
272 * @return the value of field 'graphColour'.
\r
274 public int getGraphColour()
\r
276 return this._graphColour;
\r
277 } //-- int getGraphColour()
\r
280 * Returns the value of field 'graphGroup'.
\r
283 * @return the value of field 'graphGroup'.
\r
285 public int getGraphGroup()
\r
287 return this._graphGroup;
\r
288 } //-- int getGraphGroup()
\r
291 * Returns the value of field 'graphType'.
\r
294 * @return the value of field 'graphType'.
\r
296 public int getGraphType()
\r
298 return this._graphType;
\r
299 } //-- int getGraphType()
\r
302 * Returns the value of field 'id'.
\r
305 * @return the value of field 'id'.
\r
307 public java.lang.String getId()
\r
310 } //-- java.lang.String getId()
\r
313 * Returns the value of field 'label'.
\r
316 * @return the value of field 'label'.
\r
318 public java.lang.String getLabel()
\r
320 return this._label;
\r
321 } //-- java.lang.String getLabel()
\r
324 * Returns the value of field 'sequenceRef'.
\r
327 * @return the value of field 'sequenceRef'.
\r
329 public java.lang.String getSequenceRef()
\r
331 return this._sequenceRef;
\r
332 } //-- java.lang.String getSequenceRef()
\r
335 * Returns the value of field 'thresholdLine'.
\r
337 * @return ThresholdLine
\r
338 * @return the value of field 'thresholdLine'.
\r
340 public jalview.schemabinding.version2.ThresholdLine getThresholdLine()
\r
342 return this._thresholdLine;
\r
343 } //-- jalview.schemabinding.version2.ThresholdLine getThresholdLine()
\r
352 public boolean hasGraph()
\r
354 return this._has_graph;
\r
355 } //-- boolean hasGraph()
\r
358 * Method hasGraphColour
\r
364 public boolean hasGraphColour()
\r
366 return this._has_graphColour;
\r
367 } //-- boolean hasGraphColour()
\r
370 * Method hasGraphGroup
\r
376 public boolean hasGraphGroup()
\r
378 return this._has_graphGroup;
\r
379 } //-- boolean hasGraphGroup()
\r
382 * Method hasGraphType
\r
388 public boolean hasGraphType()
\r
390 return this._has_graphType;
\r
391 } //-- boolean hasGraphType()
\r
400 public boolean isValid()
\r
405 catch (org.exolab.castor.xml.ValidationException vex) {
\r
409 } //-- boolean isValid()
\r
418 public void marshal(java.io.Writer out)
\r
419 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
422 Marshaller.marshal(this, out);
\r
423 } //-- void marshal(java.io.Writer)
\r
432 public void marshal(org.xml.sax.ContentHandler handler)
\r
433 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
436 Marshaller.marshal(this, handler);
\r
437 } //-- void marshal(org.xml.sax.ContentHandler)
\r
440 * Method removeAllAnnotationElement
\r
443 public void removeAllAnnotationElement()
\r
445 _annotationElementList.removeAllElements();
\r
446 } //-- void removeAllAnnotationElement()
\r
449 * Method removeAnnotationElement
\r
454 * @return AnnotationElement
\r
456 public jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int index)
\r
458 java.lang.Object obj = _annotationElementList.elementAt(index);
\r
459 _annotationElementList.removeElementAt(index);
\r
460 return (jalview.schemabinding.version2.AnnotationElement) obj;
\r
461 } //-- jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int)
\r
464 * Method setAnnotationElement
\r
469 * @param vAnnotationElement
\r
471 public void setAnnotationElement(int index, jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
\r
472 throws java.lang.IndexOutOfBoundsException
\r
474 //-- check bounds for index
\r
475 if ((index < 0) || (index > _annotationElementList.size())) {
\r
476 throw new IndexOutOfBoundsException();
\r
478 _annotationElementList.setElementAt(vAnnotationElement, index);
\r
479 } //-- void setAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement)
\r
482 * Method setAnnotationElement
\r
486 * @param annotationElementArray
\r
488 public void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement[] annotationElementArray)
\r
491 _annotationElementList.removeAllElements();
\r
492 for (int i = 0; i < annotationElementArray.length; i++) {
\r
493 _annotationElementList.addElement(annotationElementArray[i]);
\r
495 } //-- void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement)
\r
498 * Sets the value of field 'description'.
\r
500 * @param description the value of field 'description'.
\r
502 public void setDescription(java.lang.String description)
\r
504 this._description = description;
\r
505 } //-- void setDescription(java.lang.String)
\r
508 * Sets the value of field 'graph'.
\r
510 * @param graph the value of field 'graph'.
\r
512 public void setGraph(boolean graph)
\r
514 this._graph = graph;
\r
515 this._has_graph = true;
\r
516 } //-- void setGraph(boolean)
\r
519 * Sets the value of field 'graphColour'.
\r
521 * @param graphColour the value of field 'graphColour'.
\r
523 public void setGraphColour(int graphColour)
\r
525 this._graphColour = graphColour;
\r
526 this._has_graphColour = true;
\r
527 } //-- void setGraphColour(int)
\r
530 * Sets the value of field 'graphGroup'.
\r
532 * @param graphGroup the value of field 'graphGroup'.
\r
534 public void setGraphGroup(int graphGroup)
\r
536 this._graphGroup = graphGroup;
\r
537 this._has_graphGroup = true;
\r
538 } //-- void setGraphGroup(int)
\r
541 * Sets the value of field 'graphType'.
\r
543 * @param graphType the value of field 'graphType'.
\r
545 public void setGraphType(int graphType)
\r
547 this._graphType = graphType;
\r
548 this._has_graphType = true;
\r
549 } //-- void setGraphType(int)
\r
552 * Sets the value of field 'id'.
\r
554 * @param id the value of field 'id'.
\r
556 public void setId(java.lang.String id)
\r
559 } //-- void setId(java.lang.String)
\r
562 * Sets the value of field 'label'.
\r
564 * @param label the value of field 'label'.
\r
566 public void setLabel(java.lang.String label)
\r
568 this._label = label;
\r
569 } //-- void setLabel(java.lang.String)
\r
572 * Sets the value of field 'sequenceRef'.
\r
574 * @param sequenceRef the value of field 'sequenceRef'.
\r
576 public void setSequenceRef(java.lang.String sequenceRef)
\r
578 this._sequenceRef = sequenceRef;
\r
579 } //-- void setSequenceRef(java.lang.String)
\r
582 * Sets the value of field 'thresholdLine'.
\r
584 * @param thresholdLine the value of field 'thresholdLine'.
\r
586 public void setThresholdLine(jalview.schemabinding.version2.ThresholdLine thresholdLine)
\r
588 this._thresholdLine = thresholdLine;
\r
589 } //-- void setThresholdLine(jalview.schemabinding.version2.ThresholdLine)
\r
599 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
600 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
602 return (jalview.schemabinding.version2.Annotation) Unmarshaller.unmarshal(jalview.schemabinding.version2.Annotation.class, reader);
\r
603 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
609 public void validate()
\r
610 throws org.exolab.castor.xml.ValidationException
\r
612 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
613 validator.validate(this);
\r
614 } //-- void validate()
\r