From: amwaterhouse Date: Wed, 25 May 2005 16:33:25 +0000 (+0000) Subject: XML schema changes X-Git-Tag: Release_2_0~197 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5a35786bf1c4219bfa00603036497a18486c6801;p=jalview.git XML schema changes --- diff --git a/src/jalview/binding/Colour.java b/src/jalview/binding/Colour.java new file mode 100755 index 0000000..a51102b --- /dev/null +++ b/src/jalview/binding/Colour.java @@ -0,0 +1,173 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.binding; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +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; + +/** + * Class Colour. + * + * @version $Revision$ $Date$ + */ +public class Colour implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name + */ + private java.lang.String _name; + + /** + * Field _RGB + */ + private java.lang.String _RGB; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Colour() { + super(); + } //-- jalview.binding.Colour() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'name'. + * + * @return String + * @return the value of field 'name'. + */ + public java.lang.String getName() + { + return this._name; + } //-- java.lang.String getName() + + /** + * Returns the value of field 'RGB'. + * + * @return String + * @return the value of field 'RGB'. + */ + public java.lang.String getRGB() + { + return this._RGB; + } //-- java.lang.String getRGB() + + /** + * 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) + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName(java.lang.String name) + { + this._name = name; + } //-- void setName(java.lang.String) + + /** + * Sets the value of field 'RGB'. + * + * @param RGB the value of field 'RGB'. + */ + public void setRGB(java.lang.String RGB) + { + this._RGB = RGB; + } //-- void setRGB(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.binding.Colour) Unmarshaller.unmarshal(jalview.binding.Colour.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() + +} diff --git a/src/jalview/binding/JalviewModelSequence.java b/src/jalview/binding/JalviewModelSequence.java index 7f17893..61c80aa 100755 --- a/src/jalview/binding/JalviewModelSequence.java +++ b/src/jalview/binding/JalviewModelSequence.java @@ -50,6 +50,11 @@ public class JalviewModelSequence implements java.io.Serializable { */ private java.util.Vector _viewportList; + /** + * Field _userColoursList + */ + private java.util.Vector _userColoursList; + //----------------/ //- Constructors -/ @@ -60,6 +65,7 @@ public class JalviewModelSequence implements java.io.Serializable { _JSeqList = new Vector(); _JGroupList = new Vector(); _viewportList = new Vector(); + _userColoursList = new Vector(); } //-- jalview.binding.JalviewModelSequence() @@ -122,6 +128,33 @@ public class JalviewModelSequence implements java.io.Serializable { } //-- void addJSeq(int, jalview.binding.JSeq) /** + * Method addUserColours + * + * + * + * @param vUserColours + */ + public void addUserColours(jalview.binding.UserColours vUserColours) + throws java.lang.IndexOutOfBoundsException + { + _userColoursList.addElement(vUserColours); + } //-- void addUserColours(jalview.binding.UserColours) + + /** + * Method addUserColours + * + * + * + * @param index + * @param vUserColours + */ + public void addUserColours(int index, jalview.binding.UserColours vUserColours) + throws java.lang.IndexOutOfBoundsException + { + _userColoursList.insertElementAt(vUserColours, index); + } //-- void addUserColours(int, jalview.binding.UserColours) + + /** * Method addViewport * * @@ -173,6 +206,18 @@ public class JalviewModelSequence implements java.io.Serializable { } //-- java.util.Enumeration enumerateJSeq() /** + * Method enumerateUserColours + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateUserColours() + { + return _userColoursList.elements(); + } //-- java.util.Enumeration enumerateUserColours() + + /** * Method enumerateViewport * * @@ -281,6 +326,54 @@ public class JalviewModelSequence implements java.io.Serializable { } //-- int getJSeqCount() /** + * Method getUserColours + * + * + * + * @param index + * @return UserColours + */ + public jalview.binding.UserColours getUserColours(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _userColoursList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.binding.UserColours) _userColoursList.elementAt(index); + } //-- jalview.binding.UserColours getUserColours(int) + + /** + * Method getUserColours + * + * + * + * @return UserColours + */ + public jalview.binding.UserColours[] getUserColours() + { + int size = _userColoursList.size(); + jalview.binding.UserColours[] mArray = new jalview.binding.UserColours[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.binding.UserColours) _userColoursList.elementAt(index); + } + return mArray; + } //-- jalview.binding.UserColours[] getUserColours() + + /** + * Method getUserColoursCount + * + * + * + * @return int + */ + public int getUserColoursCount() + { + return _userColoursList.size(); + } //-- int getUserColoursCount() + + /** * Method getViewport * * @@ -393,6 +486,15 @@ public class JalviewModelSequence implements java.io.Serializable { } //-- void removeAllJSeq() /** + * Method removeAllUserColours + * + */ + public void removeAllUserColours() + { + _userColoursList.removeAllElements(); + } //-- void removeAllUserColours() + + /** * Method removeAllViewport * */ @@ -432,6 +534,21 @@ public class JalviewModelSequence implements java.io.Serializable { } //-- jalview.binding.JSeq removeJSeq(int) /** + * Method removeUserColours + * + * + * + * @param index + * @return UserColours + */ + public jalview.binding.UserColours removeUserColours(int index) + { + java.lang.Object obj = _userColoursList.elementAt(index); + _userColoursList.removeElementAt(index); + return (jalview.binding.UserColours) obj; + } //-- jalview.binding.UserColours removeUserColours(int) + + /** * Method removeViewport * * @@ -515,6 +632,40 @@ public class JalviewModelSequence implements java.io.Serializable { } //-- void setJSeq(jalview.binding.JSeq) /** + * Method setUserColours + * + * + * + * @param index + * @param vUserColours + */ + public void setUserColours(int index, jalview.binding.UserColours vUserColours) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _userColoursList.size())) { + throw new IndexOutOfBoundsException(); + } + _userColoursList.setElementAt(vUserColours, index); + } //-- void setUserColours(int, jalview.binding.UserColours) + + /** + * Method setUserColours + * + * + * + * @param userColoursArray + */ + public void setUserColours(jalview.binding.UserColours[] userColoursArray) + { + //-- copy array + _userColoursList.removeAllElements(); + for (int i = 0; i < userColoursArray.length; i++) { + _userColoursList.addElement(userColoursArray[i]); + } + } //-- void setUserColours(jalview.binding.UserColours) + + /** * Method setViewport * * diff --git a/src/jalview/binding/JalviewModelSequence2.java b/src/jalview/binding/JalviewModelSequence2.java new file mode 100755 index 0000000..36e5579 --- /dev/null +++ b/src/jalview/binding/JalviewModelSequence2.java @@ -0,0 +1,274 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.binding; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +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; + +/** + * Class JalviewModelSequence2. + * + * @version $Revision$ $Date$ + */ +public class JalviewModelSequence2 implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _items + */ + private java.util.Vector _items; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JalviewModelSequence2() { + super(); + _items = new Vector(); + } //-- jalview.binding.JalviewModelSequence2() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addJalviewModelSequence2Item + * + * + * + * @param vJalviewModelSequence2Item + */ + public void addJalviewModelSequence2Item(jalview.binding.JalviewModelSequence2Item vJalviewModelSequence2Item) + throws java.lang.IndexOutOfBoundsException + { + _items.addElement(vJalviewModelSequence2Item); + } //-- void addJalviewModelSequence2Item(jalview.binding.JalviewModelSequence2Item) + + /** + * Method addJalviewModelSequence2Item + * + * + * + * @param index + * @param vJalviewModelSequence2Item + */ + public void addJalviewModelSequence2Item(int index, jalview.binding.JalviewModelSequence2Item vJalviewModelSequence2Item) + throws java.lang.IndexOutOfBoundsException + { + _items.insertElementAt(vJalviewModelSequence2Item, index); + } //-- void addJalviewModelSequence2Item(int, jalview.binding.JalviewModelSequence2Item) + + /** + * Method enumerateJalviewModelSequence2Item + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateJalviewModelSequence2Item() + { + return _items.elements(); + } //-- java.util.Enumeration enumerateJalviewModelSequence2Item() + + /** + * Method getJalviewModelSequence2Item + * + * + * + * @param index + * @return JalviewModelSequence2Item + */ + public jalview.binding.JalviewModelSequence2Item getJalviewModelSequence2Item(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _items.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.binding.JalviewModelSequence2Item) _items.elementAt(index); + } //-- jalview.binding.JalviewModelSequence2Item getJalviewModelSequence2Item(int) + + /** + * Method getJalviewModelSequence2Item + * + * + * + * @return JalviewModelSequence2Item + */ + public jalview.binding.JalviewModelSequence2Item[] getJalviewModelSequence2Item() + { + int size = _items.size(); + jalview.binding.JalviewModelSequence2Item[] mArray = new jalview.binding.JalviewModelSequence2Item[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.binding.JalviewModelSequence2Item) _items.elementAt(index); + } + return mArray; + } //-- jalview.binding.JalviewModelSequence2Item[] getJalviewModelSequence2Item() + + /** + * Method getJalviewModelSequence2ItemCount + * + * + * + * @return int + */ + public int getJalviewModelSequence2ItemCount() + { + return _items.size(); + } //-- int getJalviewModelSequence2ItemCount() + + /** + * 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 removeAllJalviewModelSequence2Item + * + */ + public void removeAllJalviewModelSequence2Item() + { + _items.removeAllElements(); + } //-- void removeAllJalviewModelSequence2Item() + + /** + * Method removeJalviewModelSequence2Item + * + * + * + * @param index + * @return JalviewModelSequence2Item + */ + public jalview.binding.JalviewModelSequence2Item removeJalviewModelSequence2Item(int index) + { + java.lang.Object obj = _items.elementAt(index); + _items.removeElementAt(index); + return (jalview.binding.JalviewModelSequence2Item) obj; + } //-- jalview.binding.JalviewModelSequence2Item removeJalviewModelSequence2Item(int) + + /** + * Method setJalviewModelSequence2Item + * + * + * + * @param index + * @param vJalviewModelSequence2Item + */ + public void setJalviewModelSequence2Item(int index, jalview.binding.JalviewModelSequence2Item vJalviewModelSequence2Item) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _items.size())) { + throw new IndexOutOfBoundsException(); + } + _items.setElementAt(vJalviewModelSequence2Item, index); + } //-- void setJalviewModelSequence2Item(int, jalview.binding.JalviewModelSequence2Item) + + /** + * Method setJalviewModelSequence2Item + * + * + * + * @param jalviewModelSequence2ItemArray + */ + public void setJalviewModelSequence2Item(jalview.binding.JalviewModelSequence2Item[] jalviewModelSequence2ItemArray) + { + //-- copy array + _items.removeAllElements(); + for (int i = 0; i < jalviewModelSequence2ItemArray.length; i++) { + _items.addElement(jalviewModelSequence2ItemArray[i]); + } + } //-- void setJalviewModelSequence2Item(jalview.binding.JalviewModelSequence2Item) + + /** + * 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.binding.JalviewModelSequence2) Unmarshaller.unmarshal(jalview.binding.JalviewModelSequence2.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() + +} diff --git a/src/jalview/binding/JalviewModelSequence2Item.java b/src/jalview/binding/JalviewModelSequence2Item.java new file mode 100755 index 0000000..8678b09 --- /dev/null +++ b/src/jalview/binding/JalviewModelSequence2Item.java @@ -0,0 +1,197 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.binding; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.Serializable; +import java.util.Enumeration; +import java.util.Vector; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class JalviewModelSequence2Item. + * + * @version $Revision$ $Date$ + */ +public class JalviewModelSequence2Item implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _userColourSchemeList + */ + private java.util.Vector _userColourSchemeList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JalviewModelSequence2Item() { + super(); + _userColourSchemeList = new Vector(); + } //-- jalview.binding.JalviewModelSequence2Item() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addUserColourScheme + * + * + * + * @param vUserColourScheme + */ + public void addUserColourScheme(jalview.binding.UserColourScheme vUserColourScheme) + throws java.lang.IndexOutOfBoundsException + { + _userColourSchemeList.addElement(vUserColourScheme); + } //-- void addUserColourScheme(jalview.binding.UserColourScheme) + + /** + * Method addUserColourScheme + * + * + * + * @param index + * @param vUserColourScheme + */ + public void addUserColourScheme(int index, jalview.binding.UserColourScheme vUserColourScheme) + throws java.lang.IndexOutOfBoundsException + { + _userColourSchemeList.insertElementAt(vUserColourScheme, index); + } //-- void addUserColourScheme(int, jalview.binding.UserColourScheme) + + /** + * Method enumerateUserColourScheme + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateUserColourScheme() + { + return _userColourSchemeList.elements(); + } //-- java.util.Enumeration enumerateUserColourScheme() + + /** + * Method getUserColourScheme + * + * + * + * @param index + * @return UserColourScheme + */ + public jalview.binding.UserColourScheme getUserColourScheme(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _userColourSchemeList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.binding.UserColourScheme) _userColourSchemeList.elementAt(index); + } //-- jalview.binding.UserColourScheme getUserColourScheme(int) + + /** + * Method getUserColourScheme + * + * + * + * @return UserColourScheme + */ + public jalview.binding.UserColourScheme[] getUserColourScheme() + { + int size = _userColourSchemeList.size(); + jalview.binding.UserColourScheme[] mArray = new jalview.binding.UserColourScheme[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.binding.UserColourScheme) _userColourSchemeList.elementAt(index); + } + return mArray; + } //-- jalview.binding.UserColourScheme[] getUserColourScheme() + + /** + * Method getUserColourSchemeCount + * + * + * + * @return int + */ + public int getUserColourSchemeCount() + { + return _userColourSchemeList.size(); + } //-- int getUserColourSchemeCount() + + /** + * Method removeAllUserColourScheme + * + */ + public void removeAllUserColourScheme() + { + _userColourSchemeList.removeAllElements(); + } //-- void removeAllUserColourScheme() + + /** + * Method removeUserColourScheme + * + * + * + * @param index + * @return UserColourScheme + */ + public jalview.binding.UserColourScheme removeUserColourScheme(int index) + { + java.lang.Object obj = _userColourSchemeList.elementAt(index); + _userColourSchemeList.removeElementAt(index); + return (jalview.binding.UserColourScheme) obj; + } //-- jalview.binding.UserColourScheme removeUserColourScheme(int) + + /** + * Method setUserColourScheme + * + * + * + * @param index + * @param vUserColourScheme + */ + public void setUserColourScheme(int index, jalview.binding.UserColourScheme vUserColourScheme) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _userColourSchemeList.size())) { + throw new IndexOutOfBoundsException(); + } + _userColourSchemeList.setElementAt(vUserColourScheme, index); + } //-- void setUserColourScheme(int, jalview.binding.UserColourScheme) + + /** + * Method setUserColourScheme + * + * + * + * @param userColourSchemeArray + */ + public void setUserColourScheme(jalview.binding.UserColourScheme[] userColourSchemeArray) + { + //-- copy array + _userColourSchemeList.removeAllElements(); + for (int i = 0; i < userColourSchemeArray.length; i++) { + _userColourSchemeList.addElement(userColourSchemeArray[i]); + } + } //-- void setUserColourScheme(jalview.binding.UserColourScheme) + +} diff --git a/src/jalview/binding/JalviewState.java b/src/jalview/binding/JalviewUserColours.java similarity index 51% rename from src/jalview/binding/JalviewState.java rename to src/jalview/binding/JalviewUserColours.java index ad9d1b3..676a623 100755 --- a/src/jalview/binding/JalviewState.java +++ b/src/jalview/binding/JalviewUserColours.java @@ -15,7 +15,6 @@ import java.io.IOException; import java.io.Reader; import java.io.Serializable; import java.io.Writer; -import java.util.Date; import java.util.Enumeration; import java.util.Vector; import org.exolab.castor.xml.MarshalException; @@ -25,11 +24,11 @@ import org.exolab.castor.xml.ValidationException; import org.xml.sax.ContentHandler; /** - * Class JalviewState. + * Class JalviewUserColours. * * @version $Revision$ $Date$ */ -public class JalviewState implements java.io.Serializable { +public class JalviewUserColours implements java.io.Serializable { //--------------------------/ @@ -37,24 +36,19 @@ public class JalviewState implements java.io.Serializable { //--------------------------/ /** - * Field _creationDate + * Field _colourList */ - private java.util.Date _creationDate; - - /** - * Field _fileList - */ - private java.util.Vector _fileList; + private java.util.Vector _colourList; //----------------/ //- Constructors -/ //----------------/ - public JalviewState() { + public JalviewUserColours() { super(); - _fileList = new Vector(); - } //-- jalview.binding.JalviewState() + _colourList = new Vector(); + } //-- jalview.binding.JalviewUserColours() //-----------/ @@ -62,102 +56,91 @@ public class JalviewState implements java.io.Serializable { //-----------/ /** - * Method addFile + * Method addColour * * * - * @param vFile + * @param vColour */ - public void addFile(java.lang.String vFile) + public void addColour(jalview.binding.Colour vColour) throws java.lang.IndexOutOfBoundsException { - _fileList.addElement(vFile); - } //-- void addFile(java.lang.String) + _colourList.addElement(vColour); + } //-- void addColour(jalview.binding.Colour) /** - * Method addFile + * Method addColour * * * * @param index - * @param vFile + * @param vColour */ - public void addFile(int index, java.lang.String vFile) + public void addColour(int index, jalview.binding.Colour vColour) throws java.lang.IndexOutOfBoundsException { - _fileList.insertElementAt(vFile, index); - } //-- void addFile(int, java.lang.String) + _colourList.insertElementAt(vColour, index); + } //-- void addColour(int, jalview.binding.Colour) /** - * Method enumerateFile + * Method enumerateColour * * * * @return Enumeration */ - public java.util.Enumeration enumerateFile() + public java.util.Enumeration enumerateColour() { - return _fileList.elements(); - } //-- java.util.Enumeration enumerateFile() + return _colourList.elements(); + } //-- java.util.Enumeration enumerateColour() /** - * Returns the value of field 'creationDate'. - * - * @return Date - * @return the value of field 'creationDate'. - */ - public java.util.Date getCreationDate() - { - return this._creationDate; - } //-- java.util.Date getCreationDate() - - /** - * Method getFile + * Method getColour * * * * @param index - * @return String + * @return Colour */ - public java.lang.String getFile(int index) + public jalview.binding.Colour getColour(int index) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index - if ((index < 0) || (index > _fileList.size())) { + if ((index < 0) || (index > _colourList.size())) { throw new IndexOutOfBoundsException(); } - return (String)_fileList.elementAt(index); - } //-- java.lang.String getFile(int) + return (jalview.binding.Colour) _colourList.elementAt(index); + } //-- jalview.binding.Colour getColour(int) /** - * Method getFile + * Method getColour * * * - * @return String + * @return Colour */ - public java.lang.String[] getFile() + public jalview.binding.Colour[] getColour() { - int size = _fileList.size(); - java.lang.String[] mArray = new java.lang.String[size]; + int size = _colourList.size(); + jalview.binding.Colour[] mArray = new jalview.binding.Colour[size]; for (int index = 0; index < size; index++) { - mArray[index] = (String)_fileList.elementAt(index); + mArray[index] = (jalview.binding.Colour) _colourList.elementAt(index); } return mArray; - } //-- java.lang.String[] getFile() + } //-- jalview.binding.Colour[] getColour() /** - * Method getFileCount + * Method getColourCount * * * * @return int */ - public int getFileCount() + public int getColourCount() { - return _fileList.size(); - } //-- int getFileCount() + return _colourList.size(); + } //-- int getColourCount() /** * Method isValid @@ -206,72 +189,62 @@ public class JalviewState implements java.io.Serializable { } //-- void marshal(org.xml.sax.ContentHandler) /** - * Method removeAllFile + * Method removeAllColour * */ - public void removeAllFile() + public void removeAllColour() { - _fileList.removeAllElements(); - } //-- void removeAllFile() + _colourList.removeAllElements(); + } //-- void removeAllColour() /** - * Method removeFile + * Method removeColour * * * * @param index - * @return String - */ - public java.lang.String removeFile(int index) - { - java.lang.Object obj = _fileList.elementAt(index); - _fileList.removeElementAt(index); - return (String)obj; - } //-- java.lang.String removeFile(int) - - /** - * Sets the value of field 'creationDate'. - * - * @param creationDate the value of field 'creationDate'. + * @return Colour */ - public void setCreationDate(java.util.Date creationDate) + public jalview.binding.Colour removeColour(int index) { - this._creationDate = creationDate; - } //-- void setCreationDate(java.util.Date) + java.lang.Object obj = _colourList.elementAt(index); + _colourList.removeElementAt(index); + return (jalview.binding.Colour) obj; + } //-- jalview.binding.Colour removeColour(int) /** - * Method setFile + * Method setColour * * * * @param index - * @param vFile + * @param vColour */ - public void setFile(int index, java.lang.String vFile) + public void setColour(int index, jalview.binding.Colour vColour) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index - if ((index < 0) || (index > _fileList.size())) { + if ((index < 0) || (index > _colourList.size())) { throw new IndexOutOfBoundsException(); } - _fileList.setElementAt(vFile, index); - } //-- void setFile(int, java.lang.String) + _colourList.setElementAt(vColour, index); + } //-- void setColour(int, jalview.binding.Colour) /** - * Method setFile + * Method setColour * * * - * @param fileArray + * @param colourArray */ - public void setFile(java.lang.String[] fileArray) + public void setColour(jalview.binding.Colour[] colourArray) { //-- copy array - _fileList.removeAllElements(); - for (int i = 0; i < fileArray.length; i++) { - _fileList.addElement(fileArray[i]); + _colourList.removeAllElements(); + for (int i = 0; i < colourArray.length; i++) { + _colourList.addElement(colourArray[i]); } - } //-- void setFile(java.lang.String) + } //-- void setColour(jalview.binding.Colour) /** * Method unmarshal @@ -284,7 +257,7 @@ public class JalviewState implements java.io.Serializable { public static java.lang.Object unmarshal(java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.binding.JalviewState) Unmarshaller.unmarshal(jalview.binding.JalviewState.class, reader); + return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(jalview.binding.JalviewUserColours.class, reader); } //-- java.lang.Object unmarshal(java.io.Reader) /** diff --git a/src/jalview/binding/JalviewUserColoursItem.java b/src/jalview/binding/JalviewUserColoursItem.java new file mode 100755 index 0000000..ce6919c --- /dev/null +++ b/src/jalview/binding/JalviewUserColoursItem.java @@ -0,0 +1,70 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.binding; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.Serializable; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class JalviewUserColoursItem. + * + * @version $Revision$ $Date$ + */ +public class JalviewUserColoursItem implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _colour + */ + private jalview.binding.Colour _colour; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JalviewUserColoursItem() { + super(); + } //-- jalview.binding.JalviewUserColoursItem() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'colour'. + * + * @return Colour + * @return the value of field 'colour'. + */ + public jalview.binding.Colour getColour() + { + return this._colour; + } //-- jalview.binding.Colour getColour() + + /** + * Sets the value of field 'colour'. + * + * @param colour the value of field 'colour'. + */ + public void setColour(jalview.binding.Colour colour) + { + this._colour = colour; + } //-- void setColour(jalview.binding.Colour) + +} diff --git a/src/jalview/binding/Residue.java b/src/jalview/binding/Residue.java new file mode 100755 index 0000000..69e4312 --- /dev/null +++ b/src/jalview/binding/Residue.java @@ -0,0 +1,200 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.binding; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +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; + +/** + * Class Residue. + * + * @version $Revision$ $Date$ + */ +public class Residue implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name + */ + private java.lang.String _name; + + /** + * Field _RGB + */ + private int _RGB; + + /** + * keeps track of state for field: _RGB + */ + private boolean _has_RGB; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Residue() { + super(); + } //-- jalview.binding.Residue() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteRGB + * + */ + public void deleteRGB() + { + this._has_RGB= false; + } //-- void deleteRGB() + + /** + * Returns the value of field 'name'. + * + * @return String + * @return the value of field 'name'. + */ + public java.lang.String getName() + { + return this._name; + } //-- java.lang.String getName() + + /** + * Returns the value of field 'RGB'. + * + * @return int + * @return the value of field 'RGB'. + */ + public int getRGB() + { + return this._RGB; + } //-- int getRGB() + + /** + * Method hasRGB + * + * + * + * @return boolean + */ + public boolean hasRGB() + { + return this._has_RGB; + } //-- boolean hasRGB() + + /** + * 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) + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName(java.lang.String name) + { + this._name = name; + } //-- void setName(java.lang.String) + + /** + * Sets the value of field 'RGB'. + * + * @param RGB the value of field 'RGB'. + */ + public void setRGB(int RGB) + { + this._RGB = RGB; + this._has_RGB = true; + } //-- void setRGB(int) + + /** + * 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.binding.Residue) Unmarshaller.unmarshal(jalview.binding.Residue.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() + +} diff --git a/src/jalview/binding/UserColour.java b/src/jalview/binding/UserColour.java new file mode 100755 index 0000000..837d9af --- /dev/null +++ b/src/jalview/binding/UserColour.java @@ -0,0 +1,200 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.binding; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +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; + +/** + * Class UserColour. + * + * @version $Revision$ $Date$ + */ +public class UserColour implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _id + */ + private int _id; + + /** + * keeps track of state for field: _id + */ + private boolean _has_id; + + /** + * Field _userColourScheme + */ + private jalview.binding.UserColourScheme _userColourScheme; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public UserColour() { + super(); + } //-- jalview.binding.UserColour() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteId + * + */ + public void deleteId() + { + this._has_id= false; + } //-- void deleteId() + + /** + * Returns the value of field 'id'. + * + * @return int + * @return the value of field 'id'. + */ + public int getId() + { + return this._id; + } //-- int getId() + + /** + * Returns the value of field 'userColourScheme'. + * + * @return UserColourScheme + * @return the value of field 'userColourScheme'. + */ + public jalview.binding.UserColourScheme getUserColourScheme() + { + return this._userColourScheme; + } //-- jalview.binding.UserColourScheme getUserColourScheme() + + /** + * Method hasId + * + * + * + * @return boolean + */ + public boolean hasId() + { + return this._has_id; + } //-- boolean hasId() + + /** + * 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) + + /** + * Sets the value of field 'id'. + * + * @param id the value of field 'id'. + */ + public void setId(int id) + { + this._id = id; + this._has_id = true; + } //-- void setId(int) + + /** + * Sets the value of field 'userColourScheme'. + * + * @param userColourScheme the value of field 'userColourScheme' + */ + public void setUserColourScheme(jalview.binding.UserColourScheme userColourScheme) + { + this._userColourScheme = userColourScheme; + } //-- void setUserColourScheme(jalview.binding.UserColourScheme) + + /** + * 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.binding.UserColour) Unmarshaller.unmarshal(jalview.binding.UserColour.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() + +} diff --git a/src/jalview/binding/UserColourScheme.java b/src/jalview/binding/UserColourScheme.java new file mode 100755 index 0000000..79ea637 --- /dev/null +++ b/src/jalview/binding/UserColourScheme.java @@ -0,0 +1,118 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.binding; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +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; + +/** + * Class UserColourScheme. + * + * @version $Revision$ $Date$ + */ +public class UserColourScheme extends JalviewUserColours +implements java.io.Serializable +{ + + + //----------------/ + //- Constructors -/ + //----------------/ + + public UserColourScheme() { + super(); + } //-- jalview.binding.UserColourScheme() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * 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 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.binding.UserColourScheme) Unmarshaller.unmarshal(jalview.binding.UserColourScheme.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() + +} diff --git a/src/jalview/binding/UserColours.java b/src/jalview/binding/UserColours.java new file mode 100755 index 0000000..241aaab --- /dev/null +++ b/src/jalview/binding/UserColours.java @@ -0,0 +1,173 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.binding; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +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; + +/** + * Class UserColours. + * + * @version $Revision$ $Date$ + */ +public class UserColours implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _id + */ + private java.lang.String _id; + + /** + * Field _userColourScheme + */ + private jalview.binding.UserColourScheme _userColourScheme; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public UserColours() { + super(); + } //-- jalview.binding.UserColours() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * 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() + + /** + * Returns the value of field 'userColourScheme'. + * + * @return UserColourScheme + * @return the value of field 'userColourScheme'. + */ + public jalview.binding.UserColourScheme getUserColourScheme() + { + return this._userColourScheme; + } //-- jalview.binding.UserColourScheme getUserColourScheme() + + /** + * 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) + + /** + * 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) + + /** + * Sets the value of field 'userColourScheme'. + * + * @param userColourScheme the value of field 'userColourScheme' + */ + public void setUserColourScheme(jalview.binding.UserColourScheme userColourScheme) + { + this._userColourScheme = userColourScheme; + } //-- void setUserColourScheme(jalview.binding.UserColourScheme) + + /** + * 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.binding.UserColours) Unmarshaller.unmarshal(jalview.binding.UserColours.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() + +}