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 JSeq implements java.io.Serializable {
\r
34 //--------------------------/
\r
35 //- Class/Member Variables -/
\r
36 //--------------------------/
\r
41 private int _colour;
\r
44 * keeps track of state for field: _colour
\r
46 private boolean _has_colour;
\r
54 * keeps track of state for field: _start
\r
56 private boolean _has_start;
\r
64 * keeps track of state for field: _end
\r
66 private boolean _has_end;
\r
74 * keeps track of state for field: _id
\r
76 private boolean _has_id;
\r
81 private boolean _hidden;
\r
84 * keeps track of state for field: _hidden
\r
86 private boolean _has_hidden;
\r
89 * Field _featuresList
\r
91 private java.util.Vector _featuresList;
\r
96 private java.util.Vector _pdbidsList;
\r
99 * Field _hiddenSequencesList
\r
101 private java.util.Vector _hiddenSequencesList;
\r
104 //----------------/
\r
105 //- Constructors -/
\r
106 //----------------/
\r
110 _featuresList = new Vector();
\r
111 _pdbidsList = new Vector();
\r
112 _hiddenSequencesList = new Vector();
\r
113 } //-- jalview.schemabinding.version2.JSeq()
\r
121 * Method addFeatures
\r
127 public void addFeatures(jalview.schemabinding.version2.Features vFeatures)
\r
128 throws java.lang.IndexOutOfBoundsException
\r
130 _featuresList.addElement(vFeatures);
\r
131 } //-- void addFeatures(jalview.schemabinding.version2.Features)
\r
134 * Method addFeatures
\r
141 public void addFeatures(int index, jalview.schemabinding.version2.Features vFeatures)
\r
142 throws java.lang.IndexOutOfBoundsException
\r
144 _featuresList.insertElementAt(vFeatures, index);
\r
145 } //-- void addFeatures(int, jalview.schemabinding.version2.Features)
\r
148 * Method addHiddenSequences
\r
152 * @param vHiddenSequences
\r
154 public void addHiddenSequences(int vHiddenSequences)
\r
155 throws java.lang.IndexOutOfBoundsException
\r
157 _hiddenSequencesList.addElement(new java.lang.Integer(vHiddenSequences));
\r
158 } //-- void addHiddenSequences(int)
\r
161 * Method addHiddenSequences
\r
166 * @param vHiddenSequences
\r
168 public void addHiddenSequences(int index, int vHiddenSequences)
\r
169 throws java.lang.IndexOutOfBoundsException
\r
171 _hiddenSequencesList.insertElementAt(new java.lang.Integer(vHiddenSequences), index);
\r
172 } //-- void addHiddenSequences(int, int)
\r
181 public void addPdbids(jalview.schemabinding.version2.Pdbids vPdbids)
\r
182 throws java.lang.IndexOutOfBoundsException
\r
184 _pdbidsList.addElement(vPdbids);
\r
185 } //-- void addPdbids(jalview.schemabinding.version2.Pdbids)
\r
195 public void addPdbids(int index, jalview.schemabinding.version2.Pdbids vPdbids)
\r
196 throws java.lang.IndexOutOfBoundsException
\r
198 _pdbidsList.insertElementAt(vPdbids, index);
\r
199 } //-- void addPdbids(int, jalview.schemabinding.version2.Pdbids)
\r
202 * Method deleteColour
\r
205 public void deleteColour()
\r
207 this._has_colour= false;
\r
208 } //-- void deleteColour()
\r
214 public void deleteEnd()
\r
216 this._has_end= false;
\r
217 } //-- void deleteEnd()
\r
220 * Method deleteHidden
\r
223 public void deleteHidden()
\r
225 this._has_hidden= false;
\r
226 } //-- void deleteHidden()
\r
232 public void deleteId()
\r
234 this._has_id= false;
\r
235 } //-- void deleteId()
\r
238 * Method deleteStart
\r
241 public void deleteStart()
\r
243 this._has_start= false;
\r
244 } //-- void deleteStart()
\r
247 * Method enumerateFeatures
\r
251 * @return Enumeration
\r
253 public java.util.Enumeration enumerateFeatures()
\r
255 return _featuresList.elements();
\r
256 } //-- java.util.Enumeration enumerateFeatures()
\r
259 * Method enumerateHiddenSequences
\r
263 * @return Enumeration
\r
265 public java.util.Enumeration enumerateHiddenSequences()
\r
267 return _hiddenSequencesList.elements();
\r
268 } //-- java.util.Enumeration enumerateHiddenSequences()
\r
271 * Method enumeratePdbids
\r
275 * @return Enumeration
\r
277 public java.util.Enumeration enumeratePdbids()
\r
279 return _pdbidsList.elements();
\r
280 } //-- java.util.Enumeration enumeratePdbids()
\r
283 * Returns the value of field 'colour'.
\r
286 * @return the value of field 'colour'.
\r
288 public int getColour()
\r
290 return this._colour;
\r
291 } //-- int getColour()
\r
294 * Returns the value of field 'end'.
\r
297 * @return the value of field 'end'.
\r
299 public int getEnd()
\r
302 } //-- int getEnd()
\r
305 * Method getFeatures
\r
312 public jalview.schemabinding.version2.Features getFeatures(int index)
\r
313 throws java.lang.IndexOutOfBoundsException
\r
315 //-- check bounds for index
\r
316 if ((index < 0) || (index > _featuresList.size())) {
\r
317 throw new IndexOutOfBoundsException();
\r
320 return (jalview.schemabinding.version2.Features) _featuresList.elementAt(index);
\r
321 } //-- jalview.schemabinding.version2.Features getFeatures(int)
\r
324 * Method getFeatures
\r
330 public jalview.schemabinding.version2.Features[] getFeatures()
\r
332 int size = _featuresList.size();
\r
333 jalview.schemabinding.version2.Features[] mArray = new jalview.schemabinding.version2.Features[size];
\r
334 for (int index = 0; index < size; index++) {
\r
335 mArray[index] = (jalview.schemabinding.version2.Features) _featuresList.elementAt(index);
\r
338 } //-- jalview.schemabinding.version2.Features[] getFeatures()
\r
341 * Method getFeaturesCount
\r
347 public int getFeaturesCount()
\r
349 return _featuresList.size();
\r
350 } //-- int getFeaturesCount()
\r
353 * Returns the value of field 'hidden'.
\r
356 * @return the value of field 'hidden'.
\r
358 public boolean getHidden()
\r
360 return this._hidden;
\r
361 } //-- boolean getHidden()
\r
364 * Method getHiddenSequences
\r
371 public int getHiddenSequences(int index)
\r
372 throws java.lang.IndexOutOfBoundsException
\r
374 //-- check bounds for index
\r
375 if ((index < 0) || (index > _hiddenSequencesList.size())) {
\r
376 throw new IndexOutOfBoundsException();
\r
379 return ((java.lang.Integer)_hiddenSequencesList.elementAt(index)).intValue();
\r
380 } //-- int getHiddenSequences(int)
\r
383 * Method getHiddenSequences
\r
389 public int[] getHiddenSequences()
\r
391 int size = _hiddenSequencesList.size();
\r
392 int[] mArray = new int[size];
\r
393 for (int index = 0; index < size; index++) {
\r
394 mArray[index] = ((java.lang.Integer)_hiddenSequencesList.elementAt(index)).intValue();
\r
397 } //-- int[] getHiddenSequences()
\r
400 * Method getHiddenSequencesCount
\r
406 public int getHiddenSequencesCount()
\r
408 return _hiddenSequencesList.size();
\r
409 } //-- int getHiddenSequencesCount()
\r
412 * Returns the value of field 'id'.
\r
415 * @return the value of field 'id'.
\r
420 } //-- int getId()
\r
430 public jalview.schemabinding.version2.Pdbids getPdbids(int index)
\r
431 throws java.lang.IndexOutOfBoundsException
\r
433 //-- check bounds for index
\r
434 if ((index < 0) || (index > _pdbidsList.size())) {
\r
435 throw new IndexOutOfBoundsException();
\r
438 return (jalview.schemabinding.version2.Pdbids) _pdbidsList.elementAt(index);
\r
439 } //-- jalview.schemabinding.version2.Pdbids getPdbids(int)
\r
448 public jalview.schemabinding.version2.Pdbids[] getPdbids()
\r
450 int size = _pdbidsList.size();
\r
451 jalview.schemabinding.version2.Pdbids[] mArray = new jalview.schemabinding.version2.Pdbids[size];
\r
452 for (int index = 0; index < size; index++) {
\r
453 mArray[index] = (jalview.schemabinding.version2.Pdbids) _pdbidsList.elementAt(index);
\r
456 } //-- jalview.schemabinding.version2.Pdbids[] getPdbids()
\r
459 * Method getPdbidsCount
\r
465 public int getPdbidsCount()
\r
467 return _pdbidsList.size();
\r
468 } //-- int getPdbidsCount()
\r
471 * Returns the value of field 'start'.
\r
474 * @return the value of field 'start'.
\r
476 public int getStart()
\r
478 return this._start;
\r
479 } //-- int getStart()
\r
488 public boolean hasColour()
\r
490 return this._has_colour;
\r
491 } //-- boolean hasColour()
\r
500 public boolean hasEnd()
\r
502 return this._has_end;
\r
503 } //-- boolean hasEnd()
\r
512 public boolean hasHidden()
\r
514 return this._has_hidden;
\r
515 } //-- boolean hasHidden()
\r
524 public boolean hasId()
\r
526 return this._has_id;
\r
527 } //-- boolean hasId()
\r
536 public boolean hasStart()
\r
538 return this._has_start;
\r
539 } //-- boolean hasStart()
\r
548 public boolean isValid()
\r
553 catch (org.exolab.castor.xml.ValidationException vex) {
\r
557 } //-- boolean isValid()
\r
566 public void marshal(java.io.Writer out)
\r
567 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
570 Marshaller.marshal(this, out);
\r
571 } //-- void marshal(java.io.Writer)
\r
580 public void marshal(org.xml.sax.ContentHandler handler)
\r
581 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
584 Marshaller.marshal(this, handler);
\r
585 } //-- void marshal(org.xml.sax.ContentHandler)
\r
588 * Method removeAllFeatures
\r
591 public void removeAllFeatures()
\r
593 _featuresList.removeAllElements();
\r
594 } //-- void removeAllFeatures()
\r
597 * Method removeAllHiddenSequences
\r
600 public void removeAllHiddenSequences()
\r
602 _hiddenSequencesList.removeAllElements();
\r
603 } //-- void removeAllHiddenSequences()
\r
606 * Method removeAllPdbids
\r
609 public void removeAllPdbids()
\r
611 _pdbidsList.removeAllElements();
\r
612 } //-- void removeAllPdbids()
\r
615 * Method removeFeatures
\r
622 public jalview.schemabinding.version2.Features removeFeatures(int index)
\r
624 java.lang.Object obj = _featuresList.elementAt(index);
\r
625 _featuresList.removeElementAt(index);
\r
626 return (jalview.schemabinding.version2.Features) obj;
\r
627 } //-- jalview.schemabinding.version2.Features removeFeatures(int)
\r
630 * Method removeHiddenSequences
\r
637 public int removeHiddenSequences(int index)
\r
639 java.lang.Object obj = _hiddenSequencesList.elementAt(index);
\r
640 _hiddenSequencesList.removeElementAt(index);
\r
641 return ((java.lang.Integer)obj).intValue();
\r
642 } //-- int removeHiddenSequences(int)
\r
645 * Method removePdbids
\r
652 public jalview.schemabinding.version2.Pdbids removePdbids(int index)
\r
654 java.lang.Object obj = _pdbidsList.elementAt(index);
\r
655 _pdbidsList.removeElementAt(index);
\r
656 return (jalview.schemabinding.version2.Pdbids) obj;
\r
657 } //-- jalview.schemabinding.version2.Pdbids removePdbids(int)
\r
660 * Sets the value of field 'colour'.
\r
662 * @param colour the value of field 'colour'.
\r
664 public void setColour(int colour)
\r
666 this._colour = colour;
\r
667 this._has_colour = true;
\r
668 } //-- void setColour(int)
\r
671 * Sets the value of field 'end'.
\r
673 * @param end the value of field 'end'.
\r
675 public void setEnd(int end)
\r
678 this._has_end = true;
\r
679 } //-- void setEnd(int)
\r
682 * Method setFeatures
\r
689 public void setFeatures(int index, jalview.schemabinding.version2.Features vFeatures)
\r
690 throws java.lang.IndexOutOfBoundsException
\r
692 //-- check bounds for index
\r
693 if ((index < 0) || (index > _featuresList.size())) {
\r
694 throw new IndexOutOfBoundsException();
\r
696 _featuresList.setElementAt(vFeatures, index);
\r
697 } //-- void setFeatures(int, jalview.schemabinding.version2.Features)
\r
700 * Method setFeatures
\r
704 * @param featuresArray
\r
706 public void setFeatures(jalview.schemabinding.version2.Features[] featuresArray)
\r
709 _featuresList.removeAllElements();
\r
710 for (int i = 0; i < featuresArray.length; i++) {
\r
711 _featuresList.addElement(featuresArray[i]);
\r
713 } //-- void setFeatures(jalview.schemabinding.version2.Features)
\r
716 * Sets the value of field 'hidden'.
\r
718 * @param hidden the value of field 'hidden'.
\r
720 public void setHidden(boolean hidden)
\r
722 this._hidden = hidden;
\r
723 this._has_hidden = true;
\r
724 } //-- void setHidden(boolean)
\r
727 * Method setHiddenSequences
\r
732 * @param vHiddenSequences
\r
734 public void setHiddenSequences(int index, int vHiddenSequences)
\r
735 throws java.lang.IndexOutOfBoundsException
\r
737 //-- check bounds for index
\r
738 if ((index < 0) || (index > _hiddenSequencesList.size())) {
\r
739 throw new IndexOutOfBoundsException();
\r
741 _hiddenSequencesList.setElementAt(new java.lang.Integer(vHiddenSequences), index);
\r
742 } //-- void setHiddenSequences(int, int)
\r
745 * Method setHiddenSequences
\r
749 * @param hiddenSequencesArray
\r
751 public void setHiddenSequences(int[] hiddenSequencesArray)
\r
754 _hiddenSequencesList.removeAllElements();
\r
755 for (int i = 0; i < hiddenSequencesArray.length; i++) {
\r
756 _hiddenSequencesList.addElement(new java.lang.Integer(hiddenSequencesArray[i]));
\r
758 } //-- void setHiddenSequences(int)
\r
761 * Sets the value of field 'id'.
\r
763 * @param id the value of field 'id'.
\r
765 public void setId(int id)
\r
768 this._has_id = true;
\r
769 } //-- void setId(int)
\r
779 public void setPdbids(int index, jalview.schemabinding.version2.Pdbids vPdbids)
\r
780 throws java.lang.IndexOutOfBoundsException
\r
782 //-- check bounds for index
\r
783 if ((index < 0) || (index > _pdbidsList.size())) {
\r
784 throw new IndexOutOfBoundsException();
\r
786 _pdbidsList.setElementAt(vPdbids, index);
\r
787 } //-- void setPdbids(int, jalview.schemabinding.version2.Pdbids)
\r
794 * @param pdbidsArray
\r
796 public void setPdbids(jalview.schemabinding.version2.Pdbids[] pdbidsArray)
\r
799 _pdbidsList.removeAllElements();
\r
800 for (int i = 0; i < pdbidsArray.length; i++) {
\r
801 _pdbidsList.addElement(pdbidsArray[i]);
\r
803 } //-- void setPdbids(jalview.schemabinding.version2.Pdbids)
\r
806 * Sets the value of field 'start'.
\r
808 * @param start the value of field 'start'.
\r
810 public void setStart(int start)
\r
812 this._start = start;
\r
813 this._has_start = true;
\r
814 } //-- void setStart(int)
\r
824 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
825 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
827 return (jalview.schemabinding.version2.JSeq) Unmarshaller.unmarshal(jalview.schemabinding.version2.JSeq.class, reader);
\r
828 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
834 public void validate()
\r
835 throws org.exolab.castor.xml.ValidationException
\r
837 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
838 validator.validate(this);
\r
839 } //-- void validate()
\r