X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemabinding%2Fversion2%2FSequence.java;h=372a2c564c2155544387190b74448117254802cb;hb=7bc226b58110fa26d9dbd3f0c78095d06909ffc3;hp=993ad23609b227ec32ae07d817e49cd2abed549c;hpb=374d49bb6bd6bb285f7e49560e2bcb8004ff4af3;p=jalview.git diff --git a/src/jalview/schemabinding/version2/Sequence.java b/src/jalview/schemabinding/version2/Sequence.java index 993ad23..372a2c5 100755 --- a/src/jalview/schemabinding/version2/Sequence.java +++ b/src/jalview/schemabinding/version2/Sequence.java @@ -1,5 +1,5 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ @@ -7,270 +7,274 @@ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ //---------------------------------/ +//- Imported classes and packages -/ +//---------------------------------/ + +import java.util.*; -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; +import org.exolab.castor.xml.*; /** * Class Sequence. - * + * * @version $Revision$ $Date$ */ -public class Sequence extends jalview.schemabinding.version2.SequenceType -implements java.io.Serializable +public class Sequence + extends jalview.schemabinding.version2.SequenceType implements java.io. + Serializable { + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ + /** + * Field _DBRefList + */ + private java.util.Vector _DBRefList; - /** - * Field _DBRefList - */ - private java.util.Vector _DBRefList; + //----------------/ + //- Constructors -/ + //----------------/ + public Sequence() + { + super(); + _DBRefList = new Vector(); + } //-- jalview.schemabinding.version2.Sequence() - //----------------/ - //- Constructors -/ - //----------------/ + //-----------/ + //- Methods -/ + //-----------/ - public Sequence() { - super(); - _DBRefList = new Vector(); - } //-- jalview.schemabinding.version2.Sequence() + /** + * Method addDBRef + * + * + * + * @param vDBRef + */ + public void addDBRef(jalview.schemabinding.version2.DBRef vDBRef) + throws java.lang.IndexOutOfBoundsException + { + _DBRefList.addElement(vDBRef); + } //-- void addDBRef(jalview.schemabinding.version2.DBRef) + /** + * Method addDBRef + * + * + * + * @param index + * @param vDBRef + */ + public void addDBRef(int index, jalview.schemabinding.version2.DBRef vDBRef) + throws java.lang.IndexOutOfBoundsException + { + _DBRefList.insertElementAt(vDBRef, index); + } //-- void addDBRef(int, jalview.schemabinding.version2.DBRef) - //-----------/ - //- Methods -/ - //-----------/ + /** + * Method enumerateDBRef + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateDBRef() + { + return _DBRefList.elements(); + } //-- java.util.Enumeration enumerateDBRef() - /** - * Method addDBRef - * - * - * - * @param vDBRef - */ - public void addDBRef(jalview.schemabinding.version2.DBRef vDBRef) - throws java.lang.IndexOutOfBoundsException + /** + * Method getDBRef + * + * + * + * @param index + * @return DBRef + */ + public jalview.schemabinding.version2.DBRef getDBRef(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ( (index < 0) || (index > _DBRefList.size())) { - _DBRefList.addElement(vDBRef); - } //-- void addDBRef(jalview.schemabinding.version2.DBRef) + throw new IndexOutOfBoundsException(); + } - /** - * Method addDBRef - * - * - * - * @param index - * @param vDBRef - */ - public void addDBRef(int index, jalview.schemabinding.version2.DBRef vDBRef) - throws java.lang.IndexOutOfBoundsException - { - _DBRefList.insertElementAt(vDBRef, index); - } //-- void addDBRef(int, jalview.schemabinding.version2.DBRef) + return (jalview.schemabinding.version2.DBRef) _DBRefList.elementAt(index); + } //-- jalview.schemabinding.version2.DBRef getDBRef(int) - /** - * Method enumerateDBRef - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateDBRef() + /** + * Method getDBRef + * + * + * + * @return DBRef + */ + public jalview.schemabinding.version2.DBRef[] getDBRef() + { + int size = _DBRefList.size(); + jalview.schemabinding.version2.DBRef[] mArray = new jalview.schemabinding. + version2.DBRef[size]; + for (int index = 0; index < size; index++) { - return _DBRefList.elements(); - } //-- java.util.Enumeration enumerateDBRef() + mArray[index] = (jalview.schemabinding.version2.DBRef) _DBRefList. + elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.DBRef[] getDBRef() - /** - * Method getDBRef - * - * - * - * @param index - * @return DBRef - */ - public jalview.schemabinding.version2.DBRef getDBRef(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _DBRefList.size())) { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.DBRef) _DBRefList.elementAt(index); - } //-- jalview.schemabinding.version2.DBRef getDBRef(int) + /** + * Method getDBRefCount + * + * + * + * @return int + */ + public int getDBRefCount() + { + return _DBRefList.size(); + } //-- int getDBRefCount() - /** - * Method getDBRef - * - * - * - * @return DBRef - */ - public jalview.schemabinding.version2.DBRef[] getDBRef() + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { - int size = _DBRefList.size(); - jalview.schemabinding.version2.DBRef[] mArray = new jalview.schemabinding.version2.DBRef[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.DBRef) _DBRefList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.DBRef[] getDBRef() - - /** - * Method getDBRefCount - * - * - * - * @return int - */ - public int getDBRefCount() + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { - return _DBRefList.size(); - } //-- int getDBRefCount() + return false; + } + return true; + } //-- boolean isValid() - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { - /** - * Method removeAllDBRef - * - */ - public void removeAllDBRef() - { - _DBRefList.removeAllElements(); - } //-- void removeAllDBRef() + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) - /** - * Method removeDBRef - * - * - * - * @param index - * @return DBRef - */ - public jalview.schemabinding.version2.DBRef removeDBRef(int index) - { - java.lang.Object obj = _DBRefList.elementAt(index); - _DBRefList.removeElementAt(index); - return (jalview.schemabinding.version2.DBRef) obj; - } //-- jalview.schemabinding.version2.DBRef removeDBRef(int) + /** + * Method removeAllDBRef + * + */ + public void removeAllDBRef() + { + _DBRefList.removeAllElements(); + } //-- void removeAllDBRef() - /** - * Method setDBRef - * - * - * - * @param index - * @param vDBRef - */ - public void setDBRef(int index, jalview.schemabinding.version2.DBRef vDBRef) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _DBRefList.size())) { - throw new IndexOutOfBoundsException(); - } - _DBRefList.setElementAt(vDBRef, index); - } //-- void setDBRef(int, jalview.schemabinding.version2.DBRef) + /** + * Method removeDBRef + * + * + * + * @param index + * @return DBRef + */ + public jalview.schemabinding.version2.DBRef removeDBRef(int index) + { + java.lang.Object obj = _DBRefList.elementAt(index); + _DBRefList.removeElementAt(index); + return (jalview.schemabinding.version2.DBRef) obj; + } //-- jalview.schemabinding.version2.DBRef removeDBRef(int) - /** - * Method setDBRef - * - * - * - * @param DBRefArray - */ - public void setDBRef(jalview.schemabinding.version2.DBRef[] DBRefArray) + /** + * Method setDBRef + * + * + * + * @param index + * @param vDBRef + */ + public void setDBRef(int index, jalview.schemabinding.version2.DBRef vDBRef) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ( (index < 0) || (index > _DBRefList.size())) { - //-- copy array - _DBRefList.removeAllElements(); - for (int i = 0; i < DBRefArray.length; i++) { - _DBRefList.addElement(DBRefArray[i]); - } - } //-- void setDBRef(jalview.schemabinding.version2.DBRef) + throw new IndexOutOfBoundsException(); + } + _DBRefList.setElementAt(vDBRef, index); + } //-- void setDBRef(int, jalview.schemabinding.version2.DBRef) - /** - * Method unmarshal - * - * - * - * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + /** + * Method setDBRef + * + * + * + * @param DBRefArray + */ + public void setDBRef(jalview.schemabinding.version2.DBRef[] DBRefArray) + { + //-- copy array + _DBRefList.removeAllElements(); + for (int i = 0; i < DBRefArray.length; i++) { - return (jalview.schemabinding.version2.Sequence) Unmarshaller.unmarshal(jalview.schemabinding.version2.Sequence.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + _DBRefList.addElement(DBRefArray[i]); + } + } //-- void setDBRef(jalview.schemabinding.version2.DBRef) - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() + /** + * Method unmarshal + * + * + * + * @param reader + * @return Object + */ + public static java.lang.Object unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + return (jalview.schemabinding.version2.Sequence) Unmarshaller.unmarshal( + jalview.schemabinding.version2.Sequence.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml. + Validator(); + validator.validate(this); + } //-- void validate() }