From 48df59aa393e03aa7269b2df662ac1b8d58cbb25 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 22 Mar 2007 18:29:49 +0000 Subject: [PATCH] Saves Jmol status --- src/jalview/schemabinding/version2/Annotation.java | 1214 ++++--- .../schemabinding/version2/AnnotationColours.java | 732 ++-- .../version2/AnnotationColoursDescriptor.java | 810 +++-- .../version2/AnnotationDescriptor.java | 1133 +++---- .../schemabinding/version2/AnnotationElement.java | 680 ++-- .../version2/AnnotationElementDescriptor.java | 821 +++-- src/jalview/schemabinding/version2/Colour.java | 307 +- .../schemabinding/version2/ColourDescriptor.java | 451 ++- src/jalview/schemabinding/version2/DBRef.java | 359 +- .../schemabinding/version2/DBRefDescriptor.java | 529 ++- src/jalview/schemabinding/version2/Feature.java | 1049 +++--- .../schemabinding/version2/FeatureDescriptor.java | 959 +++--- .../schemabinding/version2/FeatureSettings.java | 466 ++- .../version2/FeatureSettingsDescriptor.java | 385 ++- src/jalview/schemabinding/version2/Features.java | 178 +- .../schemabinding/version2/FeaturesDescriptor.java | 295 +- .../schemabinding/version2/HiddenColumns.java | 415 +-- .../version2/HiddenColumnsDescriptor.java | 476 ++- src/jalview/schemabinding/version2/JGroup.java | 1787 +++++----- .../schemabinding/version2/JGroupDescriptor.java | 1563 ++++----- src/jalview/schemabinding/version2/JSeq.java | 1674 +++++----- .../schemabinding/version2/JSeqDescriptor.java | 994 +++--- .../schemabinding/version2/JalviewModel.java | 418 ++- .../version2/JalviewModelDescriptor.java | 630 ++-- .../version2/JalviewModelSequence.java | 1818 +++++----- .../version2/JalviewModelSequenceDescriptor.java | 761 ++--- .../schemabinding/version2/JalviewUserColours.java | 542 ++- .../version2/JalviewUserColoursDescriptor.java | 457 ++- src/jalview/schemabinding/version2/OtherData.java | 307 +- .../version2/OtherDataDescriptor.java | 458 ++- src/jalview/schemabinding/version2/Pdbentry.java | 670 ++-- .../schemabinding/version2/PdbentryDescriptor.java | 606 ++-- .../schemabinding/version2/PdbentryItem.java | 358 +- .../version2/PdbentryItemDescriptor.java | 385 ++- src/jalview/schemabinding/version2/Pdbids.java | 350 +- .../schemabinding/version2/PdbidsDescriptor.java | 340 +- src/jalview/schemabinding/version2/PdbidsItem.java | 70 + .../version2/PdbidsItemDescriptor.java | 207 ++ src/jalview/schemabinding/version2/Property.java | 307 +- .../schemabinding/version2/PropertyDescriptor.java | 458 ++- src/jalview/schemabinding/version2/Sequence.java | 464 ++- .../schemabinding/version2/SequenceDescriptor.java | 392 ++- .../schemabinding/version2/SequenceSet.java | 870 +++-- .../version2/SequenceSetDescriptor.java | 538 ++- .../schemabinding/version2/SequenceType.java | 411 +-- .../version2/SequenceTypeDescriptor.java | 617 ++-- src/jalview/schemabinding/version2/Setting.java | 467 +-- .../schemabinding/version2/SettingDescriptor.java | 563 ++-- .../schemabinding/version2/StructureState.java | 415 +++ .../version2/StructureStateDescriptor.java | 411 +++ .../schemabinding/version2/ThresholdLine.java | 467 +-- .../version2/ThresholdLineDescriptor.java | 554 ++-- src/jalview/schemabinding/version2/Tree.java | 1635 ++++----- .../schemabinding/version2/TreeDescriptor.java | 1652 +++++---- .../schemabinding/version2/UserColourScheme.java | 178 +- .../version2/UserColourSchemeDescriptor.java | 295 +- .../schemabinding/version2/UserColours.java | 308 +- .../version2/UserColoursDescriptor.java | 459 ++- src/jalview/schemabinding/version2/VAMSAS.java | 812 +++-- .../schemabinding/version2/VAMSASDescriptor.java | 464 ++- .../schemabinding/version2/VamsasModel.java | 178 +- .../version2/VamsasModelDescriptor.java | 295 +- src/jalview/schemabinding/version2/Viewport.java | 3497 ++++++++++---------- .../schemabinding/version2/ViewportDescriptor.java | 3180 ++++++++---------- 64 files changed, 22666 insertions(+), 22875 deletions(-) create mode 100644 src/jalview/schemabinding/version2/PdbidsItem.java create mode 100644 src/jalview/schemabinding/version2/PdbidsItemDescriptor.java create mode 100644 src/jalview/schemabinding/version2/StructureState.java create mode 100644 src/jalview/schemabinding/version2/StructureStateDescriptor.java diff --git a/src/jalview/schemabinding/version2/Annotation.java b/src/jalview/schemabinding/version2/Annotation.java index c9f79cb..61f9413 100755 --- a/src/jalview/schemabinding/version2/Annotation.java +++ b/src/jalview/schemabinding/version2/Annotation.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,626 +7,610 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import java.util.*; -import org.exolab.castor.xml.*; +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 Annotation. - * + * * @version $Revision$ $Date$ */ -public class Annotation - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _graph - */ - private boolean _graph; - - /** - * keeps track of state for field: _graph - */ - private boolean _has_graph; - - /** - * Field _graphType - */ - private int _graphType; - - /** - * keeps track of state for field: _graphType - */ - private boolean _has_graphType; - - /** - * Field _sequenceRef - */ - private java.lang.String _sequenceRef; - - /** - * Field _graphColour - */ - private int _graphColour; - - /** - * keeps track of state for field: _graphColour - */ - private boolean _has_graphColour; - - /** - * Field _graphGroup - */ - private int _graphGroup; - - /** - * keeps track of state for field: _graphGroup - */ - private boolean _has_graphGroup; - - /** - * Field _id - */ - private java.lang.String _id; - - /** - * Field _annotationElementList - */ - private java.util.Vector _annotationElementList; - - /** - * Field _label - */ - private java.lang.String _label; - - /** - * Field _description - */ - private java.lang.String _description; - - /** - * Field _thresholdLine - */ - private jalview.schemabinding.version2.ThresholdLine _thresholdLine; - - //----------------/ - //- Constructors -/ - //----------------/ - - public Annotation() - { - super(); - _annotationElementList = new Vector(); - } //-- jalview.schemabinding.version2.Annotation() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method addAnnotationElement - * - * - * - * @param vAnnotationElement - */ - public void addAnnotationElement(jalview.schemabinding.version2. - AnnotationElement vAnnotationElement) - throws java.lang.IndexOutOfBoundsException - { - _annotationElementList.addElement(vAnnotationElement); - } //-- void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement) - - /** - * Method addAnnotationElement - * - * - * - * @param index - * @param vAnnotationElement - */ - public void addAnnotationElement(int index, - jalview.schemabinding.version2.AnnotationElement - vAnnotationElement) - throws java.lang.IndexOutOfBoundsException - { - _annotationElementList.insertElementAt(vAnnotationElement, index); - } //-- void addAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement) - - /** - * Method deleteGraph - * - */ - public void deleteGraph() - { - this._has_graph = false; - } //-- void deleteGraph() - - /** - * Method deleteGraphColour - * - */ - public void deleteGraphColour() - { - this._has_graphColour = false; - } //-- void deleteGraphColour() - - /** - * Method deleteGraphGroup - * - */ - public void deleteGraphGroup() - { - this._has_graphGroup = false; - } //-- void deleteGraphGroup() - - /** - * Method deleteGraphType - * - */ - public void deleteGraphType() - { - this._has_graphType = false; - } //-- void deleteGraphType() - - /** - * Method enumerateAnnotationElement - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateAnnotationElement() - { - return _annotationElementList.elements(); - } //-- java.util.Enumeration enumerateAnnotationElement() - - /** - * Method getAnnotationElement - * - * - * - * @param index - * @return AnnotationElement - */ - public jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int - index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _annotationElementList.size())) - { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.AnnotationElement) - _annotationElementList.elementAt(index); - } //-- jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int) - - /** - * Method getAnnotationElement - * - * - * - * @return AnnotationElement - */ - public jalview.schemabinding.version2.AnnotationElement[] - getAnnotationElement() - { - int size = _annotationElementList.size(); - jalview.schemabinding.version2.AnnotationElement[] mArray = new jalview. - schemabinding.version2.AnnotationElement[size]; - for (int index = 0; index < size; index++) - { - mArray[index] = (jalview.schemabinding.version2.AnnotationElement) - _annotationElementList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement() - - /** - * Method getAnnotationElementCount - * - * - * - * @return int - */ - public int getAnnotationElementCount() - { - return _annotationElementList.size(); - } //-- int getAnnotationElementCount() - - /** - * Returns the value of field 'description'. - * - * @return String - * @return the value of field 'description'. - */ - public java.lang.String getDescription() - { - return this._description; - } //-- java.lang.String getDescription() - - /** - * Returns the value of field 'graph'. - * - * @return boolean - * @return the value of field 'graph'. - */ - public boolean getGraph() - { - return this._graph; - } //-- boolean getGraph() - - /** - * Returns the value of field 'graphColour'. - * - * @return int - * @return the value of field 'graphColour'. - */ - public int getGraphColour() - { - return this._graphColour; - } //-- int getGraphColour() - - /** - * Returns the value of field 'graphGroup'. - * - * @return int - * @return the value of field 'graphGroup'. - */ - public int getGraphGroup() - { - return this._graphGroup; - } //-- int getGraphGroup() - - /** - * Returns the value of field 'graphType'. - * - * @return int - * @return the value of field 'graphType'. - */ - public int getGraphType() - { - return this._graphType; - } //-- int getGraphType() - - /** - * 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 'label'. - * - * @return String - * @return the value of field 'label'. - */ - public java.lang.String getLabel() - { - return this._label; - } //-- java.lang.String getLabel() - - /** - * Returns the value of field 'sequenceRef'. - * - * @return String - * @return the value of field 'sequenceRef'. - */ - public java.lang.String getSequenceRef() - { - return this._sequenceRef; - } //-- java.lang.String getSequenceRef() - - /** - * Returns the value of field 'thresholdLine'. - * - * @return ThresholdLine - * @return the value of field 'thresholdLine'. - */ - public jalview.schemabinding.version2.ThresholdLine getThresholdLine() - { - return this._thresholdLine; - } //-- jalview.schemabinding.version2.ThresholdLine getThresholdLine() - - /** - * Method hasGraph - * - * - * - * @return boolean - */ - public boolean hasGraph() - { - return this._has_graph; - } //-- boolean hasGraph() - - /** - * Method hasGraphColour - * - * - * - * @return boolean - */ - public boolean hasGraphColour() - { - return this._has_graphColour; - } //-- boolean hasGraphColour() - - /** - * Method hasGraphGroup - * - * - * - * @return boolean - */ - public boolean hasGraphGroup() - { - return this._has_graphGroup; - } //-- boolean hasGraphGroup() - - /** - * Method hasGraphType - * - * - * - * @return boolean - */ - public boolean hasGraphType() - { - return this._has_graphType; - } //-- boolean hasGraphType() - - /** - * 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 removeAllAnnotationElement - * - */ - public void removeAllAnnotationElement() - { - _annotationElementList.removeAllElements(); - } //-- void removeAllAnnotationElement() - - /** - * Method removeAnnotationElement - * - * - * - * @param index - * @return AnnotationElement - */ - public jalview.schemabinding.version2.AnnotationElement - removeAnnotationElement(int index) - { - java.lang.Object obj = _annotationElementList.elementAt(index); - _annotationElementList.removeElementAt(index); - return (jalview.schemabinding.version2.AnnotationElement) obj; - } //-- jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int) - - /** - * Method setAnnotationElement - * - * - * - * @param index - * @param vAnnotationElement - */ - public void setAnnotationElement(int index, - jalview.schemabinding.version2.AnnotationElement - vAnnotationElement) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _annotationElementList.size())) - { - throw new IndexOutOfBoundsException(); - } - _annotationElementList.setElementAt(vAnnotationElement, index); - } //-- void setAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement) - - /** - * Method setAnnotationElement - * - * - * - * @param annotationElementArray - */ - public void setAnnotationElement(jalview.schemabinding.version2. - AnnotationElement[] annotationElementArray) - { - //-- copy array - _annotationElementList.removeAllElements(); - for (int i = 0; i < annotationElementArray.length; i++) - { - _annotationElementList.addElement(annotationElementArray[i]); - } - } //-- void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement) - - /** - * Sets the value of field 'description'. - * - * @param description the value of field 'description'. - */ - public void setDescription(java.lang.String description) - { - this._description = description; - } //-- void setDescription(java.lang.String) - - /** - * Sets the value of field 'graph'. - * - * @param graph the value of field 'graph'. - */ - public void setGraph(boolean graph) - { - this._graph = graph; - this._has_graph = true; - } //-- void setGraph(boolean) - - /** - * Sets the value of field 'graphColour'. - * - * @param graphColour the value of field 'graphColour'. - */ - public void setGraphColour(int graphColour) - { - this._graphColour = graphColour; - this._has_graphColour = true; - } //-- void setGraphColour(int) - - /** - * Sets the value of field 'graphGroup'. - * - * @param graphGroup the value of field 'graphGroup'. - */ - public void setGraphGroup(int graphGroup) - { - this._graphGroup = graphGroup; - this._has_graphGroup = true; - } //-- void setGraphGroup(int) - - /** - * Sets the value of field 'graphType'. - * - * @param graphType the value of field 'graphType'. - */ - public void setGraphType(int graphType) - { - this._graphType = graphType; - this._has_graphType = true; - } //-- void setGraphType(int) - - /** - * 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 'label'. - * - * @param label the value of field 'label'. - */ - public void setLabel(java.lang.String label) - { - this._label = label; - } //-- void setLabel(java.lang.String) - - /** - * Sets the value of field 'sequenceRef'. - * - * @param sequenceRef the value of field 'sequenceRef'. - */ - public void setSequenceRef(java.lang.String sequenceRef) - { - this._sequenceRef = sequenceRef; - } //-- void setSequenceRef(java.lang.String) - - /** - * Sets the value of field 'thresholdLine'. - * - * @param thresholdLine the value of field 'thresholdLine'. - */ - public void setThresholdLine(jalview.schemabinding.version2.ThresholdLine - thresholdLine) - { - this._thresholdLine = thresholdLine; - } //-- void setThresholdLine(jalview.schemabinding.version2.ThresholdLine) - - /** - * 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.Annotation) Unmarshaller.unmarshal( - jalview.schemabinding.version2.Annotation.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() +public class Annotation implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _graph + */ + private boolean _graph; + + /** + * keeps track of state for field: _graph + */ + private boolean _has_graph; + + /** + * Field _graphType + */ + private int _graphType; + + /** + * keeps track of state for field: _graphType + */ + private boolean _has_graphType; + + /** + * Field _sequenceRef + */ + private java.lang.String _sequenceRef; + + /** + * Field _graphColour + */ + private int _graphColour; + + /** + * keeps track of state for field: _graphColour + */ + private boolean _has_graphColour; + + /** + * Field _graphGroup + */ + private int _graphGroup; + + /** + * keeps track of state for field: _graphGroup + */ + private boolean _has_graphGroup; + + /** + * Field _id + */ + private java.lang.String _id; + + /** + * Field _annotationElementList + */ + private java.util.Vector _annotationElementList; + + /** + * Field _label + */ + private java.lang.String _label; + + /** + * Field _description + */ + private java.lang.String _description; + + /** + * Field _thresholdLine + */ + private jalview.schemabinding.version2.ThresholdLine _thresholdLine; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Annotation() { + super(); + _annotationElementList = new Vector(); + } //-- jalview.schemabinding.version2.Annotation() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addAnnotationElement + * + * + * + * @param vAnnotationElement + */ + public void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { + _annotationElementList.addElement(vAnnotationElement); + } //-- void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement) + + /** + * Method addAnnotationElement + * + * + * + * @param index + * @param vAnnotationElement + */ + public void addAnnotationElement(int index, jalview.schemabinding.version2.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { + _annotationElementList.insertElementAt(vAnnotationElement, index); + } //-- void addAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement) + + /** + * Method deleteGraph + * + */ + public void deleteGraph() + { + this._has_graph= false; + } //-- void deleteGraph() + + /** + * Method deleteGraphColour + * + */ + public void deleteGraphColour() + { + this._has_graphColour= false; + } //-- void deleteGraphColour() + + /** + * Method deleteGraphGroup + * + */ + public void deleteGraphGroup() + { + this._has_graphGroup= false; + } //-- void deleteGraphGroup() + + /** + * Method deleteGraphType + * + */ + public void deleteGraphType() + { + this._has_graphType= false; + } //-- void deleteGraphType() + + /** + * Method enumerateAnnotationElement + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateAnnotationElement() + { + return _annotationElementList.elements(); + } //-- java.util.Enumeration enumerateAnnotationElement() + + /** + * Method getAnnotationElement + * + * + * + * @param index + * @return AnnotationElement + */ + public jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _annotationElementList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.elementAt(index); + } //-- jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int) + + /** + * Method getAnnotationElement + * + * + * + * @return AnnotationElement + */ + public jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement() + { + int size = _annotationElementList.size(); + jalview.schemabinding.version2.AnnotationElement[] mArray = new jalview.schemabinding.version2.AnnotationElement[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement() + + /** + * Method getAnnotationElementCount + * + * + * + * @return int + */ + public int getAnnotationElementCount() + { + return _annotationElementList.size(); + } //-- int getAnnotationElementCount() + + /** + * Returns the value of field 'description'. + * + * @return String + * @return the value of field 'description'. + */ + public java.lang.String getDescription() + { + return this._description; + } //-- java.lang.String getDescription() + + /** + * Returns the value of field 'graph'. + * + * @return boolean + * @return the value of field 'graph'. + */ + public boolean getGraph() + { + return this._graph; + } //-- boolean getGraph() + + /** + * Returns the value of field 'graphColour'. + * + * @return int + * @return the value of field 'graphColour'. + */ + public int getGraphColour() + { + return this._graphColour; + } //-- int getGraphColour() + + /** + * Returns the value of field 'graphGroup'. + * + * @return int + * @return the value of field 'graphGroup'. + */ + public int getGraphGroup() + { + return this._graphGroup; + } //-- int getGraphGroup() + + /** + * Returns the value of field 'graphType'. + * + * @return int + * @return the value of field 'graphType'. + */ + public int getGraphType() + { + return this._graphType; + } //-- int getGraphType() + + /** + * 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 'label'. + * + * @return String + * @return the value of field 'label'. + */ + public java.lang.String getLabel() + { + return this._label; + } //-- java.lang.String getLabel() + + /** + * Returns the value of field 'sequenceRef'. + * + * @return String + * @return the value of field 'sequenceRef'. + */ + public java.lang.String getSequenceRef() + { + return this._sequenceRef; + } //-- java.lang.String getSequenceRef() + + /** + * Returns the value of field 'thresholdLine'. + * + * @return ThresholdLine + * @return the value of field 'thresholdLine'. + */ + public jalview.schemabinding.version2.ThresholdLine getThresholdLine() + { + return this._thresholdLine; + } //-- jalview.schemabinding.version2.ThresholdLine getThresholdLine() + + /** + * Method hasGraph + * + * + * + * @return boolean + */ + public boolean hasGraph() + { + return this._has_graph; + } //-- boolean hasGraph() + + /** + * Method hasGraphColour + * + * + * + * @return boolean + */ + public boolean hasGraphColour() + { + return this._has_graphColour; + } //-- boolean hasGraphColour() + + /** + * Method hasGraphGroup + * + * + * + * @return boolean + */ + public boolean hasGraphGroup() + { + return this._has_graphGroup; + } //-- boolean hasGraphGroup() + + /** + * Method hasGraphType + * + * + * + * @return boolean + */ + public boolean hasGraphType() + { + return this._has_graphType; + } //-- boolean hasGraphType() + + /** + * 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 removeAllAnnotationElement + * + */ + public void removeAllAnnotationElement() + { + _annotationElementList.removeAllElements(); + } //-- void removeAllAnnotationElement() + + /** + * Method removeAnnotationElement + * + * + * + * @param index + * @return AnnotationElement + */ + public jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int index) + { + java.lang.Object obj = _annotationElementList.elementAt(index); + _annotationElementList.removeElementAt(index); + return (jalview.schemabinding.version2.AnnotationElement) obj; + } //-- jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int) + + /** + * Method setAnnotationElement + * + * + * + * @param index + * @param vAnnotationElement + */ + public void setAnnotationElement(int index, jalview.schemabinding.version2.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _annotationElementList.size())) { + throw new IndexOutOfBoundsException(); + } + _annotationElementList.setElementAt(vAnnotationElement, index); + } //-- void setAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement) + + /** + * Method setAnnotationElement + * + * + * + * @param annotationElementArray + */ + public void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement[] annotationElementArray) + { + //-- copy array + _annotationElementList.removeAllElements(); + for (int i = 0; i < annotationElementArray.length; i++) { + _annotationElementList.addElement(annotationElementArray[i]); + } + } //-- void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement) + + /** + * Sets the value of field 'description'. + * + * @param description the value of field 'description'. + */ + public void setDescription(java.lang.String description) + { + this._description = description; + } //-- void setDescription(java.lang.String) + + /** + * Sets the value of field 'graph'. + * + * @param graph the value of field 'graph'. + */ + public void setGraph(boolean graph) + { + this._graph = graph; + this._has_graph = true; + } //-- void setGraph(boolean) + + /** + * Sets the value of field 'graphColour'. + * + * @param graphColour the value of field 'graphColour'. + */ + public void setGraphColour(int graphColour) + { + this._graphColour = graphColour; + this._has_graphColour = true; + } //-- void setGraphColour(int) + + /** + * Sets the value of field 'graphGroup'. + * + * @param graphGroup the value of field 'graphGroup'. + */ + public void setGraphGroup(int graphGroup) + { + this._graphGroup = graphGroup; + this._has_graphGroup = true; + } //-- void setGraphGroup(int) + + /** + * Sets the value of field 'graphType'. + * + * @param graphType the value of field 'graphType'. + */ + public void setGraphType(int graphType) + { + this._graphType = graphType; + this._has_graphType = true; + } //-- void setGraphType(int) + + /** + * 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 'label'. + * + * @param label the value of field 'label'. + */ + public void setLabel(java.lang.String label) + { + this._label = label; + } //-- void setLabel(java.lang.String) + + /** + * Sets the value of field 'sequenceRef'. + * + * @param sequenceRef the value of field 'sequenceRef'. + */ + public void setSequenceRef(java.lang.String sequenceRef) + { + this._sequenceRef = sequenceRef; + } //-- void setSequenceRef(java.lang.String) + + /** + * Sets the value of field 'thresholdLine'. + * + * @param thresholdLine the value of field 'thresholdLine'. + */ + public void setThresholdLine(jalview.schemabinding.version2.ThresholdLine thresholdLine) + { + this._thresholdLine = thresholdLine; + } //-- void setThresholdLine(jalview.schemabinding.version2.ThresholdLine) + + /** + * 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.Annotation) Unmarshaller.unmarshal(jalview.schemabinding.version2.Annotation.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/schemabinding/version2/AnnotationColours.java b/src/jalview/schemabinding/version2/AnnotationColours.java index 67d6ad8..b2af2c4 100755 --- a/src/jalview/schemabinding/version2/AnnotationColours.java +++ b/src/jalview/schemabinding/version2/AnnotationColours.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,379 +7,379 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 AnnotationColours. - * + * * @version $Revision$ $Date$ */ -public class AnnotationColours - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _aboveThreshold - */ - private int _aboveThreshold; - - /** - * keeps track of state for field: _aboveThreshold - */ - private boolean _has_aboveThreshold; - - /** - * Field _annotation - */ - private java.lang.String _annotation; - - /** - * Field _minColour - */ - private int _minColour; - - /** - * keeps track of state for field: _minColour - */ - private boolean _has_minColour; - - /** - * Field _maxColour - */ - private int _maxColour; - - /** - * keeps track of state for field: _maxColour - */ - private boolean _has_maxColour; - - /** - * Field _colourScheme - */ - private java.lang.String _colourScheme; - - /** - * Field _threshold - */ - private float _threshold; - - /** - * keeps track of state for field: _threshold - */ - private boolean _has_threshold; - - //----------------/ - //- Constructors -/ - //----------------/ - - public AnnotationColours() - { - super(); - } //-- jalview.schemabinding.version2.AnnotationColours() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteAboveThreshold - * - */ - public void deleteAboveThreshold() - { - this._has_aboveThreshold = false; - } //-- void deleteAboveThreshold() - - /** - * Method deleteMaxColour - * - */ - public void deleteMaxColour() - { - this._has_maxColour = false; - } //-- void deleteMaxColour() - - /** - * Method deleteMinColour - * - */ - public void deleteMinColour() - { - this._has_minColour = false; - } //-- void deleteMinColour() - - /** - * Method deleteThreshold - * - */ - public void deleteThreshold() - { - this._has_threshold = false; - } //-- void deleteThreshold() - - /** - * Returns the value of field 'aboveThreshold'. - * - * @return int - * @return the value of field 'aboveThreshold'. - */ - public int getAboveThreshold() - { - return this._aboveThreshold; - } //-- int getAboveThreshold() - - /** - * Returns the value of field 'annotation'. - * - * @return String - * @return the value of field 'annotation'. - */ - public java.lang.String getAnnotation() - { - return this._annotation; - } //-- java.lang.String getAnnotation() - - /** - * Returns the value of field 'colourScheme'. - * - * @return String - * @return the value of field 'colourScheme'. - */ - public java.lang.String getColourScheme() - { - return this._colourScheme; - } //-- java.lang.String getColourScheme() - - /** - * Returns the value of field 'maxColour'. - * - * @return int - * @return the value of field 'maxColour'. - */ - public int getMaxColour() - { - return this._maxColour; - } //-- int getMaxColour() - - /** - * Returns the value of field 'minColour'. - * - * @return int - * @return the value of field 'minColour'. - */ - public int getMinColour() - { - return this._minColour; - } //-- int getMinColour() - - /** - * Returns the value of field 'threshold'. - * - * @return float - * @return the value of field 'threshold'. - */ - public float getThreshold() - { - return this._threshold; - } //-- float getThreshold() - - /** - * Method hasAboveThreshold - * - * - * - * @return boolean - */ - public boolean hasAboveThreshold() - { - return this._has_aboveThreshold; - } //-- boolean hasAboveThreshold() - - /** - * Method hasMaxColour - * - * - * - * @return boolean - */ - public boolean hasMaxColour() - { - return this._has_maxColour; - } //-- boolean hasMaxColour() - - /** - * Method hasMinColour - * - * - * - * @return boolean - */ - public boolean hasMinColour() - { - return this._has_minColour; - } //-- boolean hasMinColour() - - /** - * Method hasThreshold - * - * - * - * @return boolean - */ - public boolean hasThreshold() - { - return this._has_threshold; - } //-- boolean hasThreshold() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try +public class AnnotationColours implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _aboveThreshold + */ + private int _aboveThreshold; + + /** + * keeps track of state for field: _aboveThreshold + */ + private boolean _has_aboveThreshold; + + /** + * Field _annotation + */ + private java.lang.String _annotation; + + /** + * Field _minColour + */ + private int _minColour; + + /** + * keeps track of state for field: _minColour + */ + private boolean _has_minColour; + + /** + * Field _maxColour + */ + private int _maxColour; + + /** + * keeps track of state for field: _maxColour + */ + private boolean _has_maxColour; + + /** + * Field _colourScheme + */ + private java.lang.String _colourScheme; + + /** + * Field _threshold + */ + private float _threshold; + + /** + * keeps track of state for field: _threshold + */ + private boolean _has_threshold; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AnnotationColours() { + super(); + } //-- jalview.schemabinding.version2.AnnotationColours() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteAboveThreshold + * + */ + public void deleteAboveThreshold() + { + this._has_aboveThreshold= false; + } //-- void deleteAboveThreshold() + + /** + * Method deleteMaxColour + * + */ + public void deleteMaxColour() + { + this._has_maxColour= false; + } //-- void deleteMaxColour() + + /** + * Method deleteMinColour + * + */ + public void deleteMinColour() + { + this._has_minColour= false; + } //-- void deleteMinColour() + + /** + * Method deleteThreshold + * + */ + public void deleteThreshold() + { + this._has_threshold= false; + } //-- void deleteThreshold() + + /** + * Returns the value of field 'aboveThreshold'. + * + * @return int + * @return the value of field 'aboveThreshold'. + */ + public int getAboveThreshold() + { + return this._aboveThreshold; + } //-- int getAboveThreshold() + + /** + * Returns the value of field 'annotation'. + * + * @return String + * @return the value of field 'annotation'. + */ + public java.lang.String getAnnotation() + { + return this._annotation; + } //-- java.lang.String getAnnotation() + + /** + * Returns the value of field 'colourScheme'. + * + * @return String + * @return the value of field 'colourScheme'. + */ + public java.lang.String getColourScheme() + { + return this._colourScheme; + } //-- java.lang.String getColourScheme() + + /** + * Returns the value of field 'maxColour'. + * + * @return int + * @return the value of field 'maxColour'. + */ + public int getMaxColour() + { + return this._maxColour; + } //-- int getMaxColour() + + /** + * Returns the value of field 'minColour'. + * + * @return int + * @return the value of field 'minColour'. + */ + public int getMinColour() + { + return this._minColour; + } //-- int getMinColour() + + /** + * Returns the value of field 'threshold'. + * + * @return float + * @return the value of field 'threshold'. + */ + public float getThreshold() + { + return this._threshold; + } //-- float getThreshold() + + /** + * Method hasAboveThreshold + * + * + * + * @return boolean + */ + public boolean hasAboveThreshold() + { + return this._has_aboveThreshold; + } //-- boolean hasAboveThreshold() + + /** + * Method hasMaxColour + * + * + * + * @return boolean + */ + public boolean hasMaxColour() + { + return this._has_maxColour; + } //-- boolean hasMaxColour() + + /** + * Method hasMinColour + * + * + * + * @return boolean + */ + public boolean hasMinColour() + { + return this._has_minColour; + } //-- boolean hasMinColour() + + /** + * Method hasThreshold + * + * + * + * @return boolean + */ + public boolean hasThreshold() + { + return this._has_threshold; + } //-- boolean hasThreshold() + + /** + * 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 'aboveThreshold'. + * + * @param aboveThreshold the value of field 'aboveThreshold'. + */ + public void setAboveThreshold(int aboveThreshold) + { + this._aboveThreshold = aboveThreshold; + this._has_aboveThreshold = true; + } //-- void setAboveThreshold(int) + + /** + * Sets the value of field 'annotation'. + * + * @param annotation the value of field 'annotation'. + */ + public void setAnnotation(java.lang.String annotation) + { + this._annotation = annotation; + } //-- void setAnnotation(java.lang.String) + + /** + * Sets the value of field 'colourScheme'. + * + * @param colourScheme the value of field 'colourScheme'. + */ + public void setColourScheme(java.lang.String colourScheme) + { + this._colourScheme = colourScheme; + } //-- void setColourScheme(java.lang.String) + + /** + * Sets the value of field 'maxColour'. + * + * @param maxColour the value of field 'maxColour'. + */ + public void setMaxColour(int maxColour) + { + this._maxColour = maxColour; + this._has_maxColour = true; + } //-- void setMaxColour(int) + + /** + * Sets the value of field 'minColour'. + * + * @param minColour the value of field 'minColour'. + */ + public void setMinColour(int minColour) + { + this._minColour = minColour; + this._has_minColour = true; + } //-- void setMinColour(int) + + /** + * Sets the value of field 'threshold'. + * + * @param threshold the value of field 'threshold'. + */ + public void setThreshold(float threshold) + { + this._threshold = threshold; + this._has_threshold = true; + } //-- void setThreshold(float) + + /** + * 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 { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationColours.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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) - - /** - * Sets the value of field 'aboveThreshold'. - * - * @param aboveThreshold the value of field 'aboveThreshold'. - */ - public void setAboveThreshold(int aboveThreshold) - { - this._aboveThreshold = aboveThreshold; - this._has_aboveThreshold = true; - } //-- void setAboveThreshold(int) - - /** - * Sets the value of field 'annotation'. - * - * @param annotation the value of field 'annotation'. - */ - public void setAnnotation(java.lang.String annotation) - { - this._annotation = annotation; - } //-- void setAnnotation(java.lang.String) - - /** - * Sets the value of field 'colourScheme'. - * - * @param colourScheme the value of field 'colourScheme'. - */ - public void setColourScheme(java.lang.String colourScheme) - { - this._colourScheme = colourScheme; - } //-- void setColourScheme(java.lang.String) - - /** - * Sets the value of field 'maxColour'. - * - * @param maxColour the value of field 'maxColour'. - */ - public void setMaxColour(int maxColour) - { - this._maxColour = maxColour; - this._has_maxColour = true; - } //-- void setMaxColour(int) - - /** - * Sets the value of field 'minColour'. - * - * @param minColour the value of field 'minColour'. - */ - public void setMinColour(int minColour) - { - this._minColour = minColour; - this._has_minColour = true; - } //-- void setMinColour(int) - - /** - * Sets the value of field 'threshold'. - * - * @param threshold the value of field 'threshold'. - */ - public void setThreshold(float threshold) - { - this._threshold = threshold; - this._has_threshold = true; - } //-- void setThreshold(float) - - /** - * 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.AnnotationColours) Unmarshaller. - unmarshal(jalview.schemabinding.version2.AnnotationColours.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/AnnotationColoursDescriptor.java b/src/jalview/schemabinding/version2/AnnotationColoursDescriptor.java index f8cc3a1..c3c06e6 100755 --- a/src/jalview/schemabinding/version2/AnnotationColoursDescriptor.java +++ b/src/jalview/schemabinding/version2/AnnotationColoursDescriptor.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,456 +7,400 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class AnnotationColoursDescriptor. - * + * * @version $Revision$ $Date$ */ -public class AnnotationColoursDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public AnnotationColoursDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "AnnotationColours"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _aboveThreshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_aboveThreshold", "aboveThreshold", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - if (!target.hasAboveThreshold()) - { - return null; - } - return new java.lang.Integer(target.getAboveThreshold()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationColours target = (AnnotationColours) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteAboveThreshold(); - return; - } - target.setAboveThreshold( ( (java.lang.Integer) value).intValue()); +public class AnnotationColoursDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AnnotationColoursDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "AnnotationColours"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _aboveThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if(!target.hasAboveThreshold()) + return null; + return new java.lang.Integer(target.getAboveThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteAboveThreshold(); + return; + } + target.setAboveThreshold( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _aboveThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _aboveThreshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _annotation - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_annotation", "annotation", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - return target.getAnnotation(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationColours target = (AnnotationColours) object; - target.setAnnotation( (java.lang.String) value); + desc.setValidator(fieldValidator); + //-- _annotation + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_annotation", "annotation", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + return target.getAnnotation(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + target.setAnnotation( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _annotation + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _minColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_minColour", "minColour", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if(!target.hasMinColour()) + return null; + return new java.lang.Integer(target.getMinColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteMinColour(); + return; + } + target.setMinColour( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _minColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _annotation - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _minColour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_minColour", "minColour", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - if (!target.hasMinColour()) - { - return null; + desc.setValidator(fieldValidator); + //-- _maxColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_maxColour", "maxColour", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if(!target.hasMaxColour()) + return null; + return new java.lang.Integer(target.getMaxColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteMaxColour(); + return; + } + target.setMaxColour( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _maxColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - return new java.lang.Integer(target.getMinColour()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationColours target = (AnnotationColours) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteMinColour(); - return; - } - target.setMinColour( ( (java.lang.Integer) value).intValue()); + desc.setValidator(fieldValidator); + //-- _colourScheme + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_colourScheme", "colourScheme", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + return target.getColourScheme(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + target.setColourScheme( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _colourScheme + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _threshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if(!target.hasThreshold()) + return null; + return new java.lang.Float(target.getThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteThreshold(); + return; + } + target.setThreshold( ((java.lang.Float)value).floatValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _threshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + FloatValidator typeValidator = new FloatValidator(); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _minColour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _maxColour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_maxColour", "maxColour", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- jalview.schemabinding.version2.AnnotationColoursDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - if (!target.hasMaxColour()) - { - return null; - } - return new java.lang.Integer(target.getMaxColour()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationColours target = (AnnotationColours) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteMaxColour(); - return; - } - target.setMaxColour( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _maxColour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _colourScheme - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_colourScheme", "colourScheme", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - return target.getColourScheme(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationColours target = (AnnotationColours) object; - target.setColourScheme( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _colourScheme - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _threshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, - "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationColours target = (AnnotationColours) object; - if (!target.hasThreshold()) - { - return null; - } - return new java.lang.Float(target.getThreshold()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationColours target = (AnnotationColours) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteThreshold(); - return; - } - target.setThreshold( ( (java.lang.Float) value).floatValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _threshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - FloatValidator typeValidator = new FloatValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- jalview.schemabinding.version2.AnnotationColoursDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.AnnotationColours.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.AnnotationColours.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/AnnotationDescriptor.java b/src/jalview/schemabinding/version2/AnnotationDescriptor.java index 7ba7e67..34047b3 100755 --- a/src/jalview/schemabinding/version2/AnnotationDescriptor.java +++ b/src/jalview/schemabinding/version2/AnnotationDescriptor.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,643 +7,550 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class AnnotationDescriptor. - * + * * @version $Revision$ $Date$ */ -public class AnnotationDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public AnnotationDescriptor() - { - super(); - nsURI = "www.vamsas.ac.uk/jalview/version2"; - xmlName = "Annotation"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _graph - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_graph", "graph", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Annotation target = (Annotation) object; - if (!target.hasGraph()) - { - return null; +public class AnnotationDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AnnotationDescriptor() { + super(); + nsURI = "www.vamsas.ac.uk/jalview/version2"; + xmlName = "Annotation"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _graph + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_graph", "graph", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + if(!target.hasGraph()) + return null; + return (target.getGraph() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setGraph( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _graph + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); } - return (target.getGraph() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Annotation target = (Annotation) object; - // ignore null values for non optional primitives - if (value == null) - { - return; - } - - target.setGraph( ( (java.lang.Boolean) value).booleanValue()); + desc.setValidator(fieldValidator); + //-- _graphType + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_graphType", "graphType", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + if(!target.hasGraphType()) + return null; + return new java.lang.Integer(target.getGraphType()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteGraphType(); + return; + } + target.setGraphType( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _graphType + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _sequenceRef + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequenceRef", "sequenceRef", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + return target.getSequenceRef(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + target.setSequenceRef( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _sequenceRef + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _graph - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _graphType - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_graphType", "graphType", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Annotation target = (Annotation) object; - if (!target.hasGraphType()) - { - return null; + desc.setValidator(fieldValidator); + //-- _graphColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_graphColour", "graphColour", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + if(!target.hasGraphColour()) + return null; + return new java.lang.Integer(target.getGraphColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteGraphColour(); + return; + } + target.setGraphColour( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _graphColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - return new java.lang.Integer(target.getGraphType()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Annotation target = (Annotation) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteGraphType(); - return; - } - target.setGraphType( ( (java.lang.Integer) value).intValue()); + desc.setValidator(fieldValidator); + //-- _graphGroup + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_graphGroup", "graphGroup", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + if(!target.hasGraphGroup()) + return null; + return new java.lang.Integer(target.getGraphGroup()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteGraphGroup(); + return; + } + target.setGraphGroup( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _graphGroup + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + return target.getId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + target.setId( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _id + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _graphType - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _sequenceRef - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_sequenceRef", "sequenceRef", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Annotation target = (Annotation) object; - return target.getSequenceRef(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Annotation target = (Annotation) object; - target.setSequenceRef( (java.lang.String) value); + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _annotationElementList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.AnnotationElement.class, "_annotationElementList", "annotationElement", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + return target.getAnnotationElement(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + target.addAnnotationElement( (jalview.schemabinding.version2.AnnotationElement) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.AnnotationElement(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _annotationElementList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _sequenceRef - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _graphColour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_graphColour", "graphColour", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Annotation target = (Annotation) object; - if (!target.hasGraphColour()) - { - return null; + desc.setValidator(fieldValidator); + //-- _label + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_label", "label", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + return target.getLabel(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + target.setLabel( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _label + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - return new java.lang.Integer(target.getGraphColour()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Annotation target = (Annotation) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteGraphColour(); - return; - } - target.setGraphColour( ( (java.lang.Integer) value).intValue()); + desc.setValidator(fieldValidator); + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + return target.getDescription(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + target.setDescription( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _description + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _thresholdLine + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.ThresholdLine.class, "_thresholdLine", "thresholdLine", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + return target.getThresholdLine(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + target.setThresholdLine( (jalview.schemabinding.version2.ThresholdLine) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.ThresholdLine(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _thresholdLine + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _graphColour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _graphGroup - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_graphGroup", "graphGroup", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.AnnotationDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Annotation target = (Annotation) object; - if (!target.hasGraphGroup()) - { - return null; - } - return new java.lang.Integer(target.getGraphGroup()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Annotation target = (Annotation) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteGraphGroup(); - return; - } - target.setGraphGroup( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _graphGroup - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _id - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Annotation target = (Annotation) object; - return target.getId(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Annotation target = (Annotation) object; - target.setId( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _id - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _annotationElementList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.AnnotationElement.class, - "_annotationElementList", "annotationElement", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Annotation target = (Annotation) object; - return target.getAnnotationElement(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Annotation target = (Annotation) object; - target.addAnnotationElement( (jalview.schemabinding.version2. - AnnotationElement) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.AnnotationElement(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _annotationElementList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _label - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_label", "label", org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Annotation target = (Annotation) object; - return target.getLabel(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Annotation target = (Annotation) object; - target.setLabel( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _label - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _description - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_description", "description", - org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return jalview.schemabinding.version2.Annotation.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Annotation target = (Annotation) object; - return target.getDescription(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Annotation target = (Annotation) object; - target.setDescription( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _description - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _thresholdLine - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.ThresholdLine.class, "_thresholdLine", - "thresholdLine", org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Annotation target = (Annotation) object; - return target.getThresholdLine(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Annotation target = (Annotation) object; - target.setThresholdLine( (jalview.schemabinding.version2. - ThresholdLine) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.ThresholdLine(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _thresholdLine - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.AnnotationDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.Annotation.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/AnnotationElement.java b/src/jalview/schemabinding/version2/AnnotationElement.java index 57c0b2c..2507197 100755 --- a/src/jalview/schemabinding/version2/AnnotationElement.java +++ b/src/jalview/schemabinding/version2/AnnotationElement.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,353 +7,353 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 AnnotationElement. - * + * * @version $Revision$ $Date$ */ -public class AnnotationElement - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _position - */ - private int _position; - - /** - * keeps track of state for field: _position - */ - private boolean _has_position; - - /** - * Field _colour - */ - private int _colour; - - /** - * keeps track of state for field: _colour - */ - private boolean _has_colour; - - /** - * Field _displayCharacter - */ - private java.lang.String _displayCharacter; - - /** - * Field _description - */ - private java.lang.String _description; - - /** - * Field _secondaryStructure - */ - private java.lang.String _secondaryStructure; - - /** - * Field _value - */ - private float _value; - - /** - * keeps track of state for field: _value - */ - private boolean _has_value; - - //----------------/ - //- Constructors -/ - //----------------/ - - public AnnotationElement() - { - super(); - } //-- jalview.schemabinding.version2.AnnotationElement() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteColour - * - */ - public void deleteColour() - { - this._has_colour = false; - } //-- void deleteColour() - - /** - * Method deletePosition - * - */ - public void deletePosition() - { - this._has_position = false; - } //-- void deletePosition() - - /** - * Method deleteValue - * - */ - public void deleteValue() - { - this._has_value = false; - } //-- void deleteValue() - - /** - * Returns the value of field 'colour'. - * - * @return int - * @return the value of field 'colour'. - */ - public int getColour() - { - return this._colour; - } //-- int getColour() - - /** - * Returns the value of field 'description'. - * - * @return String - * @return the value of field 'description'. - */ - public java.lang.String getDescription() - { - return this._description; - } //-- java.lang.String getDescription() - - /** - * Returns the value of field 'displayCharacter'. - * - * @return String - * @return the value of field 'displayCharacter'. - */ - public java.lang.String getDisplayCharacter() - { - return this._displayCharacter; - } //-- java.lang.String getDisplayCharacter() - - /** - * Returns the value of field 'position'. - * - * @return int - * @return the value of field 'position'. - */ - public int getPosition() - { - return this._position; - } //-- int getPosition() - - /** - * Returns the value of field 'secondaryStructure'. - * - * @return String - * @return the value of field 'secondaryStructure'. - */ - public java.lang.String getSecondaryStructure() - { - return this._secondaryStructure; - } //-- java.lang.String getSecondaryStructure() - - /** - * Returns the value of field 'value'. - * - * @return float - * @return the value of field 'value'. - */ - public float getValue() - { - return this._value; - } //-- float getValue() - - /** - * Method hasColour - * - * - * - * @return boolean - */ - public boolean hasColour() - { - return this._has_colour; - } //-- boolean hasColour() - - /** - * Method hasPosition - * - * - * - * @return boolean - */ - public boolean hasPosition() - { - return this._has_position; - } //-- boolean hasPosition() - - /** - * Method hasValue - * - * - * - * @return boolean - */ - public boolean hasValue() - { - return this._has_value; - } //-- boolean hasValue() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try +public class AnnotationElement implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _position + */ + private int _position; + + /** + * keeps track of state for field: _position + */ + private boolean _has_position; + + /** + * Field _colour + */ + private int _colour; + + /** + * keeps track of state for field: _colour + */ + private boolean _has_colour; + + /** + * Field _displayCharacter + */ + private java.lang.String _displayCharacter; + + /** + * Field _description + */ + private java.lang.String _description; + + /** + * Field _secondaryStructure + */ + private java.lang.String _secondaryStructure; + + /** + * Field _value + */ + private float _value; + + /** + * keeps track of state for field: _value + */ + private boolean _has_value; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AnnotationElement() { + super(); + } //-- jalview.schemabinding.version2.AnnotationElement() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteColour + * + */ + public void deleteColour() + { + this._has_colour= false; + } //-- void deleteColour() + + /** + * Method deletePosition + * + */ + public void deletePosition() + { + this._has_position= false; + } //-- void deletePosition() + + /** + * Method deleteValue + * + */ + public void deleteValue() + { + this._has_value= false; + } //-- void deleteValue() + + /** + * Returns the value of field 'colour'. + * + * @return int + * @return the value of field 'colour'. + */ + public int getColour() + { + return this._colour; + } //-- int getColour() + + /** + * Returns the value of field 'description'. + * + * @return String + * @return the value of field 'description'. + */ + public java.lang.String getDescription() + { + return this._description; + } //-- java.lang.String getDescription() + + /** + * Returns the value of field 'displayCharacter'. + * + * @return String + * @return the value of field 'displayCharacter'. + */ + public java.lang.String getDisplayCharacter() + { + return this._displayCharacter; + } //-- java.lang.String getDisplayCharacter() + + /** + * Returns the value of field 'position'. + * + * @return int + * @return the value of field 'position'. + */ + public int getPosition() + { + return this._position; + } //-- int getPosition() + + /** + * Returns the value of field 'secondaryStructure'. + * + * @return String + * @return the value of field 'secondaryStructure'. + */ + public java.lang.String getSecondaryStructure() + { + return this._secondaryStructure; + } //-- java.lang.String getSecondaryStructure() + + /** + * Returns the value of field 'value'. + * + * @return float + * @return the value of field 'value'. + */ + public float getValue() + { + return this._value; + } //-- float getValue() + + /** + * Method hasColour + * + * + * + * @return boolean + */ + public boolean hasColour() + { + return this._has_colour; + } //-- boolean hasColour() + + /** + * Method hasPosition + * + * + * + * @return boolean + */ + public boolean hasPosition() + { + return this._has_position; + } //-- boolean hasPosition() + + /** + * Method hasValue + * + * + * + * @return boolean + */ + public boolean hasValue() + { + return this._has_value; + } //-- boolean hasValue() + + /** + * 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 'colour'. + * + * @param colour the value of field 'colour'. + */ + public void setColour(int colour) + { + this._colour = colour; + this._has_colour = true; + } //-- void setColour(int) + + /** + * Sets the value of field 'description'. + * + * @param description the value of field 'description'. + */ + public void setDescription(java.lang.String description) + { + this._description = description; + } //-- void setDescription(java.lang.String) + + /** + * Sets the value of field 'displayCharacter'. + * + * @param displayCharacter the value of field 'displayCharacter' + */ + public void setDisplayCharacter(java.lang.String displayCharacter) + { + this._displayCharacter = displayCharacter; + } //-- void setDisplayCharacter(java.lang.String) + + /** + * Sets the value of field 'position'. + * + * @param position the value of field 'position'. + */ + public void setPosition(int position) + { + this._position = position; + this._has_position = true; + } //-- void setPosition(int) + + /** + * Sets the value of field 'secondaryStructure'. + * + * @param secondaryStructure the value of field + * 'secondaryStructure'. + */ + public void setSecondaryStructure(java.lang.String secondaryStructure) + { + this._secondaryStructure = secondaryStructure; + } //-- void setSecondaryStructure(java.lang.String) + + /** + * Sets the value of field 'value'. + * + * @param value the value of field 'value'. + */ + public void setValue(float value) + { + this._value = value; + this._has_value = true; + } //-- void setValue(float) + + /** + * 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 { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return (jalview.schemabinding.version2.AnnotationElement) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationElement.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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) - - /** - * Sets the value of field 'colour'. - * - * @param colour the value of field 'colour'. - */ - public void setColour(int colour) - { - this._colour = colour; - this._has_colour = true; - } //-- void setColour(int) - - /** - * Sets the value of field 'description'. - * - * @param description the value of field 'description'. - */ - public void setDescription(java.lang.String description) - { - this._description = description; - } //-- void setDescription(java.lang.String) - - /** - * Sets the value of field 'displayCharacter'. - * - * @param displayCharacter the value of field 'displayCharacter' - */ - public void setDisplayCharacter(java.lang.String displayCharacter) - { - this._displayCharacter = displayCharacter; - } //-- void setDisplayCharacter(java.lang.String) - - /** - * Sets the value of field 'position'. - * - * @param position the value of field 'position'. - */ - public void setPosition(int position) - { - this._position = position; - this._has_position = true; - } //-- void setPosition(int) - - /** - * Sets the value of field 'secondaryStructure'. - * - * @param secondaryStructure the value of field - * 'secondaryStructure'. - */ - public void setSecondaryStructure(java.lang.String secondaryStructure) - { - this._secondaryStructure = secondaryStructure; - } //-- void setSecondaryStructure(java.lang.String) - - /** - * Sets the value of field 'value'. - * - * @param value the value of field 'value'. - */ - public void setValue(float value) - { - this._value = value; - this._has_value = true; - } //-- void setValue(float) - - /** - * 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.AnnotationElement) Unmarshaller. - unmarshal(jalview.schemabinding.version2.AnnotationElement.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/AnnotationElementDescriptor.java b/src/jalview/schemabinding/version2/AnnotationElementDescriptor.java index 058788d..0eab95b 100755 --- a/src/jalview/schemabinding/version2/AnnotationElementDescriptor.java +++ b/src/jalview/schemabinding/version2/AnnotationElementDescriptor.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,462 +7,407 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class AnnotationElementDescriptor. - * + * * @version $Revision$ $Date$ */ -public class AnnotationElementDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public AnnotationElementDescriptor() - { - super(); - nsURI = "www.vamsas.ac.uk/jalview/version2"; - xmlName = "annotationElement"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _position - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_position", "position", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationElement target = (AnnotationElement) object; - if (!target.hasPosition()) - { - return null; +public class AnnotationElementDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AnnotationElementDescriptor() { + super(); + nsURI = "www.vamsas.ac.uk/jalview/version2"; + xmlName = "annotationElement"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _position + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_position", "position", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationElement target = (AnnotationElement) object; + if(!target.hasPosition()) + return null; + return new java.lang.Integer(target.getPosition()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationElement target = (AnnotationElement) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setPosition( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _position + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - return new java.lang.Integer(target.getPosition()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationElement target = (AnnotationElement) object; - // ignore null values for non optional primitives - if (value == null) - { - return; - } - - target.setPosition( ( (java.lang.Integer) value).intValue()); + desc.setValidator(fieldValidator); + //-- _colour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colour", "colour", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationElement target = (AnnotationElement) object; + if(!target.hasColour()) + return null; + return new java.lang.Integer(target.getColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationElement target = (AnnotationElement) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteColour(); + return; + } + target.setColour( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _colour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _displayCharacter + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_displayCharacter", "displayCharacter", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationElement target = (AnnotationElement) object; + return target.getDisplayCharacter(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationElement target = (AnnotationElement) object; + target.setDisplayCharacter( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _displayCharacter + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _position - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _colour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_colour", "colour", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationElement target = (AnnotationElement) object; - if (!target.hasColour()) - { - return null; + desc.setValidator(fieldValidator); + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationElement target = (AnnotationElement) object; + return target.getDescription(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationElement target = (AnnotationElement) object; + target.setDescription( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _description + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - return new java.lang.Integer(target.getColour()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationElement target = (AnnotationElement) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteColour(); - return; - } - target.setColour( ( (java.lang.Integer) value).intValue()); + desc.setValidator(fieldValidator); + //-- _secondaryStructure + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_secondaryStructure", "secondaryStructure", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationElement target = (AnnotationElement) object; + return target.getSecondaryStructure(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationElement target = (AnnotationElement) object; + target.setSecondaryStructure( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _secondaryStructure + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setLength(1); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, "_value", "value", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationElement target = (AnnotationElement) object; + if(!target.hasValue()) + return null; + return new java.lang.Float(target.getValue()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationElement target = (AnnotationElement) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteValue(); + return; + } + target.setValue( ((java.lang.Float)value).floatValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _value + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + FloatValidator typeValidator = new FloatValidator(); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _colour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _displayCharacter - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_displayCharacter", "displayCharacter", - org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.AnnotationElementDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationElement target = (AnnotationElement) object; - return target.getDisplayCharacter(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationElement target = (AnnotationElement) object; - target.setDisplayCharacter( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _displayCharacter - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _description - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_description", "description", - org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationElement target = (AnnotationElement) object; - return target.getDescription(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationElement target = (AnnotationElement) object; - target.setDescription( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _description - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _secondaryStructure - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_secondaryStructure", "secondaryStructure", - org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationElement target = (AnnotationElement) object; - return target.getSecondaryStructure(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationElement target = (AnnotationElement) object; - target.setSecondaryStructure( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _secondaryStructure - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setLength(1); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _value - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, - "_value", "value", org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - AnnotationElement target = (AnnotationElement) object; - if (!target.hasValue()) - { - return null; - } - return new java.lang.Float(target.getValue()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - AnnotationElement target = (AnnotationElement) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteValue(); - return; - } - target.setValue( ( (java.lang.Float) value).floatValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _value - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - FloatValidator typeValidator = new FloatValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.AnnotationElementDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.AnnotationElement.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return jalview.schemabinding.version2.AnnotationElement.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/Colour.java b/src/jalview/schemabinding/version2/Colour.java index 2b2dba7..bcc4642 100755 --- a/src/jalview/schemabinding/version2/Colour.java +++ b/src/jalview/schemabinding/version2/Colour.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,166 +7,167 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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.schemabinding.version2.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 +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.schemabinding.version2.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 { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return (jalview.schemabinding.version2.Colour) Unmarshaller.unmarshal(jalview.schemabinding.version2.Colour.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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) - - /** - * 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.schemabinding.version2.Colour) Unmarshaller.unmarshal( - jalview.schemabinding.version2.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/ColourDescriptor.java b/src/jalview/schemabinding/version2/ColourDescriptor.java index 7865ccf..7aa3a82 100755 --- a/src/jalview/schemabinding/version2/ColourDescriptor.java +++ b/src/jalview/schemabinding/version2/ColourDescriptor.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,248 +7,237 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class ColourDescriptor. - * + * * @version $Revision$ $Date$ */ -public class ColourDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public ColourDescriptor() - { - super(); - xmlName = "colour"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _name - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_name", "Name", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Colour target = (Colour) object; - return target.getName(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Colour target = (Colour) object; - target.setName( (java.lang.String) value); +public class ColourDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ColourDescriptor() { + super(); + xmlName = "colour"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "Name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Colour target = (Colour) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Colour target = (Colour) object; + target.setName( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _RGB + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_RGB", "RGB", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Colour target = (Colour) object; + return target.getRGB(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Colour target = (Colour) object; + target.setRGB( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _RGB + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- jalview.schemabinding.version2.ColourDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _name - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _RGB - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_RGB", "RGB", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Colour target = (Colour) object; - return target.getRGB(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Colour target = (Colour) object; - target.setRGB( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _RGB - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- jalview.schemabinding.version2.ColourDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.Colour.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.Colour.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/DBRef.java b/src/jalview/schemabinding/version2/DBRef.java index 7c98b4e..576a4ad 100644 --- a/src/jalview/schemabinding/version2/DBRef.java +++ b/src/jalview/schemabinding/version2/DBRef.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,192 +7,193 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 DBRef. - * + * * @version $Revision$ $Date$ */ -public class DBRef - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _source - */ - private java.lang.String _source; - - /** - * Field _version - */ - private java.lang.String _version; - - /** - * Field _accessionId - */ - private java.lang.String _accessionId; - - //----------------/ - //- Constructors -/ - //----------------/ - - public DBRef() - { - super(); - } //-- jalview.schemabinding.version2.DBRef() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Returns the value of field 'accessionId'. - * - * @return String - * @return the value of field 'accessionId'. - */ - public java.lang.String getAccessionId() - { - return this._accessionId; - } //-- java.lang.String getAccessionId() - - /** - * Returns the value of field 'source'. - * - * @return String - * @return the value of field 'source'. - */ - public java.lang.String getSource() - { - return this._source; - } //-- java.lang.String getSource() - - /** - * Returns the value of field 'version'. - * - * @return String - * @return the value of field 'version'. - */ - public java.lang.String getVersion() - { - return this._version; - } //-- java.lang.String getVersion() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try +public class DBRef implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _source + */ + private java.lang.String _source; + + /** + * Field _version + */ + private java.lang.String _version; + + /** + * Field _accessionId + */ + private java.lang.String _accessionId; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public DBRef() { + super(); + } //-- jalview.schemabinding.version2.DBRef() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'accessionId'. + * + * @return String + * @return the value of field 'accessionId'. + */ + public java.lang.String getAccessionId() + { + return this._accessionId; + } //-- java.lang.String getAccessionId() + + /** + * Returns the value of field 'source'. + * + * @return String + * @return the value of field 'source'. + */ + public java.lang.String getSource() + { + return this._source; + } //-- java.lang.String getSource() + + /** + * Returns the value of field 'version'. + * + * @return String + * @return the value of field 'version'. + */ + public java.lang.String getVersion() + { + return this._version; + } //-- java.lang.String getVersion() + + /** + * 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 'accessionId'. + * + * @param accessionId the value of field 'accessionId'. + */ + public void setAccessionId(java.lang.String accessionId) + { + this._accessionId = accessionId; + } //-- void setAccessionId(java.lang.String) + + /** + * Sets the value of field 'source'. + * + * @param source the value of field 'source'. + */ + public void setSource(java.lang.String source) + { + this._source = source; + } //-- void setSource(java.lang.String) + + /** + * Sets the value of field 'version'. + * + * @param version the value of field 'version'. + */ + public void setVersion(java.lang.String version) + { + this._version = version; + } //-- void setVersion(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 { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(jalview.schemabinding.version2.DBRef.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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) - - /** - * Sets the value of field 'accessionId'. - * - * @param accessionId the value of field 'accessionId'. - */ - public void setAccessionId(java.lang.String accessionId) - { - this._accessionId = accessionId; - } //-- void setAccessionId(java.lang.String) - - /** - * Sets the value of field 'source'. - * - * @param source the value of field 'source'. - */ - public void setSource(java.lang.String source) - { - this._source = source; - } //-- void setSource(java.lang.String) - - /** - * Sets the value of field 'version'. - * - * @param version the value of field 'version'. - */ - public void setVersion(java.lang.String version) - { - this._version = version; - } //-- void setVersion(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.DBRef) Unmarshaller.unmarshal( - jalview.schemabinding.version2.DBRef.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/DBRefDescriptor.java b/src/jalview/schemabinding/version2/DBRefDescriptor.java index 9ab9112..939d5b1 100644 --- a/src/jalview/schemabinding/version2/DBRefDescriptor.java +++ b/src/jalview/schemabinding/version2/DBRefDescriptor.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,293 +7,272 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class DBRefDescriptor. - * + * * @version $Revision$ $Date$ */ -public class DBRefDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public DBRefDescriptor() - { - super(); - nsURI = "www.vamsas.ac.uk/jalview/version2"; - xmlName = "DBRef"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _source - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_source", "source", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - DBRef target = (DBRef) object; - return target.getSource(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - DBRef target = (DBRef) object; - target.setSource( (java.lang.String) value); +public class DBRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public DBRefDescriptor() { + super(); + nsURI = "www.vamsas.ac.uk/jalview/version2"; + xmlName = "DBRef"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _source + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_source", "source", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DBRef target = (DBRef) object; + return target.getSource(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DBRef target = (DBRef) object; + target.setSource( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _source + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _version + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_version", "version", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DBRef target = (DBRef) object; + return target.getVersion(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DBRef target = (DBRef) object; + target.setVersion( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _version + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _source - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _version - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_version", "version", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - DBRef target = (DBRef) object; - return target.getVersion(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - DBRef target = (DBRef) object; - target.setVersion( (java.lang.String) value); + desc.setValidator(fieldValidator); + //-- _accessionId + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_accessionId", "accessionId", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DBRef target = (DBRef) object; + return target.getAccessionId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DBRef target = (DBRef) object; + target.setAccessionId( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _accessionId + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- jalview.schemabinding.version2.DBRefDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _version - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _accessionId - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_accessionId", "accessionId", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - DBRef target = (DBRef) object; - return target.getAccessionId(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - DBRef target = (DBRef) object; - target.setAccessionId( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _accessionId - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- jalview.schemabinding.version2.DBRefDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.DBRef.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.DBRef.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/Feature.java b/src/jalview/schemabinding/version2/Feature.java index 2f7f2fa..305e287 100755 --- a/src/jalview/schemabinding/version2/Feature.java +++ b/src/jalview/schemabinding/version2/Feature.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,540 +7,531 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import java.util.*; -import org.exolab.castor.xml.*; +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 Feature. - * + * * @version $Revision$ $Date$ */ -public class Feature - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _begin - */ - private int _begin; - - /** - * keeps track of state for field: _begin - */ - private boolean _has_begin; - - /** - * Field _end - */ - private int _end; - - /** - * keeps track of state for field: _end - */ - private boolean _has_end; - - /** - * Field _type - */ - private java.lang.String _type; - - /** - * Field _description - */ - private java.lang.String _description; - - /** - * Field _status - */ - private java.lang.String _status; - - /** - * Field _featureGroup - */ - private java.lang.String _featureGroup; - - /** - * Field _score - */ - private float _score; - - /** - * keeps track of state for field: _score - */ - private boolean _has_score; - - /** - * Field _otherDataList - */ - private java.util.Vector _otherDataList; - - //----------------/ - //- Constructors -/ - //----------------/ - - public Feature() - { - super(); - _otherDataList = new Vector(); - } //-- jalview.schemabinding.version2.Feature() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method addOtherData - * - * - * - * @param vOtherData - */ - public void addOtherData(jalview.schemabinding.version2.OtherData vOtherData) - throws java.lang.IndexOutOfBoundsException - { - _otherDataList.addElement(vOtherData); - } //-- void addOtherData(jalview.schemabinding.version2.OtherData) - - /** - * Method addOtherData - * - * - * - * @param index - * @param vOtherData - */ - public void addOtherData(int index, - jalview.schemabinding.version2.OtherData vOtherData) - throws java.lang.IndexOutOfBoundsException - { - _otherDataList.insertElementAt(vOtherData, index); - } //-- void addOtherData(int, jalview.schemabinding.version2.OtherData) - - /** - * Method deleteBegin - * - */ - public void deleteBegin() - { - this._has_begin = false; - } //-- void deleteBegin() - - /** - * Method deleteEnd - * - */ - public void deleteEnd() - { - this._has_end = false; - } //-- void deleteEnd() - - /** - * Method deleteScore - * - */ - public void deleteScore() - { - this._has_score = false; - } //-- void deleteScore() - - /** - * Method enumerateOtherData - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateOtherData() - { - return _otherDataList.elements(); - } //-- java.util.Enumeration enumerateOtherData() - - /** - * Returns the value of field 'begin'. - * - * @return int - * @return the value of field 'begin'. - */ - public int getBegin() - { - return this._begin; - } //-- int getBegin() - - /** - * Returns the value of field 'description'. - * - * @return String - * @return the value of field 'description'. - */ - public java.lang.String getDescription() - { - return this._description; - } //-- java.lang.String getDescription() - - /** - * Returns the value of field 'end'. - * - * @return int - * @return the value of field 'end'. - */ - public int getEnd() - { - return this._end; - } //-- int getEnd() - - /** - * Returns the value of field 'featureGroup'. - * - * @return String - * @return the value of field 'featureGroup'. - */ - public java.lang.String getFeatureGroup() - { - return this._featureGroup; - } //-- java.lang.String getFeatureGroup() - - /** - * Method getOtherData - * - * - * - * @param index - * @return OtherData - */ - public jalview.schemabinding.version2.OtherData getOtherData(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _otherDataList.size())) - { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.OtherData) _otherDataList.elementAt( - index); - } //-- jalview.schemabinding.version2.OtherData getOtherData(int) - - /** - * Method getOtherData - * - * - * - * @return OtherData - */ - public jalview.schemabinding.version2.OtherData[] getOtherData() - { - int size = _otherDataList.size(); - jalview.schemabinding.version2.OtherData[] mArray = new jalview. - schemabinding.version2.OtherData[size]; - for (int index = 0; index < size; index++) - { - mArray[index] = (jalview.schemabinding.version2.OtherData) _otherDataList. - elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.OtherData[] getOtherData() - - /** - * Method getOtherDataCount - * - * - * - * @return int - */ - public int getOtherDataCount() - { - return _otherDataList.size(); - } //-- int getOtherDataCount() - - /** - * Returns the value of field 'score'. - * - * @return float - * @return the value of field 'score'. - */ - public float getScore() - { - return this._score; - } //-- float getScore() - - /** - * Returns the value of field 'status'. - * - * @return String - * @return the value of field 'status'. - */ - public java.lang.String getStatus() - { - return this._status; - } //-- java.lang.String getStatus() - - /** - * 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 hasBegin - * - * - * - * @return boolean - */ - public boolean hasBegin() - { - return this._has_begin; - } //-- boolean hasBegin() - - /** - * Method hasEnd - * - * - * - * @return boolean - */ - public boolean hasEnd() - { - return this._has_end; - } //-- boolean hasEnd() - - /** - * Method hasScore - * - * - * - * @return boolean - */ - public boolean hasScore() - { - return this._has_score; - } //-- boolean hasScore() - - /** - * 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 removeAllOtherData - * - */ - public void removeAllOtherData() - { - _otherDataList.removeAllElements(); - } //-- void removeAllOtherData() - - /** - * Method removeOtherData - * - * - * - * @param index - * @return OtherData - */ - public jalview.schemabinding.version2.OtherData removeOtherData(int index) - { - java.lang.Object obj = _otherDataList.elementAt(index); - _otherDataList.removeElementAt(index); - return (jalview.schemabinding.version2.OtherData) obj; - } //-- jalview.schemabinding.version2.OtherData removeOtherData(int) - - /** - * Sets the value of field 'begin'. - * - * @param begin the value of field 'begin'. - */ - public void setBegin(int begin) - { - this._begin = begin; - this._has_begin = true; - } //-- void setBegin(int) - - /** - * Sets the value of field 'description'. - * - * @param description the value of field 'description'. - */ - public void setDescription(java.lang.String description) - { - this._description = description; - } //-- void setDescription(java.lang.String) - - /** - * Sets the value of field 'end'. - * - * @param end the value of field 'end'. - */ - public void setEnd(int end) - { - this._end = end; - this._has_end = true; - } //-- void setEnd(int) - - /** - * Sets the value of field 'featureGroup'. - * - * @param featureGroup the value of field 'featureGroup'. - */ - public void setFeatureGroup(java.lang.String featureGroup) - { - this._featureGroup = featureGroup; - } //-- void setFeatureGroup(java.lang.String) - - /** - * Method setOtherData - * - * - * - * @param index - * @param vOtherData - */ - public void setOtherData(int index, - jalview.schemabinding.version2.OtherData vOtherData) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _otherDataList.size())) - { - throw new IndexOutOfBoundsException(); - } - _otherDataList.setElementAt(vOtherData, index); - } //-- void setOtherData(int, jalview.schemabinding.version2.OtherData) - - /** - * Method setOtherData - * - * - * - * @param otherDataArray - */ - public void setOtherData(jalview.schemabinding.version2.OtherData[] - otherDataArray) - { - //-- copy array - _otherDataList.removeAllElements(); - for (int i = 0; i < otherDataArray.length; i++) - { - _otherDataList.addElement(otherDataArray[i]); - } - } //-- void setOtherData(jalview.schemabinding.version2.OtherData) - - /** - * Sets the value of field 'score'. - * - * @param score the value of field 'score'. - */ - public void setScore(float score) - { - this._score = score; - this._has_score = true; - } //-- void setScore(float) - - /** - * Sets the value of field 'status'. - * - * @param status the value of field 'status'. - */ - public void setStatus(java.lang.String status) - { - this._status = status; - } //-- void setStatus(java.lang.String) - - /** - * 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.Feature) Unmarshaller.unmarshal( - jalview.schemabinding.version2.Feature.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() +public class Feature implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _begin + */ + private int _begin; + + /** + * keeps track of state for field: _begin + */ + private boolean _has_begin; + + /** + * Field _end + */ + private int _end; + + /** + * keeps track of state for field: _end + */ + private boolean _has_end; + + /** + * Field _type + */ + private java.lang.String _type; + + /** + * Field _description + */ + private java.lang.String _description; + + /** + * Field _status + */ + private java.lang.String _status; + + /** + * Field _featureGroup + */ + private java.lang.String _featureGroup; + + /** + * Field _score + */ + private float _score; + + /** + * keeps track of state for field: _score + */ + private boolean _has_score; + + /** + * Field _otherDataList + */ + private java.util.Vector _otherDataList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Feature() { + super(); + _otherDataList = new Vector(); + } //-- jalview.schemabinding.version2.Feature() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addOtherData + * + * + * + * @param vOtherData + */ + public void addOtherData(jalview.schemabinding.version2.OtherData vOtherData) + throws java.lang.IndexOutOfBoundsException + { + _otherDataList.addElement(vOtherData); + } //-- void addOtherData(jalview.schemabinding.version2.OtherData) + + /** + * Method addOtherData + * + * + * + * @param index + * @param vOtherData + */ + public void addOtherData(int index, jalview.schemabinding.version2.OtherData vOtherData) + throws java.lang.IndexOutOfBoundsException + { + _otherDataList.insertElementAt(vOtherData, index); + } //-- void addOtherData(int, jalview.schemabinding.version2.OtherData) + + /** + * Method deleteBegin + * + */ + public void deleteBegin() + { + this._has_begin= false; + } //-- void deleteBegin() + + /** + * Method deleteEnd + * + */ + public void deleteEnd() + { + this._has_end= false; + } //-- void deleteEnd() + + /** + * Method deleteScore + * + */ + public void deleteScore() + { + this._has_score= false; + } //-- void deleteScore() + + /** + * Method enumerateOtherData + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateOtherData() + { + return _otherDataList.elements(); + } //-- java.util.Enumeration enumerateOtherData() + + /** + * Returns the value of field 'begin'. + * + * @return int + * @return the value of field 'begin'. + */ + public int getBegin() + { + return this._begin; + } //-- int getBegin() + + /** + * Returns the value of field 'description'. + * + * @return String + * @return the value of field 'description'. + */ + public java.lang.String getDescription() + { + return this._description; + } //-- java.lang.String getDescription() + + /** + * Returns the value of field 'end'. + * + * @return int + * @return the value of field 'end'. + */ + public int getEnd() + { + return this._end; + } //-- int getEnd() + + /** + * Returns the value of field 'featureGroup'. + * + * @return String + * @return the value of field 'featureGroup'. + */ + public java.lang.String getFeatureGroup() + { + return this._featureGroup; + } //-- java.lang.String getFeatureGroup() + + /** + * Method getOtherData + * + * + * + * @param index + * @return OtherData + */ + public jalview.schemabinding.version2.OtherData getOtherData(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _otherDataList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.OtherData) _otherDataList.elementAt(index); + } //-- jalview.schemabinding.version2.OtherData getOtherData(int) + + /** + * Method getOtherData + * + * + * + * @return OtherData + */ + public jalview.schemabinding.version2.OtherData[] getOtherData() + { + int size = _otherDataList.size(); + jalview.schemabinding.version2.OtherData[] mArray = new jalview.schemabinding.version2.OtherData[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.OtherData) _otherDataList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.OtherData[] getOtherData() + + /** + * Method getOtherDataCount + * + * + * + * @return int + */ + public int getOtherDataCount() + { + return _otherDataList.size(); + } //-- int getOtherDataCount() + + /** + * Returns the value of field 'score'. + * + * @return float + * @return the value of field 'score'. + */ + public float getScore() + { + return this._score; + } //-- float getScore() + + /** + * Returns the value of field 'status'. + * + * @return String + * @return the value of field 'status'. + */ + public java.lang.String getStatus() + { + return this._status; + } //-- java.lang.String getStatus() + + /** + * 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 hasBegin + * + * + * + * @return boolean + */ + public boolean hasBegin() + { + return this._has_begin; + } //-- boolean hasBegin() + + /** + * Method hasEnd + * + * + * + * @return boolean + */ + public boolean hasEnd() + { + return this._has_end; + } //-- boolean hasEnd() + + /** + * Method hasScore + * + * + * + * @return boolean + */ + public boolean hasScore() + { + return this._has_score; + } //-- boolean hasScore() + + /** + * 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 removeAllOtherData + * + */ + public void removeAllOtherData() + { + _otherDataList.removeAllElements(); + } //-- void removeAllOtherData() + + /** + * Method removeOtherData + * + * + * + * @param index + * @return OtherData + */ + public jalview.schemabinding.version2.OtherData removeOtherData(int index) + { + java.lang.Object obj = _otherDataList.elementAt(index); + _otherDataList.removeElementAt(index); + return (jalview.schemabinding.version2.OtherData) obj; + } //-- jalview.schemabinding.version2.OtherData removeOtherData(int) + + /** + * Sets the value of field 'begin'. + * + * @param begin the value of field 'begin'. + */ + public void setBegin(int begin) + { + this._begin = begin; + this._has_begin = true; + } //-- void setBegin(int) + + /** + * Sets the value of field 'description'. + * + * @param description the value of field 'description'. + */ + public void setDescription(java.lang.String description) + { + this._description = description; + } //-- void setDescription(java.lang.String) + + /** + * Sets the value of field 'end'. + * + * @param end the value of field 'end'. + */ + public void setEnd(int end) + { + this._end = end; + this._has_end = true; + } //-- void setEnd(int) + + /** + * Sets the value of field 'featureGroup'. + * + * @param featureGroup the value of field 'featureGroup'. + */ + public void setFeatureGroup(java.lang.String featureGroup) + { + this._featureGroup = featureGroup; + } //-- void setFeatureGroup(java.lang.String) + + /** + * Method setOtherData + * + * + * + * @param index + * @param vOtherData + */ + public void setOtherData(int index, jalview.schemabinding.version2.OtherData vOtherData) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _otherDataList.size())) { + throw new IndexOutOfBoundsException(); + } + _otherDataList.setElementAt(vOtherData, index); + } //-- void setOtherData(int, jalview.schemabinding.version2.OtherData) + + /** + * Method setOtherData + * + * + * + * @param otherDataArray + */ + public void setOtherData(jalview.schemabinding.version2.OtherData[] otherDataArray) + { + //-- copy array + _otherDataList.removeAllElements(); + for (int i = 0; i < otherDataArray.length; i++) { + _otherDataList.addElement(otherDataArray[i]); + } + } //-- void setOtherData(jalview.schemabinding.version2.OtherData) + + /** + * Sets the value of field 'score'. + * + * @param score the value of field 'score'. + */ + public void setScore(float score) + { + this._score = score; + this._has_score = true; + } //-- void setScore(float) + + /** + * Sets the value of field 'status'. + * + * @param status the value of field 'status'. + */ + public void setStatus(java.lang.String status) + { + this._status = status; + } //-- void setStatus(java.lang.String) + + /** + * 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.Feature) Unmarshaller.unmarshal(jalview.schemabinding.version2.Feature.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/schemabinding/version2/FeatureDescriptor.java b/src/jalview/schemabinding/version2/FeatureDescriptor.java index 0641afa..d0b9372 100755 --- a/src/jalview/schemabinding/version2/FeatureDescriptor.java +++ b/src/jalview/schemabinding/version2/FeatureDescriptor.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,542 +7,471 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class FeatureDescriptor. - * + * * @version $Revision$ $Date$ */ -public class FeatureDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public FeatureDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "feature"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _begin - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_begin", "begin", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Feature target = (Feature) object; - if (!target.hasBegin()) - { - return null; +public class FeatureDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FeatureDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "feature"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _begin + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_begin", "begin", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + if(!target.hasBegin()) + return null; + return new java.lang.Integer(target.getBegin()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setBegin( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _begin + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - return new java.lang.Integer(target.getBegin()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Feature target = (Feature) object; - // ignore null values for non optional primitives - if (value == null) - { - return; - } - - target.setBegin( ( (java.lang.Integer) value).intValue()); + desc.setValidator(fieldValidator); + //-- _end + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + if(!target.hasEnd()) + return null; + return new java.lang.Integer(target.getEnd()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setEnd( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _end + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + return target.getType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + target.setType( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _begin - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _end - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Feature target = (Feature) object; - if (!target.hasEnd()) - { - return null; + desc.setValidator(fieldValidator); + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + return target.getDescription(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + target.setDescription( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _description + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - return new java.lang.Integer(target.getEnd()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Feature target = (Feature) object; - // ignore null values for non optional primitives - if (value == null) - { - return; - } - - target.setEnd( ( (java.lang.Integer) value).intValue()); + desc.setValidator(fieldValidator); + //-- _status + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_status", "status", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + return target.getStatus(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + target.setStatus( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _status + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _featureGroup + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_featureGroup", "featureGroup", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + return target.getFeatureGroup(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + target.setFeatureGroup( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _featureGroup + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _end - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _type - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Feature target = (Feature) object; - return target.getType(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Feature target = (Feature) object; - target.setType( (java.lang.String) value); + desc.setValidator(fieldValidator); + //-- _score + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, "_score", "score", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + if(!target.hasScore()) + return null; + return new java.lang.Float(target.getScore()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteScore(); + return; + } + target.setScore( ((java.lang.Float)value).floatValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _score + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + FloatValidator typeValidator = new FloatValidator(); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _otherDataList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.OtherData.class, "_otherDataList", "otherData", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + return target.getOtherData(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + target.addOtherData( (jalview.schemabinding.version2.OtherData) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.OtherData(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _otherDataList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _type - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _description - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_description", "description", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.FeatureDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Feature target = (Feature) object; - return target.getDescription(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Feature target = (Feature) object; - target.setDescription( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _description - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _status - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_status", "status", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Feature target = (Feature) object; - return target.getStatus(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Feature target = (Feature) object; - target.setStatus( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _status - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _featureGroup - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_featureGroup", "featureGroup", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Feature target = (Feature) object; - return target.getFeatureGroup(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Feature target = (Feature) object; - target.setFeatureGroup( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _featureGroup - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _score - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, - "_score", "score", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Feature target = (Feature) object; - if (!target.hasScore()) - { - return null; - } - return new java.lang.Float(target.getScore()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Feature target = (Feature) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteScore(); - return; - } - target.setScore( ( (java.lang.Float) value).floatValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _score - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - FloatValidator typeValidator = new FloatValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _otherDataList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.OtherData.class, "_otherDataList", "otherData", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return jalview.schemabinding.version2.Feature.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Feature target = (Feature) object; - return target.getOtherData(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Feature target = (Feature) object; - target.addOtherData( (jalview.schemabinding.version2.OtherData) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.OtherData(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _otherDataList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.FeatureDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.Feature.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/FeatureSettings.java b/src/jalview/schemabinding/version2/FeatureSettings.java index 2dad54a..c20a83c 100755 --- a/src/jalview/schemabinding/version2/FeatureSettings.java +++ b/src/jalview/schemabinding/version2/FeatureSettings.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,276 +7,268 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import java.util.*; -import org.exolab.castor.xml.*; +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 FeatureSettings. - * + * * @version $Revision$ $Date$ */ -public class FeatureSettings - implements java.io.Serializable -{ +public class FeatureSettings implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - /** - * Field _settingList - */ - private java.util.Vector _settingList; + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ - //----------------/ - //- Constructors -/ - //----------------/ + /** + * Field _settingList + */ + private java.util.Vector _settingList; - public FeatureSettings() - { - super(); - _settingList = new Vector(); - } //-- jalview.schemabinding.version2.FeatureSettings() - //-----------/ - //- Methods -/ - //-----------/ + //----------------/ + //- Constructors -/ + //----------------/ - /** - * Method addSetting - * - * - * - * @param vSetting - */ - public void addSetting(jalview.schemabinding.version2.Setting vSetting) - throws java.lang.IndexOutOfBoundsException - { - _settingList.addElement(vSetting); - } //-- void addSetting(jalview.schemabinding.version2.Setting) + public FeatureSettings() { + super(); + _settingList = new Vector(); + } //-- jalview.schemabinding.version2.FeatureSettings() - /** - * Method addSetting - * - * - * - * @param index - * @param vSetting - */ - public void addSetting(int index, - jalview.schemabinding.version2.Setting vSetting) - throws java.lang.IndexOutOfBoundsException - { - _settingList.insertElementAt(vSetting, index); - } //-- void addSetting(int, jalview.schemabinding.version2.Setting) - /** - * Method enumerateSetting - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateSetting() - { - return _settingList.elements(); - } //-- java.util.Enumeration enumerateSetting() + //-----------/ + //- Methods -/ + //-----------/ - /** - * Method getSetting - * - * - * - * @param index - * @return Setting - */ - public jalview.schemabinding.version2.Setting getSetting(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _settingList.size())) + /** + * Method addSetting + * + * + * + * @param vSetting + */ + public void addSetting(jalview.schemabinding.version2.Setting vSetting) + throws java.lang.IndexOutOfBoundsException { - throw new IndexOutOfBoundsException(); - } + _settingList.addElement(vSetting); + } //-- void addSetting(jalview.schemabinding.version2.Setting) - return (jalview.schemabinding.version2.Setting) _settingList.elementAt( - index); - } //-- jalview.schemabinding.version2.Setting getSetting(int) - - /** - * Method getSetting - * - * - * - * @return Setting - */ - public jalview.schemabinding.version2.Setting[] getSetting() - { - int size = _settingList.size(); - jalview.schemabinding.version2.Setting[] mArray = new jalview.schemabinding. - version2.Setting[size]; - for (int index = 0; index < size; index++) + /** + * Method addSetting + * + * + * + * @param index + * @param vSetting + */ + public void addSetting(int index, jalview.schemabinding.version2.Setting vSetting) + throws java.lang.IndexOutOfBoundsException { - mArray[index] = (jalview.schemabinding.version2.Setting) _settingList. - elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Setting[] getSetting() + _settingList.insertElementAt(vSetting, index); + } //-- void addSetting(int, jalview.schemabinding.version2.Setting) - /** - * Method getSettingCount - * - * - * - * @return int - */ - public int getSettingCount() - { - return _settingList.size(); - } //-- int getSettingCount() + /** + * Method enumerateSetting + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateSetting() + { + return _settingList.elements(); + } //-- java.util.Enumeration enumerateSetting() - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try + /** + * Method getSetting + * + * + * + * @param index + * @return Setting + */ + public jalview.schemabinding.version2.Setting getSetting(int index) + throws java.lang.IndexOutOfBoundsException { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + //-- check bounds for index + if ((index < 0) || (index > _settingList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.Setting) _settingList.elementAt(index); + } //-- jalview.schemabinding.version2.Setting getSetting(int) + + /** + * Method getSetting + * + * + * + * @return Setting + */ + public jalview.schemabinding.version2.Setting[] getSetting() { - return false; - } - return true; - } //-- boolean isValid() + int size = _settingList.size(); + jalview.schemabinding.version2.Setting[] mArray = new jalview.schemabinding.version2.Setting[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.Setting) _settingList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.Setting[] getSetting() - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException - { + /** + * Method getSettingCount + * + * + * + * @return int + */ + public int getSettingCount() + { + return _settingList.size(); + } //-- int getSettingCount() - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + /** + * 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 handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, 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, 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 + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) - /** - * Method removeAllSetting - * - */ - public void removeAllSetting() - { - _settingList.removeAllElements(); - } //-- void removeAllSetting() + /** + * Method removeAllSetting + * + */ + public void removeAllSetting() + { + _settingList.removeAllElements(); + } //-- void removeAllSetting() - /** - * Method removeSetting - * - * - * - * @param index - * @return Setting - */ - public jalview.schemabinding.version2.Setting removeSetting(int index) - { - java.lang.Object obj = _settingList.elementAt(index); - _settingList.removeElementAt(index); - return (jalview.schemabinding.version2.Setting) obj; - } //-- jalview.schemabinding.version2.Setting removeSetting(int) + /** + * Method removeSetting + * + * + * + * @param index + * @return Setting + */ + public jalview.schemabinding.version2.Setting removeSetting(int index) + { + java.lang.Object obj = _settingList.elementAt(index); + _settingList.removeElementAt(index); + return (jalview.schemabinding.version2.Setting) obj; + } //-- jalview.schemabinding.version2.Setting removeSetting(int) - /** - * Method setSetting - * - * - * - * @param index - * @param vSetting - */ - public void setSetting(int index, - jalview.schemabinding.version2.Setting vSetting) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _settingList.size())) + /** + * Method setSetting + * + * + * + * @param index + * @param vSetting + */ + public void setSetting(int index, jalview.schemabinding.version2.Setting vSetting) + throws java.lang.IndexOutOfBoundsException { - throw new IndexOutOfBoundsException(); - } - _settingList.setElementAt(vSetting, index); - } //-- void setSetting(int, jalview.schemabinding.version2.Setting) + //-- check bounds for index + if ((index < 0) || (index > _settingList.size())) { + throw new IndexOutOfBoundsException(); + } + _settingList.setElementAt(vSetting, index); + } //-- void setSetting(int, jalview.schemabinding.version2.Setting) - /** - * Method setSetting - * - * - * - * @param settingArray - */ - public void setSetting(jalview.schemabinding.version2.Setting[] settingArray) - { - //-- copy array - _settingList.removeAllElements(); - for (int i = 0; i < settingArray.length; i++) + /** + * Method setSetting + * + * + * + * @param settingArray + */ + public void setSetting(jalview.schemabinding.version2.Setting[] settingArray) { - _settingList.addElement(settingArray[i]); - } - } //-- void setSetting(jalview.schemabinding.version2.Setting) + //-- copy array + _settingList.removeAllElements(); + for (int i = 0; i < settingArray.length; i++) { + _settingList.addElement(settingArray[i]); + } + } //-- void setSetting(jalview.schemabinding.version2.Setting) - /** - * 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.FeatureSettings) Unmarshaller. - unmarshal(jalview.schemabinding.version2.FeatureSettings.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + /** + * 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.FeatureSettings) Unmarshaller.unmarshal(jalview.schemabinding.version2.FeatureSettings.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() + /** + * 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/schemabinding/version2/FeatureSettingsDescriptor.java b/src/jalview/schemabinding/version2/FeatureSettingsDescriptor.java index d355c81..219037e 100755 --- a/src/jalview/schemabinding/version2/FeatureSettingsDescriptor.java +++ b/src/jalview/schemabinding/version2/FeatureSettingsDescriptor.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,207 +7,202 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; /** * Class FeatureSettingsDescriptor. - * + * * @version $Revision$ $Date$ */ -public class FeatureSettingsDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public FeatureSettingsDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "FeatureSettings"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- initialize element descriptors - - //-- _settingList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.Setting.class, "_settingList", "setting", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - FeatureSettings target = (FeatureSettings) object; - return target.getSetting(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - FeatureSettings target = (FeatureSettings) object; - target.addSetting( (jalview.schemabinding.version2.Setting) value); +public class FeatureSettingsDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FeatureSettingsDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "FeatureSettings"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _settingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Setting.class, "_settingList", "setting", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FeatureSettings target = (FeatureSettings) object; + return target.getSetting(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FeatureSettings target = (FeatureSettings) object; + target.addSetting( (jalview.schemabinding.version2.Setting) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.Setting(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _settingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.Setting(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _settingList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.FeatureSettingsDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.FeatureSettings.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.FeatureSettingsDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.FeatureSettings.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/Features.java b/src/jalview/schemabinding/version2/Features.java index f0ca998..72321c6 100755 --- a/src/jalview/schemabinding/version2/Features.java +++ b/src/jalview/schemabinding/version2/Features.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,110 +7,112 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 Features. - * + * * @version $Revision$ $Date$ */ -public class Features - extends Feature implements java.io.Serializable +public class Features extends Feature +implements java.io.Serializable { - //----------------/ - //- Constructors -/ - //----------------/ - public Features() - { - super(); - } //-- jalview.schemabinding.version2.Features() + //----------------/ + //- Constructors -/ + //----------------/ - //-----------/ - //- Methods -/ - //-----------/ + public Features() { + super(); + } //-- jalview.schemabinding.version2.Features() - /** - * 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 - { + //-----------/ + //- Methods -/ + //-----------/ - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + /** + * 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 handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, 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, 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 + { + + 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.schemabinding.version2.Features) Unmarshaller.unmarshal( - jalview.schemabinding.version2.Features.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + /** + * 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.Features) Unmarshaller.unmarshal(jalview.schemabinding.version2.Features.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() + /** + * 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/schemabinding/version2/FeaturesDescriptor.java b/src/jalview/schemabinding/version2/FeaturesDescriptor.java index a0a98b9..5eea818 100755 --- a/src/jalview/schemabinding/version2/FeaturesDescriptor.java +++ b/src/jalview/schemabinding/version2/FeaturesDescriptor.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,159 +7,160 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; /** * Class FeaturesDescriptor. - * + * * @version $Revision$ $Date$ */ -public class FeaturesDescriptor - extends FeatureDescriptor -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public FeaturesDescriptor() - { - super(); - setExtendsWithoutFlatten(new FeatureDescriptor()); - nsURI = "www.jalview.org"; - xmlName = "features"; - } //-- jalview.schemabinding.version2.FeaturesDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return super.getExtends(); - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - if (identity == null) +public class FeaturesDescriptor extends FeatureDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FeaturesDescriptor() { + super(); + setExtendsWithoutFlatten(new FeatureDescriptor()); + nsURI = "www.jalview.org"; + xmlName = "features"; + } //-- jalview.schemabinding.version2.FeaturesDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return super.getExtends(); + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + if (identity == null) + return super.getIdentity(); + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.Features.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() { - return super.getIdentity(); - } - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.Features.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/HiddenColumns.java b/src/jalview/schemabinding/version2/HiddenColumns.java index 305fa16..5b83e64 100644 --- a/src/jalview/schemabinding/version2/HiddenColumns.java +++ b/src/jalview/schemabinding/version2/HiddenColumns.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,220 +7,221 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 HiddenColumns. - * + * * @version $Revision$ $Date$ */ -public class HiddenColumns - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _start - */ - private int _start; - - /** - * keeps track of state for field: _start - */ - private boolean _has_start; - - /** - * Field _end - */ - private int _end; - - /** - * keeps track of state for field: _end - */ - private boolean _has_end; - - //----------------/ - //- Constructors -/ - //----------------/ - - public HiddenColumns() - { - super(); - } //-- jalview.schemabinding.version2.HiddenColumns() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteEnd - * - */ - public void deleteEnd() - { - this._has_end = false; - } //-- void deleteEnd() - - /** - * Method deleteStart - * - */ - public void deleteStart() - { - this._has_start = false; - } //-- void deleteStart() - - /** - * Returns the value of field 'end'. - * - * @return int - * @return the value of field 'end'. - */ - public int getEnd() - { - return this._end; - } //-- int getEnd() - - /** - * Returns the value of field 'start'. - * - * @return int - * @return the value of field 'start'. - */ - public int getStart() - { - return this._start; - } //-- int getStart() - - /** - * Method hasEnd - * - * - * - * @return boolean - */ - public boolean hasEnd() - { - return this._has_end; - } //-- boolean hasEnd() - - /** - * Method hasStart - * - * - * - * @return boolean - */ - public boolean hasStart() - { - return this._has_start; - } //-- boolean hasStart() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try +public class HiddenColumns implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _start + */ + private int _start; + + /** + * keeps track of state for field: _start + */ + private boolean _has_start; + + /** + * Field _end + */ + private int _end; + + /** + * keeps track of state for field: _end + */ + private boolean _has_end; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public HiddenColumns() { + super(); + } //-- jalview.schemabinding.version2.HiddenColumns() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteEnd + * + */ + public void deleteEnd() + { + this._has_end= false; + } //-- void deleteEnd() + + /** + * Method deleteStart + * + */ + public void deleteStart() + { + this._has_start= false; + } //-- void deleteStart() + + /** + * Returns the value of field 'end'. + * + * @return int + * @return the value of field 'end'. + */ + public int getEnd() + { + return this._end; + } //-- int getEnd() + + /** + * Returns the value of field 'start'. + * + * @return int + * @return the value of field 'start'. + */ + public int getStart() + { + return this._start; + } //-- int getStart() + + /** + * Method hasEnd + * + * + * + * @return boolean + */ + public boolean hasEnd() + { + return this._has_end; + } //-- boolean hasEnd() + + /** + * Method hasStart + * + * + * + * @return boolean + */ + public boolean hasStart() + { + return this._has_start; + } //-- boolean hasStart() + + /** + * 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 'end'. + * + * @param end the value of field 'end'. + */ + public void setEnd(int end) + { + this._end = end; + this._has_end = true; + } //-- void setEnd(int) + + /** + * Sets the value of field 'start'. + * + * @param start the value of field 'start'. + */ + public void setStart(int start) + { + this._start = start; + this._has_start = true; + } //-- void setStart(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 { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return (jalview.schemabinding.version2.HiddenColumns) Unmarshaller.unmarshal(jalview.schemabinding.version2.HiddenColumns.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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) - - /** - * Sets the value of field 'end'. - * - * @param end the value of field 'end'. - */ - public void setEnd(int end) - { - this._end = end; - this._has_end = true; - } //-- void setEnd(int) - - /** - * Sets the value of field 'start'. - * - * @param start the value of field 'start'. - */ - public void setStart(int start) - { - this._start = start; - this._has_start = true; - } //-- void setStart(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.schemabinding.version2.HiddenColumns) Unmarshaller. - unmarshal(jalview.schemabinding.version2.HiddenColumns.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/HiddenColumnsDescriptor.java b/src/jalview/schemabinding/version2/HiddenColumnsDescriptor.java index 2d92682..df99628 100644 --- a/src/jalview/schemabinding/version2/HiddenColumnsDescriptor.java +++ b/src/jalview/schemabinding/version2/HiddenColumnsDescriptor.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,264 +7,246 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class HiddenColumnsDescriptor. - * + * * @version $Revision$ $Date$ */ -public class HiddenColumnsDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public HiddenColumnsDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "hiddenColumns"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _start - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_start", "start", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - HiddenColumns target = (HiddenColumns) object; - if (!target.hasStart()) - { - return null; +public class HiddenColumnsDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public HiddenColumnsDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "hiddenColumns"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _start + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + HiddenColumns target = (HiddenColumns) object; + if(!target.hasStart()) + return null; + return new java.lang.Integer(target.getStart()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + HiddenColumns target = (HiddenColumns) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteStart(); + return; + } + target.setStart( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _start + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - return new java.lang.Integer(target.getStart()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - HiddenColumns target = (HiddenColumns) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteStart(); - return; - } - target.setStart( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _end + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + HiddenColumns target = (HiddenColumns) object; + if(!target.hasEnd()) + return null; + return new java.lang.Integer(target.getEnd()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + HiddenColumns target = (HiddenColumns) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteEnd(); + return; + } + target.setEnd( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _end + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- jalview.schemabinding.version2.HiddenColumnsDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _start - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _end - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - HiddenColumns target = (HiddenColumns) object; - if (!target.hasEnd()) - { - return null; - } - return new java.lang.Integer(target.getEnd()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - HiddenColumns target = (HiddenColumns) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteEnd(); - return; - } - target.setEnd( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _end - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- jalview.schemabinding.version2.HiddenColumnsDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.HiddenColumns.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.HiddenColumns.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/JGroup.java b/src/jalview/schemabinding/version2/JGroup.java index 49edb8d..06eb940 100755 --- a/src/jalview/schemabinding/version2/JGroup.java +++ b/src/jalview/schemabinding/version2/JGroup.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,906 +7,903 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import java.util.*; -import org.exolab.castor.xml.*; +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 JGroup. - * + * * @version $Revision$ $Date$ */ -public class JGroup - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _start - */ - private int _start; - - /** - * keeps track of state for field: _start - */ - private boolean _has_start; - - /** - * Field _end - */ - private int _end; - - /** - * keeps track of state for field: _end - */ - private boolean _has_end; - - /** - * Field _name - */ - private java.lang.String _name; - - /** - * Field _colour - */ - private java.lang.String _colour; - - /** - * Field _consThreshold - */ - private int _consThreshold; - - /** - * keeps track of state for field: _consThreshold - */ - private boolean _has_consThreshold; - - /** - * Field _pidThreshold - */ - private int _pidThreshold; - - /** - * keeps track of state for field: _pidThreshold - */ - private boolean _has_pidThreshold; - - /** - * Field _outlineColour - */ - private int _outlineColour; - - /** - * keeps track of state for field: _outlineColour - */ - private boolean _has_outlineColour; - - /** - * Field _displayBoxes - */ - private boolean _displayBoxes; - - /** - * keeps track of state for field: _displayBoxes - */ - private boolean _has_displayBoxes; - - /** - * Field _displayText - */ - private boolean _displayText; - - /** - * keeps track of state for field: _displayText - */ - private boolean _has_displayText; - - /** - * Field _colourText - */ - private boolean _colourText; - - /** - * keeps track of state for field: _colourText - */ - private boolean _has_colourText; - - /** - * Field _textCol1 - */ - private int _textCol1; - - /** - * keeps track of state for field: _textCol1 - */ - private boolean _has_textCol1; - - /** - * Field _textCol2 - */ - private int _textCol2; - - /** - * keeps track of state for field: _textCol2 - */ - private boolean _has_textCol2; - - /** - * Field _textColThreshold - */ - private int _textColThreshold; - - /** - * keeps track of state for field: _textColThreshold - */ - private boolean _has_textColThreshold; - - /** - * Field _seqList - */ - private java.util.Vector _seqList; - - //----------------/ - //- Constructors -/ - //----------------/ - - public JGroup() - { - super(); - _seqList = new Vector(); - } //-- jalview.schemabinding.version2.JGroup() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method addSeq - * - * - * - * @param vSeq - */ - public void addSeq(int vSeq) - throws java.lang.IndexOutOfBoundsException - { - _seqList.addElement(new java.lang.Integer(vSeq)); - } //-- void addSeq(int) - - /** - * Method addSeq - * - * - * - * @param index - * @param vSeq - */ - public void addSeq(int index, int vSeq) - throws java.lang.IndexOutOfBoundsException - { - _seqList.insertElementAt(new java.lang.Integer(vSeq), index); - } //-- void addSeq(int, int) - - /** - * Method deleteColourText - * - */ - public void deleteColourText() - { - this._has_colourText = false; - } //-- void deleteColourText() - - /** - * Method deleteConsThreshold - * - */ - public void deleteConsThreshold() - { - this._has_consThreshold = false; - } //-- void deleteConsThreshold() - - /** - * Method deleteDisplayBoxes - * - */ - public void deleteDisplayBoxes() - { - this._has_displayBoxes = false; - } //-- void deleteDisplayBoxes() - - /** - * Method deleteDisplayText - * - */ - public void deleteDisplayText() - { - this._has_displayText = false; - } //-- void deleteDisplayText() - - /** - * Method deleteEnd - * - */ - public void deleteEnd() - { - this._has_end = false; - } //-- void deleteEnd() - - /** - * Method deleteOutlineColour - * - */ - public void deleteOutlineColour() - { - this._has_outlineColour = false; - } //-- void deleteOutlineColour() - - /** - * Method deletePidThreshold - * - */ - public void deletePidThreshold() - { - this._has_pidThreshold = false; - } //-- void deletePidThreshold() - - /** - * Method deleteStart - * - */ - public void deleteStart() - { - this._has_start = false; - } //-- void deleteStart() - - /** - * Method deleteTextCol1 - * - */ - public void deleteTextCol1() - { - this._has_textCol1 = false; - } //-- void deleteTextCol1() - - /** - * Method deleteTextCol2 - * - */ - public void deleteTextCol2() - { - this._has_textCol2 = false; - } //-- void deleteTextCol2() - - /** - * Method deleteTextColThreshold - * - */ - public void deleteTextColThreshold() - { - this._has_textColThreshold = false; - } //-- void deleteTextColThreshold() - - /** - * Method enumerateSeq - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateSeq() - { - return _seqList.elements(); - } //-- java.util.Enumeration enumerateSeq() - - /** - * Returns the value of field 'colour'. - * - * @return String - * @return the value of field 'colour'. - */ - public java.lang.String getColour() - { - return this._colour; - } //-- java.lang.String getColour() - - /** - * Returns the value of field 'colourText'. - * - * @return boolean - * @return the value of field 'colourText'. - */ - public boolean getColourText() - { - return this._colourText; - } //-- boolean getColourText() - - /** - * Returns the value of field 'consThreshold'. - * - * @return int - * @return the value of field 'consThreshold'. - */ - public int getConsThreshold() - { - return this._consThreshold; - } //-- int getConsThreshold() - - /** - * Returns the value of field 'displayBoxes'. - * - * @return boolean - * @return the value of field 'displayBoxes'. - */ - public boolean getDisplayBoxes() - { - return this._displayBoxes; - } //-- boolean getDisplayBoxes() - - /** - * Returns the value of field 'displayText'. - * - * @return boolean - * @return the value of field 'displayText'. - */ - public boolean getDisplayText() - { - return this._displayText; - } //-- boolean getDisplayText() - - /** - * Returns the value of field 'end'. - * - * @return int - * @return the value of field 'end'. - */ - public int getEnd() - { - return this._end; - } //-- int getEnd() - - /** - * 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 'outlineColour'. - * - * @return int - * @return the value of field 'outlineColour'. - */ - public int getOutlineColour() - { - return this._outlineColour; - } //-- int getOutlineColour() - - /** - * Returns the value of field 'pidThreshold'. - * - * @return int - * @return the value of field 'pidThreshold'. - */ - public int getPidThreshold() - { - return this._pidThreshold; - } //-- int getPidThreshold() - - /** - * Method getSeq - * - * - * - * @param index - * @return int - */ - public int getSeq(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _seqList.size())) - { - throw new IndexOutOfBoundsException(); - } - - return ( (java.lang.Integer) _seqList.elementAt(index)).intValue(); - } //-- int getSeq(int) - - /** - * Method getSeq - * - * - * - * @return int - */ - public int[] getSeq() - { - int size = _seqList.size(); - int[] mArray = new int[size]; - for (int index = 0; index < size; index++) - { - mArray[index] = ( (java.lang.Integer) _seqList.elementAt(index)).intValue(); - } - return mArray; - } //-- int[] getSeq() - - /** - * Method getSeqCount - * - * - * - * @return int - */ - public int getSeqCount() - { - return _seqList.size(); - } //-- int getSeqCount() - - /** - * Returns the value of field 'start'. - * - * @return int - * @return the value of field 'start'. - */ - public int getStart() - { - return this._start; - } //-- int getStart() - - /** - * Returns the value of field 'textCol1'. - * - * @return int - * @return the value of field 'textCol1'. - */ - public int getTextCol1() - { - return this._textCol1; - } //-- int getTextCol1() - - /** - * Returns the value of field 'textCol2'. - * - * @return int - * @return the value of field 'textCol2'. - */ - public int getTextCol2() - { - return this._textCol2; - } //-- int getTextCol2() - - /** - * Returns the value of field 'textColThreshold'. - * - * @return int - * @return the value of field 'textColThreshold'. - */ - public int getTextColThreshold() - { - return this._textColThreshold; - } //-- int getTextColThreshold() - - /** - * Method hasColourText - * - * - * - * @return boolean - */ - public boolean hasColourText() - { - return this._has_colourText; - } //-- boolean hasColourText() - - /** - * Method hasConsThreshold - * - * - * - * @return boolean - */ - public boolean hasConsThreshold() - { - return this._has_consThreshold; - } //-- boolean hasConsThreshold() - - /** - * Method hasDisplayBoxes - * - * - * - * @return boolean - */ - public boolean hasDisplayBoxes() - { - return this._has_displayBoxes; - } //-- boolean hasDisplayBoxes() - - /** - * Method hasDisplayText - * - * - * - * @return boolean - */ - public boolean hasDisplayText() - { - return this._has_displayText; - } //-- boolean hasDisplayText() - - /** - * Method hasEnd - * - * - * - * @return boolean - */ - public boolean hasEnd() - { - return this._has_end; - } //-- boolean hasEnd() - - /** - * Method hasOutlineColour - * - * - * - * @return boolean - */ - public boolean hasOutlineColour() - { - return this._has_outlineColour; - } //-- boolean hasOutlineColour() - - /** - * Method hasPidThreshold - * - * - * - * @return boolean - */ - public boolean hasPidThreshold() - { - return this._has_pidThreshold; - } //-- boolean hasPidThreshold() - - /** - * Method hasStart - * - * - * - * @return boolean - */ - public boolean hasStart() - { - return this._has_start; - } //-- boolean hasStart() - - /** - * Method hasTextCol1 - * - * - * - * @return boolean - */ - public boolean hasTextCol1() - { - return this._has_textCol1; - } //-- boolean hasTextCol1() - - /** - * Method hasTextCol2 - * - * - * - * @return boolean - */ - public boolean hasTextCol2() - { - return this._has_textCol2; - } //-- boolean hasTextCol2() - - /** - * Method hasTextColThreshold - * - * - * - * @return boolean - */ - public boolean hasTextColThreshold() - { - return this._has_textColThreshold; - } //-- boolean hasTextColThreshold() - - /** - * 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 removeAllSeq - * - */ - public void removeAllSeq() - { - _seqList.removeAllElements(); - } //-- void removeAllSeq() - - /** - * Method removeSeq - * - * - * - * @param index - * @return int - */ - public int removeSeq(int index) - { - java.lang.Object obj = _seqList.elementAt(index); - _seqList.removeElementAt(index); - return ( (java.lang.Integer) obj).intValue(); - } //-- int removeSeq(int) - - /** - * Sets the value of field 'colour'. - * - * @param colour the value of field 'colour'. - */ - public void setColour(java.lang.String colour) - { - this._colour = colour; - } //-- void setColour(java.lang.String) - - /** - * Sets the value of field 'colourText'. - * - * @param colourText the value of field 'colourText'. - */ - public void setColourText(boolean colourText) - { - this._colourText = colourText; - this._has_colourText = true; - } //-- void setColourText(boolean) - - /** - * Sets the value of field 'consThreshold'. - * - * @param consThreshold the value of field 'consThreshold'. - */ - public void setConsThreshold(int consThreshold) - { - this._consThreshold = consThreshold; - this._has_consThreshold = true; - } //-- void setConsThreshold(int) - - /** - * Sets the value of field 'displayBoxes'. - * - * @param displayBoxes the value of field 'displayBoxes'. - */ - public void setDisplayBoxes(boolean displayBoxes) - { - this._displayBoxes = displayBoxes; - this._has_displayBoxes = true; - } //-- void setDisplayBoxes(boolean) - - /** - * Sets the value of field 'displayText'. - * - * @param displayText the value of field 'displayText'. - */ - public void setDisplayText(boolean displayText) - { - this._displayText = displayText; - this._has_displayText = true; - } //-- void setDisplayText(boolean) - - /** - * Sets the value of field 'end'. - * - * @param end the value of field 'end'. - */ - public void setEnd(int end) - { - this._end = end; - this._has_end = true; - } //-- void setEnd(int) - - /** - * 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 'outlineColour'. - * - * @param outlineColour the value of field 'outlineColour'. - */ - public void setOutlineColour(int outlineColour) - { - this._outlineColour = outlineColour; - this._has_outlineColour = true; - } //-- void setOutlineColour(int) - - /** - * Sets the value of field 'pidThreshold'. - * - * @param pidThreshold the value of field 'pidThreshold'. - */ - public void setPidThreshold(int pidThreshold) - { - this._pidThreshold = pidThreshold; - this._has_pidThreshold = true; - } //-- void setPidThreshold(int) - - /** - * Method setSeq - * - * - * - * @param index - * @param vSeq - */ - public void setSeq(int index, int vSeq) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _seqList.size())) - { - throw new IndexOutOfBoundsException(); - } - _seqList.setElementAt(new java.lang.Integer(vSeq), index); - } //-- void setSeq(int, int) - - /** - * Method setSeq - * - * - * - * @param seqArray - */ - public void setSeq(int[] seqArray) - { - //-- copy array - _seqList.removeAllElements(); - for (int i = 0; i < seqArray.length; i++) - { - _seqList.addElement(new java.lang.Integer(seqArray[i])); - } - } //-- void setSeq(int) - - /** - * Sets the value of field 'start'. - * - * @param start the value of field 'start'. - */ - public void setStart(int start) - { - this._start = start; - this._has_start = true; - } //-- void setStart(int) - - /** - * Sets the value of field 'textCol1'. - * - * @param textCol1 the value of field 'textCol1'. - */ - public void setTextCol1(int textCol1) - { - this._textCol1 = textCol1; - this._has_textCol1 = true; - } //-- void setTextCol1(int) - - /** - * Sets the value of field 'textCol2'. - * - * @param textCol2 the value of field 'textCol2'. - */ - public void setTextCol2(int textCol2) - { - this._textCol2 = textCol2; - this._has_textCol2 = true; - } //-- void setTextCol2(int) - - /** - * Sets the value of field 'textColThreshold'. - * - * @param textColThreshold the value of field 'textColThreshold' - */ - public void setTextColThreshold(int textColThreshold) - { - this._textColThreshold = textColThreshold; - this._has_textColThreshold = true; - } //-- void setTextColThreshold(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.schemabinding.version2.JGroup) Unmarshaller.unmarshal( - jalview.schemabinding.version2.JGroup.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() +public class JGroup implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _start + */ + private int _start; + + /** + * keeps track of state for field: _start + */ + private boolean _has_start; + + /** + * Field _end + */ + private int _end; + + /** + * keeps track of state for field: _end + */ + private boolean _has_end; + + /** + * Field _name + */ + private java.lang.String _name; + + /** + * Field _colour + */ + private java.lang.String _colour; + + /** + * Field _consThreshold + */ + private int _consThreshold; + + /** + * keeps track of state for field: _consThreshold + */ + private boolean _has_consThreshold; + + /** + * Field _pidThreshold + */ + private int _pidThreshold; + + /** + * keeps track of state for field: _pidThreshold + */ + private boolean _has_pidThreshold; + + /** + * Field _outlineColour + */ + private int _outlineColour; + + /** + * keeps track of state for field: _outlineColour + */ + private boolean _has_outlineColour; + + /** + * Field _displayBoxes + */ + private boolean _displayBoxes; + + /** + * keeps track of state for field: _displayBoxes + */ + private boolean _has_displayBoxes; + + /** + * Field _displayText + */ + private boolean _displayText; + + /** + * keeps track of state for field: _displayText + */ + private boolean _has_displayText; + + /** + * Field _colourText + */ + private boolean _colourText; + + /** + * keeps track of state for field: _colourText + */ + private boolean _has_colourText; + + /** + * Field _textCol1 + */ + private int _textCol1; + + /** + * keeps track of state for field: _textCol1 + */ + private boolean _has_textCol1; + + /** + * Field _textCol2 + */ + private int _textCol2; + + /** + * keeps track of state for field: _textCol2 + */ + private boolean _has_textCol2; + + /** + * Field _textColThreshold + */ + private int _textColThreshold; + + /** + * keeps track of state for field: _textColThreshold + */ + private boolean _has_textColThreshold; + + /** + * Field _seqList + */ + private java.util.Vector _seqList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JGroup() { + super(); + _seqList = new Vector(); + } //-- jalview.schemabinding.version2.JGroup() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addSeq + * + * + * + * @param vSeq + */ + public void addSeq(int vSeq) + throws java.lang.IndexOutOfBoundsException + { + _seqList.addElement(new java.lang.Integer(vSeq)); + } //-- void addSeq(int) + + /** + * Method addSeq + * + * + * + * @param index + * @param vSeq + */ + public void addSeq(int index, int vSeq) + throws java.lang.IndexOutOfBoundsException + { + _seqList.insertElementAt(new java.lang.Integer(vSeq), index); + } //-- void addSeq(int, int) + + /** + * Method deleteColourText + * + */ + public void deleteColourText() + { + this._has_colourText= false; + } //-- void deleteColourText() + + /** + * Method deleteConsThreshold + * + */ + public void deleteConsThreshold() + { + this._has_consThreshold= false; + } //-- void deleteConsThreshold() + + /** + * Method deleteDisplayBoxes + * + */ + public void deleteDisplayBoxes() + { + this._has_displayBoxes= false; + } //-- void deleteDisplayBoxes() + + /** + * Method deleteDisplayText + * + */ + public void deleteDisplayText() + { + this._has_displayText= false; + } //-- void deleteDisplayText() + + /** + * Method deleteEnd + * + */ + public void deleteEnd() + { + this._has_end= false; + } //-- void deleteEnd() + + /** + * Method deleteOutlineColour + * + */ + public void deleteOutlineColour() + { + this._has_outlineColour= false; + } //-- void deleteOutlineColour() + + /** + * Method deletePidThreshold + * + */ + public void deletePidThreshold() + { + this._has_pidThreshold= false; + } //-- void deletePidThreshold() + + /** + * Method deleteStart + * + */ + public void deleteStart() + { + this._has_start= false; + } //-- void deleteStart() + + /** + * Method deleteTextCol1 + * + */ + public void deleteTextCol1() + { + this._has_textCol1= false; + } //-- void deleteTextCol1() + + /** + * Method deleteTextCol2 + * + */ + public void deleteTextCol2() + { + this._has_textCol2= false; + } //-- void deleteTextCol2() + + /** + * Method deleteTextColThreshold + * + */ + public void deleteTextColThreshold() + { + this._has_textColThreshold= false; + } //-- void deleteTextColThreshold() + + /** + * Method enumerateSeq + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateSeq() + { + return _seqList.elements(); + } //-- java.util.Enumeration enumerateSeq() + + /** + * Returns the value of field 'colour'. + * + * @return String + * @return the value of field 'colour'. + */ + public java.lang.String getColour() + { + return this._colour; + } //-- java.lang.String getColour() + + /** + * Returns the value of field 'colourText'. + * + * @return boolean + * @return the value of field 'colourText'. + */ + public boolean getColourText() + { + return this._colourText; + } //-- boolean getColourText() + + /** + * Returns the value of field 'consThreshold'. + * + * @return int + * @return the value of field 'consThreshold'. + */ + public int getConsThreshold() + { + return this._consThreshold; + } //-- int getConsThreshold() + + /** + * Returns the value of field 'displayBoxes'. + * + * @return boolean + * @return the value of field 'displayBoxes'. + */ + public boolean getDisplayBoxes() + { + return this._displayBoxes; + } //-- boolean getDisplayBoxes() + + /** + * Returns the value of field 'displayText'. + * + * @return boolean + * @return the value of field 'displayText'. + */ + public boolean getDisplayText() + { + return this._displayText; + } //-- boolean getDisplayText() + + /** + * Returns the value of field 'end'. + * + * @return int + * @return the value of field 'end'. + */ + public int getEnd() + { + return this._end; + } //-- int getEnd() + + /** + * 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 'outlineColour'. + * + * @return int + * @return the value of field 'outlineColour'. + */ + public int getOutlineColour() + { + return this._outlineColour; + } //-- int getOutlineColour() + + /** + * Returns the value of field 'pidThreshold'. + * + * @return int + * @return the value of field 'pidThreshold'. + */ + public int getPidThreshold() + { + return this._pidThreshold; + } //-- int getPidThreshold() + + /** + * Method getSeq + * + * + * + * @param index + * @return int + */ + public int getSeq(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _seqList.size())) { + throw new IndexOutOfBoundsException(); + } + + return ((java.lang.Integer)_seqList.elementAt(index)).intValue(); + } //-- int getSeq(int) + + /** + * Method getSeq + * + * + * + * @return int + */ + public int[] getSeq() + { + int size = _seqList.size(); + int[] mArray = new int[size]; + for (int index = 0; index < size; index++) { + mArray[index] = ((java.lang.Integer)_seqList.elementAt(index)).intValue(); + } + return mArray; + } //-- int[] getSeq() + + /** + * Method getSeqCount + * + * + * + * @return int + */ + public int getSeqCount() + { + return _seqList.size(); + } //-- int getSeqCount() + + /** + * Returns the value of field 'start'. + * + * @return int + * @return the value of field 'start'. + */ + public int getStart() + { + return this._start; + } //-- int getStart() + + /** + * Returns the value of field 'textCol1'. + * + * @return int + * @return the value of field 'textCol1'. + */ + public int getTextCol1() + { + return this._textCol1; + } //-- int getTextCol1() + + /** + * Returns the value of field 'textCol2'. + * + * @return int + * @return the value of field 'textCol2'. + */ + public int getTextCol2() + { + return this._textCol2; + } //-- int getTextCol2() + + /** + * Returns the value of field 'textColThreshold'. + * + * @return int + * @return the value of field 'textColThreshold'. + */ + public int getTextColThreshold() + { + return this._textColThreshold; + } //-- int getTextColThreshold() + + /** + * Method hasColourText + * + * + * + * @return boolean + */ + public boolean hasColourText() + { + return this._has_colourText; + } //-- boolean hasColourText() + + /** + * Method hasConsThreshold + * + * + * + * @return boolean + */ + public boolean hasConsThreshold() + { + return this._has_consThreshold; + } //-- boolean hasConsThreshold() + + /** + * Method hasDisplayBoxes + * + * + * + * @return boolean + */ + public boolean hasDisplayBoxes() + { + return this._has_displayBoxes; + } //-- boolean hasDisplayBoxes() + + /** + * Method hasDisplayText + * + * + * + * @return boolean + */ + public boolean hasDisplayText() + { + return this._has_displayText; + } //-- boolean hasDisplayText() + + /** + * Method hasEnd + * + * + * + * @return boolean + */ + public boolean hasEnd() + { + return this._has_end; + } //-- boolean hasEnd() + + /** + * Method hasOutlineColour + * + * + * + * @return boolean + */ + public boolean hasOutlineColour() + { + return this._has_outlineColour; + } //-- boolean hasOutlineColour() + + /** + * Method hasPidThreshold + * + * + * + * @return boolean + */ + public boolean hasPidThreshold() + { + return this._has_pidThreshold; + } //-- boolean hasPidThreshold() + + /** + * Method hasStart + * + * + * + * @return boolean + */ + public boolean hasStart() + { + return this._has_start; + } //-- boolean hasStart() + + /** + * Method hasTextCol1 + * + * + * + * @return boolean + */ + public boolean hasTextCol1() + { + return this._has_textCol1; + } //-- boolean hasTextCol1() + + /** + * Method hasTextCol2 + * + * + * + * @return boolean + */ + public boolean hasTextCol2() + { + return this._has_textCol2; + } //-- boolean hasTextCol2() + + /** + * Method hasTextColThreshold + * + * + * + * @return boolean + */ + public boolean hasTextColThreshold() + { + return this._has_textColThreshold; + } //-- boolean hasTextColThreshold() + + /** + * 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 removeAllSeq + * + */ + public void removeAllSeq() + { + _seqList.removeAllElements(); + } //-- void removeAllSeq() + + /** + * Method removeSeq + * + * + * + * @param index + * @return int + */ + public int removeSeq(int index) + { + java.lang.Object obj = _seqList.elementAt(index); + _seqList.removeElementAt(index); + return ((java.lang.Integer)obj).intValue(); + } //-- int removeSeq(int) + + /** + * Sets the value of field 'colour'. + * + * @param colour the value of field 'colour'. + */ + public void setColour(java.lang.String colour) + { + this._colour = colour; + } //-- void setColour(java.lang.String) + + /** + * Sets the value of field 'colourText'. + * + * @param colourText the value of field 'colourText'. + */ + public void setColourText(boolean colourText) + { + this._colourText = colourText; + this._has_colourText = true; + } //-- void setColourText(boolean) + + /** + * Sets the value of field 'consThreshold'. + * + * @param consThreshold the value of field 'consThreshold'. + */ + public void setConsThreshold(int consThreshold) + { + this._consThreshold = consThreshold; + this._has_consThreshold = true; + } //-- void setConsThreshold(int) + + /** + * Sets the value of field 'displayBoxes'. + * + * @param displayBoxes the value of field 'displayBoxes'. + */ + public void setDisplayBoxes(boolean displayBoxes) + { + this._displayBoxes = displayBoxes; + this._has_displayBoxes = true; + } //-- void setDisplayBoxes(boolean) + + /** + * Sets the value of field 'displayText'. + * + * @param displayText the value of field 'displayText'. + */ + public void setDisplayText(boolean displayText) + { + this._displayText = displayText; + this._has_displayText = true; + } //-- void setDisplayText(boolean) + + /** + * Sets the value of field 'end'. + * + * @param end the value of field 'end'. + */ + public void setEnd(int end) + { + this._end = end; + this._has_end = true; + } //-- void setEnd(int) + + /** + * 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 'outlineColour'. + * + * @param outlineColour the value of field 'outlineColour'. + */ + public void setOutlineColour(int outlineColour) + { + this._outlineColour = outlineColour; + this._has_outlineColour = true; + } //-- void setOutlineColour(int) + + /** + * Sets the value of field 'pidThreshold'. + * + * @param pidThreshold the value of field 'pidThreshold'. + */ + public void setPidThreshold(int pidThreshold) + { + this._pidThreshold = pidThreshold; + this._has_pidThreshold = true; + } //-- void setPidThreshold(int) + + /** + * Method setSeq + * + * + * + * @param index + * @param vSeq + */ + public void setSeq(int index, int vSeq) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _seqList.size())) { + throw new IndexOutOfBoundsException(); + } + _seqList.setElementAt(new java.lang.Integer(vSeq), index); + } //-- void setSeq(int, int) + + /** + * Method setSeq + * + * + * + * @param seqArray + */ + public void setSeq(int[] seqArray) + { + //-- copy array + _seqList.removeAllElements(); + for (int i = 0; i < seqArray.length; i++) { + _seqList.addElement(new java.lang.Integer(seqArray[i])); + } + } //-- void setSeq(int) + + /** + * Sets the value of field 'start'. + * + * @param start the value of field 'start'. + */ + public void setStart(int start) + { + this._start = start; + this._has_start = true; + } //-- void setStart(int) + + /** + * Sets the value of field 'textCol1'. + * + * @param textCol1 the value of field 'textCol1'. + */ + public void setTextCol1(int textCol1) + { + this._textCol1 = textCol1; + this._has_textCol1 = true; + } //-- void setTextCol1(int) + + /** + * Sets the value of field 'textCol2'. + * + * @param textCol2 the value of field 'textCol2'. + */ + public void setTextCol2(int textCol2) + { + this._textCol2 = textCol2; + this._has_textCol2 = true; + } //-- void setTextCol2(int) + + /** + * Sets the value of field 'textColThreshold'. + * + * @param textColThreshold the value of field 'textColThreshold' + */ + public void setTextColThreshold(int textColThreshold) + { + this._textColThreshold = textColThreshold; + this._has_textColThreshold = true; + } //-- void setTextColThreshold(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.schemabinding.version2.JGroup) Unmarshaller.unmarshal(jalview.schemabinding.version2.JGroup.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/schemabinding/version2/JGroupDescriptor.java b/src/jalview/schemabinding/version2/JGroupDescriptor.java index 15aeb79..1985c61 100755 --- a/src/jalview/schemabinding/version2/JGroupDescriptor.java +++ b/src/jalview/schemabinding/version2/JGroupDescriptor.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,876 +7,731 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class JGroupDescriptor. - * + * * @version $Revision$ $Date$ */ -public class JGroupDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public JGroupDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "JGroup"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _start - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_start", "start", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - if (!target.hasStart()) - { - return null; - } - return new java.lang.Integer(target.getStart()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteStart(); - return; - } - target.setStart( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _start - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _end - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - if (!target.hasEnd()) - { - return null; - } - return new java.lang.Integer(target.getEnd()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteEnd(); - return; - } - target.setEnd( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _end - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _name - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - return target.getName(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - target.setName( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _name - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _colour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_colour", "colour", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - return target.getColour(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - target.setColour( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _colour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _consThreshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_consThreshold", "consThreshold", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - if (!target.hasConsThreshold()) - { - return null; - } - return new java.lang.Integer(target.getConsThreshold()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteConsThreshold(); - return; - } - target.setConsThreshold( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _consThreshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _pidThreshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_pidThreshold", "pidThreshold", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() +public class JGroupDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JGroupDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "JGroup"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _start + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasStart()) + return null; + return new java.lang.Integer(target.getStart()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteStart(); + return; + } + target.setStart( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _start + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _end + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasEnd()) + return null; + return new java.lang.Integer(target.getEnd()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteEnd(); + return; + } + target.setEnd( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _end + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + target.setName( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _colour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_colour", "colour", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + return target.getColour(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + target.setColour( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _colour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _consThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_consThreshold", "consThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasConsThreshold()) + return null; + return new java.lang.Integer(target.getConsThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteConsThreshold(); + return; + } + target.setConsThreshold( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _consThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _pidThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_pidThreshold", "pidThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasPidThreshold()) + return null; + return new java.lang.Integer(target.getPidThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deletePidThreshold(); + return; + } + target.setPidThreshold( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _pidThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _outlineColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_outlineColour", "outlineColour", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasOutlineColour()) + return null; + return new java.lang.Integer(target.getOutlineColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteOutlineColour(); + return; + } + target.setOutlineColour( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _outlineColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _displayBoxes + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_displayBoxes", "displayBoxes", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasDisplayBoxes()) + return null; + return (target.getDisplayBoxes() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteDisplayBoxes(); + return; + } + target.setDisplayBoxes( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _displayBoxes + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _displayText + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_displayText", "displayText", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasDisplayText()) + return null; + return (target.getDisplayText() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteDisplayText(); + return; + } + target.setDisplayText( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _displayText + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _colourText + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourText", "colourText", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasColourText()) + return null; + return (target.getColourText() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteColourText(); + return; + } + target.setColourText( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _colourText + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _textCol1 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol1", "textCol1", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasTextCol1()) + return null; + return new java.lang.Integer(target.getTextCol1()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol1(); + return; + } + target.setTextCol1( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _textCol1 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _textCol2 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol2", "textCol2", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasTextCol2()) + return null; + return new java.lang.Integer(target.getTextCol2()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol2(); + return; + } + target.setTextCol2( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _textCol2 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _textColThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textColThreshold", "textColThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasTextColThreshold()) + return null; + return new java.lang.Integer(target.getTextColThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextColThreshold(); + return; + } + target.setTextColThreshold( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _textColThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _seqList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_seqList", "seq", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + return target.getSeq(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.addSeq( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _seqList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.JGroupDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - if (!target.hasPidThreshold()) - { - return null; - } - return new java.lang.Integer(target.getPidThreshold()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deletePidThreshold(); - return; - } - target.setPidThreshold( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _pidThreshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _outlineColour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_outlineColour", "outlineColour", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - if (!target.hasOutlineColour()) - { - return null; - } - return new java.lang.Integer(target.getOutlineColour()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteOutlineColour(); - return; - } - target.setOutlineColour( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _outlineColour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _displayBoxes - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_displayBoxes", "displayBoxes", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - if (!target.hasDisplayBoxes()) - { - return null; - } - return (target.getDisplayBoxes() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteDisplayBoxes(); - return; - } - target.setDisplayBoxes( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _displayBoxes - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _displayText - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_displayText", "displayText", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - if (!target.hasDisplayText()) - { - return null; - } - return (target.getDisplayText() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteDisplayText(); - return; - } - target.setDisplayText( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _displayText - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _colourText - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_colourText", "colourText", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - if (!target.hasColourText()) - { - return null; - } - return (target.getColourText() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteColourText(); - return; - } - target.setColourText( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _colourText - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _textCol1 - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_textCol1", "textCol1", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return jalview.schemabinding.version2.JGroup.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - if (!target.hasTextCol1()) - { - return null; - } - return new java.lang.Integer(target.getTextCol1()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteTextCol1(); - return; - } - target.setTextCol1( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _textCol1 - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _textCol2 - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_textCol2", "textCol2", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - if (!target.hasTextCol2()) - { - return null; - } - return new java.lang.Integer(target.getTextCol2()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteTextCol2(); - return; - } - target.setTextCol2( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _textCol2 - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _textColThreshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_textColThreshold", "textColThreshold", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - if (!target.hasTextColThreshold()) - { - return null; - } - return new java.lang.Integer(target.getTextColThreshold()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteTextColThreshold(); - return; - } - target.setTextColThreshold( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _textColThreshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _seqList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_seqList", "seq", org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JGroup target = (JGroup) object; - return target.getSeq(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JGroup target = (JGroup) object; - // ignore null values for non optional primitives - if (value == null) - { - return; - } - - target.addSeq( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setRequired(true); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _seqList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.JGroupDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.JGroup.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/JSeq.java b/src/jalview/schemabinding/version2/JSeq.java index 29221ad..19e2e6d 100755 --- a/src/jalview/schemabinding/version2/JSeq.java +++ b/src/jalview/schemabinding/version2/JSeq.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,861 +7,835 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import java.util.*; -import org.exolab.castor.xml.*; +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 JSeq. - * + * * @version $Revision$ $Date$ */ -public class JSeq - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _colour - */ - private int _colour; - - /** - * keeps track of state for field: _colour - */ - private boolean _has_colour; - - /** - * Field _start - */ - private int _start; - - /** - * keeps track of state for field: _start - */ - private boolean _has_start; - - /** - * Field _end - */ - private int _end; - - /** - * keeps track of state for field: _end - */ - private boolean _has_end; - - /** - * Field _id - */ - private int _id; - - /** - * keeps track of state for field: _id - */ - private boolean _has_id; - - /** - * Field _hidden - */ - private boolean _hidden; - - /** - * keeps track of state for field: _hidden - */ - private boolean _has_hidden; - - /** - * Field _featuresList - */ - private java.util.Vector _featuresList; - - /** - * Field _pdbidsList - */ - private java.util.Vector _pdbidsList; - - /** - * Field _hiddenSequencesList - */ - private java.util.Vector _hiddenSequencesList; - - //----------------/ - //- Constructors -/ - //----------------/ - - public JSeq() - { - super(); - _featuresList = new Vector(); - _pdbidsList = new Vector(); - _hiddenSequencesList = new Vector(); - } //-- jalview.schemabinding.version2.JSeq() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method addFeatures - * - * - * - * @param vFeatures - */ - public void addFeatures(jalview.schemabinding.version2.Features vFeatures) - throws java.lang.IndexOutOfBoundsException - { - _featuresList.addElement(vFeatures); - } //-- void addFeatures(jalview.schemabinding.version2.Features) - - /** - * Method addFeatures - * - * - * - * @param index - * @param vFeatures - */ - public void addFeatures(int index, - jalview.schemabinding.version2.Features vFeatures) - throws java.lang.IndexOutOfBoundsException - { - _featuresList.insertElementAt(vFeatures, index); - } //-- void addFeatures(int, jalview.schemabinding.version2.Features) - - /** - * Method addHiddenSequences - * - * - * - * @param vHiddenSequences - */ - public void addHiddenSequences(int vHiddenSequences) - throws java.lang.IndexOutOfBoundsException - { - _hiddenSequencesList.addElement(new java.lang.Integer(vHiddenSequences)); - } //-- void addHiddenSequences(int) - - /** - * Method addHiddenSequences - * - * - * - * @param index - * @param vHiddenSequences - */ - public void addHiddenSequences(int index, int vHiddenSequences) - throws java.lang.IndexOutOfBoundsException - { - _hiddenSequencesList.insertElementAt(new java.lang.Integer(vHiddenSequences), - index); - } //-- void addHiddenSequences(int, int) - - /** - * Method addPdbids - * - * - * - * @param vPdbids - */ - public void addPdbids(jalview.schemabinding.version2.Pdbids vPdbids) - throws java.lang.IndexOutOfBoundsException - { - _pdbidsList.addElement(vPdbids); - } //-- void addPdbids(jalview.schemabinding.version2.Pdbids) - - /** - * Method addPdbids - * - * - * - * @param index - * @param vPdbids - */ - public void addPdbids(int index, - jalview.schemabinding.version2.Pdbids vPdbids) - throws java.lang.IndexOutOfBoundsException - { - _pdbidsList.insertElementAt(vPdbids, index); - } //-- void addPdbids(int, jalview.schemabinding.version2.Pdbids) - - /** - * Method deleteColour - * - */ - public void deleteColour() - { - this._has_colour = false; - } //-- void deleteColour() - - /** - * Method deleteEnd - * - */ - public void deleteEnd() - { - this._has_end = false; - } //-- void deleteEnd() - - /** - * Method deleteHidden - * - */ - public void deleteHidden() - { - this._has_hidden = false; - } //-- void deleteHidden() - - /** - * Method deleteId - * - */ - public void deleteId() - { - this._has_id = false; - } //-- void deleteId() - - /** - * Method deleteStart - * - */ - public void deleteStart() - { - this._has_start = false; - } //-- void deleteStart() - - /** - * Method enumerateFeatures - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateFeatures() - { - return _featuresList.elements(); - } //-- java.util.Enumeration enumerateFeatures() - - /** - * Method enumerateHiddenSequences - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateHiddenSequences() - { - return _hiddenSequencesList.elements(); - } //-- java.util.Enumeration enumerateHiddenSequences() - - /** - * Method enumeratePdbids - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumeratePdbids() - { - return _pdbidsList.elements(); - } //-- java.util.Enumeration enumeratePdbids() - - /** - * Returns the value of field 'colour'. - * - * @return int - * @return the value of field 'colour'. - */ - public int getColour() - { - return this._colour; - } //-- int getColour() - - /** - * Returns the value of field 'end'. - * - * @return int - * @return the value of field 'end'. - */ - public int getEnd() - { - return this._end; - } //-- int getEnd() - - /** - * Method getFeatures - * - * - * - * @param index - * @return Features - */ - public jalview.schemabinding.version2.Features getFeatures(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _featuresList.size())) - { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.Features) _featuresList.elementAt( - index); - } //-- jalview.schemabinding.version2.Features getFeatures(int) - - /** - * Method getFeatures - * - * - * - * @return Features - */ - public jalview.schemabinding.version2.Features[] getFeatures() - { - int size = _featuresList.size(); - jalview.schemabinding.version2.Features[] mArray = new jalview. - schemabinding.version2.Features[size]; - for (int index = 0; index < size; index++) - { - mArray[index] = (jalview.schemabinding.version2.Features) _featuresList. - elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Features[] getFeatures() - - /** - * Method getFeaturesCount - * - * - * - * @return int - */ - public int getFeaturesCount() - { - return _featuresList.size(); - } //-- int getFeaturesCount() - - /** - * Returns the value of field 'hidden'. - * - * @return boolean - * @return the value of field 'hidden'. - */ - public boolean getHidden() - { - return this._hidden; - } //-- boolean getHidden() - - /** - * Method getHiddenSequences - * - * - * - * @param index - * @return int - */ - public int getHiddenSequences(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _hiddenSequencesList.size())) - { - throw new IndexOutOfBoundsException(); - } - - return ( (java.lang.Integer) _hiddenSequencesList.elementAt(index)). - intValue(); - } //-- int getHiddenSequences(int) - - /** - * Method getHiddenSequences - * - * - * - * @return int - */ - public int[] getHiddenSequences() - { - int size = _hiddenSequencesList.size(); - int[] mArray = new int[size]; - for (int index = 0; index < size; index++) - { - mArray[index] = ( (java.lang.Integer) _hiddenSequencesList.elementAt( - index)).intValue(); - } - return mArray; - } //-- int[] getHiddenSequences() - - /** - * Method getHiddenSequencesCount - * - * - * - * @return int - */ - public int getHiddenSequencesCount() - { - return _hiddenSequencesList.size(); - } //-- int getHiddenSequencesCount() - - /** - * Returns the value of field 'id'. - * - * @return int - * @return the value of field 'id'. - */ - public int getId() - { - return this._id; - } //-- int getId() - - /** - * Method getPdbids - * - * - * - * @param index - * @return Pdbids - */ - public jalview.schemabinding.version2.Pdbids getPdbids(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _pdbidsList.size())) - { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.Pdbids) _pdbidsList.elementAt(index); - } //-- jalview.schemabinding.version2.Pdbids getPdbids(int) - - /** - * Method getPdbids - * - * - * - * @return Pdbids - */ - public jalview.schemabinding.version2.Pdbids[] getPdbids() - { - int size = _pdbidsList.size(); - jalview.schemabinding.version2.Pdbids[] mArray = new jalview.schemabinding. - version2.Pdbids[size]; - for (int index = 0; index < size; index++) - { - mArray[index] = (jalview.schemabinding.version2.Pdbids) _pdbidsList. - elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Pdbids[] getPdbids() - - /** - * Method getPdbidsCount - * - * - * - * @return int - */ - public int getPdbidsCount() - { - return _pdbidsList.size(); - } //-- int getPdbidsCount() - - /** - * Returns the value of field 'start'. - * - * @return int - * @return the value of field 'start'. - */ - public int getStart() - { - return this._start; - } //-- int getStart() - - /** - * Method hasColour - * - * - * - * @return boolean - */ - public boolean hasColour() - { - return this._has_colour; - } //-- boolean hasColour() - - /** - * Method hasEnd - * - * - * - * @return boolean - */ - public boolean hasEnd() - { - return this._has_end; - } //-- boolean hasEnd() - - /** - * Method hasHidden - * - * - * - * @return boolean - */ - public boolean hasHidden() - { - return this._has_hidden; - } //-- boolean hasHidden() - - /** - * Method hasId - * - * - * - * @return boolean - */ - public boolean hasId() - { - return this._has_id; - } //-- boolean hasId() - - /** - * Method hasStart - * - * - * - * @return boolean - */ - public boolean hasStart() - { - return this._has_start; - } //-- boolean hasStart() - - /** - * 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 removeAllFeatures - * - */ - public void removeAllFeatures() - { - _featuresList.removeAllElements(); - } //-- void removeAllFeatures() - - /** - * Method removeAllHiddenSequences - * - */ - public void removeAllHiddenSequences() - { - _hiddenSequencesList.removeAllElements(); - } //-- void removeAllHiddenSequences() - - /** - * Method removeAllPdbids - * - */ - public void removeAllPdbids() - { - _pdbidsList.removeAllElements(); - } //-- void removeAllPdbids() - - /** - * Method removeFeatures - * - * - * - * @param index - * @return Features - */ - public jalview.schemabinding.version2.Features removeFeatures(int index) - { - java.lang.Object obj = _featuresList.elementAt(index); - _featuresList.removeElementAt(index); - return (jalview.schemabinding.version2.Features) obj; - } //-- jalview.schemabinding.version2.Features removeFeatures(int) - - /** - * Method removeHiddenSequences - * - * - * - * @param index - * @return int - */ - public int removeHiddenSequences(int index) - { - java.lang.Object obj = _hiddenSequencesList.elementAt(index); - _hiddenSequencesList.removeElementAt(index); - return ( (java.lang.Integer) obj).intValue(); - } //-- int removeHiddenSequences(int) - - /** - * Method removePdbids - * - * - * - * @param index - * @return Pdbids - */ - public jalview.schemabinding.version2.Pdbids removePdbids(int index) - { - java.lang.Object obj = _pdbidsList.elementAt(index); - _pdbidsList.removeElementAt(index); - return (jalview.schemabinding.version2.Pdbids) obj; - } //-- jalview.schemabinding.version2.Pdbids removePdbids(int) - - /** - * Sets the value of field 'colour'. - * - * @param colour the value of field 'colour'. - */ - public void setColour(int colour) - { - this._colour = colour; - this._has_colour = true; - } //-- void setColour(int) - - /** - * Sets the value of field 'end'. - * - * @param end the value of field 'end'. - */ - public void setEnd(int end) - { - this._end = end; - this._has_end = true; - } //-- void setEnd(int) - - /** - * Method setFeatures - * - * - * - * @param index - * @param vFeatures - */ - public void setFeatures(int index, - jalview.schemabinding.version2.Features vFeatures) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _featuresList.size())) - { - throw new IndexOutOfBoundsException(); - } - _featuresList.setElementAt(vFeatures, index); - } //-- void setFeatures(int, jalview.schemabinding.version2.Features) - - /** - * Method setFeatures - * - * - * - * @param featuresArray - */ - public void setFeatures(jalview.schemabinding.version2.Features[] - featuresArray) - { - //-- copy array - _featuresList.removeAllElements(); - for (int i = 0; i < featuresArray.length; i++) - { - _featuresList.addElement(featuresArray[i]); - } - } //-- void setFeatures(jalview.schemabinding.version2.Features) - - /** - * Sets the value of field 'hidden'. - * - * @param hidden the value of field 'hidden'. - */ - public void setHidden(boolean hidden) - { - this._hidden = hidden; - this._has_hidden = true; - } //-- void setHidden(boolean) - - /** - * Method setHiddenSequences - * - * - * - * @param index - * @param vHiddenSequences - */ - public void setHiddenSequences(int index, int vHiddenSequences) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _hiddenSequencesList.size())) - { - throw new IndexOutOfBoundsException(); - } - _hiddenSequencesList.setElementAt(new java.lang.Integer(vHiddenSequences), - index); - } //-- void setHiddenSequences(int, int) - - /** - * Method setHiddenSequences - * - * - * - * @param hiddenSequencesArray - */ - public void setHiddenSequences(int[] hiddenSequencesArray) - { - //-- copy array - _hiddenSequencesList.removeAllElements(); - for (int i = 0; i < hiddenSequencesArray.length; i++) - { - _hiddenSequencesList.addElement(new java.lang.Integer( - hiddenSequencesArray[i])); - } - } //-- void setHiddenSequences(int) - - /** - * 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) - - /** - * Method setPdbids - * - * - * - * @param index - * @param vPdbids - */ - public void setPdbids(int index, - jalview.schemabinding.version2.Pdbids vPdbids) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _pdbidsList.size())) - { - throw new IndexOutOfBoundsException(); - } - _pdbidsList.setElementAt(vPdbids, index); - } //-- void setPdbids(int, jalview.schemabinding.version2.Pdbids) - - /** - * Method setPdbids - * - * - * - * @param pdbidsArray - */ - public void setPdbids(jalview.schemabinding.version2.Pdbids[] pdbidsArray) - { - //-- copy array - _pdbidsList.removeAllElements(); - for (int i = 0; i < pdbidsArray.length; i++) - { - _pdbidsList.addElement(pdbidsArray[i]); - } - } //-- void setPdbids(jalview.schemabinding.version2.Pdbids) - - /** - * Sets the value of field 'start'. - * - * @param start the value of field 'start'. - */ - public void setStart(int start) - { - this._start = start; - this._has_start = true; - } //-- void setStart(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.schemabinding.version2.JSeq) Unmarshaller.unmarshal(jalview. - schemabinding.version2.JSeq.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() +public class JSeq implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _colour + */ + private int _colour; + + /** + * keeps track of state for field: _colour + */ + private boolean _has_colour; + + /** + * Field _start + */ + private int _start; + + /** + * keeps track of state for field: _start + */ + private boolean _has_start; + + /** + * Field _end + */ + private int _end; + + /** + * keeps track of state for field: _end + */ + private boolean _has_end; + + /** + * Field _id + */ + private int _id; + + /** + * keeps track of state for field: _id + */ + private boolean _has_id; + + /** + * Field _hidden + */ + private boolean _hidden; + + /** + * keeps track of state for field: _hidden + */ + private boolean _has_hidden; + + /** + * Field _featuresList + */ + private java.util.Vector _featuresList; + + /** + * Field _pdbidsList + */ + private java.util.Vector _pdbidsList; + + /** + * Field _hiddenSequencesList + */ + private java.util.Vector _hiddenSequencesList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JSeq() { + super(); + _featuresList = new Vector(); + _pdbidsList = new Vector(); + _hiddenSequencesList = new Vector(); + } //-- jalview.schemabinding.version2.JSeq() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addFeatures + * + * + * + * @param vFeatures + */ + public void addFeatures(jalview.schemabinding.version2.Features vFeatures) + throws java.lang.IndexOutOfBoundsException + { + _featuresList.addElement(vFeatures); + } //-- void addFeatures(jalview.schemabinding.version2.Features) + + /** + * Method addFeatures + * + * + * + * @param index + * @param vFeatures + */ + public void addFeatures(int index, jalview.schemabinding.version2.Features vFeatures) + throws java.lang.IndexOutOfBoundsException + { + _featuresList.insertElementAt(vFeatures, index); + } //-- void addFeatures(int, jalview.schemabinding.version2.Features) + + /** + * Method addHiddenSequences + * + * + * + * @param vHiddenSequences + */ + public void addHiddenSequences(int vHiddenSequences) + throws java.lang.IndexOutOfBoundsException + { + _hiddenSequencesList.addElement(new java.lang.Integer(vHiddenSequences)); + } //-- void addHiddenSequences(int) + + /** + * Method addHiddenSequences + * + * + * + * @param index + * @param vHiddenSequences + */ + public void addHiddenSequences(int index, int vHiddenSequences) + throws java.lang.IndexOutOfBoundsException + { + _hiddenSequencesList.insertElementAt(new java.lang.Integer(vHiddenSequences), index); + } //-- void addHiddenSequences(int, int) + + /** + * Method addPdbids + * + * + * + * @param vPdbids + */ + public void addPdbids(jalview.schemabinding.version2.Pdbids vPdbids) + throws java.lang.IndexOutOfBoundsException + { + _pdbidsList.addElement(vPdbids); + } //-- void addPdbids(jalview.schemabinding.version2.Pdbids) + + /** + * Method addPdbids + * + * + * + * @param index + * @param vPdbids + */ + public void addPdbids(int index, jalview.schemabinding.version2.Pdbids vPdbids) + throws java.lang.IndexOutOfBoundsException + { + _pdbidsList.insertElementAt(vPdbids, index); + } //-- void addPdbids(int, jalview.schemabinding.version2.Pdbids) + + /** + * Method deleteColour + * + */ + public void deleteColour() + { + this._has_colour= false; + } //-- void deleteColour() + + /** + * Method deleteEnd + * + */ + public void deleteEnd() + { + this._has_end= false; + } //-- void deleteEnd() + + /** + * Method deleteHidden + * + */ + public void deleteHidden() + { + this._has_hidden= false; + } //-- void deleteHidden() + + /** + * Method deleteId + * + */ + public void deleteId() + { + this._has_id= false; + } //-- void deleteId() + + /** + * Method deleteStart + * + */ + public void deleteStart() + { + this._has_start= false; + } //-- void deleteStart() + + /** + * Method enumerateFeatures + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateFeatures() + { + return _featuresList.elements(); + } //-- java.util.Enumeration enumerateFeatures() + + /** + * Method enumerateHiddenSequences + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateHiddenSequences() + { + return _hiddenSequencesList.elements(); + } //-- java.util.Enumeration enumerateHiddenSequences() + + /** + * Method enumeratePdbids + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumeratePdbids() + { + return _pdbidsList.elements(); + } //-- java.util.Enumeration enumeratePdbids() + + /** + * Returns the value of field 'colour'. + * + * @return int + * @return the value of field 'colour'. + */ + public int getColour() + { + return this._colour; + } //-- int getColour() + + /** + * Returns the value of field 'end'. + * + * @return int + * @return the value of field 'end'. + */ + public int getEnd() + { + return this._end; + } //-- int getEnd() + + /** + * Method getFeatures + * + * + * + * @param index + * @return Features + */ + public jalview.schemabinding.version2.Features getFeatures(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _featuresList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.Features) _featuresList.elementAt(index); + } //-- jalview.schemabinding.version2.Features getFeatures(int) + + /** + * Method getFeatures + * + * + * + * @return Features + */ + public jalview.schemabinding.version2.Features[] getFeatures() + { + int size = _featuresList.size(); + jalview.schemabinding.version2.Features[] mArray = new jalview.schemabinding.version2.Features[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.Features) _featuresList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.Features[] getFeatures() + + /** + * Method getFeaturesCount + * + * + * + * @return int + */ + public int getFeaturesCount() + { + return _featuresList.size(); + } //-- int getFeaturesCount() + + /** + * Returns the value of field 'hidden'. + * + * @return boolean + * @return the value of field 'hidden'. + */ + public boolean getHidden() + { + return this._hidden; + } //-- boolean getHidden() + + /** + * Method getHiddenSequences + * + * + * + * @param index + * @return int + */ + public int getHiddenSequences(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _hiddenSequencesList.size())) { + throw new IndexOutOfBoundsException(); + } + + return ((java.lang.Integer)_hiddenSequencesList.elementAt(index)).intValue(); + } //-- int getHiddenSequences(int) + + /** + * Method getHiddenSequences + * + * + * + * @return int + */ + public int[] getHiddenSequences() + { + int size = _hiddenSequencesList.size(); + int[] mArray = new int[size]; + for (int index = 0; index < size; index++) { + mArray[index] = ((java.lang.Integer)_hiddenSequencesList.elementAt(index)).intValue(); + } + return mArray; + } //-- int[] getHiddenSequences() + + /** + * Method getHiddenSequencesCount + * + * + * + * @return int + */ + public int getHiddenSequencesCount() + { + return _hiddenSequencesList.size(); + } //-- int getHiddenSequencesCount() + + /** + * Returns the value of field 'id'. + * + * @return int + * @return the value of field 'id'. + */ + public int getId() + { + return this._id; + } //-- int getId() + + /** + * Method getPdbids + * + * + * + * @param index + * @return Pdbids + */ + public jalview.schemabinding.version2.Pdbids getPdbids(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _pdbidsList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.Pdbids) _pdbidsList.elementAt(index); + } //-- jalview.schemabinding.version2.Pdbids getPdbids(int) + + /** + * Method getPdbids + * + * + * + * @return Pdbids + */ + public jalview.schemabinding.version2.Pdbids[] getPdbids() + { + int size = _pdbidsList.size(); + jalview.schemabinding.version2.Pdbids[] mArray = new jalview.schemabinding.version2.Pdbids[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.Pdbids) _pdbidsList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.Pdbids[] getPdbids() + + /** + * Method getPdbidsCount + * + * + * + * @return int + */ + public int getPdbidsCount() + { + return _pdbidsList.size(); + } //-- int getPdbidsCount() + + /** + * Returns the value of field 'start'. + * + * @return int + * @return the value of field 'start'. + */ + public int getStart() + { + return this._start; + } //-- int getStart() + + /** + * Method hasColour + * + * + * + * @return boolean + */ + public boolean hasColour() + { + return this._has_colour; + } //-- boolean hasColour() + + /** + * Method hasEnd + * + * + * + * @return boolean + */ + public boolean hasEnd() + { + return this._has_end; + } //-- boolean hasEnd() + + /** + * Method hasHidden + * + * + * + * @return boolean + */ + public boolean hasHidden() + { + return this._has_hidden; + } //-- boolean hasHidden() + + /** + * Method hasId + * + * + * + * @return boolean + */ + public boolean hasId() + { + return this._has_id; + } //-- boolean hasId() + + /** + * Method hasStart + * + * + * + * @return boolean + */ + public boolean hasStart() + { + return this._has_start; + } //-- boolean hasStart() + + /** + * 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 removeAllFeatures + * + */ + public void removeAllFeatures() + { + _featuresList.removeAllElements(); + } //-- void removeAllFeatures() + + /** + * Method removeAllHiddenSequences + * + */ + public void removeAllHiddenSequences() + { + _hiddenSequencesList.removeAllElements(); + } //-- void removeAllHiddenSequences() + + /** + * Method removeAllPdbids + * + */ + public void removeAllPdbids() + { + _pdbidsList.removeAllElements(); + } //-- void removeAllPdbids() + + /** + * Method removeFeatures + * + * + * + * @param index + * @return Features + */ + public jalview.schemabinding.version2.Features removeFeatures(int index) + { + java.lang.Object obj = _featuresList.elementAt(index); + _featuresList.removeElementAt(index); + return (jalview.schemabinding.version2.Features) obj; + } //-- jalview.schemabinding.version2.Features removeFeatures(int) + + /** + * Method removeHiddenSequences + * + * + * + * @param index + * @return int + */ + public int removeHiddenSequences(int index) + { + java.lang.Object obj = _hiddenSequencesList.elementAt(index); + _hiddenSequencesList.removeElementAt(index); + return ((java.lang.Integer)obj).intValue(); + } //-- int removeHiddenSequences(int) + + /** + * Method removePdbids + * + * + * + * @param index + * @return Pdbids + */ + public jalview.schemabinding.version2.Pdbids removePdbids(int index) + { + java.lang.Object obj = _pdbidsList.elementAt(index); + _pdbidsList.removeElementAt(index); + return (jalview.schemabinding.version2.Pdbids) obj; + } //-- jalview.schemabinding.version2.Pdbids removePdbids(int) + + /** + * Sets the value of field 'colour'. + * + * @param colour the value of field 'colour'. + */ + public void setColour(int colour) + { + this._colour = colour; + this._has_colour = true; + } //-- void setColour(int) + + /** + * Sets the value of field 'end'. + * + * @param end the value of field 'end'. + */ + public void setEnd(int end) + { + this._end = end; + this._has_end = true; + } //-- void setEnd(int) + + /** + * Method setFeatures + * + * + * + * @param index + * @param vFeatures + */ + public void setFeatures(int index, jalview.schemabinding.version2.Features vFeatures) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _featuresList.size())) { + throw new IndexOutOfBoundsException(); + } + _featuresList.setElementAt(vFeatures, index); + } //-- void setFeatures(int, jalview.schemabinding.version2.Features) + + /** + * Method setFeatures + * + * + * + * @param featuresArray + */ + public void setFeatures(jalview.schemabinding.version2.Features[] featuresArray) + { + //-- copy array + _featuresList.removeAllElements(); + for (int i = 0; i < featuresArray.length; i++) { + _featuresList.addElement(featuresArray[i]); + } + } //-- void setFeatures(jalview.schemabinding.version2.Features) + + /** + * Sets the value of field 'hidden'. + * + * @param hidden the value of field 'hidden'. + */ + public void setHidden(boolean hidden) + { + this._hidden = hidden; + this._has_hidden = true; + } //-- void setHidden(boolean) + + /** + * Method setHiddenSequences + * + * + * + * @param index + * @param vHiddenSequences + */ + public void setHiddenSequences(int index, int vHiddenSequences) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _hiddenSequencesList.size())) { + throw new IndexOutOfBoundsException(); + } + _hiddenSequencesList.setElementAt(new java.lang.Integer(vHiddenSequences), index); + } //-- void setHiddenSequences(int, int) + + /** + * Method setHiddenSequences + * + * + * + * @param hiddenSequencesArray + */ + public void setHiddenSequences(int[] hiddenSequencesArray) + { + //-- copy array + _hiddenSequencesList.removeAllElements(); + for (int i = 0; i < hiddenSequencesArray.length; i++) { + _hiddenSequencesList.addElement(new java.lang.Integer(hiddenSequencesArray[i])); + } + } //-- void setHiddenSequences(int) + + /** + * 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) + + /** + * Method setPdbids + * + * + * + * @param index + * @param vPdbids + */ + public void setPdbids(int index, jalview.schemabinding.version2.Pdbids vPdbids) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _pdbidsList.size())) { + throw new IndexOutOfBoundsException(); + } + _pdbidsList.setElementAt(vPdbids, index); + } //-- void setPdbids(int, jalview.schemabinding.version2.Pdbids) + + /** + * Method setPdbids + * + * + * + * @param pdbidsArray + */ + public void setPdbids(jalview.schemabinding.version2.Pdbids[] pdbidsArray) + { + //-- copy array + _pdbidsList.removeAllElements(); + for (int i = 0; i < pdbidsArray.length; i++) { + _pdbidsList.addElement(pdbidsArray[i]); + } + } //-- void setPdbids(jalview.schemabinding.version2.Pdbids) + + /** + * Sets the value of field 'start'. + * + * @param start the value of field 'start'. + */ + public void setStart(int start) + { + this._start = start; + this._has_start = true; + } //-- void setStart(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.schemabinding.version2.JSeq) Unmarshaller.unmarshal(jalview.schemabinding.version2.JSeq.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/schemabinding/version2/JSeqDescriptor.java b/src/jalview/schemabinding/version2/JSeqDescriptor.java index 9280390..eef74d2 100755 --- a/src/jalview/schemabinding/version2/JSeqDescriptor.java +++ b/src/jalview/schemabinding/version2/JSeqDescriptor.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,566 +7,482 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class JSeqDescriptor. - * + * * @version $Revision$ $Date$ */ -public class JSeqDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public JSeqDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "JSeq"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _colour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_colour", "colour", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JSeq target = (JSeq) object; - if (!target.hasColour()) - { - return null; +public class JSeqDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JSeqDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "JSeq"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _colour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colour", "colour", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + if(!target.hasColour()) + return null; + return new java.lang.Integer(target.getColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteColour(); + return; + } + target.setColour( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _colour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - return new java.lang.Integer(target.getColour()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JSeq target = (JSeq) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteColour(); - return; - } - target.setColour( ( (java.lang.Integer) value).intValue()); + desc.setValidator(fieldValidator); + //-- _start + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + if(!target.hasStart()) + return null; + return new java.lang.Integer(target.getStart()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setStart( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _start + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _end + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + if(!target.hasEnd()) + return null; + return new java.lang.Integer(target.getEnd()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setEnd( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _end + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _colour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _start - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_start", "start", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JSeq target = (JSeq) object; - if (!target.hasStart()) - { - return null; - } - return new java.lang.Integer(target.getStart()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JSeq target = (JSeq) object; - // ignore null values for non optional primitives - if (value == null) - { - return; - } - - target.setStart( ( (java.lang.Integer) value).intValue()); + desc.setValidator(fieldValidator); + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + if(!target.hasId()) + return null; + return new java.lang.Integer(target.getId()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setId( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _id + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _hidden + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_hidden", "hidden", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + if(!target.hasHidden()) + return null; + return (target.getHidden() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteHidden(); + return; + } + target.setHidden( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _hidden + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _start - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _end - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JSeq target = (JSeq) object; - if (!target.hasEnd()) - { - return null; + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _featuresList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Features.class, "_featuresList", "features", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + return target.getFeatures(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + target.addFeatures( (jalview.schemabinding.version2.Features) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.Features(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _featuresList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - return new java.lang.Integer(target.getEnd()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JSeq target = (JSeq) object; - // ignore null values for non optional primitives - if (value == null) - { - return; - } - - target.setEnd( ( (java.lang.Integer) value).intValue()); + desc.setValidator(fieldValidator); + //-- _pdbidsList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Pdbids.class, "_pdbidsList", "pdbids", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + return target.getPdbids(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + target.addPdbids( (jalview.schemabinding.version2.Pdbids) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.Pdbids(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _pdbidsList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _hiddenSequencesList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_hiddenSequencesList", "hiddenSequences", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + return target.getHiddenSequences(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.addHiddenSequences( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _hiddenSequencesList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _end - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _id - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.JSeqDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JSeq target = (JSeq) object; - if (!target.hasId()) - { - return null; - } - return new java.lang.Integer(target.getId()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JSeq target = (JSeq) object; - // ignore null values for non optional primitives - if (value == null) - { - return; - } - - target.setId( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _id - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _hidden - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_hidden", "hidden", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JSeq target = (JSeq) object; - if (!target.hasHidden()) - { - return null; - } - return (target.getHidden() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JSeq target = (JSeq) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteHidden(); - return; - } - target.setHidden( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _hidden - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _featuresList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.Features.class, "_featuresList", "features", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JSeq target = (JSeq) object; - return target.getFeatures(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JSeq target = (JSeq) object; - target.addFeatures( (jalview.schemabinding.version2.Features) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.Features(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _featuresList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _pdbidsList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.Pdbids.class, "_pdbidsList", "pdbids", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JSeq target = (JSeq) object; - return target.getPdbids(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JSeq target = (JSeq) object; - target.addPdbids( (jalview.schemabinding.version2.Pdbids) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.Pdbids(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _pdbidsList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _hiddenSequencesList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_hiddenSequencesList", "hiddenSequences", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return jalview.schemabinding.version2.JSeq.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JSeq target = (JSeq) object; - return target.getHiddenSequences(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JSeq target = (JSeq) object; - // ignore null values for non optional primitives - if (value == null) - { - return; - } - - target.addHiddenSequences( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _hiddenSequencesList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.JSeqDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.JSeq.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/JalviewModel.java b/src/jalview/schemabinding/version2/JalviewModel.java index 11f6e38..fe8deef 100755 --- a/src/jalview/schemabinding/version2/JalviewModel.java +++ b/src/jalview/schemabinding/version2/JalviewModel.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,223 +7,221 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import java.util.Date; +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 JalviewModel. - * + * * @version $Revision$ $Date$ */ -public class JalviewModel - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _creationDate - */ - private java.util.Date _creationDate; - - /** - * Field _version - */ - private java.lang.String _version; - - /** - * Field _vamsasModel - */ - private jalview.schemabinding.version2.VamsasModel _vamsasModel; - - /** - * Field _jalviewModelSequence - */ - private jalview.schemabinding.version2.JalviewModelSequence - _jalviewModelSequence; - - //----------------/ - //- Constructors -/ - //----------------/ - - public JalviewModel() - { - super(); - } //-- jalview.schemabinding.version2.JalviewModel() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * 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() - - /** - * Returns the value of field 'jalviewModelSequence'. - * - * @return JalviewModelSequence - * @return the value of field 'jalviewModelSequence'. - */ - public jalview.schemabinding.version2.JalviewModelSequence - getJalviewModelSequence() - { - return this._jalviewModelSequence; - } //-- jalview.schemabinding.version2.JalviewModelSequence getJalviewModelSequence() - - /** - * Returns the value of field 'vamsasModel'. - * - * @return VamsasModel - * @return the value of field 'vamsasModel'. - */ - public jalview.schemabinding.version2.VamsasModel getVamsasModel() - { - return this._vamsasModel; - } //-- jalview.schemabinding.version2.VamsasModel getVamsasModel() - - /** - * Returns the value of field 'version'. - * - * @return String - * @return the value of field 'version'. - */ - public java.lang.String getVersion() - { - return this._version; - } //-- java.lang.String getVersion() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try +public class JalviewModel implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _creationDate + */ + private java.util.Date _creationDate; + + /** + * Field _version + */ + private java.lang.String _version; + + /** + * Field _vamsasModel + */ + private jalview.schemabinding.version2.VamsasModel _vamsasModel; + + /** + * Field _jalviewModelSequence + */ + private jalview.schemabinding.version2.JalviewModelSequence _jalviewModelSequence; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JalviewModel() { + super(); + } //-- jalview.schemabinding.version2.JalviewModel() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * 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() + + /** + * Returns the value of field 'jalviewModelSequence'. + * + * @return JalviewModelSequence + * @return the value of field 'jalviewModelSequence'. + */ + public jalview.schemabinding.version2.JalviewModelSequence getJalviewModelSequence() + { + return this._jalviewModelSequence; + } //-- jalview.schemabinding.version2.JalviewModelSequence getJalviewModelSequence() + + /** + * Returns the value of field 'vamsasModel'. + * + * @return VamsasModel + * @return the value of field 'vamsasModel'. + */ + public jalview.schemabinding.version2.VamsasModel getVamsasModel() + { + return this._vamsasModel; + } //-- jalview.schemabinding.version2.VamsasModel getVamsasModel() + + /** + * Returns the value of field 'version'. + * + * @return String + * @return the value of field 'version'. + */ + public java.lang.String getVersion() + { + return this._version; + } //-- java.lang.String getVersion() + + /** + * 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 'creationDate'. + * + * @param creationDate the value of field 'creationDate'. + */ + public void setCreationDate(java.util.Date creationDate) + { + this._creationDate = creationDate; + } //-- void setCreationDate(java.util.Date) + + /** + * Sets the value of field 'jalviewModelSequence'. + * + * @param jalviewModelSequence the value of field + * 'jalviewModelSequence'. + */ + public void setJalviewModelSequence(jalview.schemabinding.version2.JalviewModelSequence jalviewModelSequence) + { + this._jalviewModelSequence = jalviewModelSequence; + } //-- void setJalviewModelSequence(jalview.schemabinding.version2.JalviewModelSequence) + + /** + * Sets the value of field 'vamsasModel'. + * + * @param vamsasModel the value of field 'vamsasModel'. + */ + public void setVamsasModel(jalview.schemabinding.version2.VamsasModel vamsasModel) + { + this._vamsasModel = vamsasModel; + } //-- void setVamsasModel(jalview.schemabinding.version2.VamsasModel) + + /** + * Sets the value of field 'version'. + * + * @param version the value of field 'version'. + */ + public void setVersion(java.lang.String version) + { + this._version = version; + } //-- void setVersion(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 { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return (jalview.schemabinding.version2.JalviewModel) Unmarshaller.unmarshal(jalview.schemabinding.version2.JalviewModel.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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) - - /** - * Sets the value of field 'creationDate'. - * - * @param creationDate the value of field 'creationDate'. - */ - public void setCreationDate(java.util.Date creationDate) - { - this._creationDate = creationDate; - } //-- void setCreationDate(java.util.Date) - - /** - * Sets the value of field 'jalviewModelSequence'. - * - * @param jalviewModelSequence the value of field - * 'jalviewModelSequence'. - */ - public void setJalviewModelSequence(jalview.schemabinding.version2. - JalviewModelSequence jalviewModelSequence) - { - this._jalviewModelSequence = jalviewModelSequence; - } //-- void setJalviewModelSequence(jalview.schemabinding.version2.JalviewModelSequence) - - /** - * Sets the value of field 'vamsasModel'. - * - * @param vamsasModel the value of field 'vamsasModel'. - */ - public void setVamsasModel(jalview.schemabinding.version2.VamsasModel - vamsasModel) - { - this._vamsasModel = vamsasModel; - } //-- void setVamsasModel(jalview.schemabinding.version2.VamsasModel) - - /** - * Sets the value of field 'version'. - * - * @param version the value of field 'version'. - */ - public void setVersion(java.lang.String version) - { - this._version = version; - } //-- void setVersion(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.JalviewModel) Unmarshaller.unmarshal( - jalview.schemabinding.version2.JalviewModel.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/JalviewModelDescriptor.java b/src/jalview/schemabinding/version2/JalviewModelDescriptor.java index a9440e5..ad2dc13 100755 --- a/src/jalview/schemabinding/version2/JalviewModelDescriptor.java +++ b/src/jalview/schemabinding/version2/JalviewModelDescriptor.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,350 +7,318 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class JalviewModelDescriptor. - * + * * @version $Revision$ $Date$ */ -public class JalviewModelDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public JalviewModelDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "JalviewModel"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- initialize element descriptors - - //-- _creationDate - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.util.Date.class, - "_creationDate", "creationDate", org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JalviewModel target = (JalviewModel) object; - return target.getCreationDate(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JalviewModel target = (JalviewModel) object; - target.setCreationDate( (java.util.Date) value); +public class JalviewModelDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JalviewModelDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "JalviewModel"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _creationDate + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.util.Date.class, "_creationDate", "creationDate", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModel target = (JalviewModel) object; + return target.getCreationDate(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModel target = (JalviewModel) object; + target.setCreationDate( (java.util.Date) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new java.util.Date(); + } + } ); + desc.setHandler( new org.exolab.castor.xml.handlers.DateFieldHandler(handler)); + desc.setImmutable(true); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _creationDate + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _version + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_version", "version", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModel target = (JalviewModel) object; + return target.getVersion(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModel target = (JalviewModel) object; + target.setVersion( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _version + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new java.util.Date(); - } - }); - desc.setHandler(new org.exolab.castor.xml.handlers.DateFieldHandler(handler)); - desc.setImmutable(true); - desc.setNameSpaceURI("www.jalview.org"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _creationDate - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _version - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_version", "version", - org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JalviewModel target = (JalviewModel) object; - return target.getVersion(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JalviewModel target = (JalviewModel) object; - target.setVersion( (java.lang.String) value); + desc.setValidator(fieldValidator); + //-- _vamsasModel + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.VamsasModel.class, "_vamsasModel", "vamsasModel", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModel target = (JalviewModel) object; + return target.getVamsasModel(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModel target = (JalviewModel) object; + target.setVamsasModel( (jalview.schemabinding.version2.VamsasModel) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.VamsasModel(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _vamsasModel + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _jalviewModelSequence + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.JalviewModelSequence.class, "_jalviewModelSequence", "-error-if-this-is-used-", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModel target = (JalviewModel) object; + return target.getJalviewModelSequence(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModel target = (JalviewModel) object; + target.setJalviewModelSequence( (jalview.schemabinding.version2.JalviewModelSequence) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.JalviewModelSequence(); + } + } ); + desc.setHandler(handler); + desc.setContainer(true); + desc.setClassDescriptor(new jalview.schemabinding.version2.JalviewModelSequenceDescriptor()); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _jalviewModelSequence + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.JalviewModelDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _version - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _vamsasModel - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.VamsasModel.class, "_vamsasModel", "vamsasModel", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JalviewModel target = (JalviewModel) object; - return target.getVamsasModel(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JalviewModel target = (JalviewModel) object; - target.setVamsasModel( (jalview.schemabinding.version2.VamsasModel) - value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.VamsasModel(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _vamsasModel - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _jalviewModelSequence - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.JalviewModelSequence.class, - "_jalviewModelSequence", "-error-if-this-is-used-", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JalviewModel target = (JalviewModel) object; - return target.getJalviewModelSequence(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JalviewModel target = (JalviewModel) object; - target.setJalviewModelSequence( (jalview.schemabinding.version2. - JalviewModelSequence) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.JalviewModelSequence(); - } - }); - desc.setHandler(handler); - desc.setContainer(true); - desc.setClassDescriptor(new jalview.schemabinding.version2. - JalviewModelSequenceDescriptor()); - desc.setNameSpaceURI("www.jalview.org"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _jalviewModelSequence - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.JalviewModelDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.JalviewModel.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.JalviewModel.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/JalviewModelSequence.java b/src/jalview/schemabinding/version2/JalviewModelSequence.java index ba0c4c8..45f486b 100755 --- a/src/jalview/schemabinding/version2/JalviewModelSequence.java +++ b/src/jalview/schemabinding/version2/JalviewModelSequence.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,942 +7,898 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import java.util.*; -import org.exolab.castor.xml.*; +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 JalviewModelSequence. - * + * * @version $Revision$ $Date$ */ -public class JalviewModelSequence - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _JSeqList - */ - private java.util.Vector _JSeqList; - - /** - * Field _JGroupList - */ - private java.util.Vector _JGroupList; - - /** - * Field _viewportList - */ - private java.util.Vector _viewportList; - - /** - * Field _userColoursList - */ - private java.util.Vector _userColoursList; - - /** - * Field _treeList - */ - private java.util.Vector _treeList; - - /** - * Field _featureSettings - */ - private jalview.schemabinding.version2.FeatureSettings _featureSettings; - - //----------------/ - //- Constructors -/ - //----------------/ - - public JalviewModelSequence() - { - super(); - _JSeqList = new Vector(); - _JGroupList = new Vector(); - _viewportList = new Vector(); - _userColoursList = new Vector(); - _treeList = new Vector(); - } //-- jalview.schemabinding.version2.JalviewModelSequence() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method addJGroup - * - * - * - * @param vJGroup - */ - public void addJGroup(jalview.schemabinding.version2.JGroup vJGroup) - throws java.lang.IndexOutOfBoundsException - { - _JGroupList.addElement(vJGroup); - } //-- void addJGroup(jalview.schemabinding.version2.JGroup) - - /** - * Method addJGroup - * - * - * - * @param index - * @param vJGroup - */ - public void addJGroup(int index, - jalview.schemabinding.version2.JGroup vJGroup) - throws java.lang.IndexOutOfBoundsException - { - _JGroupList.insertElementAt(vJGroup, index); - } //-- void addJGroup(int, jalview.schemabinding.version2.JGroup) - - /** - * Method addJSeq - * - * - * - * @param vJSeq - */ - public void addJSeq(jalview.schemabinding.version2.JSeq vJSeq) - throws java.lang.IndexOutOfBoundsException - { - _JSeqList.addElement(vJSeq); - } //-- void addJSeq(jalview.schemabinding.version2.JSeq) - - /** - * Method addJSeq - * - * - * - * @param index - * @param vJSeq - */ - public void addJSeq(int index, jalview.schemabinding.version2.JSeq vJSeq) - throws java.lang.IndexOutOfBoundsException - { - _JSeqList.insertElementAt(vJSeq, index); - } //-- void addJSeq(int, jalview.schemabinding.version2.JSeq) - - /** - * Method addTree - * - * - * - * @param vTree - */ - public void addTree(jalview.schemabinding.version2.Tree vTree) - throws java.lang.IndexOutOfBoundsException - { - _treeList.addElement(vTree); - } //-- void addTree(jalview.schemabinding.version2.Tree) - - /** - * Method addTree - * - * - * - * @param index - * @param vTree - */ - public void addTree(int index, jalview.schemabinding.version2.Tree vTree) - throws java.lang.IndexOutOfBoundsException - { - _treeList.insertElementAt(vTree, index); - } //-- void addTree(int, jalview.schemabinding.version2.Tree) - - /** - * Method addUserColours - * - * - * - * @param vUserColours - */ - public void addUserColours(jalview.schemabinding.version2.UserColours - vUserColours) - throws java.lang.IndexOutOfBoundsException - { - _userColoursList.addElement(vUserColours); - } //-- void addUserColours(jalview.schemabinding.version2.UserColours) - - /** - * Method addUserColours - * - * - * - * @param index - * @param vUserColours - */ - public void addUserColours(int index, - jalview.schemabinding.version2.UserColours - vUserColours) - throws java.lang.IndexOutOfBoundsException - { - _userColoursList.insertElementAt(vUserColours, index); - } //-- void addUserColours(int, jalview.schemabinding.version2.UserColours) - - /** - * Method addViewport - * - * - * - * @param vViewport - */ - public void addViewport(jalview.schemabinding.version2.Viewport vViewport) - throws java.lang.IndexOutOfBoundsException - { - _viewportList.addElement(vViewport); - } //-- void addViewport(jalview.schemabinding.version2.Viewport) - - /** - * Method addViewport - * - * - * - * @param index - * @param vViewport - */ - public void addViewport(int index, - jalview.schemabinding.version2.Viewport vViewport) - throws java.lang.IndexOutOfBoundsException - { - _viewportList.insertElementAt(vViewport, index); - } //-- void addViewport(int, jalview.schemabinding.version2.Viewport) - - /** - * Method enumerateJGroup - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateJGroup() - { - return _JGroupList.elements(); - } //-- java.util.Enumeration enumerateJGroup() - - /** - * Method enumerateJSeq - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateJSeq() - { - return _JSeqList.elements(); - } //-- java.util.Enumeration enumerateJSeq() - - /** - * Method enumerateTree - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateTree() - { - return _treeList.elements(); - } //-- java.util.Enumeration enumerateTree() - - /** - * Method enumerateUserColours - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateUserColours() - { - return _userColoursList.elements(); - } //-- java.util.Enumeration enumerateUserColours() - - /** - * Method enumerateViewport - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateViewport() - { - return _viewportList.elements(); - } //-- java.util.Enumeration enumerateViewport() - - /** - * Returns the value of field 'featureSettings'. - * - * @return FeatureSettings - * @return the value of field 'featureSettings'. - */ - public jalview.schemabinding.version2.FeatureSettings getFeatureSettings() - { - return this._featureSettings; - } //-- jalview.schemabinding.version2.FeatureSettings getFeatureSettings() - - /** - * Method getJGroup - * - * - * - * @param index - * @return JGroup - */ - public jalview.schemabinding.version2.JGroup getJGroup(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _JGroupList.size())) - { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.JGroup) _JGroupList.elementAt(index); - } //-- jalview.schemabinding.version2.JGroup getJGroup(int) - - /** - * Method getJGroup - * - * - * - * @return JGroup - */ - public jalview.schemabinding.version2.JGroup[] getJGroup() - { - int size = _JGroupList.size(); - jalview.schemabinding.version2.JGroup[] mArray = new jalview.schemabinding. - version2.JGroup[size]; - for (int index = 0; index < size; index++) - { - mArray[index] = (jalview.schemabinding.version2.JGroup) _JGroupList. - elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.JGroup[] getJGroup() - - /** - * Method getJGroupCount - * - * - * - * @return int - */ - public int getJGroupCount() - { - return _JGroupList.size(); - } //-- int getJGroupCount() - - /** - * Method getJSeq - * - * - * - * @param index - * @return JSeq - */ - public jalview.schemabinding.version2.JSeq getJSeq(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _JSeqList.size())) - { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.JSeq) _JSeqList.elementAt(index); - } //-- jalview.schemabinding.version2.JSeq getJSeq(int) - - /** - * Method getJSeq - * - * - * - * @return JSeq - */ - public jalview.schemabinding.version2.JSeq[] getJSeq() - { - int size = _JSeqList.size(); - jalview.schemabinding.version2.JSeq[] mArray = new jalview.schemabinding. - version2.JSeq[size]; - for (int index = 0; index < size; index++) - { - mArray[index] = (jalview.schemabinding.version2.JSeq) _JSeqList.elementAt( - index); - } - return mArray; - } //-- jalview.schemabinding.version2.JSeq[] getJSeq() - - /** - * Method getJSeqCount - * - * - * - * @return int - */ - public int getJSeqCount() - { - return _JSeqList.size(); - } //-- int getJSeqCount() - - /** - * Method getTree - * - * - * - * @param index - * @return Tree - */ - public jalview.schemabinding.version2.Tree getTree(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _treeList.size())) - { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.Tree) _treeList.elementAt(index); - } //-- jalview.schemabinding.version2.Tree getTree(int) - - /** - * Method getTree - * - * - * - * @return Tree - */ - public jalview.schemabinding.version2.Tree[] getTree() - { - int size = _treeList.size(); - jalview.schemabinding.version2.Tree[] mArray = new jalview.schemabinding. - version2.Tree[size]; - for (int index = 0; index < size; index++) - { - mArray[index] = (jalview.schemabinding.version2.Tree) _treeList.elementAt( - index); - } - return mArray; - } //-- jalview.schemabinding.version2.Tree[] getTree() - - /** - * Method getTreeCount - * - * - * - * @return int - */ - public int getTreeCount() - { - return _treeList.size(); - } //-- int getTreeCount() - - /** - * Method getUserColours - * - * - * - * @param index - * @return UserColours - */ - public jalview.schemabinding.version2.UserColours getUserColours(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _userColoursList.size())) - { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.UserColours) _userColoursList. - elementAt(index); - } //-- jalview.schemabinding.version2.UserColours getUserColours(int) - - /** - * Method getUserColours - * - * - * - * @return UserColours - */ - public jalview.schemabinding.version2.UserColours[] getUserColours() - { - int size = _userColoursList.size(); - jalview.schemabinding.version2.UserColours[] mArray = new jalview. - schemabinding.version2.UserColours[size]; - for (int index = 0; index < size; index++) - { - mArray[index] = (jalview.schemabinding.version2.UserColours) - _userColoursList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.UserColours[] getUserColours() - - /** - * Method getUserColoursCount - * - * - * - * @return int - */ - public int getUserColoursCount() - { - return _userColoursList.size(); - } //-- int getUserColoursCount() - - /** - * Method getViewport - * - * - * - * @param index - * @return Viewport - */ - public jalview.schemabinding.version2.Viewport getViewport(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _viewportList.size())) - { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.Viewport) _viewportList.elementAt( - index); - } //-- jalview.schemabinding.version2.Viewport getViewport(int) - - /** - * Method getViewport - * - * - * - * @return Viewport - */ - public jalview.schemabinding.version2.Viewport[] getViewport() - { - int size = _viewportList.size(); - jalview.schemabinding.version2.Viewport[] mArray = new jalview. - schemabinding.version2.Viewport[size]; - for (int index = 0; index < size; index++) - { - mArray[index] = (jalview.schemabinding.version2.Viewport) _viewportList. - elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Viewport[] getViewport() - - /** - * Method getViewportCount - * - * - * - * @return int - */ - public int getViewportCount() - { - return _viewportList.size(); - } //-- int getViewportCount() - - /** - * 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 removeAllJGroup - * - */ - public void removeAllJGroup() - { - _JGroupList.removeAllElements(); - } //-- void removeAllJGroup() - - /** - * Method removeAllJSeq - * - */ - public void removeAllJSeq() - { - _JSeqList.removeAllElements(); - } //-- void removeAllJSeq() - - /** - * Method removeAllTree - * - */ - public void removeAllTree() - { - _treeList.removeAllElements(); - } //-- void removeAllTree() - - /** - * Method removeAllUserColours - * - */ - public void removeAllUserColours() - { - _userColoursList.removeAllElements(); - } //-- void removeAllUserColours() - - /** - * Method removeAllViewport - * - */ - public void removeAllViewport() - { - _viewportList.removeAllElements(); - } //-- void removeAllViewport() - - /** - * Method removeJGroup - * - * - * - * @param index - * @return JGroup - */ - public jalview.schemabinding.version2.JGroup removeJGroup(int index) - { - java.lang.Object obj = _JGroupList.elementAt(index); - _JGroupList.removeElementAt(index); - return (jalview.schemabinding.version2.JGroup) obj; - } //-- jalview.schemabinding.version2.JGroup removeJGroup(int) - - /** - * Method removeJSeq - * - * - * - * @param index - * @return JSeq - */ - public jalview.schemabinding.version2.JSeq removeJSeq(int index) - { - java.lang.Object obj = _JSeqList.elementAt(index); - _JSeqList.removeElementAt(index); - return (jalview.schemabinding.version2.JSeq) obj; - } //-- jalview.schemabinding.version2.JSeq removeJSeq(int) - - /** - * Method removeTree - * - * - * - * @param index - * @return Tree - */ - public jalview.schemabinding.version2.Tree removeTree(int index) - { - java.lang.Object obj = _treeList.elementAt(index); - _treeList.removeElementAt(index); - return (jalview.schemabinding.version2.Tree) obj; - } //-- jalview.schemabinding.version2.Tree removeTree(int) - - /** - * Method removeUserColours - * - * - * - * @param index - * @return UserColours - */ - public jalview.schemabinding.version2.UserColours removeUserColours(int index) - { - java.lang.Object obj = _userColoursList.elementAt(index); - _userColoursList.removeElementAt(index); - return (jalview.schemabinding.version2.UserColours) obj; - } //-- jalview.schemabinding.version2.UserColours removeUserColours(int) - - /** - * Method removeViewport - * - * - * - * @param index - * @return Viewport - */ - public jalview.schemabinding.version2.Viewport removeViewport(int index) - { - java.lang.Object obj = _viewportList.elementAt(index); - _viewportList.removeElementAt(index); - return (jalview.schemabinding.version2.Viewport) obj; - } //-- jalview.schemabinding.version2.Viewport removeViewport(int) - - /** - * Sets the value of field 'featureSettings'. - * - * @param featureSettings the value of field 'featureSettings'. - */ - public void setFeatureSettings(jalview.schemabinding.version2.FeatureSettings - featureSettings) - { - this._featureSettings = featureSettings; - } //-- void setFeatureSettings(jalview.schemabinding.version2.FeatureSettings) - - /** - * Method setJGroup - * - * - * - * @param index - * @param vJGroup - */ - public void setJGroup(int index, - jalview.schemabinding.version2.JGroup vJGroup) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _JGroupList.size())) - { - throw new IndexOutOfBoundsException(); - } - _JGroupList.setElementAt(vJGroup, index); - } //-- void setJGroup(int, jalview.schemabinding.version2.JGroup) - - /** - * Method setJGroup - * - * - * - * @param JGroupArray - */ - public void setJGroup(jalview.schemabinding.version2.JGroup[] JGroupArray) - { - //-- copy array - _JGroupList.removeAllElements(); - for (int i = 0; i < JGroupArray.length; i++) - { - _JGroupList.addElement(JGroupArray[i]); - } - } //-- void setJGroup(jalview.schemabinding.version2.JGroup) - - /** - * Method setJSeq - * - * - * - * @param index - * @param vJSeq - */ - public void setJSeq(int index, jalview.schemabinding.version2.JSeq vJSeq) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _JSeqList.size())) - { - throw new IndexOutOfBoundsException(); - } - _JSeqList.setElementAt(vJSeq, index); - } //-- void setJSeq(int, jalview.schemabinding.version2.JSeq) - - /** - * Method setJSeq - * - * - * - * @param JSeqArray - */ - public void setJSeq(jalview.schemabinding.version2.JSeq[] JSeqArray) - { - //-- copy array - _JSeqList.removeAllElements(); - for (int i = 0; i < JSeqArray.length; i++) - { - _JSeqList.addElement(JSeqArray[i]); - } - } //-- void setJSeq(jalview.schemabinding.version2.JSeq) - - /** - * Method setTree - * - * - * - * @param index - * @param vTree - */ - public void setTree(int index, jalview.schemabinding.version2.Tree vTree) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _treeList.size())) - { - throw new IndexOutOfBoundsException(); - } - _treeList.setElementAt(vTree, index); - } //-- void setTree(int, jalview.schemabinding.version2.Tree) - - /** - * Method setTree - * - * - * - * @param treeArray - */ - public void setTree(jalview.schemabinding.version2.Tree[] treeArray) - { - //-- copy array - _treeList.removeAllElements(); - for (int i = 0; i < treeArray.length; i++) - { - _treeList.addElement(treeArray[i]); - } - } //-- void setTree(jalview.schemabinding.version2.Tree) - - /** - * Method setUserColours - * - * - * - * @param index - * @param vUserColours - */ - public void setUserColours(int index, - jalview.schemabinding.version2.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.schemabinding.version2.UserColours) - - /** - * Method setUserColours - * - * - * - * @param userColoursArray - */ - public void setUserColours(jalview.schemabinding.version2.UserColours[] - userColoursArray) - { - //-- copy array - _userColoursList.removeAllElements(); - for (int i = 0; i < userColoursArray.length; i++) - { - _userColoursList.addElement(userColoursArray[i]); - } - } //-- void setUserColours(jalview.schemabinding.version2.UserColours) - - /** - * Method setViewport - * - * - * - * @param index - * @param vViewport - */ - public void setViewport(int index, - jalview.schemabinding.version2.Viewport vViewport) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _viewportList.size())) - { - throw new IndexOutOfBoundsException(); - } - _viewportList.setElementAt(vViewport, index); - } //-- void setViewport(int, jalview.schemabinding.version2.Viewport) - - /** - * Method setViewport - * - * - * - * @param viewportArray - */ - public void setViewport(jalview.schemabinding.version2.Viewport[] - viewportArray) - { - //-- copy array - _viewportList.removeAllElements(); - for (int i = 0; i < viewportArray.length; i++) - { - _viewportList.addElement(viewportArray[i]); - } - } //-- void setViewport(jalview.schemabinding.version2.Viewport) - - /** - * 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.JalviewModelSequence) Unmarshaller. - unmarshal(jalview.schemabinding.version2.JalviewModelSequence.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() +public class JalviewModelSequence implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _JSeqList + */ + private java.util.Vector _JSeqList; + + /** + * Field _JGroupList + */ + private java.util.Vector _JGroupList; + + /** + * Field _viewportList + */ + private java.util.Vector _viewportList; + + /** + * Field _userColoursList + */ + private java.util.Vector _userColoursList; + + /** + * Field _treeList + */ + private java.util.Vector _treeList; + + /** + * Field _featureSettings + */ + private jalview.schemabinding.version2.FeatureSettings _featureSettings; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JalviewModelSequence() { + super(); + _JSeqList = new Vector(); + _JGroupList = new Vector(); + _viewportList = new Vector(); + _userColoursList = new Vector(); + _treeList = new Vector(); + } //-- jalview.schemabinding.version2.JalviewModelSequence() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addJGroup + * + * + * + * @param vJGroup + */ + public void addJGroup(jalview.schemabinding.version2.JGroup vJGroup) + throws java.lang.IndexOutOfBoundsException + { + _JGroupList.addElement(vJGroup); + } //-- void addJGroup(jalview.schemabinding.version2.JGroup) + + /** + * Method addJGroup + * + * + * + * @param index + * @param vJGroup + */ + public void addJGroup(int index, jalview.schemabinding.version2.JGroup vJGroup) + throws java.lang.IndexOutOfBoundsException + { + _JGroupList.insertElementAt(vJGroup, index); + } //-- void addJGroup(int, jalview.schemabinding.version2.JGroup) + + /** + * Method addJSeq + * + * + * + * @param vJSeq + */ + public void addJSeq(jalview.schemabinding.version2.JSeq vJSeq) + throws java.lang.IndexOutOfBoundsException + { + _JSeqList.addElement(vJSeq); + } //-- void addJSeq(jalview.schemabinding.version2.JSeq) + + /** + * Method addJSeq + * + * + * + * @param index + * @param vJSeq + */ + public void addJSeq(int index, jalview.schemabinding.version2.JSeq vJSeq) + throws java.lang.IndexOutOfBoundsException + { + _JSeqList.insertElementAt(vJSeq, index); + } //-- void addJSeq(int, jalview.schemabinding.version2.JSeq) + + /** + * Method addTree + * + * + * + * @param vTree + */ + public void addTree(jalview.schemabinding.version2.Tree vTree) + throws java.lang.IndexOutOfBoundsException + { + _treeList.addElement(vTree); + } //-- void addTree(jalview.schemabinding.version2.Tree) + + /** + * Method addTree + * + * + * + * @param index + * @param vTree + */ + public void addTree(int index, jalview.schemabinding.version2.Tree vTree) + throws java.lang.IndexOutOfBoundsException + { + _treeList.insertElementAt(vTree, index); + } //-- void addTree(int, jalview.schemabinding.version2.Tree) + + /** + * Method addUserColours + * + * + * + * @param vUserColours + */ + public void addUserColours(jalview.schemabinding.version2.UserColours vUserColours) + throws java.lang.IndexOutOfBoundsException + { + _userColoursList.addElement(vUserColours); + } //-- void addUserColours(jalview.schemabinding.version2.UserColours) + + /** + * Method addUserColours + * + * + * + * @param index + * @param vUserColours + */ + public void addUserColours(int index, jalview.schemabinding.version2.UserColours vUserColours) + throws java.lang.IndexOutOfBoundsException + { + _userColoursList.insertElementAt(vUserColours, index); + } //-- void addUserColours(int, jalview.schemabinding.version2.UserColours) + + /** + * Method addViewport + * + * + * + * @param vViewport + */ + public void addViewport(jalview.schemabinding.version2.Viewport vViewport) + throws java.lang.IndexOutOfBoundsException + { + _viewportList.addElement(vViewport); + } //-- void addViewport(jalview.schemabinding.version2.Viewport) + + /** + * Method addViewport + * + * + * + * @param index + * @param vViewport + */ + public void addViewport(int index, jalview.schemabinding.version2.Viewport vViewport) + throws java.lang.IndexOutOfBoundsException + { + _viewportList.insertElementAt(vViewport, index); + } //-- void addViewport(int, jalview.schemabinding.version2.Viewport) + + /** + * Method enumerateJGroup + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateJGroup() + { + return _JGroupList.elements(); + } //-- java.util.Enumeration enumerateJGroup() + + /** + * Method enumerateJSeq + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateJSeq() + { + return _JSeqList.elements(); + } //-- java.util.Enumeration enumerateJSeq() + + /** + * Method enumerateTree + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateTree() + { + return _treeList.elements(); + } //-- java.util.Enumeration enumerateTree() + + /** + * Method enumerateUserColours + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateUserColours() + { + return _userColoursList.elements(); + } //-- java.util.Enumeration enumerateUserColours() + + /** + * Method enumerateViewport + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateViewport() + { + return _viewportList.elements(); + } //-- java.util.Enumeration enumerateViewport() + + /** + * Returns the value of field 'featureSettings'. + * + * @return FeatureSettings + * @return the value of field 'featureSettings'. + */ + public jalview.schemabinding.version2.FeatureSettings getFeatureSettings() + { + return this._featureSettings; + } //-- jalview.schemabinding.version2.FeatureSettings getFeatureSettings() + + /** + * Method getJGroup + * + * + * + * @param index + * @return JGroup + */ + public jalview.schemabinding.version2.JGroup getJGroup(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _JGroupList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.JGroup) _JGroupList.elementAt(index); + } //-- jalview.schemabinding.version2.JGroup getJGroup(int) + + /** + * Method getJGroup + * + * + * + * @return JGroup + */ + public jalview.schemabinding.version2.JGroup[] getJGroup() + { + int size = _JGroupList.size(); + jalview.schemabinding.version2.JGroup[] mArray = new jalview.schemabinding.version2.JGroup[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.JGroup) _JGroupList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.JGroup[] getJGroup() + + /** + * Method getJGroupCount + * + * + * + * @return int + */ + public int getJGroupCount() + { + return _JGroupList.size(); + } //-- int getJGroupCount() + + /** + * Method getJSeq + * + * + * + * @param index + * @return JSeq + */ + public jalview.schemabinding.version2.JSeq getJSeq(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _JSeqList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.JSeq) _JSeqList.elementAt(index); + } //-- jalview.schemabinding.version2.JSeq getJSeq(int) + + /** + * Method getJSeq + * + * + * + * @return JSeq + */ + public jalview.schemabinding.version2.JSeq[] getJSeq() + { + int size = _JSeqList.size(); + jalview.schemabinding.version2.JSeq[] mArray = new jalview.schemabinding.version2.JSeq[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.JSeq) _JSeqList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.JSeq[] getJSeq() + + /** + * Method getJSeqCount + * + * + * + * @return int + */ + public int getJSeqCount() + { + return _JSeqList.size(); + } //-- int getJSeqCount() + + /** + * Method getTree + * + * + * + * @param index + * @return Tree + */ + public jalview.schemabinding.version2.Tree getTree(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _treeList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.Tree) _treeList.elementAt(index); + } //-- jalview.schemabinding.version2.Tree getTree(int) + + /** + * Method getTree + * + * + * + * @return Tree + */ + public jalview.schemabinding.version2.Tree[] getTree() + { + int size = _treeList.size(); + jalview.schemabinding.version2.Tree[] mArray = new jalview.schemabinding.version2.Tree[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.Tree) _treeList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.Tree[] getTree() + + /** + * Method getTreeCount + * + * + * + * @return int + */ + public int getTreeCount() + { + return _treeList.size(); + } //-- int getTreeCount() + + /** + * Method getUserColours + * + * + * + * @param index + * @return UserColours + */ + public jalview.schemabinding.version2.UserColours getUserColours(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _userColoursList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.UserColours) _userColoursList.elementAt(index); + } //-- jalview.schemabinding.version2.UserColours getUserColours(int) + + /** + * Method getUserColours + * + * + * + * @return UserColours + */ + public jalview.schemabinding.version2.UserColours[] getUserColours() + { + int size = _userColoursList.size(); + jalview.schemabinding.version2.UserColours[] mArray = new jalview.schemabinding.version2.UserColours[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.UserColours) _userColoursList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.UserColours[] getUserColours() + + /** + * Method getUserColoursCount + * + * + * + * @return int + */ + public int getUserColoursCount() + { + return _userColoursList.size(); + } //-- int getUserColoursCount() + + /** + * Method getViewport + * + * + * + * @param index + * @return Viewport + */ + public jalview.schemabinding.version2.Viewport getViewport(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _viewportList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.Viewport) _viewportList.elementAt(index); + } //-- jalview.schemabinding.version2.Viewport getViewport(int) + + /** + * Method getViewport + * + * + * + * @return Viewport + */ + public jalview.schemabinding.version2.Viewport[] getViewport() + { + int size = _viewportList.size(); + jalview.schemabinding.version2.Viewport[] mArray = new jalview.schemabinding.version2.Viewport[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.Viewport) _viewportList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.Viewport[] getViewport() + + /** + * Method getViewportCount + * + * + * + * @return int + */ + public int getViewportCount() + { + return _viewportList.size(); + } //-- int getViewportCount() + + /** + * 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 removeAllJGroup + * + */ + public void removeAllJGroup() + { + _JGroupList.removeAllElements(); + } //-- void removeAllJGroup() + + /** + * Method removeAllJSeq + * + */ + public void removeAllJSeq() + { + _JSeqList.removeAllElements(); + } //-- void removeAllJSeq() + + /** + * Method removeAllTree + * + */ + public void removeAllTree() + { + _treeList.removeAllElements(); + } //-- void removeAllTree() + + /** + * Method removeAllUserColours + * + */ + public void removeAllUserColours() + { + _userColoursList.removeAllElements(); + } //-- void removeAllUserColours() + + /** + * Method removeAllViewport + * + */ + public void removeAllViewport() + { + _viewportList.removeAllElements(); + } //-- void removeAllViewport() + + /** + * Method removeJGroup + * + * + * + * @param index + * @return JGroup + */ + public jalview.schemabinding.version2.JGroup removeJGroup(int index) + { + java.lang.Object obj = _JGroupList.elementAt(index); + _JGroupList.removeElementAt(index); + return (jalview.schemabinding.version2.JGroup) obj; + } //-- jalview.schemabinding.version2.JGroup removeJGroup(int) + + /** + * Method removeJSeq + * + * + * + * @param index + * @return JSeq + */ + public jalview.schemabinding.version2.JSeq removeJSeq(int index) + { + java.lang.Object obj = _JSeqList.elementAt(index); + _JSeqList.removeElementAt(index); + return (jalview.schemabinding.version2.JSeq) obj; + } //-- jalview.schemabinding.version2.JSeq removeJSeq(int) + + /** + * Method removeTree + * + * + * + * @param index + * @return Tree + */ + public jalview.schemabinding.version2.Tree removeTree(int index) + { + java.lang.Object obj = _treeList.elementAt(index); + _treeList.removeElementAt(index); + return (jalview.schemabinding.version2.Tree) obj; + } //-- jalview.schemabinding.version2.Tree removeTree(int) + + /** + * Method removeUserColours + * + * + * + * @param index + * @return UserColours + */ + public jalview.schemabinding.version2.UserColours removeUserColours(int index) + { + java.lang.Object obj = _userColoursList.elementAt(index); + _userColoursList.removeElementAt(index); + return (jalview.schemabinding.version2.UserColours) obj; + } //-- jalview.schemabinding.version2.UserColours removeUserColours(int) + + /** + * Method removeViewport + * + * + * + * @param index + * @return Viewport + */ + public jalview.schemabinding.version2.Viewport removeViewport(int index) + { + java.lang.Object obj = _viewportList.elementAt(index); + _viewportList.removeElementAt(index); + return (jalview.schemabinding.version2.Viewport) obj; + } //-- jalview.schemabinding.version2.Viewport removeViewport(int) + + /** + * Sets the value of field 'featureSettings'. + * + * @param featureSettings the value of field 'featureSettings'. + */ + public void setFeatureSettings(jalview.schemabinding.version2.FeatureSettings featureSettings) + { + this._featureSettings = featureSettings; + } //-- void setFeatureSettings(jalview.schemabinding.version2.FeatureSettings) + + /** + * Method setJGroup + * + * + * + * @param index + * @param vJGroup + */ + public void setJGroup(int index, jalview.schemabinding.version2.JGroup vJGroup) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _JGroupList.size())) { + throw new IndexOutOfBoundsException(); + } + _JGroupList.setElementAt(vJGroup, index); + } //-- void setJGroup(int, jalview.schemabinding.version2.JGroup) + + /** + * Method setJGroup + * + * + * + * @param JGroupArray + */ + public void setJGroup(jalview.schemabinding.version2.JGroup[] JGroupArray) + { + //-- copy array + _JGroupList.removeAllElements(); + for (int i = 0; i < JGroupArray.length; i++) { + _JGroupList.addElement(JGroupArray[i]); + } + } //-- void setJGroup(jalview.schemabinding.version2.JGroup) + + /** + * Method setJSeq + * + * + * + * @param index + * @param vJSeq + */ + public void setJSeq(int index, jalview.schemabinding.version2.JSeq vJSeq) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _JSeqList.size())) { + throw new IndexOutOfBoundsException(); + } + _JSeqList.setElementAt(vJSeq, index); + } //-- void setJSeq(int, jalview.schemabinding.version2.JSeq) + + /** + * Method setJSeq + * + * + * + * @param JSeqArray + */ + public void setJSeq(jalview.schemabinding.version2.JSeq[] JSeqArray) + { + //-- copy array + _JSeqList.removeAllElements(); + for (int i = 0; i < JSeqArray.length; i++) { + _JSeqList.addElement(JSeqArray[i]); + } + } //-- void setJSeq(jalview.schemabinding.version2.JSeq) + + /** + * Method setTree + * + * + * + * @param index + * @param vTree + */ + public void setTree(int index, jalview.schemabinding.version2.Tree vTree) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _treeList.size())) { + throw new IndexOutOfBoundsException(); + } + _treeList.setElementAt(vTree, index); + } //-- void setTree(int, jalview.schemabinding.version2.Tree) + + /** + * Method setTree + * + * + * + * @param treeArray + */ + public void setTree(jalview.schemabinding.version2.Tree[] treeArray) + { + //-- copy array + _treeList.removeAllElements(); + for (int i = 0; i < treeArray.length; i++) { + _treeList.addElement(treeArray[i]); + } + } //-- void setTree(jalview.schemabinding.version2.Tree) + + /** + * Method setUserColours + * + * + * + * @param index + * @param vUserColours + */ + public void setUserColours(int index, jalview.schemabinding.version2.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.schemabinding.version2.UserColours) + + /** + * Method setUserColours + * + * + * + * @param userColoursArray + */ + public void setUserColours(jalview.schemabinding.version2.UserColours[] userColoursArray) + { + //-- copy array + _userColoursList.removeAllElements(); + for (int i = 0; i < userColoursArray.length; i++) { + _userColoursList.addElement(userColoursArray[i]); + } + } //-- void setUserColours(jalview.schemabinding.version2.UserColours) + + /** + * Method setViewport + * + * + * + * @param index + * @param vViewport + */ + public void setViewport(int index, jalview.schemabinding.version2.Viewport vViewport) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _viewportList.size())) { + throw new IndexOutOfBoundsException(); + } + _viewportList.setElementAt(vViewport, index); + } //-- void setViewport(int, jalview.schemabinding.version2.Viewport) + + /** + * Method setViewport + * + * + * + * @param viewportArray + */ + public void setViewport(jalview.schemabinding.version2.Viewport[] viewportArray) + { + //-- copy array + _viewportList.removeAllElements(); + for (int i = 0; i < viewportArray.length; i++) { + _viewportList.addElement(viewportArray[i]); + } + } //-- void setViewport(jalview.schemabinding.version2.Viewport) + + /** + * 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.JalviewModelSequence) Unmarshaller.unmarshal(jalview.schemabinding.version2.JalviewModelSequence.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/schemabinding/version2/JalviewModelSequenceDescriptor.java b/src/jalview/schemabinding/version2/JalviewModelSequenceDescriptor.java index 557b8fe..7f5bd43 100755 --- a/src/jalview/schemabinding/version2/JalviewModelSequenceDescriptor.java +++ b/src/jalview/schemabinding/version2/JalviewModelSequenceDescriptor.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,424 +7,377 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; /** * Class JalviewModelSequenceDescriptor. - * + * * @version $Revision$ $Date$ */ -public class JalviewModelSequenceDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public JalviewModelSequenceDescriptor() - { - super(); - nsURI = "www.jalview.org"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- initialize element descriptors - - //-- _JSeqList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.JSeq.class, "_JSeqList", "JSeq", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JalviewModelSequence target = (JalviewModelSequence) object; - return target.getJSeq(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JalviewModelSequence target = (JalviewModelSequence) object; - target.addJSeq( (jalview.schemabinding.version2.JSeq) value); +public class JalviewModelSequenceDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JalviewModelSequenceDescriptor() { + super(); + nsURI = "www.jalview.org"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _JSeqList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.JSeq.class, "_JSeqList", "JSeq", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModelSequence target = (JalviewModelSequence) object; + return target.getJSeq(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.addJSeq( (jalview.schemabinding.version2.JSeq) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.JSeq(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _JSeqList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _JGroupList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.JGroup.class, "_JGroupList", "JGroup", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModelSequence target = (JalviewModelSequence) object; + return target.getJGroup(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.addJGroup( (jalview.schemabinding.version2.JGroup) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.JGroup(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _JGroupList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.JSeq(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setRequired(true); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _JSeqList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _JGroupList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.JGroup.class, "_JGroupList", "JGroup", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JalviewModelSequence target = (JalviewModelSequence) object; - return target.getJGroup(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JalviewModelSequence target = (JalviewModelSequence) object; - target.addJGroup( (jalview.schemabinding.version2.JGroup) value); + desc.setValidator(fieldValidator); + //-- _viewportList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Viewport.class, "_viewportList", "Viewport", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModelSequence target = (JalviewModelSequence) object; + return target.getViewport(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.addViewport( (jalview.schemabinding.version2.Viewport) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.Viewport(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _viewportList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _userColoursList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.UserColours.class, "_userColoursList", "UserColours", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModelSequence target = (JalviewModelSequence) object; + return target.getUserColours(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.addUserColours( (jalview.schemabinding.version2.UserColours) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.UserColours(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _userColoursList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.JGroup(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _JGroupList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _viewportList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.Viewport.class, "_viewportList", "Viewport", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JalviewModelSequence target = (JalviewModelSequence) object; - return target.getViewport(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JalviewModelSequence target = (JalviewModelSequence) object; - target.addViewport( (jalview.schemabinding.version2.Viewport) value); + desc.setValidator(fieldValidator); + //-- _treeList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Tree.class, "_treeList", "tree", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModelSequence target = (JalviewModelSequence) object; + return target.getTree(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.addTree( (jalview.schemabinding.version2.Tree) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.Tree(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _treeList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _featureSettings + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.FeatureSettings.class, "_featureSettings", "FeatureSettings", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModelSequence target = (JalviewModelSequence) object; + return target.getFeatureSettings(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.setFeatureSettings( (jalview.schemabinding.version2.FeatureSettings) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.FeatureSettings(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _featureSettings + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.Viewport(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setRequired(true); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _viewportList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _userColoursList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.UserColours.class, "_userColoursList", - "UserColours", org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.JalviewModelSequenceDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JalviewModelSequence target = (JalviewModelSequence) object; - return target.getUserColours(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JalviewModelSequence target = (JalviewModelSequence) object; - target.addUserColours( (jalview.schemabinding.version2.UserColours) - value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.UserColours(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _userColoursList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _treeList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.Tree.class, "_treeList", "tree", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JalviewModelSequence target = (JalviewModelSequence) object; - return target.getTree(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JalviewModelSequence target = (JalviewModelSequence) object; - target.addTree( (jalview.schemabinding.version2.Tree) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.Tree(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _treeList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _featureSettings - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.FeatureSettings.class, "_featureSettings", - "FeatureSettings", org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JalviewModelSequence target = (JalviewModelSequence) object; - return target.getFeatureSettings(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JalviewModelSequence target = (JalviewModelSequence) object; - target.setFeatureSettings( (jalview.schemabinding.version2. - FeatureSettings) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.FeatureSettings(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _featureSettings - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.JalviewModelSequenceDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.JalviewModelSequence.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.JalviewModelSequence.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/JalviewUserColours.java b/src/jalview/schemabinding/version2/JalviewUserColours.java index 5b4fb76..7963596 100755 --- a/src/jalview/schemabinding/version2/JalviewUserColours.java +++ b/src/jalview/schemabinding/version2/JalviewUserColours.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,302 +7,294 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import java.util.*; -import org.exolab.castor.xml.*; +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 JalviewUserColours. - * + * * @version $Revision$ $Date$ */ -public class JalviewUserColours - implements java.io.Serializable -{ +public class JalviewUserColours implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - /** - * Field _schemeName - */ - private java.lang.String _schemeName; + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ - /** - * Field _colourList - */ - private java.util.Vector _colourList; + /** + * Field _schemeName + */ + private java.lang.String _schemeName; - //----------------/ - //- Constructors -/ - //----------------/ + /** + * Field _colourList + */ + private java.util.Vector _colourList; - public JalviewUserColours() - { - super(); - _colourList = new Vector(); - } //-- jalview.schemabinding.version2.JalviewUserColours() - //-----------/ - //- Methods -/ - //-----------/ + //----------------/ + //- Constructors -/ + //----------------/ - /** - * Method addColour - * - * - * - * @param vColour - */ - public void addColour(jalview.schemabinding.version2.Colour vColour) - throws java.lang.IndexOutOfBoundsException - { - _colourList.addElement(vColour); - } //-- void addColour(jalview.schemabinding.version2.Colour) + public JalviewUserColours() { + super(); + _colourList = new Vector(); + } //-- jalview.schemabinding.version2.JalviewUserColours() - /** - * Method addColour - * - * - * - * @param index - * @param vColour - */ - public void addColour(int index, - jalview.schemabinding.version2.Colour vColour) - throws java.lang.IndexOutOfBoundsException - { - _colourList.insertElementAt(vColour, index); - } //-- void addColour(int, jalview.schemabinding.version2.Colour) - /** - * Method enumerateColour - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateColour() - { - return _colourList.elements(); - } //-- java.util.Enumeration enumerateColour() + //-----------/ + //- Methods -/ + //-----------/ - /** - * Method getColour - * - * - * - * @param index - * @return Colour - */ - public jalview.schemabinding.version2.Colour getColour(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _colourList.size())) + /** + * Method addColour + * + * + * + * @param vColour + */ + public void addColour(jalview.schemabinding.version2.Colour vColour) + throws java.lang.IndexOutOfBoundsException { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.Colour) _colourList.elementAt(index); - } //-- jalview.schemabinding.version2.Colour getColour(int) - - /** - * Method getColour - * - * - * - * @return Colour - */ - public jalview.schemabinding.version2.Colour[] getColour() - { - int size = _colourList.size(); - jalview.schemabinding.version2.Colour[] mArray = new jalview.schemabinding. - version2.Colour[size]; - for (int index = 0; index < size; index++) + _colourList.addElement(vColour); + } //-- void addColour(jalview.schemabinding.version2.Colour) + + /** + * Method addColour + * + * + * + * @param index + * @param vColour + */ + public void addColour(int index, jalview.schemabinding.version2.Colour vColour) + throws java.lang.IndexOutOfBoundsException { - mArray[index] = (jalview.schemabinding.version2.Colour) _colourList. - elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Colour[] getColour() - - /** - * Method getColourCount - * - * - * - * @return int - */ - public int getColourCount() - { - return _colourList.size(); - } //-- int getColourCount() - - /** - * Returns the value of field 'schemeName'. - * - * @return String - * @return the value of field 'schemeName'. - */ - public java.lang.String getSchemeName() - { - return this._schemeName; - } //-- java.lang.String getSchemeName() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try + _colourList.insertElementAt(vColour, index); + } //-- void addColour(int, jalview.schemabinding.version2.Colour) + + /** + * Method enumerateColour + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateColour() { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return _colourList.elements(); + } //-- java.util.Enumeration enumerateColour() + + /** + * Method getColour + * + * + * + * @param index + * @return Colour + */ + public jalview.schemabinding.version2.Colour getColour(int index) + throws java.lang.IndexOutOfBoundsException { - 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 removeAllColour - * - */ - public void removeAllColour() - { - _colourList.removeAllElements(); - } //-- void removeAllColour() - - /** - * Method removeColour - * - * - * - * @param index - * @return Colour - */ - public jalview.schemabinding.version2.Colour removeColour(int index) - { - java.lang.Object obj = _colourList.elementAt(index); - _colourList.removeElementAt(index); - return (jalview.schemabinding.version2.Colour) obj; - } //-- jalview.schemabinding.version2.Colour removeColour(int) - - /** - * Method setColour - * - * - * - * @param index - * @param vColour - */ - public void setColour(int index, - jalview.schemabinding.version2.Colour vColour) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _colourList.size())) + //-- check bounds for index + if ((index < 0) || (index > _colourList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.Colour) _colourList.elementAt(index); + } //-- jalview.schemabinding.version2.Colour getColour(int) + + /** + * Method getColour + * + * + * + * @return Colour + */ + public jalview.schemabinding.version2.Colour[] getColour() { - throw new IndexOutOfBoundsException(); - } - _colourList.setElementAt(vColour, index); - } //-- void setColour(int, jalview.schemabinding.version2.Colour) - - /** - * Method setColour - * - * - * - * @param colourArray - */ - public void setColour(jalview.schemabinding.version2.Colour[] colourArray) - { - //-- copy array - _colourList.removeAllElements(); - for (int i = 0; i < colourArray.length; i++) + int size = _colourList.size(); + jalview.schemabinding.version2.Colour[] mArray = new jalview.schemabinding.version2.Colour[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.Colour) _colourList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.Colour[] getColour() + + /** + * Method getColourCount + * + * + * + * @return int + */ + public int getColourCount() { - _colourList.addElement(colourArray[i]); - } - } //-- void setColour(jalview.schemabinding.version2.Colour) - - /** - * Sets the value of field 'schemeName'. - * - * @param schemeName the value of field 'schemeName'. - */ - public void setSchemeName(java.lang.String schemeName) - { - this._schemeName = schemeName; - } //-- void setSchemeName(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.JalviewUserColours) Unmarshaller. - unmarshal(jalview.schemabinding.version2.JalviewUserColours.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() + return _colourList.size(); + } //-- int getColourCount() + + /** + * Returns the value of field 'schemeName'. + * + * @return String + * @return the value of field 'schemeName'. + */ + public java.lang.String getSchemeName() + { + return this._schemeName; + } //-- java.lang.String getSchemeName() + + /** + * 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 removeAllColour + * + */ + public void removeAllColour() + { + _colourList.removeAllElements(); + } //-- void removeAllColour() + + /** + * Method removeColour + * + * + * + * @param index + * @return Colour + */ + public jalview.schemabinding.version2.Colour removeColour(int index) + { + java.lang.Object obj = _colourList.elementAt(index); + _colourList.removeElementAt(index); + return (jalview.schemabinding.version2.Colour) obj; + } //-- jalview.schemabinding.version2.Colour removeColour(int) + + /** + * Method setColour + * + * + * + * @param index + * @param vColour + */ + public void setColour(int index, jalview.schemabinding.version2.Colour vColour) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _colourList.size())) { + throw new IndexOutOfBoundsException(); + } + _colourList.setElementAt(vColour, index); + } //-- void setColour(int, jalview.schemabinding.version2.Colour) + + /** + * Method setColour + * + * + * + * @param colourArray + */ + public void setColour(jalview.schemabinding.version2.Colour[] colourArray) + { + //-- copy array + _colourList.removeAllElements(); + for (int i = 0; i < colourArray.length; i++) { + _colourList.addElement(colourArray[i]); + } + } //-- void setColour(jalview.schemabinding.version2.Colour) + + /** + * Sets the value of field 'schemeName'. + * + * @param schemeName the value of field 'schemeName'. + */ + public void setSchemeName(java.lang.String schemeName) + { + this._schemeName = schemeName; + } //-- void setSchemeName(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.JalviewUserColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.JalviewUserColours.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/schemabinding/version2/JalviewUserColoursDescriptor.java b/src/jalview/schemabinding/version2/JalviewUserColoursDescriptor.java index b726902..661d102 100755 --- a/src/jalview/schemabinding/version2/JalviewUserColoursDescriptor.java +++ b/src/jalview/schemabinding/version2/JalviewUserColoursDescriptor.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,251 +7,238 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class JalviewUserColoursDescriptor. - * + * * @version $Revision$ $Date$ */ -public class JalviewUserColoursDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public JalviewUserColoursDescriptor() - { - super(); - nsURI = "www.jalview.org/colours"; - xmlName = "JalviewUserColours"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _schemeName - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_schemeName", "schemeName", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JalviewUserColours target = (JalviewUserColours) object; - return target.getSchemeName(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JalviewUserColours target = (JalviewUserColours) object; - target.setSchemeName( (java.lang.String) value); +public class JalviewUserColoursDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JalviewUserColoursDescriptor() { + super(); + nsURI = "www.jalview.org/colours"; + xmlName = "JalviewUserColours"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _schemeName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_schemeName", "schemeName", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewUserColours target = (JalviewUserColours) object; + return target.getSchemeName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewUserColours target = (JalviewUserColours) object; + target.setSchemeName( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _schemeName + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _colourList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Colour.class, "_colourList", "colour", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewUserColours target = (JalviewUserColours) object; + return target.getColour(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewUserColours target = (JalviewUserColours) object; + target.addColour( (jalview.schemabinding.version2.Colour) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.Colour(); + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _colourList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.JalviewUserColoursDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _schemeName - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _colourList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.Colour.class, "_colourList", "colour", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - JalviewUserColours target = (JalviewUserColours) object; - return target.getColour(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JalviewUserColours target = (JalviewUserColours) object; - target.addColour( (jalview.schemabinding.version2.Colour) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.Colour(); - } - }); - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _colourList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.JalviewUserColoursDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.JalviewUserColours.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.JalviewUserColours.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/OtherData.java b/src/jalview/schemabinding/version2/OtherData.java index 7bf72de..47423eb 100644 --- a/src/jalview/schemabinding/version2/OtherData.java +++ b/src/jalview/schemabinding/version2/OtherData.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,166 +7,167 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 OtherData. - * + * * @version $Revision$ $Date$ */ -public class OtherData - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _key - */ - private java.lang.String _key; - - /** - * Field _value - */ - private java.lang.String _value; - - //----------------/ - //- Constructors -/ - //----------------/ - - public OtherData() - { - super(); - } //-- jalview.schemabinding.version2.OtherData() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Returns the value of field 'key'. - * - * @return String - * @return the value of field 'key'. - */ - public java.lang.String getKey() - { - return this._key; - } //-- java.lang.String getKey() - - /** - * Returns the value of field 'value'. - * - * @return String - * @return the value of field 'value'. - */ - public java.lang.String getValue() - { - return this._value; - } //-- java.lang.String getValue() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try +public class OtherData implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _key + */ + private java.lang.String _key; + + /** + * Field _value + */ + private java.lang.String _value; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public OtherData() { + super(); + } //-- jalview.schemabinding.version2.OtherData() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'key'. + * + * @return String + * @return the value of field 'key'. + */ + public java.lang.String getKey() + { + return this._key; + } //-- java.lang.String getKey() + + /** + * Returns the value of field 'value'. + * + * @return String + * @return the value of field 'value'. + */ + public java.lang.String getValue() + { + return this._value; + } //-- java.lang.String getValue() + + /** + * 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 'key'. + * + * @param key the value of field 'key'. + */ + public void setKey(java.lang.String key) + { + this._key = key; + } //-- void setKey(java.lang.String) + + /** + * Sets the value of field 'value'. + * + * @param value the value of field 'value'. + */ + public void setValue(java.lang.String value) + { + this._value = value; + } //-- void setValue(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 { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return (jalview.schemabinding.version2.OtherData) Unmarshaller.unmarshal(jalview.schemabinding.version2.OtherData.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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) - - /** - * Sets the value of field 'key'. - * - * @param key the value of field 'key'. - */ - public void setKey(java.lang.String key) - { - this._key = key; - } //-- void setKey(java.lang.String) - - /** - * Sets the value of field 'value'. - * - * @param value the value of field 'value'. - */ - public void setValue(java.lang.String value) - { - this._value = value; - } //-- void setValue(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.OtherData) Unmarshaller.unmarshal( - jalview.schemabinding.version2.OtherData.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/OtherDataDescriptor.java b/src/jalview/schemabinding/version2/OtherDataDescriptor.java index f39c05d..f6ec794 100644 --- a/src/jalview/schemabinding/version2/OtherDataDescriptor.java +++ b/src/jalview/schemabinding/version2/OtherDataDescriptor.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,252 +7,240 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class OtherDataDescriptor. - * + * * @version $Revision$ $Date$ */ -public class OtherDataDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public OtherDataDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "otherData"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _key - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_key", "key", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - OtherData target = (OtherData) object; - return target.getKey(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - OtherData target = (OtherData) object; - target.setKey( (java.lang.String) value); +public class OtherDataDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public OtherDataDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "otherData"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _key + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_key", "key", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + OtherData target = (OtherData) object; + return target.getKey(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + OtherData target = (OtherData) object; + target.setKey( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _key + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + OtherData target = (OtherData) object; + return target.getValue(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + OtherData target = (OtherData) object; + target.setValue( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _value + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- jalview.schemabinding.version2.OtherDataDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _key - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _value - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_value", "value", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - OtherData target = (OtherData) object; - return target.getValue(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - OtherData target = (OtherData) object; - target.setValue( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _value - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- jalview.schemabinding.version2.OtherDataDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.OtherData.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.OtherData.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/Pdbentry.java b/src/jalview/schemabinding/version2/Pdbentry.java index f4fa4fe..93c2748 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,358 +7,346 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import java.util.*; -import org.exolab.castor.xml.*; +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 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())) +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) { - 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++) + 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 { - 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 + //-- 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) { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + //-- 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) { - 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())) + 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 { - 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++) + 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 { - _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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/PdbentryDescriptor.java b/src/jalview/schemabinding/version2/PdbentryDescriptor.java index e6fa0e1..61a9eda 100755 --- a/src/jalview/schemabinding/version2/PdbentryDescriptor.java +++ b/src/jalview/schemabinding/version2/PdbentryDescriptor.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,337 +7,309 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class PdbentryDescriptor. - * + * * @version $Revision$ $Date$ */ -public class PdbentryDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public PdbentryDescriptor() - { - super(); - xmlName = "pdbentry"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _id - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Pdbentry target = (Pdbentry) object; - return target.getId(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Pdbentry target = (Pdbentry) object; - target.setId( (java.lang.String) value); +public class PdbentryDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PdbentryDescriptor() { + super(); + xmlName = "pdbentry"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Pdbentry target = (Pdbentry) object; + return target.getId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Pdbentry target = (Pdbentry) object; + target.setId( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _id + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Pdbentry target = (Pdbentry) object; + return target.getType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Pdbentry target = (Pdbentry) object; + target.setType( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _id - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _type - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Pdbentry target = (Pdbentry) object; - return target.getType(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Pdbentry target = (Pdbentry) object; - target.setType( (java.lang.String) value); + desc.setValidator(fieldValidator); + //-- _file + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_file", "file", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Pdbentry target = (Pdbentry) object; + return target.getFile(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Pdbentry target = (Pdbentry) object; + target.setFile( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _file + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _items + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.PdbentryItem.class, "_items", (String)null, org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Pdbentry target = (Pdbentry) object; + return target.getPdbentryItem(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Pdbentry target = (Pdbentry) object; + target.addPdbentryItem( (jalview.schemabinding.version2.PdbentryItem) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.PdbentryItem(); + } + } ); + desc.setHandler(handler); + desc.setContainer(true); + desc.setClassDescriptor(new jalview.schemabinding.version2.PdbentryItemDescriptor()); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _items + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.PdbentryDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _type - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _file - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_file", "file", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Pdbentry target = (Pdbentry) object; - return target.getFile(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Pdbentry target = (Pdbentry) object; - target.setFile( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _file - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _items - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.PdbentryItem.class, "_items", (String)null, - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Pdbentry target = (Pdbentry) object; - return target.getPdbentryItem(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Pdbentry target = (Pdbentry) object; - target.addPdbentryItem( (jalview.schemabinding.version2.PdbentryItem) - value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.PdbentryItem(); - } - }); - desc.setHandler(handler); - desc.setContainer(true); - desc.setClassDescriptor(new jalview.schemabinding.version2. - PdbentryItemDescriptor()); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _items - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.PdbentryDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.Pdbentry.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.Pdbentry.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/PdbentryItem.java b/src/jalview/schemabinding/version2/PdbentryItem.java index 527f5ab..6f64036 100755 --- a/src/jalview/schemabinding/version2/PdbentryItem.java +++ b/src/jalview/schemabinding/version2/PdbentryItem.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,197 +7,191 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import java.util.*; +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 PdbentryItem. - * + * * @version $Revision$ $Date$ */ -public class PdbentryItem - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _propertyList - */ - private java.util.Vector _propertyList; - - //----------------/ - //- Constructors -/ - //----------------/ - - public PdbentryItem() - { - super(); - _propertyList = new Vector(); - } //-- jalview.schemabinding.version2.PdbentryItem() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method addProperty - * - * - * - * @param vProperty - */ - public void addProperty(jalview.schemabinding.version2.Property vProperty) - throws java.lang.IndexOutOfBoundsException - { - _propertyList.addElement(vProperty); - } //-- void addProperty(jalview.schemabinding.version2.Property) - - /** - * Method addProperty - * - * - * - * @param index - * @param vProperty - */ - public void addProperty(int index, - jalview.schemabinding.version2.Property vProperty) - throws java.lang.IndexOutOfBoundsException - { - _propertyList.insertElementAt(vProperty, index); - } //-- void addProperty(int, jalview.schemabinding.version2.Property) - - /** - * Method enumerateProperty - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateProperty() - { - return _propertyList.elements(); - } //-- java.util.Enumeration enumerateProperty() - - /** - * Method getProperty - * - * - * - * @param index - * @return Property - */ - public jalview.schemabinding.version2.Property getProperty(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _propertyList.size())) +public class PdbentryItem implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _propertyList + */ + private java.util.Vector _propertyList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PdbentryItem() { + super(); + _propertyList = new Vector(); + } //-- jalview.schemabinding.version2.PdbentryItem() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addProperty + * + * + * + * @param vProperty + */ + public void addProperty(jalview.schemabinding.version2.Property vProperty) + throws java.lang.IndexOutOfBoundsException + { + _propertyList.addElement(vProperty); + } //-- void addProperty(jalview.schemabinding.version2.Property) + + /** + * Method addProperty + * + * + * + * @param index + * @param vProperty + */ + public void addProperty(int index, jalview.schemabinding.version2.Property vProperty) + throws java.lang.IndexOutOfBoundsException + { + _propertyList.insertElementAt(vProperty, index); + } //-- void addProperty(int, jalview.schemabinding.version2.Property) + + /** + * Method enumerateProperty + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateProperty() + { + return _propertyList.elements(); + } //-- java.util.Enumeration enumerateProperty() + + /** + * Method getProperty + * + * + * + * @param index + * @return Property + */ + public jalview.schemabinding.version2.Property getProperty(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _propertyList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.Property) _propertyList.elementAt(index); + } //-- jalview.schemabinding.version2.Property getProperty(int) + + /** + * Method getProperty + * + * + * + * @return Property + */ + public jalview.schemabinding.version2.Property[] getProperty() + { + int size = _propertyList.size(); + jalview.schemabinding.version2.Property[] mArray = new jalview.schemabinding.version2.Property[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.Property) _propertyList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.Property[] getProperty() + + /** + * Method getPropertyCount + * + * + * + * @return int + */ + public int getPropertyCount() + { + return _propertyList.size(); + } //-- int getPropertyCount() + + /** + * Method removeAllProperty + * + */ + public void removeAllProperty() { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.Property) _propertyList.elementAt( - index); - } //-- jalview.schemabinding.version2.Property getProperty(int) - - /** - * Method getProperty - * - * - * - * @return Property - */ - public jalview.schemabinding.version2.Property[] getProperty() - { - int size = _propertyList.size(); - jalview.schemabinding.version2.Property[] mArray = new jalview. - schemabinding.version2.Property[size]; - for (int index = 0; index < size; index++) + _propertyList.removeAllElements(); + } //-- void removeAllProperty() + + /** + * Method removeProperty + * + * + * + * @param index + * @return Property + */ + public jalview.schemabinding.version2.Property removeProperty(int index) { - mArray[index] = (jalview.schemabinding.version2.Property) _propertyList. - elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Property[] getProperty() - - /** - * Method getPropertyCount - * - * - * - * @return int - */ - public int getPropertyCount() - { - return _propertyList.size(); - } //-- int getPropertyCount() - - /** - * Method removeAllProperty - * - */ - public void removeAllProperty() - { - _propertyList.removeAllElements(); - } //-- void removeAllProperty() - - /** - * Method removeProperty - * - * - * - * @param index - * @return Property - */ - public jalview.schemabinding.version2.Property removeProperty(int index) - { - java.lang.Object obj = _propertyList.elementAt(index); - _propertyList.removeElementAt(index); - return (jalview.schemabinding.version2.Property) obj; - } //-- jalview.schemabinding.version2.Property removeProperty(int) - - /** - * Method setProperty - * - * - * - * @param index - * @param vProperty - */ - public void setProperty(int index, - jalview.schemabinding.version2.Property vProperty) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _propertyList.size())) + java.lang.Object obj = _propertyList.elementAt(index); + _propertyList.removeElementAt(index); + return (jalview.schemabinding.version2.Property) obj; + } //-- jalview.schemabinding.version2.Property removeProperty(int) + + /** + * Method setProperty + * + * + * + * @param index + * @param vProperty + */ + public void setProperty(int index, jalview.schemabinding.version2.Property vProperty) + throws java.lang.IndexOutOfBoundsException { - throw new IndexOutOfBoundsException(); - } - _propertyList.setElementAt(vProperty, index); - } //-- void setProperty(int, jalview.schemabinding.version2.Property) - - /** - * Method setProperty - * - * - * - * @param propertyArray - */ - public void setProperty(jalview.schemabinding.version2.Property[] - propertyArray) - { - //-- copy array - _propertyList.removeAllElements(); - for (int i = 0; i < propertyArray.length; i++) + //-- check bounds for index + if ((index < 0) || (index > _propertyList.size())) { + throw new IndexOutOfBoundsException(); + } + _propertyList.setElementAt(vProperty, index); + } //-- void setProperty(int, jalview.schemabinding.version2.Property) + + /** + * Method setProperty + * + * + * + * @param propertyArray + */ + public void setProperty(jalview.schemabinding.version2.Property[] propertyArray) { - _propertyList.addElement(propertyArray[i]); - } - } //-- void setProperty(jalview.schemabinding.version2.Property) + //-- copy array + _propertyList.removeAllElements(); + for (int i = 0; i < propertyArray.length; i++) { + _propertyList.addElement(propertyArray[i]); + } + } //-- void setProperty(jalview.schemabinding.version2.Property) } diff --git a/src/jalview/schemabinding/version2/PdbentryItemDescriptor.java b/src/jalview/schemabinding/version2/PdbentryItemDescriptor.java index 7c1b0d4..d9d36c0 100755 --- a/src/jalview/schemabinding/version2/PdbentryItemDescriptor.java +++ b/src/jalview/schemabinding/version2/PdbentryItemDescriptor.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,207 +7,202 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; /** * Class PdbentryItemDescriptor. - * + * * @version $Revision$ $Date$ */ -public class PdbentryItemDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public PdbentryItemDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "pdbentry"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- initialize element descriptors - - //-- _propertyList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.Property.class, "_propertyList", "property", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - PdbentryItem target = (PdbentryItem) object; - return target.getProperty(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - PdbentryItem target = (PdbentryItem) object; - target.addProperty( (jalview.schemabinding.version2.Property) value); +public class PdbentryItemDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PdbentryItemDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "pdbentry"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _propertyList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + PdbentryItem target = (PdbentryItem) object; + return target.getProperty(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + PdbentryItem target = (PdbentryItem) object; + target.addProperty( (jalview.schemabinding.version2.Property) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.Property(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _propertyList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.Property(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _propertyList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.PdbentryItemDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.PdbentryItem.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.PdbentryItemDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.PdbentryItem.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/Pdbids.java b/src/jalview/schemabinding/version2/Pdbids.java index 8625b88..347ff35 100755 --- a/src/jalview/schemabinding/version2/Pdbids.java +++ b/src/jalview/schemabinding/version2/Pdbids.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,110 +7,270 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 Pdbids. - * + * * @version $Revision$ $Date$ */ -public class Pdbids - extends Pdbentry implements java.io.Serializable +public class Pdbids extends jalview.schemabinding.version2.Pdbentry +implements java.io.Serializable { - //----------------/ - //- Constructors -/ - //----------------/ - - public Pdbids() - { - super(); - } //-- jalview.schemabinding.version2.Pdbids() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _structureStateList + */ + private java.util.Vector _structureStateList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Pdbids() { + super(); + _structureStateList = new Vector(); + } //-- jalview.schemabinding.version2.Pdbids() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addStructureState + * + * + * + * @param vStructureState + */ + public void addStructureState(jalview.schemabinding.version2.StructureState vStructureState) + throws java.lang.IndexOutOfBoundsException + { + _structureStateList.addElement(vStructureState); + } //-- void addStructureState(jalview.schemabinding.version2.StructureState) + + /** + * Method addStructureState + * + * + * + * @param index + * @param vStructureState + */ + public void addStructureState(int index, jalview.schemabinding.version2.StructureState vStructureState) + throws java.lang.IndexOutOfBoundsException + { + _structureStateList.insertElementAt(vStructureState, index); + } //-- void addStructureState(int, jalview.schemabinding.version2.StructureState) + + /** + * Method enumerateStructureState + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateStructureState() + { + return _structureStateList.elements(); + } //-- java.util.Enumeration enumerateStructureState() + + /** + * Method getStructureState + * + * + * + * @param index + * @return StructureState + */ + public jalview.schemabinding.version2.StructureState getStructureState(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _structureStateList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.StructureState) _structureStateList.elementAt(index); + } //-- jalview.schemabinding.version2.StructureState getStructureState(int) + + /** + * Method getStructureState + * + * + * + * @return StructureState + */ + public jalview.schemabinding.version2.StructureState[] getStructureState() + { + int size = _structureStateList.size(); + jalview.schemabinding.version2.StructureState[] mArray = new jalview.schemabinding.version2.StructureState[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.StructureState) _structureStateList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.StructureState[] getStructureState() + + /** + * Method getStructureStateCount + * + * + * + * @return int + */ + public int getStructureStateCount() + { + return _structureStateList.size(); + } //-- int getStructureStateCount() + + /** + * 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 removeAllStructureState + * + */ + public void removeAllStructureState() { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + _structureStateList.removeAllElements(); + } //-- void removeAllStructureState() + + /** + * Method removeStructureState + * + * + * + * @param index + * @return StructureState + */ + public jalview.schemabinding.version2.StructureState removeStructureState(int index) + { + java.lang.Object obj = _structureStateList.elementAt(index); + _structureStateList.removeElementAt(index); + return (jalview.schemabinding.version2.StructureState) obj; + } //-- jalview.schemabinding.version2.StructureState removeStructureState(int) + + /** + * Method setStructureState + * + * + * + * @param index + * @param vStructureState + */ + public void setStructureState(int index, jalview.schemabinding.version2.StructureState vStructureState) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _structureStateList.size())) { + throw new IndexOutOfBoundsException(); + } + _structureStateList.setElementAt(vStructureState, index); + } //-- void setStructureState(int, jalview.schemabinding.version2.StructureState) + + /** + * Method setStructureState + * + * + * + * @param structureStateArray + */ + public void setStructureState(jalview.schemabinding.version2.StructureState[] structureStateArray) + { + //-- copy array + _structureStateList.removeAllElements(); + for (int i = 0; i < structureStateArray.length; i++) { + _structureStateList.addElement(structureStateArray[i]); + } + } //-- void setStructureState(jalview.schemabinding.version2.StructureState) + + /** + * 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.Pdbids) Unmarshaller.unmarshal(jalview.schemabinding.version2.Pdbids.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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 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.Pdbids) Unmarshaller.unmarshal( - jalview.schemabinding.version2.Pdbids.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/PdbidsDescriptor.java b/src/jalview/schemabinding/version2/PdbidsDescriptor.java index 2d539c9..d96b776 100755 --- a/src/jalview/schemabinding/version2/PdbidsDescriptor.java +++ b/src/jalview/schemabinding/version2/PdbidsDescriptor.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,159 +7,205 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; /** * Class PdbidsDescriptor. - * + * * @version $Revision$ $Date$ */ -public class PdbidsDescriptor - extends PdbentryDescriptor -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public PdbidsDescriptor() - { - super(); - setExtendsWithoutFlatten(new PdbentryDescriptor()); - nsURI = "www.jalview.org"; - xmlName = "pdbids"; - } //-- jalview.schemabinding.version2.PdbidsDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return super.getExtends(); - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - if (identity == null) +public class PdbidsDescriptor extends jalview.schemabinding.version2.PdbentryDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PdbidsDescriptor() { + super(); + setExtendsWithoutFlatten(new jalview.schemabinding.version2.PdbentryDescriptor()); + nsURI = "www.jalview.org"; + xmlName = "pdbids"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _structureStateList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.StructureState.class, "_structureStateList", "structureState", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Pdbids target = (Pdbids) object; + return target.getStructureState(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Pdbids target = (Pdbids) object; + target.addStructureState( (jalview.schemabinding.version2.StructureState) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.StructureState(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _structureStateList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.PdbidsDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return super.getExtends(); + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + if (identity == null) + return super.getIdentity(); + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.Pdbids.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() { - return super.getIdentity(); - } - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.Pdbids.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/PdbidsItem.java b/src/jalview/schemabinding/version2/PdbidsItem.java new file mode 100644 index 0000000..0c5c10f --- /dev/null +++ b/src/jalview/schemabinding/version2/PdbidsItem.java @@ -0,0 +1,70 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.Serializable; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class PdbidsItem. + * + * @version $Revision$ $Date$ + */ +public class PdbidsItem implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _structureState + */ + private jalview.schemabinding.version2.StructureState _structureState; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PdbidsItem() { + super(); + } //-- jalview.schemabinding.version2.PdbidsItem() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'structureState'. + * + * @return StructureState + * @return the value of field 'structureState'. + */ + public jalview.schemabinding.version2.StructureState getStructureState() + { + return this._structureState; + } //-- jalview.schemabinding.version2.StructureState getStructureState() + + /** + * Sets the value of field 'structureState'. + * + * @param structureState the value of field 'structureState'. + */ + public void setStructureState(jalview.schemabinding.version2.StructureState structureState) + { + this._structureState = structureState; + } //-- void setStructureState(jalview.schemabinding.version2.StructureState) + +} diff --git a/src/jalview/schemabinding/version2/PdbidsItemDescriptor.java b/src/jalview/schemabinding/version2/PdbidsItemDescriptor.java new file mode 100644 index 0000000..9128920 --- /dev/null +++ b/src/jalview/schemabinding/version2/PdbidsItemDescriptor.java @@ -0,0 +1,207 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class PdbidsItemDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PdbidsItemDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PdbidsItemDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "pdbids"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _structureState + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.StructureState.class, "_structureState", "structureState", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + PdbidsItem target = (PdbidsItem) object; + return target.getStructureState(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + PdbidsItem target = (PdbidsItem) object; + target.setStructureState( (jalview.schemabinding.version2.StructureState) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.StructureState(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _structureState + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.PdbidsItemDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.PdbidsItem.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/jalview/schemabinding/version2/Property.java b/src/jalview/schemabinding/version2/Property.java index 4059340..338dd90 100755 --- a/src/jalview/schemabinding/version2/Property.java +++ b/src/jalview/schemabinding/version2/Property.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,166 +7,167 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 Property. - * + * * @version $Revision$ $Date$ */ -public class Property - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _name - */ - private java.lang.String _name; - - /** - * Field _value - */ - private java.lang.String _value; - - //----------------/ - //- Constructors -/ - //----------------/ - - public Property() - { - super(); - } //-- jalview.schemabinding.version2.Property() - - //-----------/ - //- 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 'value'. - * - * @return String - * @return the value of field 'value'. - */ - public java.lang.String getValue() - { - return this._value; - } //-- java.lang.String getValue() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try +public class Property implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name + */ + private java.lang.String _name; + + /** + * Field _value + */ + private java.lang.String _value; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Property() { + super(); + } //-- jalview.schemabinding.version2.Property() + + + //-----------/ + //- 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 'value'. + * + * @return String + * @return the value of field 'value'. + */ + public java.lang.String getValue() + { + return this._value; + } //-- java.lang.String getValue() + + /** + * 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 'value'. + * + * @param value the value of field 'value'. + */ + public void setValue(java.lang.String value) + { + this._value = value; + } //-- void setValue(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 { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return (jalview.schemabinding.version2.Property) Unmarshaller.unmarshal(jalview.schemabinding.version2.Property.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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) - - /** - * 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 'value'. - * - * @param value the value of field 'value'. - */ - public void setValue(java.lang.String value) - { - this._value = value; - } //-- void setValue(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.Property) Unmarshaller.unmarshal( - jalview.schemabinding.version2.Property.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/PropertyDescriptor.java b/src/jalview/schemabinding/version2/PropertyDescriptor.java index 9d0eafa..e22704c 100755 --- a/src/jalview/schemabinding/version2/PropertyDescriptor.java +++ b/src/jalview/schemabinding/version2/PropertyDescriptor.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,252 +7,240 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class PropertyDescriptor. - * + * * @version $Revision$ $Date$ */ -public class PropertyDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public PropertyDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "property"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _name - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Property target = (Property) object; - return target.getName(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Property target = (Property) object; - target.setName( (java.lang.String) value); +public class PropertyDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PropertyDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "property"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Property target = (Property) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Property target = (Property) object; + target.setName( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Property target = (Property) object; + return target.getValue(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Property target = (Property) object; + target.setValue( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _value + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- jalview.schemabinding.version2.PropertyDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _name - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _value - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_value", "value", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Property target = (Property) object; - return target.getValue(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Property target = (Property) object; - target.setValue( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _value - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- jalview.schemabinding.version2.PropertyDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.Property.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.Property.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/Sequence.java b/src/jalview/schemabinding/version2/Sequence.java index 372a2c5..993ad23 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,274 +7,270 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import java.util.*; -import org.exolab.castor.xml.*; +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 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 -/ - //--------------------------/ - /** - * Field _DBRefList - */ - private java.util.Vector _DBRefList; + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ - //----------------/ - //- Constructors -/ - //----------------/ + /** + * Field _DBRefList + */ + private java.util.Vector _DBRefList; - public Sequence() - { - super(); - _DBRefList = new Vector(); - } //-- jalview.schemabinding.version2.Sequence() - //-----------/ - //- Methods -/ - //-----------/ + //----------------/ + //- Constructors -/ + //----------------/ - /** - * 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) + public Sequence() { + super(); + _DBRefList = new Vector(); + } //-- jalview.schemabinding.version2.Sequence() - /** - * 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) - /** - * Method enumerateDBRef - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateDBRef() - { - return _DBRefList.elements(); - } //-- java.util.Enumeration enumerateDBRef() + //-----------/ + //- Methods -/ + //-----------/ - /** - * 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())) + /** + * Method addDBRef + * + * + * + * @param vDBRef + */ + public void addDBRef(jalview.schemabinding.version2.DBRef vDBRef) + throws java.lang.IndexOutOfBoundsException { - throw new IndexOutOfBoundsException(); - } + _DBRefList.addElement(vDBRef); + } //-- void addDBRef(jalview.schemabinding.version2.DBRef) - return (jalview.schemabinding.version2.DBRef) _DBRefList.elementAt(index); - } //-- jalview.schemabinding.version2.DBRef getDBRef(int) - - /** - * 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++) + /** + * Method addDBRef + * + * + * + * @param index + * @param vDBRef + */ + public void addDBRef(int index, jalview.schemabinding.version2.DBRef vDBRef) + throws java.lang.IndexOutOfBoundsException { - mArray[index] = (jalview.schemabinding.version2.DBRef) _DBRefList. - elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.DBRef[] getDBRef() + _DBRefList.insertElementAt(vDBRef, index); + } //-- void addDBRef(int, jalview.schemabinding.version2.DBRef) - /** - * Method getDBRefCount - * - * - * - * @return int - */ - public int getDBRefCount() - { - return _DBRefList.size(); - } //-- int getDBRefCount() + /** + * Method enumerateDBRef + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateDBRef() + { + return _DBRefList.elements(); + } //-- java.util.Enumeration enumerateDBRef() - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try + /** + * Method getDBRef + * + * + * + * @param index + * @return DBRef + */ + public jalview.schemabinding.version2.DBRef getDBRef(int index) + throws java.lang.IndexOutOfBoundsException { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + //-- 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 getDBRef + * + * + * + * @return DBRef + */ + public jalview.schemabinding.version2.DBRef[] getDBRef() { - return false; - } - return true; - } //-- boolean isValid() + 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 marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException - { + /** + * Method getDBRefCount + * + * + * + * @return int + */ + public int getDBRefCount() + { + return _DBRefList.size(); + } //-- int getDBRefCount() - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + /** + * 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 handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, 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, 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 + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) - /** - * Method removeAllDBRef - * - */ - public void removeAllDBRef() - { - _DBRefList.removeAllElements(); - } //-- void removeAllDBRef() + /** + * Method removeAllDBRef + * + */ + public void removeAllDBRef() + { + _DBRefList.removeAllElements(); + } //-- void removeAllDBRef() - /** - * 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 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 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())) + /** + * Method setDBRef + * + * + * + * @param index + * @param vDBRef + */ + public void setDBRef(int index, jalview.schemabinding.version2.DBRef vDBRef) + throws java.lang.IndexOutOfBoundsException { - throw new IndexOutOfBoundsException(); - } - _DBRefList.setElementAt(vDBRef, index); - } //-- void setDBRef(int, jalview.schemabinding.version2.DBRef) + //-- 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 setDBRef - * - * - * - * @param DBRefArray - */ - public void setDBRef(jalview.schemabinding.version2.DBRef[] DBRefArray) - { - //-- copy array - _DBRefList.removeAllElements(); - for (int i = 0; i < DBRefArray.length; i++) + /** + * Method setDBRef + * + * + * + * @param DBRefArray + */ + public void setDBRef(jalview.schemabinding.version2.DBRef[] DBRefArray) { - _DBRefList.addElement(DBRefArray[i]); - } - } //-- void setDBRef(jalview.schemabinding.version2.DBRef) + //-- copy array + _DBRefList.removeAllElements(); + for (int i = 0; i < DBRefArray.length; i++) { + _DBRefList.addElement(DBRefArray[i]); + } + } //-- void setDBRef(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 - { - return (jalview.schemabinding.version2.Sequence) Unmarshaller.unmarshal( - jalview.schemabinding.version2.Sequence.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + /** + * 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() + /** + * 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/schemabinding/version2/SequenceDescriptor.java b/src/jalview/schemabinding/version2/SequenceDescriptor.java index 8c621ca..555284a 100755 --- a/src/jalview/schemabinding/version2/SequenceDescriptor.java +++ b/src/jalview/schemabinding/version2/SequenceDescriptor.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,213 +7,205 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; /** * Class SequenceDescriptor. - * + * * @version $Revision$ $Date$ */ -public class SequenceDescriptor - extends jalview.schemabinding.version2.SequenceTypeDescriptor -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public SequenceDescriptor() - { - super(); - setExtendsWithoutFlatten(new jalview.schemabinding.version2. - SequenceTypeDescriptor()); - nsURI = "www.vamsas.ac.uk/jalview/version2"; - xmlName = "Sequence"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- initialize element descriptors - - //-- _DBRefList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.DBRef.class, "_DBRefList", "DBRef", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Sequence target = (Sequence) object; - return target.getDBRef(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Sequence target = (Sequence) object; - target.addDBRef( (jalview.schemabinding.version2.DBRef) value); +public class SequenceDescriptor extends jalview.schemabinding.version2.SequenceTypeDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceDescriptor() { + super(); + setExtendsWithoutFlatten(new jalview.schemabinding.version2.SequenceTypeDescriptor()); + nsURI = "www.vamsas.ac.uk/jalview/version2"; + xmlName = "Sequence"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _DBRefList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.DBRef.class, "_DBRefList", "DBRef", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Sequence target = (Sequence) object; + return target.getDBRef(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Sequence target = (Sequence) object; + target.addDBRef( (jalview.schemabinding.version2.DBRef) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.DBRef(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _DBRefList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.DBRef(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _DBRefList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.SequenceDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return super.getExtends(); - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - if (identity == null) + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.SequenceDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return super.getExtends(); + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + if (identity == null) + return super.getIdentity(); + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.Sequence.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() { - return super.getIdentity(); - } - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.Sequence.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/SequenceSet.java b/src/jalview/schemabinding/version2/SequenceSet.java index 020cbb9..6f0342b 100755 --- a/src/jalview/schemabinding/version2/SequenceSet.java +++ b/src/jalview/schemabinding/version2/SequenceSet.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,467 +7,445 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import java.util.*; -import org.exolab.castor.xml.*; +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 SequenceSet. - * + * * @version $Revision$ $Date$ */ -public class SequenceSet - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _gapChar - */ - private java.lang.String _gapChar; - - /** - * Field _sequenceList - */ - private java.util.Vector _sequenceList; - - /** - * Field _annotationList - */ - private java.util.Vector _annotationList; - - //----------------/ - //- Constructors -/ - //----------------/ - - public SequenceSet() - { - super(); - _sequenceList = new Vector(); - _annotationList = new Vector(); - } //-- jalview.schemabinding.version2.SequenceSet() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method addAnnotation - * - * - * - * @param vAnnotation - */ - public void addAnnotation(jalview.schemabinding.version2.Annotation - vAnnotation) - throws java.lang.IndexOutOfBoundsException - { - _annotationList.addElement(vAnnotation); - } //-- void addAnnotation(jalview.schemabinding.version2.Annotation) - - /** - * Method addAnnotation - * - * - * - * @param index - * @param vAnnotation - */ - public void addAnnotation(int index, - jalview.schemabinding.version2.Annotation - vAnnotation) - throws java.lang.IndexOutOfBoundsException - { - _annotationList.insertElementAt(vAnnotation, index); - } //-- void addAnnotation(int, jalview.schemabinding.version2.Annotation) - - /** - * Method addSequence - * - * - * - * @param vSequence - */ - public void addSequence(jalview.schemabinding.version2.Sequence vSequence) - throws java.lang.IndexOutOfBoundsException - { - _sequenceList.addElement(vSequence); - } //-- void addSequence(jalview.schemabinding.version2.Sequence) - - /** - * Method addSequence - * - * - * - * @param index - * @param vSequence - */ - public void addSequence(int index, - jalview.schemabinding.version2.Sequence vSequence) - throws java.lang.IndexOutOfBoundsException - { - _sequenceList.insertElementAt(vSequence, index); - } //-- void addSequence(int, jalview.schemabinding.version2.Sequence) - - /** - * Method enumerateAnnotation - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateAnnotation() - { - return _annotationList.elements(); - } //-- java.util.Enumeration enumerateAnnotation() - - /** - * Method enumerateSequence - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateSequence() - { - return _sequenceList.elements(); - } //-- java.util.Enumeration enumerateSequence() - - /** - * Method getAnnotation - * - * - * - * @param index - * @return Annotation - */ - public jalview.schemabinding.version2.Annotation getAnnotation(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _annotationList.size())) +public class SequenceSet implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _gapChar + */ + private java.lang.String _gapChar; + + /** + * Field _sequenceList + */ + private java.util.Vector _sequenceList; + + /** + * Field _annotationList + */ + private java.util.Vector _annotationList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceSet() { + super(); + _sequenceList = new Vector(); + _annotationList = new Vector(); + } //-- jalview.schemabinding.version2.SequenceSet() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addAnnotation + * + * + * + * @param vAnnotation + */ + public void addAnnotation(jalview.schemabinding.version2.Annotation vAnnotation) + throws java.lang.IndexOutOfBoundsException + { + _annotationList.addElement(vAnnotation); + } //-- void addAnnotation(jalview.schemabinding.version2.Annotation) + + /** + * Method addAnnotation + * + * + * + * @param index + * @param vAnnotation + */ + public void addAnnotation(int index, jalview.schemabinding.version2.Annotation vAnnotation) + throws java.lang.IndexOutOfBoundsException + { + _annotationList.insertElementAt(vAnnotation, index); + } //-- void addAnnotation(int, jalview.schemabinding.version2.Annotation) + + /** + * Method addSequence + * + * + * + * @param vSequence + */ + public void addSequence(jalview.schemabinding.version2.Sequence vSequence) + throws java.lang.IndexOutOfBoundsException + { + _sequenceList.addElement(vSequence); + } //-- void addSequence(jalview.schemabinding.version2.Sequence) + + /** + * Method addSequence + * + * + * + * @param index + * @param vSequence + */ + public void addSequence(int index, jalview.schemabinding.version2.Sequence vSequence) + throws java.lang.IndexOutOfBoundsException + { + _sequenceList.insertElementAt(vSequence, index); + } //-- void addSequence(int, jalview.schemabinding.version2.Sequence) + + /** + * Method enumerateAnnotation + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateAnnotation() + { + return _annotationList.elements(); + } //-- java.util.Enumeration enumerateAnnotation() + + /** + * Method enumerateSequence + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateSequence() + { + return _sequenceList.elements(); + } //-- java.util.Enumeration enumerateSequence() + + /** + * Method getAnnotation + * + * + * + * @param index + * @return Annotation + */ + public jalview.schemabinding.version2.Annotation getAnnotation(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _annotationList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.Annotation) _annotationList.elementAt(index); + } //-- jalview.schemabinding.version2.Annotation getAnnotation(int) + + /** + * Method getAnnotation + * + * + * + * @return Annotation + */ + public jalview.schemabinding.version2.Annotation[] getAnnotation() + { + int size = _annotationList.size(); + jalview.schemabinding.version2.Annotation[] mArray = new jalview.schemabinding.version2.Annotation[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.Annotation) _annotationList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.Annotation[] getAnnotation() + + /** + * Method getAnnotationCount + * + * + * + * @return int + */ + public int getAnnotationCount() + { + return _annotationList.size(); + } //-- int getAnnotationCount() + + /** + * Returns the value of field 'gapChar'. + * + * @return String + * @return the value of field 'gapChar'. + */ + public java.lang.String getGapChar() + { + return this._gapChar; + } //-- java.lang.String getGapChar() + + /** + * Method getSequence + * + * + * + * @param index + * @return Sequence + */ + public jalview.schemabinding.version2.Sequence getSequence(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _sequenceList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.Sequence) _sequenceList.elementAt(index); + } //-- jalview.schemabinding.version2.Sequence getSequence(int) + + /** + * Method getSequence + * + * + * + * @return Sequence + */ + public jalview.schemabinding.version2.Sequence[] getSequence() + { + int size = _sequenceList.size(); + jalview.schemabinding.version2.Sequence[] mArray = new jalview.schemabinding.version2.Sequence[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.Sequence) _sequenceList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.Sequence[] getSequence() + + /** + * Method getSequenceCount + * + * + * + * @return int + */ + public int getSequenceCount() + { + return _sequenceList.size(); + } //-- int getSequenceCount() + + /** + * 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 removeAllAnnotation + * + */ + public void removeAllAnnotation() + { + _annotationList.removeAllElements(); + } //-- void removeAllAnnotation() + + /** + * Method removeAllSequence + * + */ + public void removeAllSequence() { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.Annotation) _annotationList. - elementAt(index); - } //-- jalview.schemabinding.version2.Annotation getAnnotation(int) - - /** - * Method getAnnotation - * - * - * - * @return Annotation - */ - public jalview.schemabinding.version2.Annotation[] getAnnotation() - { - int size = _annotationList.size(); - jalview.schemabinding.version2.Annotation[] mArray = new jalview. - schemabinding.version2.Annotation[size]; - for (int index = 0; index < size; index++) + _sequenceList.removeAllElements(); + } //-- void removeAllSequence() + + /** + * Method removeAnnotation + * + * + * + * @param index + * @return Annotation + */ + public jalview.schemabinding.version2.Annotation removeAnnotation(int index) { - mArray[index] = (jalview.schemabinding.version2.Annotation) - _annotationList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Annotation[] getAnnotation() - - /** - * Method getAnnotationCount - * - * - * - * @return int - */ - public int getAnnotationCount() - { - return _annotationList.size(); - } //-- int getAnnotationCount() - - /** - * Returns the value of field 'gapChar'. - * - * @return String - * @return the value of field 'gapChar'. - */ - public java.lang.String getGapChar() - { - return this._gapChar; - } //-- java.lang.String getGapChar() - - /** - * Method getSequence - * - * - * - * @param index - * @return Sequence - */ - public jalview.schemabinding.version2.Sequence getSequence(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _sequenceList.size())) + java.lang.Object obj = _annotationList.elementAt(index); + _annotationList.removeElementAt(index); + return (jalview.schemabinding.version2.Annotation) obj; + } //-- jalview.schemabinding.version2.Annotation removeAnnotation(int) + + /** + * Method removeSequence + * + * + * + * @param index + * @return Sequence + */ + public jalview.schemabinding.version2.Sequence removeSequence(int index) { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.Sequence) _sequenceList.elementAt( - index); - } //-- jalview.schemabinding.version2.Sequence getSequence(int) - - /** - * Method getSequence - * - * - * - * @return Sequence - */ - public jalview.schemabinding.version2.Sequence[] getSequence() - { - int size = _sequenceList.size(); - jalview.schemabinding.version2.Sequence[] mArray = new jalview. - schemabinding.version2.Sequence[size]; - for (int index = 0; index < size; index++) + java.lang.Object obj = _sequenceList.elementAt(index); + _sequenceList.removeElementAt(index); + return (jalview.schemabinding.version2.Sequence) obj; + } //-- jalview.schemabinding.version2.Sequence removeSequence(int) + + /** + * Method setAnnotation + * + * + * + * @param index + * @param vAnnotation + */ + public void setAnnotation(int index, jalview.schemabinding.version2.Annotation vAnnotation) + throws java.lang.IndexOutOfBoundsException { - mArray[index] = (jalview.schemabinding.version2.Sequence) _sequenceList. - elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Sequence[] getSequence() - - /** - * Method getSequenceCount - * - * - * - * @return int - */ - public int getSequenceCount() - { - return _sequenceList.size(); - } //-- int getSequenceCount() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try + //-- check bounds for index + if ((index < 0) || (index > _annotationList.size())) { + throw new IndexOutOfBoundsException(); + } + _annotationList.setElementAt(vAnnotation, index); + } //-- void setAnnotation(int, jalview.schemabinding.version2.Annotation) + + /** + * Method setAnnotation + * + * + * + * @param annotationArray + */ + public void setAnnotation(jalview.schemabinding.version2.Annotation[] annotationArray) { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + //-- copy array + _annotationList.removeAllElements(); + for (int i = 0; i < annotationArray.length; i++) { + _annotationList.addElement(annotationArray[i]); + } + } //-- void setAnnotation(jalview.schemabinding.version2.Annotation) + + /** + * Sets the value of field 'gapChar'. + * + * @param gapChar the value of field 'gapChar'. + */ + public void setGapChar(java.lang.String gapChar) { - 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 removeAllAnnotation - * - */ - public void removeAllAnnotation() - { - _annotationList.removeAllElements(); - } //-- void removeAllAnnotation() - - /** - * Method removeAllSequence - * - */ - public void removeAllSequence() - { - _sequenceList.removeAllElements(); - } //-- void removeAllSequence() - - /** - * Method removeAnnotation - * - * - * - * @param index - * @return Annotation - */ - public jalview.schemabinding.version2.Annotation removeAnnotation(int index) - { - java.lang.Object obj = _annotationList.elementAt(index); - _annotationList.removeElementAt(index); - return (jalview.schemabinding.version2.Annotation) obj; - } //-- jalview.schemabinding.version2.Annotation removeAnnotation(int) - - /** - * Method removeSequence - * - * - * - * @param index - * @return Sequence - */ - public jalview.schemabinding.version2.Sequence removeSequence(int index) - { - java.lang.Object obj = _sequenceList.elementAt(index); - _sequenceList.removeElementAt(index); - return (jalview.schemabinding.version2.Sequence) obj; - } //-- jalview.schemabinding.version2.Sequence removeSequence(int) - - /** - * Method setAnnotation - * - * - * - * @param index - * @param vAnnotation - */ - public void setAnnotation(int index, - jalview.schemabinding.version2.Annotation - vAnnotation) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _annotationList.size())) + this._gapChar = gapChar; + } //-- void setGapChar(java.lang.String) + + /** + * Method setSequence + * + * + * + * @param index + * @param vSequence + */ + public void setSequence(int index, jalview.schemabinding.version2.Sequence vSequence) + throws java.lang.IndexOutOfBoundsException { - throw new IndexOutOfBoundsException(); - } - _annotationList.setElementAt(vAnnotation, index); - } //-- void setAnnotation(int, jalview.schemabinding.version2.Annotation) - - /** - * Method setAnnotation - * - * - * - * @param annotationArray - */ - public void setAnnotation(jalview.schemabinding.version2.Annotation[] - annotationArray) - { - //-- copy array - _annotationList.removeAllElements(); - for (int i = 0; i < annotationArray.length; i++) + //-- check bounds for index + if ((index < 0) || (index > _sequenceList.size())) { + throw new IndexOutOfBoundsException(); + } + _sequenceList.setElementAt(vSequence, index); + } //-- void setSequence(int, jalview.schemabinding.version2.Sequence) + + /** + * Method setSequence + * + * + * + * @param sequenceArray + */ + public void setSequence(jalview.schemabinding.version2.Sequence[] sequenceArray) { - _annotationList.addElement(annotationArray[i]); - } - } //-- void setAnnotation(jalview.schemabinding.version2.Annotation) - - /** - * Sets the value of field 'gapChar'. - * - * @param gapChar the value of field 'gapChar'. - */ - public void setGapChar(java.lang.String gapChar) - { - this._gapChar = gapChar; - } //-- void setGapChar(java.lang.String) - - /** - * Method setSequence - * - * - * - * @param index - * @param vSequence - */ - public void setSequence(int index, - jalview.schemabinding.version2.Sequence vSequence) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _sequenceList.size())) + //-- copy array + _sequenceList.removeAllElements(); + for (int i = 0; i < sequenceArray.length; i++) { + _sequenceList.addElement(sequenceArray[i]); + } + } //-- void setSequence(jalview.schemabinding.version2.Sequence) + + /** + * 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 { - throw new IndexOutOfBoundsException(); - } - _sequenceList.setElementAt(vSequence, index); - } //-- void setSequence(int, jalview.schemabinding.version2.Sequence) - - /** - * Method setSequence - * - * - * - * @param sequenceArray - */ - public void setSequence(jalview.schemabinding.version2.Sequence[] - sequenceArray) - { - //-- copy array - _sequenceList.removeAllElements(); - for (int i = 0; i < sequenceArray.length; i++) + return (jalview.schemabinding.version2.SequenceSet) Unmarshaller.unmarshal(jalview.schemabinding.version2.SequenceSet.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException { - _sequenceList.addElement(sequenceArray[i]); - } - } //-- void setSequence(jalview.schemabinding.version2.Sequence) - - /** - * 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.SequenceSet) Unmarshaller.unmarshal( - jalview.schemabinding.version2.SequenceSet.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/SequenceSetDescriptor.java b/src/jalview/schemabinding/version2/SequenceSetDescriptor.java index 938f1ed..70ad2dc 100755 --- a/src/jalview/schemabinding/version2/SequenceSetDescriptor.java +++ b/src/jalview/schemabinding/version2/SequenceSetDescriptor.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,297 +7,275 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class SequenceSetDescriptor. - * + * * @version $Revision$ $Date$ */ -public class SequenceSetDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public SequenceSetDescriptor() - { - super(); - nsURI = "www.vamsas.ac.uk/jalview/version2"; - xmlName = "SequenceSet"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _gapChar - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_gapChar", "gapChar", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - SequenceSet target = (SequenceSet) object; - return target.getGapChar(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - SequenceSet target = (SequenceSet) object; - target.setGapChar( (java.lang.String) value); +public class SequenceSetDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceSetDescriptor() { + super(); + nsURI = "www.vamsas.ac.uk/jalview/version2"; + xmlName = "SequenceSet"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _gapChar + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_gapChar", "gapChar", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceSet target = (SequenceSet) object; + return target.getGapChar(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceSet target = (SequenceSet) object; + target.setGapChar( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _gapChar + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _sequenceList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Sequence.class, "_sequenceList", "Sequence", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceSet target = (SequenceSet) object; + return target.getSequence(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceSet target = (SequenceSet) object; + target.addSequence( (jalview.schemabinding.version2.Sequence) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.Sequence(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _sequenceList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + //-- _annotationList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Annotation.class, "_annotationList", "Annotation", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceSet target = (SequenceSet) object; + return target.getAnnotation(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceSet target = (SequenceSet) object; + target.addAnnotation( (jalview.schemabinding.version2.Annotation) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.Annotation(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _annotationList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.SequenceSetDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _gapChar - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _sequenceList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.Sequence.class, "_sequenceList", "Sequence", - org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - SequenceSet target = (SequenceSet) object; - return target.getSequence(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - SequenceSet target = (SequenceSet) object; - target.addSequence( (jalview.schemabinding.version2.Sequence) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.Sequence(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _sequenceList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _annotationList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.Annotation.class, "_annotationList", - "Annotation", org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - SequenceSet target = (SequenceSet) object; - return target.getAnnotation(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - SequenceSet target = (SequenceSet) object; - target.addAnnotation( (jalview.schemabinding.version2.Annotation) - value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.Annotation(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _annotationList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.SequenceSetDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.SequenceSet.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.SequenceSet.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/SequenceType.java b/src/jalview/schemabinding/version2/SequenceType.java index 4c60f87..d413e2d 100755 --- a/src/jalview/schemabinding/version2/SequenceType.java +++ b/src/jalview/schemabinding/version2/SequenceType.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,218 +7,219 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 SequenceType. - * + * * @version $Revision$ $Date$ */ -public class SequenceType - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _id - */ - private java.lang.String _id; - - /** - * Field _description - */ - private java.lang.String _description; - - /** - * Field _sequence - */ - private java.lang.String _sequence; - - /** - * Field _name - */ - private java.lang.String _name; - - //----------------/ - //- Constructors -/ - //----------------/ - - public SequenceType() - { - super(); - } //-- jalview.schemabinding.version2.SequenceType() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Returns the value of field 'description'. - * - * @return String - * @return the value of field 'description'. - */ - public java.lang.String getDescription() - { - return this._description; - } //-- java.lang.String getDescription() - - /** - * 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 '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 'sequence'. - * - * @return String - * @return the value of field 'sequence'. - */ - public java.lang.String getSequence() - { - return this._sequence; - } //-- java.lang.String getSequence() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try +public class SequenceType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _id + */ + private java.lang.String _id; + + /** + * Field _description + */ + private java.lang.String _description; + + /** + * Field _sequence + */ + private java.lang.String _sequence; + + /** + * Field _name + */ + private java.lang.String _name; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceType() { + super(); + } //-- jalview.schemabinding.version2.SequenceType() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'description'. + * + * @return String + * @return the value of field 'description'. + */ + public java.lang.String getDescription() + { + return this._description; + } //-- java.lang.String getDescription() + + /** + * 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 '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 'sequence'. + * + * @return String + * @return the value of field 'sequence'. + */ + public java.lang.String getSequence() + { + return this._sequence; + } //-- java.lang.String getSequence() + + /** + * 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 'description'. + * + * @param description the value of field 'description'. + */ + public void setDescription(java.lang.String description) + { + this._description = description; + } //-- void setDescription(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) + + /** + * 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 'sequence'. + * + * @param sequence the value of field 'sequence'. + */ + public void setSequence(java.lang.String sequence) + { + this._sequence = sequence; + } //-- void setSequence(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 { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return (jalview.schemabinding.version2.SequenceType) Unmarshaller.unmarshal(jalview.schemabinding.version2.SequenceType.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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) - - /** - * Sets the value of field 'description'. - * - * @param description the value of field 'description'. - */ - public void setDescription(java.lang.String description) - { - this._description = description; - } //-- void setDescription(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) - - /** - * 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 'sequence'. - * - * @param sequence the value of field 'sequence'. - */ - public void setSequence(java.lang.String sequence) - { - this._sequence = sequence; - } //-- void setSequence(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.SequenceType) Unmarshaller.unmarshal( - jalview.schemabinding.version2.SequenceType.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/SequenceTypeDescriptor.java b/src/jalview/schemabinding/version2/SequenceTypeDescriptor.java index 2910786..ef6c636 100755 --- a/src/jalview/schemabinding/version2/SequenceTypeDescriptor.java +++ b/src/jalview/schemabinding/version2/SequenceTypeDescriptor.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,342 +7,315 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class SequenceTypeDescriptor. - * + * * @version $Revision$ $Date$ */ -public class SequenceTypeDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public SequenceTypeDescriptor() - { - super(); - nsURI = "www.vamsas.ac.uk/jalview/version2"; - xmlName = "SequenceType"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _id - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - SequenceType target = (SequenceType) object; - return target.getId(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - SequenceType target = (SequenceType) object; - target.setId( (java.lang.String) value); +public class SequenceTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceTypeDescriptor() { + super(); + nsURI = "www.vamsas.ac.uk/jalview/version2"; + xmlName = "SequenceType"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceType target = (SequenceType) object; + return target.getId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceType target = (SequenceType) object; + target.setId( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _id + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceType target = (SequenceType) object; + return target.getDescription(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceType target = (SequenceType) object; + target.setDescription( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _description + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _id - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _description - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_description", "description", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - SequenceType target = (SequenceType) object; - return target.getDescription(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - SequenceType target = (SequenceType) object; - target.setDescription( (java.lang.String) value); + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _sequence + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequence", "sequence", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceType target = (SequenceType) object; + return target.getSequence(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceType target = (SequenceType) object; + target.setSequence( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _sequence + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceType target = (SequenceType) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceType target = (SequenceType) object; + target.setName( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _description - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _sequence - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_sequence", "sequence", - org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.SequenceTypeDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - SequenceType target = (SequenceType) object; - return target.getSequence(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - SequenceType target = (SequenceType) object; - target.setSequence( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _sequence - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _name - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_name", "name", org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - SequenceType target = (SequenceType) object; - return target.getName(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - SequenceType target = (SequenceType) object; - target.setName( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _name - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.SequenceTypeDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.SequenceType.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.SequenceType.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/Setting.java b/src/jalview/schemabinding/version2/Setting.java index 4f85d33..668ef9d 100755 --- a/src/jalview/schemabinding/version2/Setting.java +++ b/src/jalview/schemabinding/version2/Setting.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,246 +7,247 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 Setting. - * + * * @version $Revision$ $Date$ */ -public class Setting - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _type - */ - private java.lang.String _type; - - /** - * Field _colour - */ - private int _colour; - - /** - * keeps track of state for field: _colour - */ - private boolean _has_colour; - - /** - * Field _display - */ - private boolean _display; - - /** - * keeps track of state for field: _display - */ - private boolean _has_display; - - //----------------/ - //- Constructors -/ - //----------------/ - - public Setting() - { - super(); - } //-- jalview.schemabinding.version2.Setting() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteColour - * - */ - public void deleteColour() - { - this._has_colour = false; - } //-- void deleteColour() - - /** - * Method deleteDisplay - * - */ - public void deleteDisplay() - { - this._has_display = false; - } //-- void deleteDisplay() - - /** - * Returns the value of field 'colour'. - * - * @return int - * @return the value of field 'colour'. - */ - public int getColour() - { - return this._colour; - } //-- int getColour() - - /** - * Returns the value of field 'display'. - * - * @return boolean - * @return the value of field 'display'. - */ - public boolean getDisplay() - { - return this._display; - } //-- boolean getDisplay() - - /** - * 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 hasColour - * - * - * - * @return boolean - */ - public boolean hasColour() - { - return this._has_colour; - } //-- boolean hasColour() - - /** - * Method hasDisplay - * - * - * - * @return boolean - */ - public boolean hasDisplay() - { - return this._has_display; - } //-- boolean hasDisplay() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try +public class Setting implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _type + */ + private java.lang.String _type; + + /** + * Field _colour + */ + private int _colour; + + /** + * keeps track of state for field: _colour + */ + private boolean _has_colour; + + /** + * Field _display + */ + private boolean _display; + + /** + * keeps track of state for field: _display + */ + private boolean _has_display; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Setting() { + super(); + } //-- jalview.schemabinding.version2.Setting() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteColour + * + */ + public void deleteColour() + { + this._has_colour= false; + } //-- void deleteColour() + + /** + * Method deleteDisplay + * + */ + public void deleteDisplay() + { + this._has_display= false; + } //-- void deleteDisplay() + + /** + * Returns the value of field 'colour'. + * + * @return int + * @return the value of field 'colour'. + */ + public int getColour() + { + return this._colour; + } //-- int getColour() + + /** + * Returns the value of field 'display'. + * + * @return boolean + * @return the value of field 'display'. + */ + public boolean getDisplay() + { + return this._display; + } //-- boolean getDisplay() + + /** + * 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 hasColour + * + * + * + * @return boolean + */ + public boolean hasColour() + { + return this._has_colour; + } //-- boolean hasColour() + + /** + * Method hasDisplay + * + * + * + * @return boolean + */ + public boolean hasDisplay() + { + return this._has_display; + } //-- boolean hasDisplay() + + /** + * 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 'colour'. + * + * @param colour the value of field 'colour'. + */ + public void setColour(int colour) + { + this._colour = colour; + this._has_colour = true; + } //-- void setColour(int) + + /** + * Sets the value of field 'display'. + * + * @param display the value of field 'display'. + */ + public void setDisplay(boolean display) + { + this._display = display; + this._has_display = true; + } //-- void setDisplay(boolean) + + /** + * 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 { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return (jalview.schemabinding.version2.Setting) Unmarshaller.unmarshal(jalview.schemabinding.version2.Setting.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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) - - /** - * Sets the value of field 'colour'. - * - * @param colour the value of field 'colour'. - */ - public void setColour(int colour) - { - this._colour = colour; - this._has_colour = true; - } //-- void setColour(int) - - /** - * Sets the value of field 'display'. - * - * @param display the value of field 'display'. - */ - public void setDisplay(boolean display) - { - this._display = display; - this._has_display = true; - } //-- void setDisplay(boolean) - - /** - * 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.Setting) Unmarshaller.unmarshal( - jalview.schemabinding.version2.Setting.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/SettingDescriptor.java b/src/jalview/schemabinding/version2/SettingDescriptor.java index 9e19f65..6cadc16 100755 --- a/src/jalview/schemabinding/version2/SettingDescriptor.java +++ b/src/jalview/schemabinding/version2/SettingDescriptor.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,315 +7,284 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class SettingDescriptor. - * + * * @version $Revision$ $Date$ */ -public class SettingDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public SettingDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "setting"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _type - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Setting target = (Setting) object; - return target.getType(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Setting target = (Setting) object; - target.setType( (java.lang.String) value); +public class SettingDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SettingDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "setting"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Setting target = (Setting) object; + return target.getType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Setting target = (Setting) object; + target.setType( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _colour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colour", "colour", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Setting target = (Setting) object; + if(!target.hasColour()) + return null; + return new java.lang.Integer(target.getColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Setting target = (Setting) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setColour( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _colour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _type - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _colour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_colour", "colour", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Setting target = (Setting) object; - if (!target.hasColour()) - { - return null; - } - return new java.lang.Integer(target.getColour()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Setting target = (Setting) object; - // ignore null values for non optional primitives - if (value == null) - { - return; - } - - target.setColour( ( (java.lang.Integer) value).intValue()); + desc.setValidator(fieldValidator); + //-- _display + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_display", "display", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Setting target = (Setting) object; + if(!target.hasDisplay()) + return null; + return (target.getDisplay() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Setting target = (Setting) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setDisplay( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setRequired(true); + addFieldDescriptor(desc); + + //-- validation code for: _display + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- jalview.schemabinding.version2.SettingDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _colour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _display - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_display", "display", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Setting target = (Setting) object; - if (!target.hasDisplay()) - { - return null; - } - return (target.getDisplay() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Setting target = (Setting) object; - // ignore null values for non optional primitives - if (value == null) - { - return; - } - - target.setDisplay( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - desc.setRequired(true); - addFieldDescriptor(desc); - - //-- validation code for: _display - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- jalview.schemabinding.version2.SettingDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.Setting.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.Setting.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/StructureState.java b/src/jalview/schemabinding/version2/StructureState.java new file mode 100644 index 0000000..be826fc --- /dev/null +++ b/src/jalview/schemabinding/version2/StructureState.java @@ -0,0 +1,415 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2; + + //---------------------------------/ + //- 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 StructureState. + * + * @version $Revision$ $Date$ + */ +public class StructureState implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * internal content storage + */ + private java.lang.String _content = ""; + + /** + * Field _visible + */ + private boolean _visible; + + /** + * keeps track of state for field: _visible + */ + private boolean _has_visible; + + /** + * Field _xpos + */ + private int _xpos; + + /** + * keeps track of state for field: _xpos + */ + private boolean _has_xpos; + + /** + * Field _ypos + */ + private int _ypos; + + /** + * keeps track of state for field: _ypos + */ + private boolean _has_ypos; + + /** + * Field _width + */ + private int _width; + + /** + * keeps track of state for field: _width + */ + private boolean _has_width; + + /** + * Field _height + */ + private int _height; + + /** + * keeps track of state for field: _height + */ + private boolean _has_height; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public StructureState() { + super(); + setContent(""); + } //-- jalview.schemabinding.version2.StructureState() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteHeight + * + */ + public void deleteHeight() + { + this._has_height= false; + } //-- void deleteHeight() + + /** + * Method deleteVisible + * + */ + public void deleteVisible() + { + this._has_visible= false; + } //-- void deleteVisible() + + /** + * Method deleteWidth + * + */ + public void deleteWidth() + { + this._has_width= false; + } //-- void deleteWidth() + + /** + * Method deleteXpos + * + */ + public void deleteXpos() + { + this._has_xpos= false; + } //-- void deleteXpos() + + /** + * Method deleteYpos + * + */ + public void deleteYpos() + { + this._has_ypos= false; + } //-- void deleteYpos() + + /** + * Returns the value of field 'content'. The field 'content' + * has the following description: internal content storage + * + * @return String + * @return the value of field 'content'. + */ + public java.lang.String getContent() + { + return this._content; + } //-- java.lang.String getContent() + + /** + * Returns the value of field 'height'. + * + * @return int + * @return the value of field 'height'. + */ + public int getHeight() + { + return this._height; + } //-- int getHeight() + + /** + * Returns the value of field 'visible'. + * + * @return boolean + * @return the value of field 'visible'. + */ + public boolean getVisible() + { + return this._visible; + } //-- boolean getVisible() + + /** + * Returns the value of field 'width'. + * + * @return int + * @return the value of field 'width'. + */ + public int getWidth() + { + return this._width; + } //-- int getWidth() + + /** + * Returns the value of field 'xpos'. + * + * @return int + * @return the value of field 'xpos'. + */ + public int getXpos() + { + return this._xpos; + } //-- int getXpos() + + /** + * Returns the value of field 'ypos'. + * + * @return int + * @return the value of field 'ypos'. + */ + public int getYpos() + { + return this._ypos; + } //-- int getYpos() + + /** + * Method hasHeight + * + * + * + * @return boolean + */ + public boolean hasHeight() + { + return this._has_height; + } //-- boolean hasHeight() + + /** + * Method hasVisible + * + * + * + * @return boolean + */ + public boolean hasVisible() + { + return this._has_visible; + } //-- boolean hasVisible() + + /** + * Method hasWidth + * + * + * + * @return boolean + */ + public boolean hasWidth() + { + return this._has_width; + } //-- boolean hasWidth() + + /** + * Method hasXpos + * + * + * + * @return boolean + */ + public boolean hasXpos() + { + return this._has_xpos; + } //-- boolean hasXpos() + + /** + * Method hasYpos + * + * + * + * @return boolean + */ + public boolean hasYpos() + { + return this._has_ypos; + } //-- boolean hasYpos() + + /** + * 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 'content'. The field 'content' has + * the following description: internal content storage + * + * @param content the value of field 'content'. + */ + public void setContent(java.lang.String content) + { + this._content = content; + } //-- void setContent(java.lang.String) + + /** + * Sets the value of field 'height'. + * + * @param height the value of field 'height'. + */ + public void setHeight(int height) + { + this._height = height; + this._has_height = true; + } //-- void setHeight(int) + + /** + * Sets the value of field 'visible'. + * + * @param visible the value of field 'visible'. + */ + public void setVisible(boolean visible) + { + this._visible = visible; + this._has_visible = true; + } //-- void setVisible(boolean) + + /** + * Sets the value of field 'width'. + * + * @param width the value of field 'width'. + */ + public void setWidth(int width) + { + this._width = width; + this._has_width = true; + } //-- void setWidth(int) + + /** + * Sets the value of field 'xpos'. + * + * @param xpos the value of field 'xpos'. + */ + public void setXpos(int xpos) + { + this._xpos = xpos; + this._has_xpos = true; + } //-- void setXpos(int) + + /** + * Sets the value of field 'ypos'. + * + * @param ypos the value of field 'ypos'. + */ + public void setYpos(int ypos) + { + this._ypos = ypos; + this._has_ypos = true; + } //-- void setYpos(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.schemabinding.version2.StructureState) Unmarshaller.unmarshal(jalview.schemabinding.version2.StructureState.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/schemabinding/version2/StructureStateDescriptor.java b/src/jalview/schemabinding/version2/StructureStateDescriptor.java new file mode 100644 index 0000000..998d373 --- /dev/null +++ b/src/jalview/schemabinding/version2/StructureStateDescriptor.java @@ -0,0 +1,411 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class StructureStateDescriptor. + * + * @version $Revision$ $Date$ + */ +public class StructureStateDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public StructureStateDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "structureState"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- _content + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + StructureState target = (StructureState) object; + return target.getContent(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + StructureState target = (StructureState) object; + target.setContent( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _content + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize attribute descriptors + + //-- _visible + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_visible", "visible", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + StructureState target = (StructureState) object; + if(!target.hasVisible()) + return null; + return (target.getVisible() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + StructureState target = (StructureState) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteVisible(); + return; + } + target.setVisible( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _visible + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _xpos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + StructureState target = (StructureState) object; + if(!target.hasXpos()) + return null; + return new java.lang.Integer(target.getXpos()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + StructureState target = (StructureState) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteXpos(); + return; + } + target.setXpos( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _xpos + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _ypos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + StructureState target = (StructureState) object; + if(!target.hasYpos()) + return null; + return new java.lang.Integer(target.getYpos()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + StructureState target = (StructureState) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteYpos(); + return; + } + target.setYpos( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _ypos + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _width + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + StructureState target = (StructureState) object; + if(!target.hasWidth()) + return null; + return new java.lang.Integer(target.getWidth()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + StructureState target = (StructureState) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteWidth(); + return; + } + target.setWidth( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _width + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _height + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + StructureState target = (StructureState) object; + if(!target.hasHeight()) + return null; + return new java.lang.Integer(target.getHeight()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + StructureState target = (StructureState) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteHeight(); + return; + } + target.setHeight( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _height + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- jalview.schemabinding.version2.StructureStateDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.StructureState.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/jalview/schemabinding/version2/ThresholdLine.java b/src/jalview/schemabinding/version2/ThresholdLine.java index ca6d5de..85854c1 100755 --- a/src/jalview/schemabinding/version2/ThresholdLine.java +++ b/src/jalview/schemabinding/version2/ThresholdLine.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,246 +7,247 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 ThresholdLine. - * + * * @version $Revision$ $Date$ */ -public class ThresholdLine - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _label - */ - private java.lang.String _label; - - /** - * Field _value - */ - private float _value; - - /** - * keeps track of state for field: _value - */ - private boolean _has_value; - - /** - * Field _colour - */ - private int _colour; - - /** - * keeps track of state for field: _colour - */ - private boolean _has_colour; - - //----------------/ - //- Constructors -/ - //----------------/ - - public ThresholdLine() - { - super(); - } //-- jalview.schemabinding.version2.ThresholdLine() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteColour - * - */ - public void deleteColour() - { - this._has_colour = false; - } //-- void deleteColour() - - /** - * Method deleteValue - * - */ - public void deleteValue() - { - this._has_value = false; - } //-- void deleteValue() - - /** - * Returns the value of field 'colour'. - * - * @return int - * @return the value of field 'colour'. - */ - public int getColour() - { - return this._colour; - } //-- int getColour() - - /** - * Returns the value of field 'label'. - * - * @return String - * @return the value of field 'label'. - */ - public java.lang.String getLabel() - { - return this._label; - } //-- java.lang.String getLabel() - - /** - * Returns the value of field 'value'. - * - * @return float - * @return the value of field 'value'. - */ - public float getValue() - { - return this._value; - } //-- float getValue() - - /** - * Method hasColour - * - * - * - * @return boolean - */ - public boolean hasColour() - { - return this._has_colour; - } //-- boolean hasColour() - - /** - * Method hasValue - * - * - * - * @return boolean - */ - public boolean hasValue() - { - return this._has_value; - } //-- boolean hasValue() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try +public class ThresholdLine implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _label + */ + private java.lang.String _label; + + /** + * Field _value + */ + private float _value; + + /** + * keeps track of state for field: _value + */ + private boolean _has_value; + + /** + * Field _colour + */ + private int _colour; + + /** + * keeps track of state for field: _colour + */ + private boolean _has_colour; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ThresholdLine() { + super(); + } //-- jalview.schemabinding.version2.ThresholdLine() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteColour + * + */ + public void deleteColour() + { + this._has_colour= false; + } //-- void deleteColour() + + /** + * Method deleteValue + * + */ + public void deleteValue() + { + this._has_value= false; + } //-- void deleteValue() + + /** + * Returns the value of field 'colour'. + * + * @return int + * @return the value of field 'colour'. + */ + public int getColour() + { + return this._colour; + } //-- int getColour() + + /** + * Returns the value of field 'label'. + * + * @return String + * @return the value of field 'label'. + */ + public java.lang.String getLabel() + { + return this._label; + } //-- java.lang.String getLabel() + + /** + * Returns the value of field 'value'. + * + * @return float + * @return the value of field 'value'. + */ + public float getValue() + { + return this._value; + } //-- float getValue() + + /** + * Method hasColour + * + * + * + * @return boolean + */ + public boolean hasColour() + { + return this._has_colour; + } //-- boolean hasColour() + + /** + * Method hasValue + * + * + * + * @return boolean + */ + public boolean hasValue() + { + return this._has_value; + } //-- boolean hasValue() + + /** + * 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 'colour'. + * + * @param colour the value of field 'colour'. + */ + public void setColour(int colour) + { + this._colour = colour; + this._has_colour = true; + } //-- void setColour(int) + + /** + * Sets the value of field 'label'. + * + * @param label the value of field 'label'. + */ + public void setLabel(java.lang.String label) + { + this._label = label; + } //-- void setLabel(java.lang.String) + + /** + * Sets the value of field 'value'. + * + * @param value the value of field 'value'. + */ + public void setValue(float value) + { + this._value = value; + this._has_value = true; + } //-- void setValue(float) + + /** + * 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 { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller.unmarshal(jalview.schemabinding.version2.ThresholdLine.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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) - - /** - * Sets the value of field 'colour'. - * - * @param colour the value of field 'colour'. - */ - public void setColour(int colour) - { - this._colour = colour; - this._has_colour = true; - } //-- void setColour(int) - - /** - * Sets the value of field 'label'. - * - * @param label the value of field 'label'. - */ - public void setLabel(java.lang.String label) - { - this._label = label; - } //-- void setLabel(java.lang.String) - - /** - * Sets the value of field 'value'. - * - * @param value the value of field 'value'. - */ - public void setValue(float value) - { - this._value = value; - this._has_value = true; - } //-- void setValue(float) - - /** - * 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.ThresholdLine) Unmarshaller. - unmarshal(jalview.schemabinding.version2.ThresholdLine.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/ThresholdLineDescriptor.java b/src/jalview/schemabinding/version2/ThresholdLineDescriptor.java index a4cf76f..9241003 100755 --- a/src/jalview/schemabinding/version2/ThresholdLineDescriptor.java +++ b/src/jalview/schemabinding/version2/ThresholdLineDescriptor.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,308 +7,282 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class ThresholdLineDescriptor. - * + * * @version $Revision$ $Date$ */ -public class ThresholdLineDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public ThresholdLineDescriptor() - { - super(); - nsURI = "www.vamsas.ac.uk/jalview/version2"; - xmlName = "thresholdLine"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _label - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_label", "label", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - ThresholdLine target = (ThresholdLine) object; - return target.getLabel(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - ThresholdLine target = (ThresholdLine) object; - target.setLabel( (java.lang.String) value); +public class ThresholdLineDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ThresholdLineDescriptor() { + super(); + nsURI = "www.vamsas.ac.uk/jalview/version2"; + xmlName = "thresholdLine"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _label + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_label", "label", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ThresholdLine target = (ThresholdLine) object; + return target.getLabel(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ThresholdLine target = (ThresholdLine) object; + target.setLabel( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _label + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ThresholdLine target = (ThresholdLine) object; + if(!target.hasValue()) + return null; + return new java.lang.Float(target.getValue()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ThresholdLine target = (ThresholdLine) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteValue(); + return; + } + target.setValue( ((java.lang.Float)value).floatValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _value + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + FloatValidator typeValidator = new FloatValidator(); + fieldValidator.setValidator(typeValidator); } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _label - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _value - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, - "_value", "value", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - ThresholdLine target = (ThresholdLine) object; - if (!target.hasValue()) - { - return null; - } - return new java.lang.Float(target.getValue()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - ThresholdLine target = (ThresholdLine) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteValue(); - return; - } - target.setValue( ( (java.lang.Float) value).floatValue()); + desc.setValidator(fieldValidator); + //-- _colour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colour", "colour", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ThresholdLine target = (ThresholdLine) object; + if(!target.hasColour()) + return null; + return new java.lang.Integer(target.getColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ThresholdLine target = (ThresholdLine) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteColour(); + return; + } + target.setColour( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _colour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- jalview.schemabinding.version2.ThresholdLineDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _value - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - FloatValidator typeValidator = new FloatValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _colour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_colour", "colour", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - ThresholdLine target = (ThresholdLine) object; - if (!target.hasColour()) - { - return null; - } - return new java.lang.Integer(target.getColour()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - ThresholdLine target = (ThresholdLine) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteColour(); - return; - } - target.setColour( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _colour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- jalview.schemabinding.version2.ThresholdLineDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.ThresholdLine.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.ThresholdLine.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/Tree.java b/src/jalview/schemabinding/version2/Tree.java index 3f9098a..96b2e18 100755 --- a/src/jalview/schemabinding/version2/Tree.java +++ b/src/jalview/schemabinding/version2/Tree.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,828 +7,829 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 Tree. - * + * * @version $Revision$ $Date$ */ -public class Tree - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _width - */ - private int _width; - - /** - * keeps track of state for field: _width - */ - private boolean _has_width; - - /** - * Field _height - */ - private int _height; - - /** - * keeps track of state for field: _height - */ - private boolean _has_height; - - /** - * Field _xpos - */ - private int _xpos; - - /** - * keeps track of state for field: _xpos - */ - private boolean _has_xpos; - - /** - * Field _ypos - */ - private int _ypos; - - /** - * keeps track of state for field: _ypos - */ - private boolean _has_ypos; - - /** - * Field _fontName - */ - private java.lang.String _fontName; - - /** - * Field _fontSize - */ - private int _fontSize; - - /** - * keeps track of state for field: _fontSize - */ - private boolean _has_fontSize; - - /** - * Field _fontStyle - */ - private int _fontStyle; - - /** - * keeps track of state for field: _fontStyle - */ - private boolean _has_fontStyle; - - /** - * Field _threshold - */ - private float _threshold; - - /** - * keeps track of state for field: _threshold - */ - private boolean _has_threshold; - - /** - * Field _showBootstrap - */ - private boolean _showBootstrap; - - /** - * keeps track of state for field: _showBootstrap - */ - private boolean _has_showBootstrap; - - /** - * Field _showDistances - */ - private boolean _showDistances; - - /** - * keeps track of state for field: _showDistances - */ - private boolean _has_showDistances; - - /** - * Field _markUnlinked - */ - private boolean _markUnlinked; - - /** - * keeps track of state for field: _markUnlinked - */ - private boolean _has_markUnlinked; - - /** - * Field _fitToWindow - */ - private boolean _fitToWindow; - - /** - * keeps track of state for field: _fitToWindow - */ - private boolean _has_fitToWindow; - - /** - * Field _currentTree - */ - private boolean _currentTree; - - /** - * keeps track of state for field: _currentTree - */ - private boolean _has_currentTree; - - /** - * Field _title - */ - private java.lang.String _title; - - /** - * Field _newick - */ - private java.lang.String _newick; - - //----------------/ - //- Constructors -/ - //----------------/ - - public Tree() - { - super(); - } //-- jalview.schemabinding.version2.Tree() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteCurrentTree - * - */ - public void deleteCurrentTree() - { - this._has_currentTree = false; - } //-- void deleteCurrentTree() - - /** - * Method deleteFitToWindow - * - */ - public void deleteFitToWindow() - { - this._has_fitToWindow = false; - } //-- void deleteFitToWindow() - - /** - * Method deleteFontSize - * - */ - public void deleteFontSize() - { - this._has_fontSize = false; - } //-- void deleteFontSize() - - /** - * Method deleteFontStyle - * - */ - public void deleteFontStyle() - { - this._has_fontStyle = false; - } //-- void deleteFontStyle() - - /** - * Method deleteHeight - * - */ - public void deleteHeight() - { - this._has_height = false; - } //-- void deleteHeight() - - /** - * Method deleteMarkUnlinked - * - */ - public void deleteMarkUnlinked() - { - this._has_markUnlinked = false; - } //-- void deleteMarkUnlinked() - - /** - * Method deleteShowBootstrap - * - */ - public void deleteShowBootstrap() - { - this._has_showBootstrap = false; - } //-- void deleteShowBootstrap() - - /** - * Method deleteShowDistances - * - */ - public void deleteShowDistances() - { - this._has_showDistances = false; - } //-- void deleteShowDistances() - - /** - * Method deleteThreshold - * - */ - public void deleteThreshold() - { - this._has_threshold = false; - } //-- void deleteThreshold() - - /** - * Method deleteWidth - * - */ - public void deleteWidth() - { - this._has_width = false; - } //-- void deleteWidth() - - /** - * Method deleteXpos - * - */ - public void deleteXpos() - { - this._has_xpos = false; - } //-- void deleteXpos() - - /** - * Method deleteYpos - * - */ - public void deleteYpos() - { - this._has_ypos = false; - } //-- void deleteYpos() - - /** - * Returns the value of field 'currentTree'. - * - * @return boolean - * @return the value of field 'currentTree'. - */ - public boolean getCurrentTree() - { - return this._currentTree; - } //-- boolean getCurrentTree() - - /** - * Returns the value of field 'fitToWindow'. - * - * @return boolean - * @return the value of field 'fitToWindow'. - */ - public boolean getFitToWindow() - { - return this._fitToWindow; - } //-- boolean getFitToWindow() - - /** - * Returns the value of field 'fontName'. - * - * @return String - * @return the value of field 'fontName'. - */ - public java.lang.String getFontName() - { - return this._fontName; - } //-- java.lang.String getFontName() - - /** - * Returns the value of field 'fontSize'. - * - * @return int - * @return the value of field 'fontSize'. - */ - public int getFontSize() - { - return this._fontSize; - } //-- int getFontSize() - - /** - * Returns the value of field 'fontStyle'. - * - * @return int - * @return the value of field 'fontStyle'. - */ - public int getFontStyle() - { - return this._fontStyle; - } //-- int getFontStyle() - - /** - * Returns the value of field 'height'. - * - * @return int - * @return the value of field 'height'. - */ - public int getHeight() - { - return this._height; - } //-- int getHeight() - - /** - * Returns the value of field 'markUnlinked'. - * - * @return boolean - * @return the value of field 'markUnlinked'. - */ - public boolean getMarkUnlinked() - { - return this._markUnlinked; - } //-- boolean getMarkUnlinked() - - /** - * Returns the value of field 'newick'. - * - * @return String - * @return the value of field 'newick'. - */ - public java.lang.String getNewick() - { - return this._newick; - } //-- java.lang.String getNewick() - - /** - * Returns the value of field 'showBootstrap'. - * - * @return boolean - * @return the value of field 'showBootstrap'. - */ - public boolean getShowBootstrap() - { - return this._showBootstrap; - } //-- boolean getShowBootstrap() - - /** - * Returns the value of field 'showDistances'. - * - * @return boolean - * @return the value of field 'showDistances'. - */ - public boolean getShowDistances() - { - return this._showDistances; - } //-- boolean getShowDistances() - - /** - * Returns the value of field 'threshold'. - * - * @return float - * @return the value of field 'threshold'. - */ - public float getThreshold() - { - return this._threshold; - } //-- float getThreshold() - - /** - * Returns the value of field 'title'. - * - * @return String - * @return the value of field 'title'. - */ - public java.lang.String getTitle() - { - return this._title; - } //-- java.lang.String getTitle() - - /** - * Returns the value of field 'width'. - * - * @return int - * @return the value of field 'width'. - */ - public int getWidth() - { - return this._width; - } //-- int getWidth() - - /** - * Returns the value of field 'xpos'. - * - * @return int - * @return the value of field 'xpos'. - */ - public int getXpos() - { - return this._xpos; - } //-- int getXpos() - - /** - * Returns the value of field 'ypos'. - * - * @return int - * @return the value of field 'ypos'. - */ - public int getYpos() - { - return this._ypos; - } //-- int getYpos() - - /** - * Method hasCurrentTree - * - * - * - * @return boolean - */ - public boolean hasCurrentTree() - { - return this._has_currentTree; - } //-- boolean hasCurrentTree() - - /** - * Method hasFitToWindow - * - * - * - * @return boolean - */ - public boolean hasFitToWindow() - { - return this._has_fitToWindow; - } //-- boolean hasFitToWindow() - - /** - * Method hasFontSize - * - * - * - * @return boolean - */ - public boolean hasFontSize() - { - return this._has_fontSize; - } //-- boolean hasFontSize() - - /** - * Method hasFontStyle - * - * - * - * @return boolean - */ - public boolean hasFontStyle() - { - return this._has_fontStyle; - } //-- boolean hasFontStyle() - - /** - * Method hasHeight - * - * - * - * @return boolean - */ - public boolean hasHeight() - { - return this._has_height; - } //-- boolean hasHeight() - - /** - * Method hasMarkUnlinked - * - * - * - * @return boolean - */ - public boolean hasMarkUnlinked() - { - return this._has_markUnlinked; - } //-- boolean hasMarkUnlinked() - - /** - * Method hasShowBootstrap - * - * - * - * @return boolean - */ - public boolean hasShowBootstrap() - { - return this._has_showBootstrap; - } //-- boolean hasShowBootstrap() - - /** - * Method hasShowDistances - * - * - * - * @return boolean - */ - public boolean hasShowDistances() - { - return this._has_showDistances; - } //-- boolean hasShowDistances() - - /** - * Method hasThreshold - * - * - * - * @return boolean - */ - public boolean hasThreshold() - { - return this._has_threshold; - } //-- boolean hasThreshold() - - /** - * Method hasWidth - * - * - * - * @return boolean - */ - public boolean hasWidth() - { - return this._has_width; - } //-- boolean hasWidth() - - /** - * Method hasXpos - * - * - * - * @return boolean - */ - public boolean hasXpos() - { - return this._has_xpos; - } //-- boolean hasXpos() - - /** - * Method hasYpos - * - * - * - * @return boolean - */ - public boolean hasYpos() - { - return this._has_ypos; - } //-- boolean hasYpos() - - /** - * 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 'currentTree'. - * - * @param currentTree the value of field 'currentTree'. - */ - public void setCurrentTree(boolean currentTree) - { - this._currentTree = currentTree; - this._has_currentTree = true; - } //-- void setCurrentTree(boolean) - - /** - * Sets the value of field 'fitToWindow'. - * - * @param fitToWindow the value of field 'fitToWindow'. - */ - public void setFitToWindow(boolean fitToWindow) - { - this._fitToWindow = fitToWindow; - this._has_fitToWindow = true; - } //-- void setFitToWindow(boolean) - - /** - * Sets the value of field 'fontName'. - * - * @param fontName the value of field 'fontName'. - */ - public void setFontName(java.lang.String fontName) - { - this._fontName = fontName; - } //-- void setFontName(java.lang.String) - - /** - * Sets the value of field 'fontSize'. - * - * @param fontSize the value of field 'fontSize'. - */ - public void setFontSize(int fontSize) - { - this._fontSize = fontSize; - this._has_fontSize = true; - } //-- void setFontSize(int) - - /** - * Sets the value of field 'fontStyle'. - * - * @param fontStyle the value of field 'fontStyle'. - */ - public void setFontStyle(int fontStyle) - { - this._fontStyle = fontStyle; - this._has_fontStyle = true; - } //-- void setFontStyle(int) - - /** - * Sets the value of field 'height'. - * - * @param height the value of field 'height'. - */ - public void setHeight(int height) - { - this._height = height; - this._has_height = true; - } //-- void setHeight(int) - - /** - * Sets the value of field 'markUnlinked'. - * - * @param markUnlinked the value of field 'markUnlinked'. - */ - public void setMarkUnlinked(boolean markUnlinked) - { - this._markUnlinked = markUnlinked; - this._has_markUnlinked = true; - } //-- void setMarkUnlinked(boolean) - - /** - * Sets the value of field 'newick'. - * - * @param newick the value of field 'newick'. - */ - public void setNewick(java.lang.String newick) - { - this._newick = newick; - } //-- void setNewick(java.lang.String) - - /** - * Sets the value of field 'showBootstrap'. - * - * @param showBootstrap the value of field 'showBootstrap'. - */ - public void setShowBootstrap(boolean showBootstrap) - { - this._showBootstrap = showBootstrap; - this._has_showBootstrap = true; - } //-- void setShowBootstrap(boolean) - - /** - * Sets the value of field 'showDistances'. - * - * @param showDistances the value of field 'showDistances'. - */ - public void setShowDistances(boolean showDistances) - { - this._showDistances = showDistances; - this._has_showDistances = true; - } //-- void setShowDistances(boolean) - - /** - * Sets the value of field 'threshold'. - * - * @param threshold the value of field 'threshold'. - */ - public void setThreshold(float threshold) - { - this._threshold = threshold; - this._has_threshold = true; - } //-- void setThreshold(float) - - /** - * Sets the value of field 'title'. - * - * @param title the value of field 'title'. - */ - public void setTitle(java.lang.String title) - { - this._title = title; - } //-- void setTitle(java.lang.String) - - /** - * Sets the value of field 'width'. - * - * @param width the value of field 'width'. - */ - public void setWidth(int width) - { - this._width = width; - this._has_width = true; - } //-- void setWidth(int) - - /** - * Sets the value of field 'xpos'. - * - * @param xpos the value of field 'xpos'. - */ - public void setXpos(int xpos) - { - this._xpos = xpos; - this._has_xpos = true; - } //-- void setXpos(int) - - /** - * Sets the value of field 'ypos'. - * - * @param ypos the value of field 'ypos'. - */ - public void setYpos(int ypos) - { - this._ypos = ypos; - this._has_ypos = true; - } //-- void setYpos(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.schemabinding.version2.Tree) Unmarshaller.unmarshal(jalview. - schemabinding.version2.Tree.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() +public class Tree implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _width + */ + private int _width; + + /** + * keeps track of state for field: _width + */ + private boolean _has_width; + + /** + * Field _height + */ + private int _height; + + /** + * keeps track of state for field: _height + */ + private boolean _has_height; + + /** + * Field _xpos + */ + private int _xpos; + + /** + * keeps track of state for field: _xpos + */ + private boolean _has_xpos; + + /** + * Field _ypos + */ + private int _ypos; + + /** + * keeps track of state for field: _ypos + */ + private boolean _has_ypos; + + /** + * Field _fontName + */ + private java.lang.String _fontName; + + /** + * Field _fontSize + */ + private int _fontSize; + + /** + * keeps track of state for field: _fontSize + */ + private boolean _has_fontSize; + + /** + * Field _fontStyle + */ + private int _fontStyle; + + /** + * keeps track of state for field: _fontStyle + */ + private boolean _has_fontStyle; + + /** + * Field _threshold + */ + private float _threshold; + + /** + * keeps track of state for field: _threshold + */ + private boolean _has_threshold; + + /** + * Field _showBootstrap + */ + private boolean _showBootstrap; + + /** + * keeps track of state for field: _showBootstrap + */ + private boolean _has_showBootstrap; + + /** + * Field _showDistances + */ + private boolean _showDistances; + + /** + * keeps track of state for field: _showDistances + */ + private boolean _has_showDistances; + + /** + * Field _markUnlinked + */ + private boolean _markUnlinked; + + /** + * keeps track of state for field: _markUnlinked + */ + private boolean _has_markUnlinked; + + /** + * Field _fitToWindow + */ + private boolean _fitToWindow; + + /** + * keeps track of state for field: _fitToWindow + */ + private boolean _has_fitToWindow; + + /** + * Field _currentTree + */ + private boolean _currentTree; + + /** + * keeps track of state for field: _currentTree + */ + private boolean _has_currentTree; + + /** + * Field _title + */ + private java.lang.String _title; + + /** + * Field _newick + */ + private java.lang.String _newick; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Tree() { + super(); + } //-- jalview.schemabinding.version2.Tree() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteCurrentTree + * + */ + public void deleteCurrentTree() + { + this._has_currentTree= false; + } //-- void deleteCurrentTree() + + /** + * Method deleteFitToWindow + * + */ + public void deleteFitToWindow() + { + this._has_fitToWindow= false; + } //-- void deleteFitToWindow() + + /** + * Method deleteFontSize + * + */ + public void deleteFontSize() + { + this._has_fontSize= false; + } //-- void deleteFontSize() + + /** + * Method deleteFontStyle + * + */ + public void deleteFontStyle() + { + this._has_fontStyle= false; + } //-- void deleteFontStyle() + + /** + * Method deleteHeight + * + */ + public void deleteHeight() + { + this._has_height= false; + } //-- void deleteHeight() + + /** + * Method deleteMarkUnlinked + * + */ + public void deleteMarkUnlinked() + { + this._has_markUnlinked= false; + } //-- void deleteMarkUnlinked() + + /** + * Method deleteShowBootstrap + * + */ + public void deleteShowBootstrap() + { + this._has_showBootstrap= false; + } //-- void deleteShowBootstrap() + + /** + * Method deleteShowDistances + * + */ + public void deleteShowDistances() + { + this._has_showDistances= false; + } //-- void deleteShowDistances() + + /** + * Method deleteThreshold + * + */ + public void deleteThreshold() + { + this._has_threshold= false; + } //-- void deleteThreshold() + + /** + * Method deleteWidth + * + */ + public void deleteWidth() + { + this._has_width= false; + } //-- void deleteWidth() + + /** + * Method deleteXpos + * + */ + public void deleteXpos() + { + this._has_xpos= false; + } //-- void deleteXpos() + + /** + * Method deleteYpos + * + */ + public void deleteYpos() + { + this._has_ypos= false; + } //-- void deleteYpos() + + /** + * Returns the value of field 'currentTree'. + * + * @return boolean + * @return the value of field 'currentTree'. + */ + public boolean getCurrentTree() + { + return this._currentTree; + } //-- boolean getCurrentTree() + + /** + * Returns the value of field 'fitToWindow'. + * + * @return boolean + * @return the value of field 'fitToWindow'. + */ + public boolean getFitToWindow() + { + return this._fitToWindow; + } //-- boolean getFitToWindow() + + /** + * Returns the value of field 'fontName'. + * + * @return String + * @return the value of field 'fontName'. + */ + public java.lang.String getFontName() + { + return this._fontName; + } //-- java.lang.String getFontName() + + /** + * Returns the value of field 'fontSize'. + * + * @return int + * @return the value of field 'fontSize'. + */ + public int getFontSize() + { + return this._fontSize; + } //-- int getFontSize() + + /** + * Returns the value of field 'fontStyle'. + * + * @return int + * @return the value of field 'fontStyle'. + */ + public int getFontStyle() + { + return this._fontStyle; + } //-- int getFontStyle() + + /** + * Returns the value of field 'height'. + * + * @return int + * @return the value of field 'height'. + */ + public int getHeight() + { + return this._height; + } //-- int getHeight() + + /** + * Returns the value of field 'markUnlinked'. + * + * @return boolean + * @return the value of field 'markUnlinked'. + */ + public boolean getMarkUnlinked() + { + return this._markUnlinked; + } //-- boolean getMarkUnlinked() + + /** + * Returns the value of field 'newick'. + * + * @return String + * @return the value of field 'newick'. + */ + public java.lang.String getNewick() + { + return this._newick; + } //-- java.lang.String getNewick() + + /** + * Returns the value of field 'showBootstrap'. + * + * @return boolean + * @return the value of field 'showBootstrap'. + */ + public boolean getShowBootstrap() + { + return this._showBootstrap; + } //-- boolean getShowBootstrap() + + /** + * Returns the value of field 'showDistances'. + * + * @return boolean + * @return the value of field 'showDistances'. + */ + public boolean getShowDistances() + { + return this._showDistances; + } //-- boolean getShowDistances() + + /** + * Returns the value of field 'threshold'. + * + * @return float + * @return the value of field 'threshold'. + */ + public float getThreshold() + { + return this._threshold; + } //-- float getThreshold() + + /** + * Returns the value of field 'title'. + * + * @return String + * @return the value of field 'title'. + */ + public java.lang.String getTitle() + { + return this._title; + } //-- java.lang.String getTitle() + + /** + * Returns the value of field 'width'. + * + * @return int + * @return the value of field 'width'. + */ + public int getWidth() + { + return this._width; + } //-- int getWidth() + + /** + * Returns the value of field 'xpos'. + * + * @return int + * @return the value of field 'xpos'. + */ + public int getXpos() + { + return this._xpos; + } //-- int getXpos() + + /** + * Returns the value of field 'ypos'. + * + * @return int + * @return the value of field 'ypos'. + */ + public int getYpos() + { + return this._ypos; + } //-- int getYpos() + + /** + * Method hasCurrentTree + * + * + * + * @return boolean + */ + public boolean hasCurrentTree() + { + return this._has_currentTree; + } //-- boolean hasCurrentTree() + + /** + * Method hasFitToWindow + * + * + * + * @return boolean + */ + public boolean hasFitToWindow() + { + return this._has_fitToWindow; + } //-- boolean hasFitToWindow() + + /** + * Method hasFontSize + * + * + * + * @return boolean + */ + public boolean hasFontSize() + { + return this._has_fontSize; + } //-- boolean hasFontSize() + + /** + * Method hasFontStyle + * + * + * + * @return boolean + */ + public boolean hasFontStyle() + { + return this._has_fontStyle; + } //-- boolean hasFontStyle() + + /** + * Method hasHeight + * + * + * + * @return boolean + */ + public boolean hasHeight() + { + return this._has_height; + } //-- boolean hasHeight() + + /** + * Method hasMarkUnlinked + * + * + * + * @return boolean + */ + public boolean hasMarkUnlinked() + { + return this._has_markUnlinked; + } //-- boolean hasMarkUnlinked() + + /** + * Method hasShowBootstrap + * + * + * + * @return boolean + */ + public boolean hasShowBootstrap() + { + return this._has_showBootstrap; + } //-- boolean hasShowBootstrap() + + /** + * Method hasShowDistances + * + * + * + * @return boolean + */ + public boolean hasShowDistances() + { + return this._has_showDistances; + } //-- boolean hasShowDistances() + + /** + * Method hasThreshold + * + * + * + * @return boolean + */ + public boolean hasThreshold() + { + return this._has_threshold; + } //-- boolean hasThreshold() + + /** + * Method hasWidth + * + * + * + * @return boolean + */ + public boolean hasWidth() + { + return this._has_width; + } //-- boolean hasWidth() + + /** + * Method hasXpos + * + * + * + * @return boolean + */ + public boolean hasXpos() + { + return this._has_xpos; + } //-- boolean hasXpos() + + /** + * Method hasYpos + * + * + * + * @return boolean + */ + public boolean hasYpos() + { + return this._has_ypos; + } //-- boolean hasYpos() + + /** + * 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 'currentTree'. + * + * @param currentTree the value of field 'currentTree'. + */ + public void setCurrentTree(boolean currentTree) + { + this._currentTree = currentTree; + this._has_currentTree = true; + } //-- void setCurrentTree(boolean) + + /** + * Sets the value of field 'fitToWindow'. + * + * @param fitToWindow the value of field 'fitToWindow'. + */ + public void setFitToWindow(boolean fitToWindow) + { + this._fitToWindow = fitToWindow; + this._has_fitToWindow = true; + } //-- void setFitToWindow(boolean) + + /** + * Sets the value of field 'fontName'. + * + * @param fontName the value of field 'fontName'. + */ + public void setFontName(java.lang.String fontName) + { + this._fontName = fontName; + } //-- void setFontName(java.lang.String) + + /** + * Sets the value of field 'fontSize'. + * + * @param fontSize the value of field 'fontSize'. + */ + public void setFontSize(int fontSize) + { + this._fontSize = fontSize; + this._has_fontSize = true; + } //-- void setFontSize(int) + + /** + * Sets the value of field 'fontStyle'. + * + * @param fontStyle the value of field 'fontStyle'. + */ + public void setFontStyle(int fontStyle) + { + this._fontStyle = fontStyle; + this._has_fontStyle = true; + } //-- void setFontStyle(int) + + /** + * Sets the value of field 'height'. + * + * @param height the value of field 'height'. + */ + public void setHeight(int height) + { + this._height = height; + this._has_height = true; + } //-- void setHeight(int) + + /** + * Sets the value of field 'markUnlinked'. + * + * @param markUnlinked the value of field 'markUnlinked'. + */ + public void setMarkUnlinked(boolean markUnlinked) + { + this._markUnlinked = markUnlinked; + this._has_markUnlinked = true; + } //-- void setMarkUnlinked(boolean) + + /** + * Sets the value of field 'newick'. + * + * @param newick the value of field 'newick'. + */ + public void setNewick(java.lang.String newick) + { + this._newick = newick; + } //-- void setNewick(java.lang.String) + + /** + * Sets the value of field 'showBootstrap'. + * + * @param showBootstrap the value of field 'showBootstrap'. + */ + public void setShowBootstrap(boolean showBootstrap) + { + this._showBootstrap = showBootstrap; + this._has_showBootstrap = true; + } //-- void setShowBootstrap(boolean) + + /** + * Sets the value of field 'showDistances'. + * + * @param showDistances the value of field 'showDistances'. + */ + public void setShowDistances(boolean showDistances) + { + this._showDistances = showDistances; + this._has_showDistances = true; + } //-- void setShowDistances(boolean) + + /** + * Sets the value of field 'threshold'. + * + * @param threshold the value of field 'threshold'. + */ + public void setThreshold(float threshold) + { + this._threshold = threshold; + this._has_threshold = true; + } //-- void setThreshold(float) + + /** + * Sets the value of field 'title'. + * + * @param title the value of field 'title'. + */ + public void setTitle(java.lang.String title) + { + this._title = title; + } //-- void setTitle(java.lang.String) + + /** + * Sets the value of field 'width'. + * + * @param width the value of field 'width'. + */ + public void setWidth(int width) + { + this._width = width; + this._has_width = true; + } //-- void setWidth(int) + + /** + * Sets the value of field 'xpos'. + * + * @param xpos the value of field 'xpos'. + */ + public void setXpos(int xpos) + { + this._xpos = xpos; + this._has_xpos = true; + } //-- void setXpos(int) + + /** + * Sets the value of field 'ypos'. + * + * @param ypos the value of field 'ypos'. + */ + public void setYpos(int ypos) + { + this._ypos = ypos; + this._has_ypos = true; + } //-- void setYpos(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.schemabinding.version2.Tree) Unmarshaller.unmarshal(jalview.schemabinding.version2.Tree.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/schemabinding/version2/TreeDescriptor.java b/src/jalview/schemabinding/version2/TreeDescriptor.java index 1b7065e..5232c12 100755 --- a/src/jalview/schemabinding/version2/TreeDescriptor.java +++ b/src/jalview/schemabinding/version2/TreeDescriptor.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,925 +7,771 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class TreeDescriptor. - * + * * @version $Revision$ $Date$ */ -public class TreeDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public TreeDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "tree"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _width - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_width", "width", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - if (!target.hasWidth()) - { - return null; - } - return new java.lang.Integer(target.getWidth()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteWidth(); - return; - } - target.setWidth( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _width - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _height - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_height", "height", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() +public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public TreeDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "tree"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _width + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if(!target.hasWidth()) + return null; + return new java.lang.Integer(target.getWidth()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteWidth(); + return; + } + target.setWidth( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _width + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _height + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if(!target.hasHeight()) + return null; + return new java.lang.Integer(target.getHeight()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteHeight(); + return; + } + target.setHeight( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _height + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _xpos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if(!target.hasXpos()) + return null; + return new java.lang.Integer(target.getXpos()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteXpos(); + return; + } + target.setXpos( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _xpos + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _ypos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if(!target.hasYpos()) + return null; + return new java.lang.Integer(target.getYpos()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteYpos(); + return; + } + target.setYpos( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _ypos + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _fontName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + return target.getFontName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + target.setFontName( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _fontName + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _fontSize + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if(!target.hasFontSize()) + return null; + return new java.lang.Integer(target.getFontSize()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteFontSize(); + return; + } + target.setFontSize( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _fontSize + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _fontStyle + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if(!target.hasFontStyle()) + return null; + return new java.lang.Integer(target.getFontStyle()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteFontStyle(); + return; + } + target.setFontStyle( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _fontStyle + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _threshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if(!target.hasThreshold()) + return null; + return new java.lang.Float(target.getThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteThreshold(); + return; + } + target.setThreshold( ((java.lang.Float)value).floatValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _threshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + FloatValidator typeValidator = new FloatValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showBootstrap + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showBootstrap", "showBootstrap", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if(!target.hasShowBootstrap()) + return null; + return (target.getShowBootstrap() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowBootstrap(); + return; + } + target.setShowBootstrap( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _showBootstrap + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showDistances + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showDistances", "showDistances", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if(!target.hasShowDistances()) + return null; + return (target.getShowDistances() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowDistances(); + return; + } + target.setShowDistances( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _showDistances + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _markUnlinked + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_markUnlinked", "markUnlinked", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if(!target.hasMarkUnlinked()) + return null; + return (target.getMarkUnlinked() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteMarkUnlinked(); + return; + } + target.setMarkUnlinked( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _markUnlinked + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _fitToWindow + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_fitToWindow", "fitToWindow", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if(!target.hasFitToWindow()) + return null; + return (target.getFitToWindow() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteFitToWindow(); + return; + } + target.setFitToWindow( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _fitToWindow + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _currentTree + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_currentTree", "currentTree", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if(!target.hasCurrentTree()) + return null; + return (target.getCurrentTree() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteCurrentTree(); + return; + } + target.setCurrentTree( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _currentTree + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _title + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_title", "title", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + return target.getTitle(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + target.setTitle( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _title + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _newick + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_newick", "newick", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + return target.getNewick(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + target.setNewick( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _newick + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.TreeDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - if (!target.hasHeight()) - { - return null; - } - return new java.lang.Integer(target.getHeight()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteHeight(); - return; - } - target.setHeight( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _height - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _xpos - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - if (!target.hasXpos()) - { - return null; - } - return new java.lang.Integer(target.getXpos()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteXpos(); - return; - } - target.setXpos( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _xpos - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _ypos - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - if (!target.hasYpos()) - { - return null; - } - return new java.lang.Integer(target.getYpos()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteYpos(); - return; - } - target.setYpos( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _ypos - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _fontName - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_fontName", "fontName", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - return target.getFontName(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - target.setFontName( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _fontName - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _fontSize - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_fontSize", "fontSize", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return jalview.schemabinding.version2.Tree.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - if (!target.hasFontSize()) - { - return null; - } - return new java.lang.Integer(target.getFontSize()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteFontSize(); - return; - } - target.setFontSize( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _fontSize - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _fontStyle - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_fontStyle", "fontStyle", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - if (!target.hasFontStyle()) - { - return null; - } - return new java.lang.Integer(target.getFontStyle()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteFontStyle(); - return; - } - target.setFontStyle( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _fontStyle - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _threshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, - "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - if (!target.hasThreshold()) - { - return null; - } - return new java.lang.Float(target.getThreshold()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteThreshold(); - return; - } - target.setThreshold( ( (java.lang.Float) value).floatValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _threshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - FloatValidator typeValidator = new FloatValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _showBootstrap - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_showBootstrap", "showBootstrap", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - if (!target.hasShowBootstrap()) - { - return null; - } - return (target.getShowBootstrap() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteShowBootstrap(); - return; - } - target.setShowBootstrap( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _showBootstrap - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _showDistances - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_showDistances", "showDistances", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - if (!target.hasShowDistances()) - { - return null; - } - return (target.getShowDistances() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteShowDistances(); - return; - } - target.setShowDistances( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _showDistances - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _markUnlinked - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_markUnlinked", "markUnlinked", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - if (!target.hasMarkUnlinked()) - { - return null; - } - return (target.getMarkUnlinked() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteMarkUnlinked(); - return; - } - target.setMarkUnlinked( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _markUnlinked - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _fitToWindow - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_fitToWindow", "fitToWindow", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - if (!target.hasFitToWindow()) - { - return null; - } - return (target.getFitToWindow() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteFitToWindow(); - return; - } - target.setFitToWindow( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _fitToWindow - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _currentTree - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_currentTree", "currentTree", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - if (!target.hasCurrentTree()) - { - return null; - } - return (target.getCurrentTree() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteCurrentTree(); - return; - } - target.setCurrentTree( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _currentTree - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _title - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_title", "title", org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - return target.getTitle(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - target.setTitle( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _title - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _newick - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_newick", "newick", - org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Tree target = (Tree) object; - return target.getNewick(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Tree target = (Tree) object; - target.setNewick( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _newick - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.TreeDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.Tree.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/UserColourScheme.java b/src/jalview/schemabinding/version2/UserColourScheme.java index d186608..00bc181 100755 --- a/src/jalview/schemabinding/version2/UserColourScheme.java +++ b/src/jalview/schemabinding/version2/UserColourScheme.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,110 +7,112 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 +public class UserColourScheme extends JalviewUserColours +implements java.io.Serializable { - //----------------/ - //- Constructors -/ - //----------------/ - public UserColourScheme() - { - super(); - } //-- jalview.schemabinding.version2.UserColourScheme() + //----------------/ + //- Constructors -/ + //----------------/ - //-----------/ - //- Methods -/ - //-----------/ + public UserColourScheme() { + super(); + } //-- jalview.schemabinding.version2.UserColourScheme() - /** - * 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 - { + //-----------/ + //- Methods -/ + //-----------/ - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + /** + * 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 handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, 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, 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 + { + + 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.schemabinding.version2.UserColourScheme) Unmarshaller. - unmarshal(jalview.schemabinding.version2.UserColourScheme.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + /** + * 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.UserColourScheme) Unmarshaller.unmarshal(jalview.schemabinding.version2.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() + /** + * 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/schemabinding/version2/UserColourSchemeDescriptor.java b/src/jalview/schemabinding/version2/UserColourSchemeDescriptor.java index adcb59b..cf86a11 100755 --- a/src/jalview/schemabinding/version2/UserColourSchemeDescriptor.java +++ b/src/jalview/schemabinding/version2/UserColourSchemeDescriptor.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,159 +7,160 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; /** * Class UserColourSchemeDescriptor. - * + * * @version $Revision$ $Date$ */ -public class UserColourSchemeDescriptor - extends JalviewUserColoursDescriptor -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public UserColourSchemeDescriptor() - { - super(); - setExtendsWithoutFlatten(new JalviewUserColoursDescriptor()); - nsURI = "www.jalview.org"; - xmlName = "UserColourScheme"; - } //-- jalview.schemabinding.version2.UserColourSchemeDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return super.getExtends(); - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - if (identity == null) +public class UserColourSchemeDescriptor extends JalviewUserColoursDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public UserColourSchemeDescriptor() { + super(); + setExtendsWithoutFlatten(new JalviewUserColoursDescriptor()); + nsURI = "www.jalview.org"; + xmlName = "UserColourScheme"; + } //-- jalview.schemabinding.version2.UserColourSchemeDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return super.getExtends(); + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + if (identity == null) + return super.getIdentity(); + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.UserColourScheme.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() { - return super.getIdentity(); - } - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.UserColourScheme.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/UserColours.java b/src/jalview/schemabinding/version2/UserColours.java index fe77948..28f2b39 100755 --- a/src/jalview/schemabinding/version2/UserColours.java +++ b/src/jalview/schemabinding/version2/UserColours.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,167 +7,167 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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.schemabinding.version2.UserColourScheme _userColourScheme; - - //----------------/ - //- Constructors -/ - //----------------/ - - public UserColours() - { - super(); - } //-- jalview.schemabinding.version2.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.schemabinding.version2.UserColourScheme getUserColourScheme() - { - return this._userColourScheme; - } //-- jalview.schemabinding.version2.UserColourScheme getUserColourScheme() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try +public class UserColours implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _id + */ + private java.lang.String _id; + + /** + * Field _userColourScheme + */ + private jalview.schemabinding.version2.UserColourScheme _userColourScheme; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public UserColours() { + super(); + } //-- jalview.schemabinding.version2.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.schemabinding.version2.UserColourScheme getUserColourScheme() + { + return this._userColourScheme; + } //-- jalview.schemabinding.version2.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.schemabinding.version2.UserColourScheme userColourScheme) + { + this._userColourScheme = userColourScheme; + } //-- void setUserColourScheme(jalview.schemabinding.version2.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 { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + return (jalview.schemabinding.version2.UserColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.UserColours.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws 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) - - /** - * 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.schemabinding.version2. - UserColourScheme userColourScheme) - { - this._userColourScheme = userColourScheme; - } //-- void setUserColourScheme(jalview.schemabinding.version2.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.schemabinding.version2.UserColours) Unmarshaller.unmarshal( - jalview.schemabinding.version2.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/UserColoursDescriptor.java b/src/jalview/schemabinding/version2/UserColoursDescriptor.java index 29339a2..6c42d0b 100755 --- a/src/jalview/schemabinding/version2/UserColoursDescriptor.java +++ b/src/jalview/schemabinding/version2/UserColoursDescriptor.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,252 +7,239 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class UserColoursDescriptor. - * + * * @version $Revision$ $Date$ */ -public class UserColoursDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public UserColoursDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "UserColours"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _id - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - UserColours target = (UserColours) object; - return target.getId(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - UserColours target = (UserColours) object; - target.setId( (java.lang.String) value); +public class UserColoursDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public UserColoursDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "UserColours"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + UserColours target = (UserColours) object; + return target.getId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + UserColours target = (UserColours) object; + target.setId( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _id + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _userColourScheme + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.UserColourScheme.class, "_userColourScheme", "UserColourScheme", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + UserColours target = (UserColours) object; + return target.getUserColourScheme(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + UserColours target = (UserColours) object; + target.setUserColourScheme( (jalview.schemabinding.version2.UserColourScheme) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.UserColourScheme(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _userColourScheme + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.UserColoursDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _id - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _userColourScheme - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.UserColourScheme.class, "_userColourScheme", - "UserColourScheme", org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - UserColours target = (UserColours) object; - return target.getUserColourScheme(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - UserColours target = (UserColours) object; - target.setUserColourScheme( (jalview.schemabinding.version2. - UserColourScheme) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.UserColourScheme(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _userColourScheme - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.UserColoursDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.UserColours.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.UserColours.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/VAMSAS.java b/src/jalview/schemabinding/version2/VAMSAS.java index 8a4803c..03633d6 100755 --- a/src/jalview/schemabinding/version2/VAMSAS.java +++ b/src/jalview/schemabinding/version2/VAMSAS.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,435 +7,419 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import java.util.*; -import org.exolab.castor.xml.*; +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 VAMSAS. - * + * * @version $Revision$ $Date$ */ -public class VAMSAS - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _treeList - */ - private java.util.Vector _treeList; - - /** - * Field _sequenceSetList - */ - private java.util.Vector _sequenceSetList; - - //----------------/ - //- Constructors -/ - //----------------/ - - public VAMSAS() - { - super(); - _treeList = new Vector(); - _sequenceSetList = new Vector(); - } //-- jalview.schemabinding.version2.VAMSAS() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method addSequenceSet - * - * - * - * @param vSequenceSet - */ - public void addSequenceSet(jalview.schemabinding.version2.SequenceSet - vSequenceSet) - throws java.lang.IndexOutOfBoundsException - { - _sequenceSetList.addElement(vSequenceSet); - } //-- void addSequenceSet(jalview.schemabinding.version2.SequenceSet) - - /** - * Method addSequenceSet - * - * - * - * @param index - * @param vSequenceSet - */ - public void addSequenceSet(int index, - jalview.schemabinding.version2.SequenceSet - vSequenceSet) - throws java.lang.IndexOutOfBoundsException - { - _sequenceSetList.insertElementAt(vSequenceSet, index); - } //-- void addSequenceSet(int, jalview.schemabinding.version2.SequenceSet) - - /** - * Method addTree - * - * - * - * @param vTree - */ - public void addTree(java.lang.String vTree) - throws java.lang.IndexOutOfBoundsException - { - _treeList.addElement(vTree); - } //-- void addTree(java.lang.String) - - /** - * Method addTree - * - * - * - * @param index - * @param vTree - */ - public void addTree(int index, java.lang.String vTree) - throws java.lang.IndexOutOfBoundsException - { - _treeList.insertElementAt(vTree, index); - } //-- void addTree(int, java.lang.String) - - /** - * Method enumerateSequenceSet - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateSequenceSet() - { - return _sequenceSetList.elements(); - } //-- java.util.Enumeration enumerateSequenceSet() - - /** - * Method enumerateTree - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateTree() - { - return _treeList.elements(); - } //-- java.util.Enumeration enumerateTree() - - /** - * Method getSequenceSet - * - * - * - * @param index - * @return SequenceSet - */ - public jalview.schemabinding.version2.SequenceSet getSequenceSet(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _sequenceSetList.size())) +public class VAMSAS implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _treeList + */ + private java.util.Vector _treeList; + + /** + * Field _sequenceSetList + */ + private java.util.Vector _sequenceSetList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public VAMSAS() { + super(); + _treeList = new Vector(); + _sequenceSetList = new Vector(); + } //-- jalview.schemabinding.version2.VAMSAS() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addSequenceSet + * + * + * + * @param vSequenceSet + */ + public void addSequenceSet(jalview.schemabinding.version2.SequenceSet vSequenceSet) + throws java.lang.IndexOutOfBoundsException + { + _sequenceSetList.addElement(vSequenceSet); + } //-- void addSequenceSet(jalview.schemabinding.version2.SequenceSet) + + /** + * Method addSequenceSet + * + * + * + * @param index + * @param vSequenceSet + */ + public void addSequenceSet(int index, jalview.schemabinding.version2.SequenceSet vSequenceSet) + throws java.lang.IndexOutOfBoundsException + { + _sequenceSetList.insertElementAt(vSequenceSet, index); + } //-- void addSequenceSet(int, jalview.schemabinding.version2.SequenceSet) + + /** + * Method addTree + * + * + * + * @param vTree + */ + public void addTree(java.lang.String vTree) + throws java.lang.IndexOutOfBoundsException + { + _treeList.addElement(vTree); + } //-- void addTree(java.lang.String) + + /** + * Method addTree + * + * + * + * @param index + * @param vTree + */ + public void addTree(int index, java.lang.String vTree) + throws java.lang.IndexOutOfBoundsException + { + _treeList.insertElementAt(vTree, index); + } //-- void addTree(int, java.lang.String) + + /** + * Method enumerateSequenceSet + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateSequenceSet() + { + return _sequenceSetList.elements(); + } //-- java.util.Enumeration enumerateSequenceSet() + + /** + * Method enumerateTree + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateTree() + { + return _treeList.elements(); + } //-- java.util.Enumeration enumerateTree() + + /** + * Method getSequenceSet + * + * + * + * @param index + * @return SequenceSet + */ + public jalview.schemabinding.version2.SequenceSet getSequenceSet(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _sequenceSetList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.SequenceSet) _sequenceSetList.elementAt(index); + } //-- jalview.schemabinding.version2.SequenceSet getSequenceSet(int) + + /** + * Method getSequenceSet + * + * + * + * @return SequenceSet + */ + public jalview.schemabinding.version2.SequenceSet[] getSequenceSet() + { + int size = _sequenceSetList.size(); + jalview.schemabinding.version2.SequenceSet[] mArray = new jalview.schemabinding.version2.SequenceSet[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.SequenceSet) _sequenceSetList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.SequenceSet[] getSequenceSet() + + /** + * Method getSequenceSetCount + * + * + * + * @return int + */ + public int getSequenceSetCount() + { + return _sequenceSetList.size(); + } //-- int getSequenceSetCount() + + /** + * Method getTree + * + * + * + * @param index + * @return String + */ + public java.lang.String getTree(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _treeList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (String)_treeList.elementAt(index); + } //-- java.lang.String getTree(int) + + /** + * Method getTree + * + * + * + * @return String + */ + public java.lang.String[] getTree() + { + int size = _treeList.size(); + java.lang.String[] mArray = new java.lang.String[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (String)_treeList.elementAt(index); + } + return mArray; + } //-- java.lang.String[] getTree() + + /** + * Method getTreeCount + * + * + * + * @return int + */ + public int getTreeCount() + { + return _treeList.size(); + } //-- int getTreeCount() + + /** + * 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 removeAllSequenceSet + * + */ + public void removeAllSequenceSet() { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.SequenceSet) _sequenceSetList. - elementAt(index); - } //-- jalview.schemabinding.version2.SequenceSet getSequenceSet(int) - - /** - * Method getSequenceSet - * - * - * - * @return SequenceSet - */ - public jalview.schemabinding.version2.SequenceSet[] getSequenceSet() - { - int size = _sequenceSetList.size(); - jalview.schemabinding.version2.SequenceSet[] mArray = new jalview. - schemabinding.version2.SequenceSet[size]; - for (int index = 0; index < size; index++) + _sequenceSetList.removeAllElements(); + } //-- void removeAllSequenceSet() + + /** + * Method removeAllTree + * + */ + public void removeAllTree() { - mArray[index] = (jalview.schemabinding.version2.SequenceSet) - _sequenceSetList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.SequenceSet[] getSequenceSet() - - /** - * Method getSequenceSetCount - * - * - * - * @return int - */ - public int getSequenceSetCount() - { - return _sequenceSetList.size(); - } //-- int getSequenceSetCount() - - /** - * Method getTree - * - * - * - * @param index - * @return String - */ - public java.lang.String getTree(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _treeList.size())) + _treeList.removeAllElements(); + } //-- void removeAllTree() + + /** + * Method removeSequenceSet + * + * + * + * @param index + * @return SequenceSet + */ + public jalview.schemabinding.version2.SequenceSet removeSequenceSet(int index) { - throw new IndexOutOfBoundsException(); - } - - return (String) _treeList.elementAt(index); - } //-- java.lang.String getTree(int) - - /** - * Method getTree - * - * - * - * @return String - */ - public java.lang.String[] getTree() - { - int size = _treeList.size(); - java.lang.String[] mArray = new java.lang.String[size]; - for (int index = 0; index < size; index++) + java.lang.Object obj = _sequenceSetList.elementAt(index); + _sequenceSetList.removeElementAt(index); + return (jalview.schemabinding.version2.SequenceSet) obj; + } //-- jalview.schemabinding.version2.SequenceSet removeSequenceSet(int) + + /** + * Method removeTree + * + * + * + * @param index + * @return String + */ + public java.lang.String removeTree(int index) { - mArray[index] = (String) _treeList.elementAt(index); - } - return mArray; - } //-- java.lang.String[] getTree() - - /** - * Method getTreeCount - * - * - * - * @return int - */ - public int getTreeCount() - { - return _treeList.size(); - } //-- int getTreeCount() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try + java.lang.Object obj = _treeList.elementAt(index); + _treeList.removeElementAt(index); + return (String)obj; + } //-- java.lang.String removeTree(int) + + /** + * Method setSequenceSet + * + * + * + * @param index + * @param vSequenceSet + */ + public void setSequenceSet(int index, jalview.schemabinding.version2.SequenceSet vSequenceSet) + throws java.lang.IndexOutOfBoundsException { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) + //-- check bounds for index + if ((index < 0) || (index > _sequenceSetList.size())) { + throw new IndexOutOfBoundsException(); + } + _sequenceSetList.setElementAt(vSequenceSet, index); + } //-- void setSequenceSet(int, jalview.schemabinding.version2.SequenceSet) + + /** + * Method setSequenceSet + * + * + * + * @param sequenceSetArray + */ + public void setSequenceSet(jalview.schemabinding.version2.SequenceSet[] sequenceSetArray) { - 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 removeAllSequenceSet - * - */ - public void removeAllSequenceSet() - { - _sequenceSetList.removeAllElements(); - } //-- void removeAllSequenceSet() - - /** - * Method removeAllTree - * - */ - public void removeAllTree() - { - _treeList.removeAllElements(); - } //-- void removeAllTree() - - /** - * Method removeSequenceSet - * - * - * - * @param index - * @return SequenceSet - */ - public jalview.schemabinding.version2.SequenceSet removeSequenceSet(int index) - { - java.lang.Object obj = _sequenceSetList.elementAt(index); - _sequenceSetList.removeElementAt(index); - return (jalview.schemabinding.version2.SequenceSet) obj; - } //-- jalview.schemabinding.version2.SequenceSet removeSequenceSet(int) - - /** - * Method removeTree - * - * - * - * @param index - * @return String - */ - public java.lang.String removeTree(int index) - { - java.lang.Object obj = _treeList.elementAt(index); - _treeList.removeElementAt(index); - return (String) obj; - } //-- java.lang.String removeTree(int) - - /** - * Method setSequenceSet - * - * - * - * @param index - * @param vSequenceSet - */ - public void setSequenceSet(int index, - jalview.schemabinding.version2.SequenceSet - vSequenceSet) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _sequenceSetList.size())) + //-- copy array + _sequenceSetList.removeAllElements(); + for (int i = 0; i < sequenceSetArray.length; i++) { + _sequenceSetList.addElement(sequenceSetArray[i]); + } + } //-- void setSequenceSet(jalview.schemabinding.version2.SequenceSet) + + /** + * Method setTree + * + * + * + * @param index + * @param vTree + */ + public void setTree(int index, java.lang.String vTree) + throws java.lang.IndexOutOfBoundsException { - throw new IndexOutOfBoundsException(); - } - _sequenceSetList.setElementAt(vSequenceSet, index); - } //-- void setSequenceSet(int, jalview.schemabinding.version2.SequenceSet) - - /** - * Method setSequenceSet - * - * - * - * @param sequenceSetArray - */ - public void setSequenceSet(jalview.schemabinding.version2.SequenceSet[] - sequenceSetArray) - { - //-- copy array - _sequenceSetList.removeAllElements(); - for (int i = 0; i < sequenceSetArray.length; i++) + //-- check bounds for index + if ((index < 0) || (index > _treeList.size())) { + throw new IndexOutOfBoundsException(); + } + _treeList.setElementAt(vTree, index); + } //-- void setTree(int, java.lang.String) + + /** + * Method setTree + * + * + * + * @param treeArray + */ + public void setTree(java.lang.String[] treeArray) { - _sequenceSetList.addElement(sequenceSetArray[i]); - } - } //-- void setSequenceSet(jalview.schemabinding.version2.SequenceSet) - - /** - * Method setTree - * - * - * - * @param index - * @param vTree - */ - public void setTree(int index, java.lang.String vTree) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _treeList.size())) + //-- copy array + _treeList.removeAllElements(); + for (int i = 0; i < treeArray.length; i++) { + _treeList.addElement(treeArray[i]); + } + } //-- void setTree(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 { - throw new IndexOutOfBoundsException(); - } - _treeList.setElementAt(vTree, index); - } //-- void setTree(int, java.lang.String) - - /** - * Method setTree - * - * - * - * @param treeArray - */ - public void setTree(java.lang.String[] treeArray) - { - //-- copy array - _treeList.removeAllElements(); - for (int i = 0; i < treeArray.length; i++) + return (jalview.schemabinding.version2.VAMSAS) Unmarshaller.unmarshal(jalview.schemabinding.version2.VAMSAS.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException { - _treeList.addElement(treeArray[i]); - } - } //-- void setTree(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.VAMSAS) Unmarshaller.unmarshal( - jalview.schemabinding.version2.VAMSAS.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() + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() } diff --git a/src/jalview/schemabinding/version2/VAMSASDescriptor.java b/src/jalview/schemabinding/version2/VAMSASDescriptor.java index 89d4157..fad185b 100755 --- a/src/jalview/schemabinding/version2/VAMSASDescriptor.java +++ b/src/jalview/schemabinding/version2/VAMSASDescriptor.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,255 +7,241 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class VAMSASDescriptor. - * + * * @version $Revision$ $Date$ */ -public class VAMSASDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public VAMSASDescriptor() - { - super(); - nsURI = "www.vamsas.ac.uk/jalview/version2"; - xmlName = "VAMSAS"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- initialize element descriptors - - //-- _treeList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_treeList", "Tree", - org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - VAMSAS target = (VAMSAS) object; - return target.getTree(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - VAMSAS target = (VAMSAS) object; - target.addTree( (java.lang.String) value); +public class VAMSASDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public VAMSASDescriptor() { + super(); + nsURI = "www.vamsas.ac.uk/jalview/version2"; + xmlName = "VAMSAS"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _treeList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_treeList", "Tree", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + VAMSAS target = (VAMSAS) object; + return target.getTree(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + VAMSAS target = (VAMSAS) object; + target.addTree( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _treeList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _sequenceSetList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.SequenceSet.class, "_sequenceSetList", "SequenceSet", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + VAMSAS target = (VAMSAS) object; + return target.getSequenceSet(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + VAMSAS target = (VAMSAS) object; + target.addSequenceSet( (jalview.schemabinding.version2.SequenceSet) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.SequenceSet(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _sequenceSetList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.VAMSASDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { return null; - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _treeList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _sequenceSetList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.SequenceSet.class, "_sequenceSetList", - "SequenceSet", org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - VAMSAS target = (VAMSAS) object; - return target.getSequenceSet(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - VAMSAS target = (VAMSAS) object; - target.addSequenceSet( (jalview.schemabinding.version2.SequenceSet) - value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.SequenceSet(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _sequenceSetList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.VAMSASDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.VAMSAS.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.VAMSAS.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/VamsasModel.java b/src/jalview/schemabinding/version2/VamsasModel.java index abd267f..4617903 100755 --- a/src/jalview/schemabinding/version2/VamsasModel.java +++ b/src/jalview/schemabinding/version2/VamsasModel.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,110 +7,112 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -import org.exolab.castor.xml.*; +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 VamsasModel. - * + * * @version $Revision$ $Date$ */ -public class VamsasModel - extends VAMSAS implements java.io.Serializable +public class VamsasModel extends VAMSAS +implements java.io.Serializable { - //----------------/ - //- Constructors -/ - //----------------/ - public VamsasModel() - { - super(); - } //-- jalview.schemabinding.version2.VamsasModel() + //----------------/ + //- Constructors -/ + //----------------/ - //-----------/ - //- Methods -/ - //-----------/ + public VamsasModel() { + super(); + } //-- jalview.schemabinding.version2.VamsasModel() - /** - * 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 - { + //-----------/ + //- Methods -/ + //-----------/ - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + /** + * 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 handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, 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, 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 + { + + 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.schemabinding.version2.VamsasModel) Unmarshaller.unmarshal( - jalview.schemabinding.version2.VamsasModel.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + /** + * 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.VamsasModel) Unmarshaller.unmarshal(jalview.schemabinding.version2.VamsasModel.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() + /** + * 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/schemabinding/version2/VamsasModelDescriptor.java b/src/jalview/schemabinding/version2/VamsasModelDescriptor.java index 95adf50..e40d9c8 100755 --- a/src/jalview/schemabinding/version2/VamsasModelDescriptor.java +++ b/src/jalview/schemabinding/version2/VamsasModelDescriptor.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,159 +7,160 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; /** * Class VamsasModelDescriptor. - * + * * @version $Revision$ $Date$ */ -public class VamsasModelDescriptor - extends VAMSASDescriptor -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public VamsasModelDescriptor() - { - super(); - setExtendsWithoutFlatten(new VAMSASDescriptor()); - nsURI = "www.jalview.org"; - xmlName = "vamsasModel"; - } //-- jalview.schemabinding.version2.VamsasModelDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return super.getExtends(); - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - if (identity == null) +public class VamsasModelDescriptor extends VAMSASDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public VamsasModelDescriptor() { + super(); + setExtendsWithoutFlatten(new VAMSASDescriptor()); + nsURI = "www.jalview.org"; + xmlName = "vamsasModel"; + } //-- jalview.schemabinding.version2.VamsasModelDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return super.getExtends(); + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + if (identity == null) + return super.getIdentity(); + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return jalview.schemabinding.version2.VamsasModel.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() { - return super.getIdentity(); - } - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.VamsasModel.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return xmlName; + } //-- java.lang.String getXMLName() } diff --git a/src/jalview/schemabinding/version2/Viewport.java b/src/jalview/schemabinding/version2/Viewport.java index 978ab5c..6dfb14f 100755 --- a/src/jalview/schemabinding/version2/Viewport.java +++ b/src/jalview/schemabinding/version2/Viewport.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,1767 +7,1752 @@ package jalview.schemabinding.version2; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ - -import java.util.*; -import org.exolab.castor.xml.*; +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 Viewport. - * + * * @version $Revision$ $Date$ */ -public class Viewport - implements java.io.Serializable -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _conservationSelected - */ - private boolean _conservationSelected; - - /** - * keeps track of state for field: _conservationSelected - */ - private boolean _has_conservationSelected; - - /** - * Field _pidSelected - */ - private boolean _pidSelected; - - /** - * keeps track of state for field: _pidSelected - */ - private boolean _has_pidSelected; - - /** - * Field _bgColour - */ - private java.lang.String _bgColour; - - /** - * Field _consThreshold - */ - private int _consThreshold; - - /** - * keeps track of state for field: _consThreshold - */ - private boolean _has_consThreshold; - - /** - * Field _pidThreshold - */ - private int _pidThreshold; - - /** - * keeps track of state for field: _pidThreshold - */ - private boolean _has_pidThreshold; - - /** - * Field _title - */ - private java.lang.String _title; - - /** - * Field _showFullId - */ - private boolean _showFullId; - - /** - * keeps track of state for field: _showFullId - */ - private boolean _has_showFullId; - - /** - * Field _rightAlignIds - */ - private boolean _rightAlignIds; - - /** - * keeps track of state for field: _rightAlignIds - */ - private boolean _has_rightAlignIds; - - /** - * Field _showText - */ - private boolean _showText; - - /** - * keeps track of state for field: _showText - */ - private boolean _has_showText; - - /** - * Field _showColourText - */ - private boolean _showColourText; - - /** - * keeps track of state for field: _showColourText - */ - private boolean _has_showColourText; - - /** - * Field _showBoxes - */ - private boolean _showBoxes; - - /** - * keeps track of state for field: _showBoxes - */ - private boolean _has_showBoxes; - - /** - * Field _wrapAlignment - */ - private boolean _wrapAlignment; - - /** - * keeps track of state for field: _wrapAlignment - */ - private boolean _has_wrapAlignment; - - /** - * Field _renderGaps - */ - private boolean _renderGaps; - - /** - * keeps track of state for field: _renderGaps - */ - private boolean _has_renderGaps; - - /** - * Field _showSequenceFeatures - */ - private boolean _showSequenceFeatures; - - /** - * keeps track of state for field: _showSequenceFeatures - */ - private boolean _has_showSequenceFeatures; - - /** - * Field _showAnnotation - */ - private boolean _showAnnotation; - - /** - * keeps track of state for field: _showAnnotation - */ - private boolean _has_showAnnotation; - - /** - * Field _xpos - */ - private int _xpos; - - /** - * keeps track of state for field: _xpos - */ - private boolean _has_xpos; - - /** - * Field _ypos - */ - private int _ypos; - - /** - * keeps track of state for field: _ypos - */ - private boolean _has_ypos; - - /** - * Field _width - */ - private int _width; - - /** - * keeps track of state for field: _width - */ - private boolean _has_width; - - /** - * Field _height - */ - private int _height; - - /** - * keeps track of state for field: _height - */ - private boolean _has_height; - - /** - * Field _startRes - */ - private int _startRes; - - /** - * keeps track of state for field: _startRes - */ - private boolean _has_startRes; - - /** - * Field _startSeq - */ - private int _startSeq; - - /** - * keeps track of state for field: _startSeq - */ - private boolean _has_startSeq; - - /** - * Field _fontName - */ - private java.lang.String _fontName; - - /** - * Field _fontSize - */ - private int _fontSize; - - /** - * keeps track of state for field: _fontSize - */ - private boolean _has_fontSize; - - /** - * Field _fontStyle - */ - private int _fontStyle; - - /** - * keeps track of state for field: _fontStyle - */ - private boolean _has_fontStyle; - - /** - * Field _viewName - */ - private java.lang.String _viewName; - - /** - * Field _sequenceSetId - */ - private java.lang.String _sequenceSetId; - - /** - * Field _gatheredViews - */ - private boolean _gatheredViews; - - /** - * keeps track of state for field: _gatheredViews - */ - private boolean _has_gatheredViews; - - /** - * Field _textCol1 - */ - private int _textCol1; - - /** - * keeps track of state for field: _textCol1 - */ - private boolean _has_textCol1; - - /** - * Field _textCol2 - */ - private int _textCol2; - - /** - * keeps track of state for field: _textCol2 - */ - private boolean _has_textCol2; - - /** - * Field _textColThreshold - */ - private int _textColThreshold; - - /** - * keeps track of state for field: _textColThreshold - */ - private boolean _has_textColThreshold; - - /** - * Field _annotationColours - */ - private jalview.schemabinding.version2.AnnotationColours _annotationColours; - - /** - * Field _hiddenColumnsList - */ - private java.util.Vector _hiddenColumnsList; - - //----------------/ - //- Constructors -/ - //----------------/ - - public Viewport() - { - super(); - _hiddenColumnsList = new Vector(); - } //-- jalview.schemabinding.version2.Viewport() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method addHiddenColumns - * - * - * - * @param vHiddenColumns - */ - public void addHiddenColumns(jalview.schemabinding.version2.HiddenColumns - vHiddenColumns) - throws java.lang.IndexOutOfBoundsException - { - _hiddenColumnsList.addElement(vHiddenColumns); - } //-- void addHiddenColumns(jalview.schemabinding.version2.HiddenColumns) - - /** - * Method addHiddenColumns - * - * - * - * @param index - * @param vHiddenColumns - */ - public void addHiddenColumns(int index, - jalview.schemabinding.version2.HiddenColumns - vHiddenColumns) - throws java.lang.IndexOutOfBoundsException - { - _hiddenColumnsList.insertElementAt(vHiddenColumns, index); - } //-- void addHiddenColumns(int, jalview.schemabinding.version2.HiddenColumns) - - /** - * Method deleteConsThreshold - * - */ - public void deleteConsThreshold() - { - this._has_consThreshold = false; - } //-- void deleteConsThreshold() - - /** - * Method deleteConservationSelected - * - */ - public void deleteConservationSelected() - { - this._has_conservationSelected = false; - } //-- void deleteConservationSelected() - - /** - * Method deleteFontSize - * - */ - public void deleteFontSize() - { - this._has_fontSize = false; - } //-- void deleteFontSize() - - /** - * Method deleteFontStyle - * - */ - public void deleteFontStyle() - { - this._has_fontStyle = false; - } //-- void deleteFontStyle() - - /** - * Method deleteGatheredViews - * - */ - public void deleteGatheredViews() - { - this._has_gatheredViews = false; - } //-- void deleteGatheredViews() - - /** - * Method deleteHeight - * - */ - public void deleteHeight() - { - this._has_height = false; - } //-- void deleteHeight() - - /** - * Method deletePidSelected - * - */ - public void deletePidSelected() - { - this._has_pidSelected = false; - } //-- void deletePidSelected() - - /** - * Method deletePidThreshold - * - */ - public void deletePidThreshold() - { - this._has_pidThreshold = false; - } //-- void deletePidThreshold() - - /** - * Method deleteRenderGaps - * - */ - public void deleteRenderGaps() - { - this._has_renderGaps = false; - } //-- void deleteRenderGaps() - - /** - * Method deleteRightAlignIds - * - */ - public void deleteRightAlignIds() - { - this._has_rightAlignIds = false; - } //-- void deleteRightAlignIds() - - /** - * Method deleteShowAnnotation - * - */ - public void deleteShowAnnotation() - { - this._has_showAnnotation = false; - } //-- void deleteShowAnnotation() - - /** - * Method deleteShowBoxes - * - */ - public void deleteShowBoxes() - { - this._has_showBoxes = false; - } //-- void deleteShowBoxes() - - /** - * Method deleteShowColourText - * - */ - public void deleteShowColourText() - { - this._has_showColourText = false; - } //-- void deleteShowColourText() - - /** - * Method deleteShowFullId - * - */ - public void deleteShowFullId() - { - this._has_showFullId = false; - } //-- void deleteShowFullId() - - /** - * Method deleteShowSequenceFeatures - * - */ - public void deleteShowSequenceFeatures() - { - this._has_showSequenceFeatures = false; - } //-- void deleteShowSequenceFeatures() - - /** - * Method deleteShowText - * - */ - public void deleteShowText() - { - this._has_showText = false; - } //-- void deleteShowText() - - /** - * Method deleteStartRes - * - */ - public void deleteStartRes() - { - this._has_startRes = false; - } //-- void deleteStartRes() - - /** - * Method deleteStartSeq - * - */ - public void deleteStartSeq() - { - this._has_startSeq = false; - } //-- void deleteStartSeq() - - /** - * Method deleteTextCol1 - * - */ - public void deleteTextCol1() - { - this._has_textCol1 = false; - } //-- void deleteTextCol1() - - /** - * Method deleteTextCol2 - * - */ - public void deleteTextCol2() - { - this._has_textCol2 = false; - } //-- void deleteTextCol2() - - /** - * Method deleteTextColThreshold - * - */ - public void deleteTextColThreshold() - { - this._has_textColThreshold = false; - } //-- void deleteTextColThreshold() - - /** - * Method deleteWidth - * - */ - public void deleteWidth() - { - this._has_width = false; - } //-- void deleteWidth() - - /** - * Method deleteWrapAlignment - * - */ - public void deleteWrapAlignment() - { - this._has_wrapAlignment = false; - } //-- void deleteWrapAlignment() - - /** - * Method deleteXpos - * - */ - public void deleteXpos() - { - this._has_xpos = false; - } //-- void deleteXpos() - - /** - * Method deleteYpos - * - */ - public void deleteYpos() - { - this._has_ypos = false; - } //-- void deleteYpos() - - /** - * Method enumerateHiddenColumns - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateHiddenColumns() - { - return _hiddenColumnsList.elements(); - } //-- java.util.Enumeration enumerateHiddenColumns() - - /** - * Returns the value of field 'annotationColours'. - * - * @return AnnotationColours - * @return the value of field 'annotationColours'. - */ - public jalview.schemabinding.version2.AnnotationColours getAnnotationColours() - { - return this._annotationColours; - } //-- jalview.schemabinding.version2.AnnotationColours getAnnotationColours() - - /** - * Returns the value of field 'bgColour'. - * - * @return String - * @return the value of field 'bgColour'. - */ - public java.lang.String getBgColour() - { - return this._bgColour; - } //-- java.lang.String getBgColour() - - /** - * Returns the value of field 'consThreshold'. - * - * @return int - * @return the value of field 'consThreshold'. - */ - public int getConsThreshold() - { - return this._consThreshold; - } //-- int getConsThreshold() - - /** - * Returns the value of field 'conservationSelected'. - * - * @return boolean - * @return the value of field 'conservationSelected'. - */ - public boolean getConservationSelected() - { - return this._conservationSelected; - } //-- boolean getConservationSelected() - - /** - * Returns the value of field 'fontName'. - * - * @return String - * @return the value of field 'fontName'. - */ - public java.lang.String getFontName() - { - return this._fontName; - } //-- java.lang.String getFontName() - - /** - * Returns the value of field 'fontSize'. - * - * @return int - * @return the value of field 'fontSize'. - */ - public int getFontSize() - { - return this._fontSize; - } //-- int getFontSize() - - /** - * Returns the value of field 'fontStyle'. - * - * @return int - * @return the value of field 'fontStyle'. - */ - public int getFontStyle() - { - return this._fontStyle; - } //-- int getFontStyle() - - /** - * Returns the value of field 'gatheredViews'. - * - * @return boolean - * @return the value of field 'gatheredViews'. - */ - public boolean getGatheredViews() - { - return this._gatheredViews; - } //-- boolean getGatheredViews() - - /** - * Returns the value of field 'height'. - * - * @return int - * @return the value of field 'height'. - */ - public int getHeight() - { - return this._height; - } //-- int getHeight() - - /** - * Method getHiddenColumns - * - * - * - * @param index - * @return HiddenColumns - */ - public jalview.schemabinding.version2.HiddenColumns getHiddenColumns(int - index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _hiddenColumnsList.size())) - { - throw new IndexOutOfBoundsException(); - } - - return (jalview.schemabinding.version2.HiddenColumns) _hiddenColumnsList. - elementAt(index); - } //-- jalview.schemabinding.version2.HiddenColumns getHiddenColumns(int) - - /** - * Method getHiddenColumns - * - * - * - * @return HiddenColumns - */ - public jalview.schemabinding.version2.HiddenColumns[] getHiddenColumns() - { - int size = _hiddenColumnsList.size(); - jalview.schemabinding.version2.HiddenColumns[] mArray = new jalview. - schemabinding.version2.HiddenColumns[size]; - for (int index = 0; index < size; index++) - { - mArray[index] = (jalview.schemabinding.version2.HiddenColumns) - _hiddenColumnsList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.HiddenColumns[] getHiddenColumns() - - /** - * Method getHiddenColumnsCount - * - * - * - * @return int - */ - public int getHiddenColumnsCount() - { - return _hiddenColumnsList.size(); - } //-- int getHiddenColumnsCount() - - /** - * Returns the value of field 'pidSelected'. - * - * @return boolean - * @return the value of field 'pidSelected'. - */ - public boolean getPidSelected() - { - return this._pidSelected; - } //-- boolean getPidSelected() - - /** - * Returns the value of field 'pidThreshold'. - * - * @return int - * @return the value of field 'pidThreshold'. - */ - public int getPidThreshold() - { - return this._pidThreshold; - } //-- int getPidThreshold() - - /** - * Returns the value of field 'renderGaps'. - * - * @return boolean - * @return the value of field 'renderGaps'. - */ - public boolean getRenderGaps() - { - return this._renderGaps; - } //-- boolean getRenderGaps() - - /** - * Returns the value of field 'rightAlignIds'. - * - * @return boolean - * @return the value of field 'rightAlignIds'. - */ - public boolean getRightAlignIds() - { - return this._rightAlignIds; - } //-- boolean getRightAlignIds() - - /** - * Returns the value of field 'sequenceSetId'. - * - * @return String - * @return the value of field 'sequenceSetId'. - */ - public java.lang.String getSequenceSetId() - { - return this._sequenceSetId; - } //-- java.lang.String getSequenceSetId() - - /** - * Returns the value of field 'showAnnotation'. - * - * @return boolean - * @return the value of field 'showAnnotation'. - */ - public boolean getShowAnnotation() - { - return this._showAnnotation; - } //-- boolean getShowAnnotation() - - /** - * Returns the value of field 'showBoxes'. - * - * @return boolean - * @return the value of field 'showBoxes'. - */ - public boolean getShowBoxes() - { - return this._showBoxes; - } //-- boolean getShowBoxes() - - /** - * Returns the value of field 'showColourText'. - * - * @return boolean - * @return the value of field 'showColourText'. - */ - public boolean getShowColourText() - { - return this._showColourText; - } //-- boolean getShowColourText() - - /** - * Returns the value of field 'showFullId'. - * - * @return boolean - * @return the value of field 'showFullId'. - */ - public boolean getShowFullId() - { - return this._showFullId; - } //-- boolean getShowFullId() - - /** - * Returns the value of field 'showSequenceFeatures'. - * - * @return boolean - * @return the value of field 'showSequenceFeatures'. - */ - public boolean getShowSequenceFeatures() - { - return this._showSequenceFeatures; - } //-- boolean getShowSequenceFeatures() - - /** - * Returns the value of field 'showText'. - * - * @return boolean - * @return the value of field 'showText'. - */ - public boolean getShowText() - { - return this._showText; - } //-- boolean getShowText() - - /** - * Returns the value of field 'startRes'. - * - * @return int - * @return the value of field 'startRes'. - */ - public int getStartRes() - { - return this._startRes; - } //-- int getStartRes() - - /** - * Returns the value of field 'startSeq'. - * - * @return int - * @return the value of field 'startSeq'. - */ - public int getStartSeq() - { - return this._startSeq; - } //-- int getStartSeq() - - /** - * Returns the value of field 'textCol1'. - * - * @return int - * @return the value of field 'textCol1'. - */ - public int getTextCol1() - { - return this._textCol1; - } //-- int getTextCol1() - - /** - * Returns the value of field 'textCol2'. - * - * @return int - * @return the value of field 'textCol2'. - */ - public int getTextCol2() - { - return this._textCol2; - } //-- int getTextCol2() - - /** - * Returns the value of field 'textColThreshold'. - * - * @return int - * @return the value of field 'textColThreshold'. - */ - public int getTextColThreshold() - { - return this._textColThreshold; - } //-- int getTextColThreshold() - - /** - * Returns the value of field 'title'. - * - * @return String - * @return the value of field 'title'. - */ - public java.lang.String getTitle() - { - return this._title; - } //-- java.lang.String getTitle() - - /** - * Returns the value of field 'viewName'. - * - * @return String - * @return the value of field 'viewName'. - */ - public java.lang.String getViewName() - { - return this._viewName; - } //-- java.lang.String getViewName() - - /** - * Returns the value of field 'width'. - * - * @return int - * @return the value of field 'width'. - */ - public int getWidth() - { - return this._width; - } //-- int getWidth() - - /** - * Returns the value of field 'wrapAlignment'. - * - * @return boolean - * @return the value of field 'wrapAlignment'. - */ - public boolean getWrapAlignment() - { - return this._wrapAlignment; - } //-- boolean getWrapAlignment() - - /** - * Returns the value of field 'xpos'. - * - * @return int - * @return the value of field 'xpos'. - */ - public int getXpos() - { - return this._xpos; - } //-- int getXpos() - - /** - * Returns the value of field 'ypos'. - * - * @return int - * @return the value of field 'ypos'. - */ - public int getYpos() - { - return this._ypos; - } //-- int getYpos() - - /** - * Method hasConsThreshold - * - * - * - * @return boolean - */ - public boolean hasConsThreshold() - { - return this._has_consThreshold; - } //-- boolean hasConsThreshold() - - /** - * Method hasConservationSelected - * - * - * - * @return boolean - */ - public boolean hasConservationSelected() - { - return this._has_conservationSelected; - } //-- boolean hasConservationSelected() - - /** - * Method hasFontSize - * - * - * - * @return boolean - */ - public boolean hasFontSize() - { - return this._has_fontSize; - } //-- boolean hasFontSize() - - /** - * Method hasFontStyle - * - * - * - * @return boolean - */ - public boolean hasFontStyle() - { - return this._has_fontStyle; - } //-- boolean hasFontStyle() - - /** - * Method hasGatheredViews - * - * - * - * @return boolean - */ - public boolean hasGatheredViews() - { - return this._has_gatheredViews; - } //-- boolean hasGatheredViews() - - /** - * Method hasHeight - * - * - * - * @return boolean - */ - public boolean hasHeight() - { - return this._has_height; - } //-- boolean hasHeight() - - /** - * Method hasPidSelected - * - * - * - * @return boolean - */ - public boolean hasPidSelected() - { - return this._has_pidSelected; - } //-- boolean hasPidSelected() - - /** - * Method hasPidThreshold - * - * - * - * @return boolean - */ - public boolean hasPidThreshold() - { - return this._has_pidThreshold; - } //-- boolean hasPidThreshold() - - /** - * Method hasRenderGaps - * - * - * - * @return boolean - */ - public boolean hasRenderGaps() - { - return this._has_renderGaps; - } //-- boolean hasRenderGaps() - - /** - * Method hasRightAlignIds - * - * - * - * @return boolean - */ - public boolean hasRightAlignIds() - { - return this._has_rightAlignIds; - } //-- boolean hasRightAlignIds() - - /** - * Method hasShowAnnotation - * - * - * - * @return boolean - */ - public boolean hasShowAnnotation() - { - return this._has_showAnnotation; - } //-- boolean hasShowAnnotation() - - /** - * Method hasShowBoxes - * - * - * - * @return boolean - */ - public boolean hasShowBoxes() - { - return this._has_showBoxes; - } //-- boolean hasShowBoxes() - - /** - * Method hasShowColourText - * - * - * - * @return boolean - */ - public boolean hasShowColourText() - { - return this._has_showColourText; - } //-- boolean hasShowColourText() - - /** - * Method hasShowFullId - * - * - * - * @return boolean - */ - public boolean hasShowFullId() - { - return this._has_showFullId; - } //-- boolean hasShowFullId() - - /** - * Method hasShowSequenceFeatures - * - * - * - * @return boolean - */ - public boolean hasShowSequenceFeatures() - { - return this._has_showSequenceFeatures; - } //-- boolean hasShowSequenceFeatures() - - /** - * Method hasShowText - * - * - * - * @return boolean - */ - public boolean hasShowText() - { - return this._has_showText; - } //-- boolean hasShowText() - - /** - * Method hasStartRes - * - * - * - * @return boolean - */ - public boolean hasStartRes() - { - return this._has_startRes; - } //-- boolean hasStartRes() - - /** - * Method hasStartSeq - * - * - * - * @return boolean - */ - public boolean hasStartSeq() - { - return this._has_startSeq; - } //-- boolean hasStartSeq() - - /** - * Method hasTextCol1 - * - * - * - * @return boolean - */ - public boolean hasTextCol1() - { - return this._has_textCol1; - } //-- boolean hasTextCol1() - - /** - * Method hasTextCol2 - * - * - * - * @return boolean - */ - public boolean hasTextCol2() - { - return this._has_textCol2; - } //-- boolean hasTextCol2() - - /** - * Method hasTextColThreshold - * - * - * - * @return boolean - */ - public boolean hasTextColThreshold() - { - return this._has_textColThreshold; - } //-- boolean hasTextColThreshold() - - /** - * Method hasWidth - * - * - * - * @return boolean - */ - public boolean hasWidth() - { - return this._has_width; - } //-- boolean hasWidth() - - /** - * Method hasWrapAlignment - * - * - * - * @return boolean - */ - public boolean hasWrapAlignment() - { - return this._has_wrapAlignment; - } //-- boolean hasWrapAlignment() - - /** - * Method hasXpos - * - * - * - * @return boolean - */ - public boolean hasXpos() - { - return this._has_xpos; - } //-- boolean hasXpos() - - /** - * Method hasYpos - * - * - * - * @return boolean - */ - public boolean hasYpos() - { - return this._has_ypos; - } //-- boolean hasYpos() - - /** - * 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 removeAllHiddenColumns - * - */ - public void removeAllHiddenColumns() - { - _hiddenColumnsList.removeAllElements(); - } //-- void removeAllHiddenColumns() - - /** - * Method removeHiddenColumns - * - * - * - * @param index - * @return HiddenColumns - */ - public jalview.schemabinding.version2.HiddenColumns removeHiddenColumns(int - index) - { - java.lang.Object obj = _hiddenColumnsList.elementAt(index); - _hiddenColumnsList.removeElementAt(index); - return (jalview.schemabinding.version2.HiddenColumns) obj; - } //-- jalview.schemabinding.version2.HiddenColumns removeHiddenColumns(int) - - /** - * Sets the value of field 'annotationColours'. - * - * @param annotationColours the value of field - * 'annotationColours'. - */ - public void setAnnotationColours(jalview.schemabinding.version2. - AnnotationColours annotationColours) - { - this._annotationColours = annotationColours; - } //-- void setAnnotationColours(jalview.schemabinding.version2.AnnotationColours) - - /** - * Sets the value of field 'bgColour'. - * - * @param bgColour the value of field 'bgColour'. - */ - public void setBgColour(java.lang.String bgColour) - { - this._bgColour = bgColour; - } //-- void setBgColour(java.lang.String) - - /** - * Sets the value of field 'consThreshold'. - * - * @param consThreshold the value of field 'consThreshold'. - */ - public void setConsThreshold(int consThreshold) - { - this._consThreshold = consThreshold; - this._has_consThreshold = true; - } //-- void setConsThreshold(int) - - /** - * Sets the value of field 'conservationSelected'. - * - * @param conservationSelected the value of field - * 'conservationSelected'. - */ - public void setConservationSelected(boolean conservationSelected) - { - this._conservationSelected = conservationSelected; - this._has_conservationSelected = true; - } //-- void setConservationSelected(boolean) - - /** - * Sets the value of field 'fontName'. - * - * @param fontName the value of field 'fontName'. - */ - public void setFontName(java.lang.String fontName) - { - this._fontName = fontName; - } //-- void setFontName(java.lang.String) - - /** - * Sets the value of field 'fontSize'. - * - * @param fontSize the value of field 'fontSize'. - */ - public void setFontSize(int fontSize) - { - this._fontSize = fontSize; - this._has_fontSize = true; - } //-- void setFontSize(int) - - /** - * Sets the value of field 'fontStyle'. - * - * @param fontStyle the value of field 'fontStyle'. - */ - public void setFontStyle(int fontStyle) - { - this._fontStyle = fontStyle; - this._has_fontStyle = true; - } //-- void setFontStyle(int) - - /** - * Sets the value of field 'gatheredViews'. - * - * @param gatheredViews the value of field 'gatheredViews'. - */ - public void setGatheredViews(boolean gatheredViews) - { - this._gatheredViews = gatheredViews; - this._has_gatheredViews = true; - } //-- void setGatheredViews(boolean) - - /** - * Sets the value of field 'height'. - * - * @param height the value of field 'height'. - */ - public void setHeight(int height) - { - this._height = height; - this._has_height = true; - } //-- void setHeight(int) - - /** - * Method setHiddenColumns - * - * - * - * @param index - * @param vHiddenColumns - */ - public void setHiddenColumns(int index, - jalview.schemabinding.version2.HiddenColumns - vHiddenColumns) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ( (index < 0) || (index > _hiddenColumnsList.size())) - { - throw new IndexOutOfBoundsException(); - } - _hiddenColumnsList.setElementAt(vHiddenColumns, index); - } //-- void setHiddenColumns(int, jalview.schemabinding.version2.HiddenColumns) - - /** - * Method setHiddenColumns - * - * - * - * @param hiddenColumnsArray - */ - public void setHiddenColumns(jalview.schemabinding.version2.HiddenColumns[] - hiddenColumnsArray) - { - //-- copy array - _hiddenColumnsList.removeAllElements(); - for (int i = 0; i < hiddenColumnsArray.length; i++) - { - _hiddenColumnsList.addElement(hiddenColumnsArray[i]); - } - } //-- void setHiddenColumns(jalview.schemabinding.version2.HiddenColumns) - - /** - * Sets the value of field 'pidSelected'. - * - * @param pidSelected the value of field 'pidSelected'. - */ - public void setPidSelected(boolean pidSelected) - { - this._pidSelected = pidSelected; - this._has_pidSelected = true; - } //-- void setPidSelected(boolean) - - /** - * Sets the value of field 'pidThreshold'. - * - * @param pidThreshold the value of field 'pidThreshold'. - */ - public void setPidThreshold(int pidThreshold) - { - this._pidThreshold = pidThreshold; - this._has_pidThreshold = true; - } //-- void setPidThreshold(int) - - /** - * Sets the value of field 'renderGaps'. - * - * @param renderGaps the value of field 'renderGaps'. - */ - public void setRenderGaps(boolean renderGaps) - { - this._renderGaps = renderGaps; - this._has_renderGaps = true; - } //-- void setRenderGaps(boolean) - - /** - * Sets the value of field 'rightAlignIds'. - * - * @param rightAlignIds the value of field 'rightAlignIds'. - */ - public void setRightAlignIds(boolean rightAlignIds) - { - this._rightAlignIds = rightAlignIds; - this._has_rightAlignIds = true; - } //-- void setRightAlignIds(boolean) - - /** - * Sets the value of field 'sequenceSetId'. - * - * @param sequenceSetId the value of field 'sequenceSetId'. - */ - public void setSequenceSetId(java.lang.String sequenceSetId) - { - this._sequenceSetId = sequenceSetId; - } //-- void setSequenceSetId(java.lang.String) - - /** - * Sets the value of field 'showAnnotation'. - * - * @param showAnnotation the value of field 'showAnnotation'. - */ - public void setShowAnnotation(boolean showAnnotation) - { - this._showAnnotation = showAnnotation; - this._has_showAnnotation = true; - } //-- void setShowAnnotation(boolean) - - /** - * Sets the value of field 'showBoxes'. - * - * @param showBoxes the value of field 'showBoxes'. - */ - public void setShowBoxes(boolean showBoxes) - { - this._showBoxes = showBoxes; - this._has_showBoxes = true; - } //-- void setShowBoxes(boolean) - - /** - * Sets the value of field 'showColourText'. - * - * @param showColourText the value of field 'showColourText'. - */ - public void setShowColourText(boolean showColourText) - { - this._showColourText = showColourText; - this._has_showColourText = true; - } //-- void setShowColourText(boolean) - - /** - * Sets the value of field 'showFullId'. - * - * @param showFullId the value of field 'showFullId'. - */ - public void setShowFullId(boolean showFullId) - { - this._showFullId = showFullId; - this._has_showFullId = true; - } //-- void setShowFullId(boolean) - - /** - * Sets the value of field 'showSequenceFeatures'. - * - * @param showSequenceFeatures the value of field - * 'showSequenceFeatures'. - */ - public void setShowSequenceFeatures(boolean showSequenceFeatures) - { - this._showSequenceFeatures = showSequenceFeatures; - this._has_showSequenceFeatures = true; - } //-- void setShowSequenceFeatures(boolean) - - /** - * Sets the value of field 'showText'. - * - * @param showText the value of field 'showText'. - */ - public void setShowText(boolean showText) - { - this._showText = showText; - this._has_showText = true; - } //-- void setShowText(boolean) - - /** - * Sets the value of field 'startRes'. - * - * @param startRes the value of field 'startRes'. - */ - public void setStartRes(int startRes) - { - this._startRes = startRes; - this._has_startRes = true; - } //-- void setStartRes(int) - - /** - * Sets the value of field 'startSeq'. - * - * @param startSeq the value of field 'startSeq'. - */ - public void setStartSeq(int startSeq) - { - this._startSeq = startSeq; - this._has_startSeq = true; - } //-- void setStartSeq(int) - - /** - * Sets the value of field 'textCol1'. - * - * @param textCol1 the value of field 'textCol1'. - */ - public void setTextCol1(int textCol1) - { - this._textCol1 = textCol1; - this._has_textCol1 = true; - } //-- void setTextCol1(int) - - /** - * Sets the value of field 'textCol2'. - * - * @param textCol2 the value of field 'textCol2'. - */ - public void setTextCol2(int textCol2) - { - this._textCol2 = textCol2; - this._has_textCol2 = true; - } //-- void setTextCol2(int) - - /** - * Sets the value of field 'textColThreshold'. - * - * @param textColThreshold the value of field 'textColThreshold' - */ - public void setTextColThreshold(int textColThreshold) - { - this._textColThreshold = textColThreshold; - this._has_textColThreshold = true; - } //-- void setTextColThreshold(int) - - /** - * Sets the value of field 'title'. - * - * @param title the value of field 'title'. - */ - public void setTitle(java.lang.String title) - { - this._title = title; - } //-- void setTitle(java.lang.String) - - /** - * Sets the value of field 'viewName'. - * - * @param viewName the value of field 'viewName'. - */ - public void setViewName(java.lang.String viewName) - { - this._viewName = viewName; - } //-- void setViewName(java.lang.String) - - /** - * Sets the value of field 'width'. - * - * @param width the value of field 'width'. - */ - public void setWidth(int width) - { - this._width = width; - this._has_width = true; - } //-- void setWidth(int) - - /** - * Sets the value of field 'wrapAlignment'. - * - * @param wrapAlignment the value of field 'wrapAlignment'. - */ - public void setWrapAlignment(boolean wrapAlignment) - { - this._wrapAlignment = wrapAlignment; - this._has_wrapAlignment = true; - } //-- void setWrapAlignment(boolean) - - /** - * Sets the value of field 'xpos'. - * - * @param xpos the value of field 'xpos'. - */ - public void setXpos(int xpos) - { - this._xpos = xpos; - this._has_xpos = true; - } //-- void setXpos(int) - - /** - * Sets the value of field 'ypos'. - * - * @param ypos the value of field 'ypos'. - */ - public void setYpos(int ypos) - { - this._ypos = ypos; - this._has_ypos = true; - } //-- void setYpos(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.schemabinding.version2.Viewport) Unmarshaller.unmarshal( - jalview.schemabinding.version2.Viewport.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() +public class Viewport implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _conservationSelected + */ + private boolean _conservationSelected; + + /** + * keeps track of state for field: _conservationSelected + */ + private boolean _has_conservationSelected; + + /** + * Field _pidSelected + */ + private boolean _pidSelected; + + /** + * keeps track of state for field: _pidSelected + */ + private boolean _has_pidSelected; + + /** + * Field _bgColour + */ + private java.lang.String _bgColour; + + /** + * Field _consThreshold + */ + private int _consThreshold; + + /** + * keeps track of state for field: _consThreshold + */ + private boolean _has_consThreshold; + + /** + * Field _pidThreshold + */ + private int _pidThreshold; + + /** + * keeps track of state for field: _pidThreshold + */ + private boolean _has_pidThreshold; + + /** + * Field _title + */ + private java.lang.String _title; + + /** + * Field _showFullId + */ + private boolean _showFullId; + + /** + * keeps track of state for field: _showFullId + */ + private boolean _has_showFullId; + + /** + * Field _rightAlignIds + */ + private boolean _rightAlignIds; + + /** + * keeps track of state for field: _rightAlignIds + */ + private boolean _has_rightAlignIds; + + /** + * Field _showText + */ + private boolean _showText; + + /** + * keeps track of state for field: _showText + */ + private boolean _has_showText; + + /** + * Field _showColourText + */ + private boolean _showColourText; + + /** + * keeps track of state for field: _showColourText + */ + private boolean _has_showColourText; + + /** + * Field _showBoxes + */ + private boolean _showBoxes; + + /** + * keeps track of state for field: _showBoxes + */ + private boolean _has_showBoxes; + + /** + * Field _wrapAlignment + */ + private boolean _wrapAlignment; + + /** + * keeps track of state for field: _wrapAlignment + */ + private boolean _has_wrapAlignment; + + /** + * Field _renderGaps + */ + private boolean _renderGaps; + + /** + * keeps track of state for field: _renderGaps + */ + private boolean _has_renderGaps; + + /** + * Field _showSequenceFeatures + */ + private boolean _showSequenceFeatures; + + /** + * keeps track of state for field: _showSequenceFeatures + */ + private boolean _has_showSequenceFeatures; + + /** + * Field _showAnnotation + */ + private boolean _showAnnotation; + + /** + * keeps track of state for field: _showAnnotation + */ + private boolean _has_showAnnotation; + + /** + * Field _xpos + */ + private int _xpos; + + /** + * keeps track of state for field: _xpos + */ + private boolean _has_xpos; + + /** + * Field _ypos + */ + private int _ypos; + + /** + * keeps track of state for field: _ypos + */ + private boolean _has_ypos; + + /** + * Field _width + */ + private int _width; + + /** + * keeps track of state for field: _width + */ + private boolean _has_width; + + /** + * Field _height + */ + private int _height; + + /** + * keeps track of state for field: _height + */ + private boolean _has_height; + + /** + * Field _startRes + */ + private int _startRes; + + /** + * keeps track of state for field: _startRes + */ + private boolean _has_startRes; + + /** + * Field _startSeq + */ + private int _startSeq; + + /** + * keeps track of state for field: _startSeq + */ + private boolean _has_startSeq; + + /** + * Field _fontName + */ + private java.lang.String _fontName; + + /** + * Field _fontSize + */ + private int _fontSize; + + /** + * keeps track of state for field: _fontSize + */ + private boolean _has_fontSize; + + /** + * Field _fontStyle + */ + private int _fontStyle; + + /** + * keeps track of state for field: _fontStyle + */ + private boolean _has_fontStyle; + + /** + * Field _viewName + */ + private java.lang.String _viewName; + + /** + * Field _sequenceSetId + */ + private java.lang.String _sequenceSetId; + + /** + * Field _gatheredViews + */ + private boolean _gatheredViews; + + /** + * keeps track of state for field: _gatheredViews + */ + private boolean _has_gatheredViews; + + /** + * Field _textCol1 + */ + private int _textCol1; + + /** + * keeps track of state for field: _textCol1 + */ + private boolean _has_textCol1; + + /** + * Field _textCol2 + */ + private int _textCol2; + + /** + * keeps track of state for field: _textCol2 + */ + private boolean _has_textCol2; + + /** + * Field _textColThreshold + */ + private int _textColThreshold; + + /** + * keeps track of state for field: _textColThreshold + */ + private boolean _has_textColThreshold; + + /** + * Field _annotationColours + */ + private jalview.schemabinding.version2.AnnotationColours _annotationColours; + + /** + * Field _hiddenColumnsList + */ + private java.util.Vector _hiddenColumnsList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Viewport() { + super(); + _hiddenColumnsList = new Vector(); + } //-- jalview.schemabinding.version2.Viewport() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addHiddenColumns + * + * + * + * @param vHiddenColumns + */ + public void addHiddenColumns(jalview.schemabinding.version2.HiddenColumns vHiddenColumns) + throws java.lang.IndexOutOfBoundsException + { + _hiddenColumnsList.addElement(vHiddenColumns); + } //-- void addHiddenColumns(jalview.schemabinding.version2.HiddenColumns) + + /** + * Method addHiddenColumns + * + * + * + * @param index + * @param vHiddenColumns + */ + public void addHiddenColumns(int index, jalview.schemabinding.version2.HiddenColumns vHiddenColumns) + throws java.lang.IndexOutOfBoundsException + { + _hiddenColumnsList.insertElementAt(vHiddenColumns, index); + } //-- void addHiddenColumns(int, jalview.schemabinding.version2.HiddenColumns) + + /** + * Method deleteConsThreshold + * + */ + public void deleteConsThreshold() + { + this._has_consThreshold= false; + } //-- void deleteConsThreshold() + + /** + * Method deleteConservationSelected + * + */ + public void deleteConservationSelected() + { + this._has_conservationSelected= false; + } //-- void deleteConservationSelected() + + /** + * Method deleteFontSize + * + */ + public void deleteFontSize() + { + this._has_fontSize= false; + } //-- void deleteFontSize() + + /** + * Method deleteFontStyle + * + */ + public void deleteFontStyle() + { + this._has_fontStyle= false; + } //-- void deleteFontStyle() + + /** + * Method deleteGatheredViews + * + */ + public void deleteGatheredViews() + { + this._has_gatheredViews= false; + } //-- void deleteGatheredViews() + + /** + * Method deleteHeight + * + */ + public void deleteHeight() + { + this._has_height= false; + } //-- void deleteHeight() + + /** + * Method deletePidSelected + * + */ + public void deletePidSelected() + { + this._has_pidSelected= false; + } //-- void deletePidSelected() + + /** + * Method deletePidThreshold + * + */ + public void deletePidThreshold() + { + this._has_pidThreshold= false; + } //-- void deletePidThreshold() + + /** + * Method deleteRenderGaps + * + */ + public void deleteRenderGaps() + { + this._has_renderGaps= false; + } //-- void deleteRenderGaps() + + /** + * Method deleteRightAlignIds + * + */ + public void deleteRightAlignIds() + { + this._has_rightAlignIds= false; + } //-- void deleteRightAlignIds() + + /** + * Method deleteShowAnnotation + * + */ + public void deleteShowAnnotation() + { + this._has_showAnnotation= false; + } //-- void deleteShowAnnotation() + + /** + * Method deleteShowBoxes + * + */ + public void deleteShowBoxes() + { + this._has_showBoxes= false; + } //-- void deleteShowBoxes() + + /** + * Method deleteShowColourText + * + */ + public void deleteShowColourText() + { + this._has_showColourText= false; + } //-- void deleteShowColourText() + + /** + * Method deleteShowFullId + * + */ + public void deleteShowFullId() + { + this._has_showFullId= false; + } //-- void deleteShowFullId() + + /** + * Method deleteShowSequenceFeatures + * + */ + public void deleteShowSequenceFeatures() + { + this._has_showSequenceFeatures= false; + } //-- void deleteShowSequenceFeatures() + + /** + * Method deleteShowText + * + */ + public void deleteShowText() + { + this._has_showText= false; + } //-- void deleteShowText() + + /** + * Method deleteStartRes + * + */ + public void deleteStartRes() + { + this._has_startRes= false; + } //-- void deleteStartRes() + + /** + * Method deleteStartSeq + * + */ + public void deleteStartSeq() + { + this._has_startSeq= false; + } //-- void deleteStartSeq() + + /** + * Method deleteTextCol1 + * + */ + public void deleteTextCol1() + { + this._has_textCol1= false; + } //-- void deleteTextCol1() + + /** + * Method deleteTextCol2 + * + */ + public void deleteTextCol2() + { + this._has_textCol2= false; + } //-- void deleteTextCol2() + + /** + * Method deleteTextColThreshold + * + */ + public void deleteTextColThreshold() + { + this._has_textColThreshold= false; + } //-- void deleteTextColThreshold() + + /** + * Method deleteWidth + * + */ + public void deleteWidth() + { + this._has_width= false; + } //-- void deleteWidth() + + /** + * Method deleteWrapAlignment + * + */ + public void deleteWrapAlignment() + { + this._has_wrapAlignment= false; + } //-- void deleteWrapAlignment() + + /** + * Method deleteXpos + * + */ + public void deleteXpos() + { + this._has_xpos= false; + } //-- void deleteXpos() + + /** + * Method deleteYpos + * + */ + public void deleteYpos() + { + this._has_ypos= false; + } //-- void deleteYpos() + + /** + * Method enumerateHiddenColumns + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateHiddenColumns() + { + return _hiddenColumnsList.elements(); + } //-- java.util.Enumeration enumerateHiddenColumns() + + /** + * Returns the value of field 'annotationColours'. + * + * @return AnnotationColours + * @return the value of field 'annotationColours'. + */ + public jalview.schemabinding.version2.AnnotationColours getAnnotationColours() + { + return this._annotationColours; + } //-- jalview.schemabinding.version2.AnnotationColours getAnnotationColours() + + /** + * Returns the value of field 'bgColour'. + * + * @return String + * @return the value of field 'bgColour'. + */ + public java.lang.String getBgColour() + { + return this._bgColour; + } //-- java.lang.String getBgColour() + + /** + * Returns the value of field 'consThreshold'. + * + * @return int + * @return the value of field 'consThreshold'. + */ + public int getConsThreshold() + { + return this._consThreshold; + } //-- int getConsThreshold() + + /** + * Returns the value of field 'conservationSelected'. + * + * @return boolean + * @return the value of field 'conservationSelected'. + */ + public boolean getConservationSelected() + { + return this._conservationSelected; + } //-- boolean getConservationSelected() + + /** + * Returns the value of field 'fontName'. + * + * @return String + * @return the value of field 'fontName'. + */ + public java.lang.String getFontName() + { + return this._fontName; + } //-- java.lang.String getFontName() + + /** + * Returns the value of field 'fontSize'. + * + * @return int + * @return the value of field 'fontSize'. + */ + public int getFontSize() + { + return this._fontSize; + } //-- int getFontSize() + + /** + * Returns the value of field 'fontStyle'. + * + * @return int + * @return the value of field 'fontStyle'. + */ + public int getFontStyle() + { + return this._fontStyle; + } //-- int getFontStyle() + + /** + * Returns the value of field 'gatheredViews'. + * + * @return boolean + * @return the value of field 'gatheredViews'. + */ + public boolean getGatheredViews() + { + return this._gatheredViews; + } //-- boolean getGatheredViews() + + /** + * Returns the value of field 'height'. + * + * @return int + * @return the value of field 'height'. + */ + public int getHeight() + { + return this._height; + } //-- int getHeight() + + /** + * Method getHiddenColumns + * + * + * + * @param index + * @return HiddenColumns + */ + public jalview.schemabinding.version2.HiddenColumns getHiddenColumns(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _hiddenColumnsList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.schemabinding.version2.HiddenColumns) _hiddenColumnsList.elementAt(index); + } //-- jalview.schemabinding.version2.HiddenColumns getHiddenColumns(int) + + /** + * Method getHiddenColumns + * + * + * + * @return HiddenColumns + */ + public jalview.schemabinding.version2.HiddenColumns[] getHiddenColumns() + { + int size = _hiddenColumnsList.size(); + jalview.schemabinding.version2.HiddenColumns[] mArray = new jalview.schemabinding.version2.HiddenColumns[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.schemabinding.version2.HiddenColumns) _hiddenColumnsList.elementAt(index); + } + return mArray; + } //-- jalview.schemabinding.version2.HiddenColumns[] getHiddenColumns() + + /** + * Method getHiddenColumnsCount + * + * + * + * @return int + */ + public int getHiddenColumnsCount() + { + return _hiddenColumnsList.size(); + } //-- int getHiddenColumnsCount() + + /** + * Returns the value of field 'pidSelected'. + * + * @return boolean + * @return the value of field 'pidSelected'. + */ + public boolean getPidSelected() + { + return this._pidSelected; + } //-- boolean getPidSelected() + + /** + * Returns the value of field 'pidThreshold'. + * + * @return int + * @return the value of field 'pidThreshold'. + */ + public int getPidThreshold() + { + return this._pidThreshold; + } //-- int getPidThreshold() + + /** + * Returns the value of field 'renderGaps'. + * + * @return boolean + * @return the value of field 'renderGaps'. + */ + public boolean getRenderGaps() + { + return this._renderGaps; + } //-- boolean getRenderGaps() + + /** + * Returns the value of field 'rightAlignIds'. + * + * @return boolean + * @return the value of field 'rightAlignIds'. + */ + public boolean getRightAlignIds() + { + return this._rightAlignIds; + } //-- boolean getRightAlignIds() + + /** + * Returns the value of field 'sequenceSetId'. + * + * @return String + * @return the value of field 'sequenceSetId'. + */ + public java.lang.String getSequenceSetId() + { + return this._sequenceSetId; + } //-- java.lang.String getSequenceSetId() + + /** + * Returns the value of field 'showAnnotation'. + * + * @return boolean + * @return the value of field 'showAnnotation'. + */ + public boolean getShowAnnotation() + { + return this._showAnnotation; + } //-- boolean getShowAnnotation() + + /** + * Returns the value of field 'showBoxes'. + * + * @return boolean + * @return the value of field 'showBoxes'. + */ + public boolean getShowBoxes() + { + return this._showBoxes; + } //-- boolean getShowBoxes() + + /** + * Returns the value of field 'showColourText'. + * + * @return boolean + * @return the value of field 'showColourText'. + */ + public boolean getShowColourText() + { + return this._showColourText; + } //-- boolean getShowColourText() + + /** + * Returns the value of field 'showFullId'. + * + * @return boolean + * @return the value of field 'showFullId'. + */ + public boolean getShowFullId() + { + return this._showFullId; + } //-- boolean getShowFullId() + + /** + * Returns the value of field 'showSequenceFeatures'. + * + * @return boolean + * @return the value of field 'showSequenceFeatures'. + */ + public boolean getShowSequenceFeatures() + { + return this._showSequenceFeatures; + } //-- boolean getShowSequenceFeatures() + + /** + * Returns the value of field 'showText'. + * + * @return boolean + * @return the value of field 'showText'. + */ + public boolean getShowText() + { + return this._showText; + } //-- boolean getShowText() + + /** + * Returns the value of field 'startRes'. + * + * @return int + * @return the value of field 'startRes'. + */ + public int getStartRes() + { + return this._startRes; + } //-- int getStartRes() + + /** + * Returns the value of field 'startSeq'. + * + * @return int + * @return the value of field 'startSeq'. + */ + public int getStartSeq() + { + return this._startSeq; + } //-- int getStartSeq() + + /** + * Returns the value of field 'textCol1'. + * + * @return int + * @return the value of field 'textCol1'. + */ + public int getTextCol1() + { + return this._textCol1; + } //-- int getTextCol1() + + /** + * Returns the value of field 'textCol2'. + * + * @return int + * @return the value of field 'textCol2'. + */ + public int getTextCol2() + { + return this._textCol2; + } //-- int getTextCol2() + + /** + * Returns the value of field 'textColThreshold'. + * + * @return int + * @return the value of field 'textColThreshold'. + */ + public int getTextColThreshold() + { + return this._textColThreshold; + } //-- int getTextColThreshold() + + /** + * Returns the value of field 'title'. + * + * @return String + * @return the value of field 'title'. + */ + public java.lang.String getTitle() + { + return this._title; + } //-- java.lang.String getTitle() + + /** + * Returns the value of field 'viewName'. + * + * @return String + * @return the value of field 'viewName'. + */ + public java.lang.String getViewName() + { + return this._viewName; + } //-- java.lang.String getViewName() + + /** + * Returns the value of field 'width'. + * + * @return int + * @return the value of field 'width'. + */ + public int getWidth() + { + return this._width; + } //-- int getWidth() + + /** + * Returns the value of field 'wrapAlignment'. + * + * @return boolean + * @return the value of field 'wrapAlignment'. + */ + public boolean getWrapAlignment() + { + return this._wrapAlignment; + } //-- boolean getWrapAlignment() + + /** + * Returns the value of field 'xpos'. + * + * @return int + * @return the value of field 'xpos'. + */ + public int getXpos() + { + return this._xpos; + } //-- int getXpos() + + /** + * Returns the value of field 'ypos'. + * + * @return int + * @return the value of field 'ypos'. + */ + public int getYpos() + { + return this._ypos; + } //-- int getYpos() + + /** + * Method hasConsThreshold + * + * + * + * @return boolean + */ + public boolean hasConsThreshold() + { + return this._has_consThreshold; + } //-- boolean hasConsThreshold() + + /** + * Method hasConservationSelected + * + * + * + * @return boolean + */ + public boolean hasConservationSelected() + { + return this._has_conservationSelected; + } //-- boolean hasConservationSelected() + + /** + * Method hasFontSize + * + * + * + * @return boolean + */ + public boolean hasFontSize() + { + return this._has_fontSize; + } //-- boolean hasFontSize() + + /** + * Method hasFontStyle + * + * + * + * @return boolean + */ + public boolean hasFontStyle() + { + return this._has_fontStyle; + } //-- boolean hasFontStyle() + + /** + * Method hasGatheredViews + * + * + * + * @return boolean + */ + public boolean hasGatheredViews() + { + return this._has_gatheredViews; + } //-- boolean hasGatheredViews() + + /** + * Method hasHeight + * + * + * + * @return boolean + */ + public boolean hasHeight() + { + return this._has_height; + } //-- boolean hasHeight() + + /** + * Method hasPidSelected + * + * + * + * @return boolean + */ + public boolean hasPidSelected() + { + return this._has_pidSelected; + } //-- boolean hasPidSelected() + + /** + * Method hasPidThreshold + * + * + * + * @return boolean + */ + public boolean hasPidThreshold() + { + return this._has_pidThreshold; + } //-- boolean hasPidThreshold() + + /** + * Method hasRenderGaps + * + * + * + * @return boolean + */ + public boolean hasRenderGaps() + { + return this._has_renderGaps; + } //-- boolean hasRenderGaps() + + /** + * Method hasRightAlignIds + * + * + * + * @return boolean + */ + public boolean hasRightAlignIds() + { + return this._has_rightAlignIds; + } //-- boolean hasRightAlignIds() + + /** + * Method hasShowAnnotation + * + * + * + * @return boolean + */ + public boolean hasShowAnnotation() + { + return this._has_showAnnotation; + } //-- boolean hasShowAnnotation() + + /** + * Method hasShowBoxes + * + * + * + * @return boolean + */ + public boolean hasShowBoxes() + { + return this._has_showBoxes; + } //-- boolean hasShowBoxes() + + /** + * Method hasShowColourText + * + * + * + * @return boolean + */ + public boolean hasShowColourText() + { + return this._has_showColourText; + } //-- boolean hasShowColourText() + + /** + * Method hasShowFullId + * + * + * + * @return boolean + */ + public boolean hasShowFullId() + { + return this._has_showFullId; + } //-- boolean hasShowFullId() + + /** + * Method hasShowSequenceFeatures + * + * + * + * @return boolean + */ + public boolean hasShowSequenceFeatures() + { + return this._has_showSequenceFeatures; + } //-- boolean hasShowSequenceFeatures() + + /** + * Method hasShowText + * + * + * + * @return boolean + */ + public boolean hasShowText() + { + return this._has_showText; + } //-- boolean hasShowText() + + /** + * Method hasStartRes + * + * + * + * @return boolean + */ + public boolean hasStartRes() + { + return this._has_startRes; + } //-- boolean hasStartRes() + + /** + * Method hasStartSeq + * + * + * + * @return boolean + */ + public boolean hasStartSeq() + { + return this._has_startSeq; + } //-- boolean hasStartSeq() + + /** + * Method hasTextCol1 + * + * + * + * @return boolean + */ + public boolean hasTextCol1() + { + return this._has_textCol1; + } //-- boolean hasTextCol1() + + /** + * Method hasTextCol2 + * + * + * + * @return boolean + */ + public boolean hasTextCol2() + { + return this._has_textCol2; + } //-- boolean hasTextCol2() + + /** + * Method hasTextColThreshold + * + * + * + * @return boolean + */ + public boolean hasTextColThreshold() + { + return this._has_textColThreshold; + } //-- boolean hasTextColThreshold() + + /** + * Method hasWidth + * + * + * + * @return boolean + */ + public boolean hasWidth() + { + return this._has_width; + } //-- boolean hasWidth() + + /** + * Method hasWrapAlignment + * + * + * + * @return boolean + */ + public boolean hasWrapAlignment() + { + return this._has_wrapAlignment; + } //-- boolean hasWrapAlignment() + + /** + * Method hasXpos + * + * + * + * @return boolean + */ + public boolean hasXpos() + { + return this._has_xpos; + } //-- boolean hasXpos() + + /** + * Method hasYpos + * + * + * + * @return boolean + */ + public boolean hasYpos() + { + return this._has_ypos; + } //-- boolean hasYpos() + + /** + * 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 removeAllHiddenColumns + * + */ + public void removeAllHiddenColumns() + { + _hiddenColumnsList.removeAllElements(); + } //-- void removeAllHiddenColumns() + + /** + * Method removeHiddenColumns + * + * + * + * @param index + * @return HiddenColumns + */ + public jalview.schemabinding.version2.HiddenColumns removeHiddenColumns(int index) + { + java.lang.Object obj = _hiddenColumnsList.elementAt(index); + _hiddenColumnsList.removeElementAt(index); + return (jalview.schemabinding.version2.HiddenColumns) obj; + } //-- jalview.schemabinding.version2.HiddenColumns removeHiddenColumns(int) + + /** + * Sets the value of field 'annotationColours'. + * + * @param annotationColours the value of field + * 'annotationColours'. + */ + public void setAnnotationColours(jalview.schemabinding.version2.AnnotationColours annotationColours) + { + this._annotationColours = annotationColours; + } //-- void setAnnotationColours(jalview.schemabinding.version2.AnnotationColours) + + /** + * Sets the value of field 'bgColour'. + * + * @param bgColour the value of field 'bgColour'. + */ + public void setBgColour(java.lang.String bgColour) + { + this._bgColour = bgColour; + } //-- void setBgColour(java.lang.String) + + /** + * Sets the value of field 'consThreshold'. + * + * @param consThreshold the value of field 'consThreshold'. + */ + public void setConsThreshold(int consThreshold) + { + this._consThreshold = consThreshold; + this._has_consThreshold = true; + } //-- void setConsThreshold(int) + + /** + * Sets the value of field 'conservationSelected'. + * + * @param conservationSelected the value of field + * 'conservationSelected'. + */ + public void setConservationSelected(boolean conservationSelected) + { + this._conservationSelected = conservationSelected; + this._has_conservationSelected = true; + } //-- void setConservationSelected(boolean) + + /** + * Sets the value of field 'fontName'. + * + * @param fontName the value of field 'fontName'. + */ + public void setFontName(java.lang.String fontName) + { + this._fontName = fontName; + } //-- void setFontName(java.lang.String) + + /** + * Sets the value of field 'fontSize'. + * + * @param fontSize the value of field 'fontSize'. + */ + public void setFontSize(int fontSize) + { + this._fontSize = fontSize; + this._has_fontSize = true; + } //-- void setFontSize(int) + + /** + * Sets the value of field 'fontStyle'. + * + * @param fontStyle the value of field 'fontStyle'. + */ + public void setFontStyle(int fontStyle) + { + this._fontStyle = fontStyle; + this._has_fontStyle = true; + } //-- void setFontStyle(int) + + /** + * Sets the value of field 'gatheredViews'. + * + * @param gatheredViews the value of field 'gatheredViews'. + */ + public void setGatheredViews(boolean gatheredViews) + { + this._gatheredViews = gatheredViews; + this._has_gatheredViews = true; + } //-- void setGatheredViews(boolean) + + /** + * Sets the value of field 'height'. + * + * @param height the value of field 'height'. + */ + public void setHeight(int height) + { + this._height = height; + this._has_height = true; + } //-- void setHeight(int) + + /** + * Method setHiddenColumns + * + * + * + * @param index + * @param vHiddenColumns + */ + public void setHiddenColumns(int index, jalview.schemabinding.version2.HiddenColumns vHiddenColumns) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _hiddenColumnsList.size())) { + throw new IndexOutOfBoundsException(); + } + _hiddenColumnsList.setElementAt(vHiddenColumns, index); + } //-- void setHiddenColumns(int, jalview.schemabinding.version2.HiddenColumns) + + /** + * Method setHiddenColumns + * + * + * + * @param hiddenColumnsArray + */ + public void setHiddenColumns(jalview.schemabinding.version2.HiddenColumns[] hiddenColumnsArray) + { + //-- copy array + _hiddenColumnsList.removeAllElements(); + for (int i = 0; i < hiddenColumnsArray.length; i++) { + _hiddenColumnsList.addElement(hiddenColumnsArray[i]); + } + } //-- void setHiddenColumns(jalview.schemabinding.version2.HiddenColumns) + + /** + * Sets the value of field 'pidSelected'. + * + * @param pidSelected the value of field 'pidSelected'. + */ + public void setPidSelected(boolean pidSelected) + { + this._pidSelected = pidSelected; + this._has_pidSelected = true; + } //-- void setPidSelected(boolean) + + /** + * Sets the value of field 'pidThreshold'. + * + * @param pidThreshold the value of field 'pidThreshold'. + */ + public void setPidThreshold(int pidThreshold) + { + this._pidThreshold = pidThreshold; + this._has_pidThreshold = true; + } //-- void setPidThreshold(int) + + /** + * Sets the value of field 'renderGaps'. + * + * @param renderGaps the value of field 'renderGaps'. + */ + public void setRenderGaps(boolean renderGaps) + { + this._renderGaps = renderGaps; + this._has_renderGaps = true; + } //-- void setRenderGaps(boolean) + + /** + * Sets the value of field 'rightAlignIds'. + * + * @param rightAlignIds the value of field 'rightAlignIds'. + */ + public void setRightAlignIds(boolean rightAlignIds) + { + this._rightAlignIds = rightAlignIds; + this._has_rightAlignIds = true; + } //-- void setRightAlignIds(boolean) + + /** + * Sets the value of field 'sequenceSetId'. + * + * @param sequenceSetId the value of field 'sequenceSetId'. + */ + public void setSequenceSetId(java.lang.String sequenceSetId) + { + this._sequenceSetId = sequenceSetId; + } //-- void setSequenceSetId(java.lang.String) + + /** + * Sets the value of field 'showAnnotation'. + * + * @param showAnnotation the value of field 'showAnnotation'. + */ + public void setShowAnnotation(boolean showAnnotation) + { + this._showAnnotation = showAnnotation; + this._has_showAnnotation = true; + } //-- void setShowAnnotation(boolean) + + /** + * Sets the value of field 'showBoxes'. + * + * @param showBoxes the value of field 'showBoxes'. + */ + public void setShowBoxes(boolean showBoxes) + { + this._showBoxes = showBoxes; + this._has_showBoxes = true; + } //-- void setShowBoxes(boolean) + + /** + * Sets the value of field 'showColourText'. + * + * @param showColourText the value of field 'showColourText'. + */ + public void setShowColourText(boolean showColourText) + { + this._showColourText = showColourText; + this._has_showColourText = true; + } //-- void setShowColourText(boolean) + + /** + * Sets the value of field 'showFullId'. + * + * @param showFullId the value of field 'showFullId'. + */ + public void setShowFullId(boolean showFullId) + { + this._showFullId = showFullId; + this._has_showFullId = true; + } //-- void setShowFullId(boolean) + + /** + * Sets the value of field 'showSequenceFeatures'. + * + * @param showSequenceFeatures the value of field + * 'showSequenceFeatures'. + */ + public void setShowSequenceFeatures(boolean showSequenceFeatures) + { + this._showSequenceFeatures = showSequenceFeatures; + this._has_showSequenceFeatures = true; + } //-- void setShowSequenceFeatures(boolean) + + /** + * Sets the value of field 'showText'. + * + * @param showText the value of field 'showText'. + */ + public void setShowText(boolean showText) + { + this._showText = showText; + this._has_showText = true; + } //-- void setShowText(boolean) + + /** + * Sets the value of field 'startRes'. + * + * @param startRes the value of field 'startRes'. + */ + public void setStartRes(int startRes) + { + this._startRes = startRes; + this._has_startRes = true; + } //-- void setStartRes(int) + + /** + * Sets the value of field 'startSeq'. + * + * @param startSeq the value of field 'startSeq'. + */ + public void setStartSeq(int startSeq) + { + this._startSeq = startSeq; + this._has_startSeq = true; + } //-- void setStartSeq(int) + + /** + * Sets the value of field 'textCol1'. + * + * @param textCol1 the value of field 'textCol1'. + */ + public void setTextCol1(int textCol1) + { + this._textCol1 = textCol1; + this._has_textCol1 = true; + } //-- void setTextCol1(int) + + /** + * Sets the value of field 'textCol2'. + * + * @param textCol2 the value of field 'textCol2'. + */ + public void setTextCol2(int textCol2) + { + this._textCol2 = textCol2; + this._has_textCol2 = true; + } //-- void setTextCol2(int) + + /** + * Sets the value of field 'textColThreshold'. + * + * @param textColThreshold the value of field 'textColThreshold' + */ + public void setTextColThreshold(int textColThreshold) + { + this._textColThreshold = textColThreshold; + this._has_textColThreshold = true; + } //-- void setTextColThreshold(int) + + /** + * Sets the value of field 'title'. + * + * @param title the value of field 'title'. + */ + public void setTitle(java.lang.String title) + { + this._title = title; + } //-- void setTitle(java.lang.String) + + /** + * Sets the value of field 'viewName'. + * + * @param viewName the value of field 'viewName'. + */ + public void setViewName(java.lang.String viewName) + { + this._viewName = viewName; + } //-- void setViewName(java.lang.String) + + /** + * Sets the value of field 'width'. + * + * @param width the value of field 'width'. + */ + public void setWidth(int width) + { + this._width = width; + this._has_width = true; + } //-- void setWidth(int) + + /** + * Sets the value of field 'wrapAlignment'. + * + * @param wrapAlignment the value of field 'wrapAlignment'. + */ + public void setWrapAlignment(boolean wrapAlignment) + { + this._wrapAlignment = wrapAlignment; + this._has_wrapAlignment = true; + } //-- void setWrapAlignment(boolean) + + /** + * Sets the value of field 'xpos'. + * + * @param xpos the value of field 'xpos'. + */ + public void setXpos(int xpos) + { + this._xpos = xpos; + this._has_xpos = true; + } //-- void setXpos(int) + + /** + * Sets the value of field 'ypos'. + * + * @param ypos the value of field 'ypos'. + */ + public void setYpos(int ypos) + { + this._ypos = ypos; + this._has_ypos = true; + } //-- void setYpos(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.schemabinding.version2.Viewport) Unmarshaller.unmarshal(jalview.schemabinding.version2.Viewport.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/schemabinding/version2/ViewportDescriptor.java b/src/jalview/schemabinding/version2/ViewportDescriptor.java index 5b2e45c..09544ef 100755 --- a/src/jalview/schemabinding/version2/ViewportDescriptor.java +++ b/src/jalview/schemabinding/version2/ViewportDescriptor.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,1783 +7,1441 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; import org.exolab.castor.xml.validators.*; /** * Class ViewportDescriptor. - * + * * @version $Revision$ $Date$ */ -public class ViewportDescriptor - extends org.exolab.castor.xml.util.XMLClassDescriptorImpl -{ - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - //----------------/ - //- Constructors -/ - //----------------/ - - public ViewportDescriptor() - { - super(); - nsURI = "www.jalview.org"; - xmlName = "Viewport"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.xml.XMLFieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _conservationSelected - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_conservationSelected", "conservationSelected", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() +public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ViewportDescriptor() { + super(); + nsURI = "www.jalview.org"; + xmlName = "Viewport"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.xml.XMLFieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _conservationSelected + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_conservationSelected", "conservationSelected", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasConservationSelected()) + return null; + return (target.getConservationSelected() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteConservationSelected(); + return; + } + target.setConservationSelected( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _conservationSelected + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _pidSelected + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_pidSelected", "pidSelected", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasPidSelected()) + return null; + return (target.getPidSelected() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deletePidSelected(); + return; + } + target.setPidSelected( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _pidSelected + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _bgColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_bgColour", "bgColour", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getBgColour(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.setBgColour( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _bgColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _consThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_consThreshold", "consThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasConsThreshold()) + return null; + return new java.lang.Integer(target.getConsThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteConsThreshold(); + return; + } + target.setConsThreshold( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _consThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _pidThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_pidThreshold", "pidThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasPidThreshold()) + return null; + return new java.lang.Integer(target.getPidThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deletePidThreshold(); + return; + } + target.setPidThreshold( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _pidThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _title + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_title", "title", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getTitle(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.setTitle( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _title + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showFullId + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showFullId", "showFullId", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasShowFullId()) + return null; + return (target.getShowFullId() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowFullId(); + return; + } + target.setShowFullId( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _showFullId + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _rightAlignIds + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_rightAlignIds", "rightAlignIds", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasRightAlignIds()) + return null; + return (target.getRightAlignIds() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteRightAlignIds(); + return; + } + target.setRightAlignIds( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _rightAlignIds + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showText + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showText", "showText", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasShowText()) + return null; + return (target.getShowText() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowText(); + return; + } + target.setShowText( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _showText + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showColourText + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showColourText", "showColourText", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasShowColourText()) + return null; + return (target.getShowColourText() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowColourText(); + return; + } + target.setShowColourText( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _showColourText + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showBoxes + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showBoxes", "showBoxes", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasShowBoxes()) + return null; + return (target.getShowBoxes() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowBoxes(); + return; + } + target.setShowBoxes( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _showBoxes + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _wrapAlignment + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_wrapAlignment", "wrapAlignment", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasWrapAlignment()) + return null; + return (target.getWrapAlignment() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteWrapAlignment(); + return; + } + target.setWrapAlignment( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _wrapAlignment + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _renderGaps + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_renderGaps", "renderGaps", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasRenderGaps()) + return null; + return (target.getRenderGaps() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteRenderGaps(); + return; + } + target.setRenderGaps( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _renderGaps + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showSequenceFeatures + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showSequenceFeatures", "showSequenceFeatures", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasShowSequenceFeatures()) + return null; + return (target.getShowSequenceFeatures() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowSequenceFeatures(); + return; + } + target.setShowSequenceFeatures( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _showSequenceFeatures + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showAnnotation + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showAnnotation", "showAnnotation", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasShowAnnotation()) + return null; + return (target.getShowAnnotation() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowAnnotation(); + return; + } + target.setShowAnnotation( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _showAnnotation + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _xpos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasXpos()) + return null; + return new java.lang.Integer(target.getXpos()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteXpos(); + return; + } + target.setXpos( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _xpos + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _ypos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasYpos()) + return null; + return new java.lang.Integer(target.getYpos()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteYpos(); + return; + } + target.setYpos( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _ypos + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _width + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasWidth()) + return null; + return new java.lang.Integer(target.getWidth()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteWidth(); + return; + } + target.setWidth( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _width + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _height + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasHeight()) + return null; + return new java.lang.Integer(target.getHeight()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteHeight(); + return; + } + target.setHeight( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _height + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _startRes + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startRes", "startRes", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasStartRes()) + return null; + return new java.lang.Integer(target.getStartRes()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteStartRes(); + return; + } + target.setStartRes( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _startRes + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _startSeq + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startSeq", "startSeq", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasStartSeq()) + return null; + return new java.lang.Integer(target.getStartSeq()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteStartSeq(); + return; + } + target.setStartSeq( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _startSeq + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _fontName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getFontName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.setFontName( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _fontName + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _fontSize + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasFontSize()) + return null; + return new java.lang.Integer(target.getFontSize()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteFontSize(); + return; + } + target.setFontSize( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _fontSize + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _fontStyle + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasFontStyle()) + return null; + return new java.lang.Integer(target.getFontStyle()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteFontStyle(); + return; + } + target.setFontStyle( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _fontStyle + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _viewName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewName", "viewName", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getViewName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.setViewName( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _viewName + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _sequenceSetId + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequenceSetId", "sequenceSetId", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getSequenceSetId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.setSequenceSetId( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _sequenceSetId + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _gatheredViews + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_gatheredViews", "gatheredViews", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasGatheredViews()) + return null; + return (target.getGatheredViews() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteGatheredViews(); + return; + } + target.setGatheredViews( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _gatheredViews + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _textCol1 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol1", "textCol1", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasTextCol1()) + return null; + return new java.lang.Integer(target.getTextCol1()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol1(); + return; + } + target.setTextCol1( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _textCol1 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _textCol2 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol2", "textCol2", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasTextCol2()) + return null; + return new java.lang.Integer(target.getTextCol2()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol2(); + return; + } + target.setTextCol2( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _textCol2 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _textColThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textColThreshold", "textColThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasTextColThreshold()) + return null; + return new java.lang.Integer(target.getTextColThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextColThreshold(); + return; + } + target.setTextColThreshold( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _textColThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _annotationColours + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.AnnotationColours.class, "_annotationColours", "AnnotationColours", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getAnnotationColours(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.setAnnotationColours( (jalview.schemabinding.version2.AnnotationColours) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.AnnotationColours(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _annotationColours + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _hiddenColumnsList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.HiddenColumns.class, "_hiddenColumnsList", "hiddenColumns", org.exolab.castor.xml.NodeType.Element); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getHiddenColumns(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.addHiddenColumns( (jalview.schemabinding.version2.HiddenColumns) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new jalview.schemabinding.version2.HiddenColumns(); + } + } ); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _hiddenColumnsList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } //-- jalview.schemabinding.version2.ViewportDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasConservationSelected()) - { - return null; - } - return (target.getConservationSelected() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteConservationSelected(); - return; - } - target.setConservationSelected( ( (java.lang.Boolean) value). - booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _conservationSelected - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _pidSelected - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_pidSelected", "pidSelected", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasPidSelected()) - { - return null; - } - return (target.getPidSelected() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deletePidSelected(); - return; - } - target.setPidSelected( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _pidSelected - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _bgColour - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_bgColour", "bgColour", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - return target.getBgColour(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - target.setBgColour( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _bgColour - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _consThreshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_consThreshold", "consThreshold", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasConsThreshold()) - { - return null; - } - return new java.lang.Integer(target.getConsThreshold()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteConsThreshold(); - return; - } - target.setConsThreshold( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _consThreshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _pidThreshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_pidThreshold", "pidThreshold", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasPidThreshold()) - { - return null; - } - return new java.lang.Integer(target.getPidThreshold()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deletePidThreshold(); - return; - } - target.setPidThreshold( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _pidThreshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _title - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_title", "title", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return jalview.schemabinding.version2.Viewport.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - return target.getTitle(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - target.setTitle( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _title - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _showFullId - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_showFullId", "showFullId", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasShowFullId()) - { - return null; - } - return (target.getShowFullId() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteShowFullId(); - return; - } - target.setShowFullId( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _showFullId - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _rightAlignIds - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_rightAlignIds", "rightAlignIds", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasRightAlignIds()) - { - return null; - } - return (target.getRightAlignIds() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteRightAlignIds(); - return; - } - target.setRightAlignIds( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _rightAlignIds - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _showText - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_showText", "showText", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasShowText()) - { - return null; - } - return (target.getShowText() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteShowText(); - return; - } - target.setShowText( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _showText - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _showColourText - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_showColourText", "showColourText", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasShowColourText()) - { - return null; - } - return (target.getShowColourText() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteShowColourText(); - return; - } - target.setShowColourText( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _showColourText - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _showBoxes - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_showBoxes", "showBoxes", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasShowBoxes()) - { - return null; - } - return (target.getShowBoxes() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteShowBoxes(); - return; - } - target.setShowBoxes( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _showBoxes - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _wrapAlignment - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_wrapAlignment", "wrapAlignment", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasWrapAlignment()) - { - return null; - } - return (target.getWrapAlignment() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteWrapAlignment(); - return; - } - target.setWrapAlignment( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _wrapAlignment - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _renderGaps - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_renderGaps", "renderGaps", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasRenderGaps()) - { - return null; - } - return (target.getRenderGaps() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteRenderGaps(); - return; - } - target.setRenderGaps( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _renderGaps - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _showSequenceFeatures - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_showSequenceFeatures", "showSequenceFeatures", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasShowSequenceFeatures()) - { - return null; - } - return (target.getShowSequenceFeatures() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteShowSequenceFeatures(); - return; - } - target.setShowSequenceFeatures( ( (java.lang.Boolean) value). - booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _showSequenceFeatures - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _showAnnotation - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_showAnnotation", "showAnnotation", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasShowAnnotation()) - { - return null; - } - return (target.getShowAnnotation() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteShowAnnotation(); - return; - } - target.setShowAnnotation( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _showAnnotation - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _xpos - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasXpos()) - { - return null; - } - return new java.lang.Integer(target.getXpos()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteXpos(); - return; - } - target.setXpos( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _xpos - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _ypos - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasYpos()) - { - return null; - } - return new java.lang.Integer(target.getYpos()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteYpos(); - return; - } - target.setYpos( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _ypos - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _width - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_width", "width", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasWidth()) - { - return null; - } - return new java.lang.Integer(target.getWidth()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteWidth(); - return; - } - target.setWidth( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _width - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _height - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_height", "height", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasHeight()) - { - return null; - } - return new java.lang.Integer(target.getHeight()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteHeight(); - return; - } - target.setHeight( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _height - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _startRes - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_startRes", "startRes", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasStartRes()) - { - return null; - } - return new java.lang.Integer(target.getStartRes()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteStartRes(); - return; - } - target.setStartRes( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _startRes - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _startSeq - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_startSeq", "startSeq", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasStartSeq()) - { - return null; - } - return new java.lang.Integer(target.getStartSeq()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteStartSeq(); - return; - } - target.setStartSeq( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _startSeq - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _fontName - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_fontName", "fontName", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - return target.getFontName(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - target.setFontName( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _fontName - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _fontSize - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_fontSize", "fontSize", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasFontSize()) - { - return null; - } - return new java.lang.Integer(target.getFontSize()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteFontSize(); - return; - } - target.setFontSize( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _fontSize - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _fontStyle - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_fontStyle", "fontStyle", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasFontStyle()) - { - return null; - } - return new java.lang.Integer(target.getFontStyle()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteFontStyle(); - return; - } - target.setFontStyle( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _fontStyle - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _viewName - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_viewName", "viewName", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - return target.getViewName(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - target.setViewName( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _viewName - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _sequenceSetId - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - String.class, "_sequenceSetId", "sequenceSetId", - org.exolab.castor.xml.NodeType.Attribute); - desc.setImmutable(true); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - return target.getSequenceSetId(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - target.setSequenceSetId( (java.lang.String) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _sequenceSetId - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _gatheredViews - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Boolean.TYPE, "_gatheredViews", "gatheredViews", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasGatheredViews()) - { - return null; - } - return (target.getGatheredViews() ? java.lang.Boolean.TRUE : - java.lang.Boolean.FALSE); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteGatheredViews(); - return; - } - target.setGatheredViews( ( (java.lang.Boolean) value).booleanValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _gatheredViews - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _textCol1 - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_textCol1", "textCol1", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasTextCol1()) - { - return null; - } - return new java.lang.Integer(target.getTextCol1()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteTextCol1(); - return; - } - target.setTextCol1( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _textCol1 - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _textCol2 - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_textCol2", "textCol2", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasTextCol2()) - { - return null; - } - return new java.lang.Integer(target.getTextCol2()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteTextCol2(); - return; - } - target.setTextCol2( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _textCol2 - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _textColThreshold - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang. - Integer.TYPE, "_textColThreshold", "textColThreshold", - org.exolab.castor.xml.NodeType.Attribute); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - if (!target.hasTextColThreshold()) - { - return null; - } - return new java.lang.Integer(target.getTextColThreshold()); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - // if null, use delete method for optional primitives - if (value == null) - { - target.deleteTextColThreshold(); - return; - } - target.setTextColThreshold( ( (java.lang.Integer) value).intValue()); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return null; - } - }); - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _textColThreshold - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _annotationColours - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.AnnotationColours.class, "_annotationColours", - "AnnotationColours", org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - return target.getAnnotationColours(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - target.setAnnotationColours( (jalview.schemabinding.version2. - AnnotationColours) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.AnnotationColours(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _annotationColours - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _hiddenColumnsList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview. - schemabinding.version2.HiddenColumns.class, "_hiddenColumnsList", - "hiddenColumns", org.exolab.castor.xml.NodeType.Element); - handler = (new org.exolab.castor.xml.XMLFieldHandler() - { - public java.lang.Object getValue(java.lang.Object object) - throws IllegalStateException - { - Viewport target = (Viewport) object; - return target.getHiddenColumns(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - Viewport target = (Viewport) object; - target.addHiddenColumns( (jalview.schemabinding.version2. - HiddenColumns) value); - } - catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.HiddenColumns(); - } - }); - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _hiddenColumnsList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- jalview.schemabinding.version2.ViewportDescriptor() - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return jalview.schemabinding.version2.Viewport.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() + return xmlName; + } //-- java.lang.String getXMLName() } -- 1.7.10.2