X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemabinding%2Fversion2%2FPdbentry.java;h=f4fa4fe44e63614cb1ee67040860505e18fe8011;hb=7bc226b58110fa26d9dbd3f0c78095d06909ffc3;hp=93c274832c61d6872199813f383de448bdde9230;hpb=dd74fc4938723fe5ec48d4e5fdcfbe58ac42a48d;p=jalview.git diff --git a/src/jalview/schemabinding/version2/Pdbentry.java b/src/jalview/schemabinding/version2/Pdbentry.java index 93c2748..f4fa4fe 100755 --- a/src/jalview/schemabinding/version2/Pdbentry.java +++ b/src/jalview/schemabinding/version2/Pdbentry.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,346 +7,358 @@ 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 Pdbentry. - * + * * @version $Revision$ $Date$ */ -public class Pdbentry implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _id - */ - private java.lang.String _id; - - /** - * Field _type - */ - private java.lang.String _type; - - /** - * Field _file - */ - private java.lang.String _file; - - /** - * Field _items - */ - private java.util.Vector _items; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Pdbentry() { - super(); - _items = new Vector(); - } //-- jalview.schemabinding.version2.Pdbentry() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method addPdbentryItem - * - * - * - * @param vPdbentryItem - */ - public void addPdbentryItem(jalview.schemabinding.version2.PdbentryItem vPdbentryItem) - throws java.lang.IndexOutOfBoundsException - { - _items.addElement(vPdbentryItem); - } //-- void addPdbentryItem(jalview.schemabinding.version2.PdbentryItem) - - /** - * Method addPdbentryItem - * - * - * - * @param index - * @param vPdbentryItem - */ - public void addPdbentryItem(int index, jalview.schemabinding.version2.PdbentryItem vPdbentryItem) - throws java.lang.IndexOutOfBoundsException - { - _items.insertElementAt(vPdbentryItem, index); - } //-- void addPdbentryItem(int, jalview.schemabinding.version2.PdbentryItem) - - /** - * Method enumeratePdbentryItem - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumeratePdbentryItem() - { - return _items.elements(); - } //-- java.util.Enumeration enumeratePdbentryItem() - - /** - * Returns the value of field 'file'. - * - * @return String - * @return the value of field 'file'. - */ - public java.lang.String getFile() - { - return this._file; - } //-- java.lang.String getFile() - - /** - * Returns the value of field 'id'. - * - * @return String - * @return the value of field 'id'. - */ - public java.lang.String getId() - { - return this._id; - } //-- java.lang.String getId() - - /** - * Method getPdbentryItem - * - * - * - * @param index - * @return PdbentryItem - */ - public jalview.schemabinding.version2.PdbentryItem getPdbentryItem(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _items.size())) { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.PdbentryItem) _items.elementAt(index); - } //-- jalview.schemabinding.version2.PdbentryItem getPdbentryItem(int) - - /** - * Method getPdbentryItem - * - * - * - * @return PdbentryItem - */ - public jalview.schemabinding.version2.PdbentryItem[] getPdbentryItem() - { - int size = _items.size(); - jalview.schemabinding.version2.PdbentryItem[] mArray = new jalview.schemabinding.version2.PdbentryItem[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.PdbentryItem) _items.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.PdbentryItem[] getPdbentryItem() - - /** - * Method getPdbentryItemCount - * - * - * - * @return int - */ - public int getPdbentryItemCount() - { - return _items.size(); - } //-- int getPdbentryItemCount() - - /** - * Returns the value of field 'type'. - * - * @return String - * @return the value of field 'type'. - */ - public java.lang.String getType() - { - return this._type; - } //-- java.lang.String getType() - - /** - * 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 - { - - 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 removeAllPdbentryItem - * - */ - public void removeAllPdbentryItem() - { - _items.removeAllElements(); - } //-- void removeAllPdbentryItem() - - /** - * Method removePdbentryItem - * - * - * - * @param index - * @return PdbentryItem - */ - public jalview.schemabinding.version2.PdbentryItem removePdbentryItem(int index) - { - java.lang.Object obj = _items.elementAt(index); - _items.removeElementAt(index); - return (jalview.schemabinding.version2.PdbentryItem) obj; - } //-- jalview.schemabinding.version2.PdbentryItem removePdbentryItem(int) - - /** - * Sets the value of field 'file'. - * - * @param file the value of field 'file'. - */ - public void setFile(java.lang.String file) - { - this._file = file; - } //-- void setFile(java.lang.String) - - /** - * Sets the value of field 'id'. - * - * @param id the value of field 'id'. - */ - public void setId(java.lang.String id) +public class Pdbentry + implements java.io.Serializable +{ + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _id + */ + private java.lang.String _id; + + /** + * Field _type + */ + private java.lang.String _type; + + /** + * Field _file + */ + private java.lang.String _file; + + /** + * Field _items + */ + private java.util.Vector _items; + + //----------------/ + //- Constructors -/ + //----------------/ + + public Pdbentry() + { + super(); + _items = new Vector(); + } //-- jalview.schemabinding.version2.Pdbentry() + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addPdbentryItem + * + * + * + * @param vPdbentryItem + */ + public void addPdbentryItem(jalview.schemabinding.version2.PdbentryItem + vPdbentryItem) + throws java.lang.IndexOutOfBoundsException + { + _items.addElement(vPdbentryItem); + } //-- void addPdbentryItem(jalview.schemabinding.version2.PdbentryItem) + + /** + * Method addPdbentryItem + * + * + * + * @param index + * @param vPdbentryItem + */ + public void addPdbentryItem(int index, + jalview.schemabinding.version2.PdbentryItem + vPdbentryItem) + throws java.lang.IndexOutOfBoundsException + { + _items.insertElementAt(vPdbentryItem, index); + } //-- void addPdbentryItem(int, jalview.schemabinding.version2.PdbentryItem) + + /** + * Method enumeratePdbentryItem + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumeratePdbentryItem() + { + return _items.elements(); + } //-- java.util.Enumeration enumeratePdbentryItem() + + /** + * Returns the value of field 'file'. + * + * @return String + * @return the value of field 'file'. + */ + public java.lang.String getFile() + { + return this._file; + } //-- java.lang.String getFile() + + /** + * Returns the value of field 'id'. + * + * @return String + * @return the value of field 'id'. + */ + public java.lang.String getId() + { + return this._id; + } //-- java.lang.String getId() + + /** + * Method getPdbentryItem + * + * + * + * @param index + * @return PdbentryItem + */ + public jalview.schemabinding.version2.PdbentryItem getPdbentryItem(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ( (index < 0) || (index > _items.size())) { - this._id = id; - } //-- void setId(java.lang.String) - - /** - * Method setPdbentryItem - * - * - * - * @param index - * @param vPdbentryItem - */ - public void setPdbentryItem(int index, jalview.schemabinding.version2.PdbentryItem vPdbentryItem) - throws java.lang.IndexOutOfBoundsException + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.PdbentryItem) _items.elementAt(index); + } //-- jalview.schemabinding.version2.PdbentryItem getPdbentryItem(int) + + /** + * Method getPdbentryItem + * + * + * + * @return PdbentryItem + */ + public jalview.schemabinding.version2.PdbentryItem[] getPdbentryItem() + { + int size = _items.size(); + jalview.schemabinding.version2.PdbentryItem[] mArray = new jalview. + schemabinding.version2.PdbentryItem[size]; + for (int index = 0; index < size; index++) { - //-- check bounds for index - if ((index < 0) || (index > _items.size())) { - throw new IndexOutOfBoundsException(); - } - _items.setElementAt(vPdbentryItem, index); - } //-- void setPdbentryItem(int, jalview.schemabinding.version2.PdbentryItem) - - /** - * Method setPdbentryItem - * - * - * - * @param pdbentryItemArray - */ - public void setPdbentryItem(jalview.schemabinding.version2.PdbentryItem[] pdbentryItemArray) + mArray[index] = (jalview.schemabinding.version2.PdbentryItem) _items. + elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.PdbentryItem[] getPdbentryItem() + + /** + * Method getPdbentryItemCount + * + * + * + * @return int + */ + public int getPdbentryItemCount() + { + return _items.size(); + } //-- int getPdbentryItemCount() + + /** + * Returns the value of field 'type'. + * + * @return String + * @return the value of field 'type'. + */ + public java.lang.String getType() + { + return this._type; + } //-- java.lang.String getType() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { - //-- copy array - _items.removeAllElements(); - for (int i = 0; i < pdbentryItemArray.length; i++) { - _items.addElement(pdbentryItemArray[i]); - } - } //-- void setPdbentryItem(jalview.schemabinding.version2.PdbentryItem) - - /** - * Sets the value of field 'type'. - * - * @param type the value of field 'type'. - */ - public void setType(java.lang.String type) + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { - this._type = type; - } //-- void setType(java.lang.String) - - /** - * 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 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 + { + + 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 removeAllPdbentryItem + * + */ + public void removeAllPdbentryItem() + { + _items.removeAllElements(); + } //-- void removeAllPdbentryItem() + + /** + * Method removePdbentryItem + * + * + * + * @param index + * @return PdbentryItem + */ + public jalview.schemabinding.version2.PdbentryItem removePdbentryItem(int + index) + { + java.lang.Object obj = _items.elementAt(index); + _items.removeElementAt(index); + return (jalview.schemabinding.version2.PdbentryItem) obj; + } //-- jalview.schemabinding.version2.PdbentryItem removePdbentryItem(int) + + /** + * Sets the value of field 'file'. + * + * @param file the value of field 'file'. + */ + public void setFile(java.lang.String file) + { + this._file = file; + } //-- void setFile(java.lang.String) + + /** + * Sets the value of field 'id'. + * + * @param id the value of field 'id'. + */ + public void setId(java.lang.String id) + { + this._id = id; + } //-- void setId(java.lang.String) + + /** + * Method setPdbentryItem + * + * + * + * @param index + * @param vPdbentryItem + */ + public void setPdbentryItem(int index, + jalview.schemabinding.version2.PdbentryItem + vPdbentryItem) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ( (index < 0) || (index > _items.size())) { - return (jalview.schemabinding.version2.Pdbentry) Unmarshaller.unmarshal(jalview.schemabinding.version2.Pdbentry.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException + throw new IndexOutOfBoundsException(); + } + _items.setElementAt(vPdbentryItem, index); + } //-- void setPdbentryItem(int, jalview.schemabinding.version2.PdbentryItem) + + /** + * Method setPdbentryItem + * + * + * + * @param pdbentryItemArray + */ + public void setPdbentryItem(jalview.schemabinding.version2.PdbentryItem[] + pdbentryItemArray) + { + //-- copy array + _items.removeAllElements(); + for (int i = 0; i < pdbentryItemArray.length; i++) { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() + _items.addElement(pdbentryItemArray[i]); + } + } //-- void setPdbentryItem(jalview.schemabinding.version2.PdbentryItem) + + /** + * Sets the value of field 'type'. + * + * @param type the value of field 'type'. + */ + public void setType(java.lang.String type) + { + this._type = type; + } //-- void setType(java.lang.String) + + /** + * 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.Pdbentry) Unmarshaller.unmarshal( + jalview.schemabinding.version2.Pdbentry.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() }