From a96d51f58325f8429c5792ae554243de5628d62a Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 30 Aug 2007 11:38:08 +0000 Subject: [PATCH] added aligned codon frames, and dataset reference ids for sequenceSet and sequences to project xml --- schemas/vamsas.xsd | 200 +++++-- src/jalview/schemabinding/version2/.castor.cdr | 62 ++- src/jalview/schemabinding/version2/AlcodMap.java | 184 +++++++ src/jalview/schemabinding/version2/Alcodon.java | 263 +++++++++ .../schemabinding/version2/AlcodonFrame.java | 432 +++++++++++++++ src/jalview/schemabinding/version2/DBRef.java | 25 + .../schemabinding/version2/MapListFrom.java | 216 ++++++++ src/jalview/schemabinding/version2/MapListTo.java | 216 ++++++++ .../schemabinding/version2/MapListType.java | 582 ++++++++++++++++++++ src/jalview/schemabinding/version2/Mapping.java | 165 ++++++ .../schemabinding/version2/MappingChoice.java | 170 ++++++ src/jalview/schemabinding/version2/Sequence.java | 33 ++ .../schemabinding/version2/SequenceSet.java | 192 +++++++ .../version2/descriptors/AlcodMapDescriptor.java | 234 ++++++++ .../version2/descriptors/AlcodonDescriptor.java | 280 ++++++++++ .../descriptors/AlcodonFrameDescriptor.java | 244 ++++++++ .../version2/descriptors/DBRefDescriptor.java | 36 ++ .../descriptors/MapListFromDescriptor.java | 243 ++++++++ .../version2/descriptors/MapListToDescriptor.java | 243 ++++++++ .../descriptors/MapListTypeDescriptor.java | 328 +++++++++++ .../descriptors/MappingChoiceDescriptor.java | 230 ++++++++ .../version2/descriptors/MappingDescriptor.java | 196 +++++++ .../version2/descriptors/SequenceDescriptor.java | 37 ++ .../descriptors/SequenceSetDescriptor.java | 79 +++ 24 files changed, 4830 insertions(+), 60 deletions(-) create mode 100644 src/jalview/schemabinding/version2/AlcodMap.java create mode 100644 src/jalview/schemabinding/version2/Alcodon.java create mode 100644 src/jalview/schemabinding/version2/AlcodonFrame.java create mode 100644 src/jalview/schemabinding/version2/MapListFrom.java create mode 100644 src/jalview/schemabinding/version2/MapListTo.java create mode 100644 src/jalview/schemabinding/version2/MapListType.java create mode 100644 src/jalview/schemabinding/version2/Mapping.java create mode 100644 src/jalview/schemabinding/version2/MappingChoice.java create mode 100644 src/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.java create mode 100644 src/jalview/schemabinding/version2/descriptors/AlcodonDescriptor.java create mode 100644 src/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.java create mode 100644 src/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.java create mode 100644 src/jalview/schemabinding/version2/descriptors/MapListToDescriptor.java create mode 100644 src/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.java create mode 100644 src/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.java create mode 100644 src/jalview/schemabinding/version2/descriptors/MappingDescriptor.java diff --git a/schemas/vamsas.xsd b/schemas/vamsas.xsd index 847c903..b457bec 100755 --- a/schemas/vamsas.xsd +++ b/schemas/vamsas.xsd @@ -7,59 +7,191 @@ - + + + + developed after mapRangeType from http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes + + + This effectively represents a java.util.MapList object + + + + + + a region from start to end inclusive + + + + + + + + + a region from start to end inclusive + + + + + + + + + + number of dictionary symbol widths involved in each + mapped position on this sequence (for example, 3 for a dna sequence exon + region that is being mapped to a protein sequence). This is optional, + since the unit can be usually be inferred from the dictionary type of + each sequence involved in the mapping. + + + + + number of dictionary symbol widths involved in each + mapped position on this sequence (for example, 3 for a dna sequence exon + region that is being mapped to a protein sequence). This is optional, + since the unit can be usually be inferred from the dictionary type of + each sequence involved in the mapping. + + + + + + + + Represent the jalview.datamodel.Mapping object - it also provides + a way of storing sequences that are mapped 'to' without adding them + to the sequence set (which will mean they are then added to the alignment too). + + + + + + + + + + + + The sequence whose dataset sequence is to be referenced here + + + + + + + + + + + - + - - - - - - - - - - - - - + + + - + - - - - - - - - - + + + + a Mapping entry and an associated protein sequence + + - - - - - - - - - + + + + internal jalview id for the dnasq for this mapping. + + + + + + + + + + + + + + + + + + + + + + + + + + + + dataset sequence id for this sequence. Will be created as union of sequences. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + reference to set where jalview will gather the dataset sequences for all sequences in the set. + + + diff --git a/src/jalview/schemabinding/version2/.castor.cdr b/src/jalview/schemabinding/version2/.castor.cdr index cb20022..6de5c73 100644 --- a/src/jalview/schemabinding/version2/.castor.cdr +++ b/src/jalview/schemabinding/version2/.castor.cdr @@ -1,34 +1,44 @@ -#Sun Jun 17 14:17:08 BST 2007 -jalview.schemabinding.version2.AnnotationColours=jalview.schemabinding.version2.descriptors.AnnotationColoursDescriptor -jalview.schemabinding.version2.Sequence=jalview.schemabinding.version2.descriptors.SequenceDescriptor -jalview.schemabinding.version2.SequenceType=jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor -jalview.schemabinding.version2.PdbentryItem=jalview.schemabinding.version2.descriptors.PdbentryItemDescriptor -jalview.schemabinding.version2.StructureState=jalview.schemabinding.version2.descriptors.StructureStateDescriptor +#Wed Aug 29 14:54:33 BST 2007 jalview.schemabinding.version2.ThresholdLine=jalview.schemabinding.version2.descriptors.ThresholdLineDescriptor -jalview.schemabinding.version2.Pdbentry=jalview.schemabinding.version2.descriptors.PdbentryDescriptor -jalview.schemabinding.version2.AnnotationElement=jalview.schemabinding.version2.descriptors.AnnotationElementDescriptor +jalview.schemabinding.version2.SequenceSetProperties=jalview.schemabinding.version2.descriptors.SequenceSetPropertiesDescriptor +jalview.schemabinding.version2.StructureState=jalview.schemabinding.version2.descriptors.StructureStateDescriptor +jalview.schemabinding.version2.Tree=jalview.schemabinding.version2.descriptors.TreeDescriptor +jalview.schemabinding.version2.JalviewModel=jalview.schemabinding.version2.descriptors.JalviewModelDescriptor +jalview.schemabinding.version2.SequenceType=jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor jalview.schemabinding.version2.OtherData=jalview.schemabinding.version2.descriptors.OtherDataDescriptor -jalview.schemabinding.version2.VamsasModel=jalview.schemabinding.version2.descriptors.VamsasModelDescriptor -jalview.schemabinding.version2.VAMSAS=jalview.schemabinding.version2.descriptors.VAMSASDescriptor -jalview.schemabinding.version2.JalviewUserColours=jalview.schemabinding.version2.descriptors.JalviewUserColoursDescriptor -jalview.schemabinding.version2.JalviewModelSequence=jalview.schemabinding.version2.descriptors.JalviewModelSequenceDescriptor -jalview.schemabinding.version2.Features=jalview.schemabinding.version2.descriptors.FeaturesDescriptor +jalview.schemabinding.version2.Setting=jalview.schemabinding.version2.descriptors.SettingDescriptor +jalview.schemabinding.version2.AlcodonFrame=jalview.schemabinding.version2.descriptors.AlcodonFrameDescriptor +jalview.schemabinding.version2.AnnotationElement=jalview.schemabinding.version2.descriptors.AnnotationElementDescriptor jalview.schemabinding.version2.SequenceSet=jalview.schemabinding.version2.descriptors.SequenceSetDescriptor -jalview.schemabinding.version2.DBRef=jalview.schemabinding.version2.descriptors.DBRefDescriptor -jalview.schemabinding.version2.Colour=jalview.schemabinding.version2.descriptors.ColourDescriptor -jalview.schemabinding.version2.Feature=jalview.schemabinding.version2.descriptors.FeatureDescriptor jalview.schemabinding.version2.Viewport=jalview.schemabinding.version2.descriptors.ViewportDescriptor -jalview.schemabinding.version2.JalviewModel=jalview.schemabinding.version2.descriptors.JalviewModelDescriptor -jalview.schemabinding.version2.JGroup=jalview.schemabinding.version2.descriptors.JGroupDescriptor -jalview.schemabinding.version2.FeatureSettings=jalview.schemabinding.version2.descriptors.FeatureSettingsDescriptor +jalview.schemabinding.version2.MapListType=jalview.schemabinding.version2.descriptors.MapListTypeDescriptor +jalview.schemabinding.version2.Property=jalview.schemabinding.version2.descriptors.PropertyDescriptor jalview.schemabinding.version2.UserColourScheme=jalview.schemabinding.version2.descriptors.UserColourSchemeDescriptor +jalview.schemabinding.version2.DBRef=jalview.schemabinding.version2.descriptors.DBRefDescriptor +jalview.schemabinding.version2.AlcodMap=jalview.schemabinding.version2.descriptors.AlcodMapDescriptor +jalview.schemabinding.version2.Annotation=jalview.schemabinding.version2.descriptors.AnnotationDescriptor +jalview.schemabinding.version2.JSeq=jalview.schemabinding.version2.descriptors.JSeqDescriptor +jalview.schemabinding.version2.Sequence=jalview.schemabinding.version2.descriptors.SequenceDescriptor +jalview.schemabinding.version2.Alcodon=jalview.schemabinding.version2.descriptors.AlcodonDescriptor +jalview.schemabinding.version2.AnnotationColours=jalview.schemabinding.version2.descriptors.AnnotationColoursDescriptor jalview.schemabinding.version2.Pdbids=jalview.schemabinding.version2.descriptors.PdbidsDescriptor -jalview.schemabinding.version2.HiddenColumns=jalview.schemabinding.version2.descriptors.HiddenColumnsDescriptor +jalview.schemabinding.version2.Mapping=jalview.schemabinding.version2.descriptors.MappingDescriptor +jalview.schemabinding.version2.MappingChoice=jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor jalview.schemabinding.version2.Group=jalview.schemabinding.version2.descriptors.GroupDescriptor -jalview.schemabinding.version2.Tree=jalview.schemabinding.version2.descriptors.TreeDescriptor -jalview.schemabinding.version2.Setting=jalview.schemabinding.version2.descriptors.SettingDescriptor +jalview.schemabinding.version2.Feature=jalview.schemabinding.version2.descriptors.FeatureDescriptor +jalview.schemabinding.version2.JalviewModelSequence=jalview.schemabinding.version2.descriptors.JalviewModelSequenceDescriptor jalview.schemabinding.version2.UserColours=jalview.schemabinding.version2.descriptors.UserColoursDescriptor -jalview.schemabinding.version2.JSeq=jalview.schemabinding.version2.descriptors.JSeqDescriptor -jalview.schemabinding.version2.SequenceSetProperties=jalview.schemabinding.version2.descriptors.SequenceSetPropertiesDescriptor -jalview.schemabinding.version2.Property=jalview.schemabinding.version2.descriptors.PropertyDescriptor -jalview.schemabinding.version2.Annotation=jalview.schemabinding.version2.descriptors.AnnotationDescriptor +jalview.schemabinding.version2.Colour=jalview.schemabinding.version2.descriptors.ColourDescriptor +jalview.schemabinding.version2.MapListFrom=jalview.schemabinding.version2.descriptors.MapListFromDescriptor +jalview.schemabinding.version2.PdbentryItem=jalview.schemabinding.version2.descriptors.PdbentryItemDescriptor +jalview.schemabinding.version2.FeatureSettings=jalview.schemabinding.version2.descriptors.FeatureSettingsDescriptor +jalview.schemabinding.version2.JGroup=jalview.schemabinding.version2.descriptors.JGroupDescriptor +jalview.schemabinding.version2.MapListTo=jalview.schemabinding.version2.descriptors.MapListToDescriptor +jalview.schemabinding.version2.JalviewUserColours=jalview.schemabinding.version2.descriptors.JalviewUserColoursDescriptor +jalview.schemabinding.version2.VamsasModel=jalview.schemabinding.version2.descriptors.VamsasModelDescriptor +jalview.schemabinding.version2.Pdbentry=jalview.schemabinding.version2.descriptors.PdbentryDescriptor +jalview.schemabinding.version2.HiddenColumns=jalview.schemabinding.version2.descriptors.HiddenColumnsDescriptor +jalview.schemabinding.version2.DseqFor=jalview.schemabinding.version2.descriptors.DseqForDescriptor +jalview.schemabinding.version2.Features=jalview.schemabinding.version2.descriptors.FeaturesDescriptor +jalview.schemabinding.version2.VAMSAS=jalview.schemabinding.version2.descriptors.VAMSASDescriptor +jalview.schemabinding.version2.MappingChoiceItem=jalview.schemabinding.version2.descriptors.MappingChoiceItemDescriptor diff --git a/src/jalview/schemabinding/version2/AlcodMap.java b/src/jalview/schemabinding/version2/AlcodMap.java new file mode 100644 index 0000000..f43acd6 --- /dev/null +++ b/src/jalview/schemabinding/version2/AlcodMap.java @@ -0,0 +1,184 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class AlcodMap. + * + * @version $Revision$ $Date$ + */ +public class AlcodMap implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * internal jalview id for the dnasq for this mapping. + * + */ + private java.lang.String _dnasq; + + /** + * a Mapping entry and an associated protein sequence + * + */ + private jalview.schemabinding.version2.Mapping _mapping; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AlcodMap() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'dnasq'. The field 'dnasq' has + * the following description: internal jalview id for the dnasq + * for this mapping. + * + * + * @return the value of field 'Dnasq'. + */ + public java.lang.String getDnasq( + ) { + return this._dnasq; + } + + /** + * Returns the value of field 'mapping'. The field 'mapping' + * has the following description: a Mapping entry and an + * associated protein sequence + * + * + * @return the value of field 'Mapping'. + */ + public jalview.schemabinding.version2.Mapping getMapping( + ) { + return this._mapping; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'dnasq'. The field 'dnasq' has the + * following description: internal jalview id for the dnasq for + * this mapping. + * + * + * @param dnasq the value of field 'dnasq'. + */ + public void setDnasq( + final java.lang.String dnasq) { + this._dnasq = dnasq; + } + + /** + * Sets the value of field 'mapping'. The field 'mapping' has + * the following description: a Mapping entry and an associated + * protein sequence + * + * + * @param mapping the value of field 'mapping'. + */ + public void setMapping( + final jalview.schemabinding.version2.Mapping mapping) { + this._mapping = mapping; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * jalview.schemabinding.version2.AlcodMap + */ + public static jalview.schemabinding.version2.AlcodMap unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.AlcodMap) Unmarshaller.unmarshal(jalview.schemabinding.version2.AlcodMap.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} diff --git a/src/jalview/schemabinding/version2/Alcodon.java b/src/jalview/schemabinding/version2/Alcodon.java new file mode 100644 index 0000000..cffbd9a --- /dev/null +++ b/src/jalview/schemabinding/version2/Alcodon.java @@ -0,0 +1,263 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class Alcodon. + * + * @version $Revision$ $Date$ + */ +public class Alcodon implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _pos1. + */ + private long _pos1; + + /** + * keeps track of state for field: _pos1 + */ + private boolean _has_pos1; + + /** + * Field _pos2. + */ + private long _pos2; + + /** + * keeps track of state for field: _pos2 + */ + private boolean _has_pos2; + + /** + * Field _pos3. + */ + private long _pos3; + + /** + * keeps track of state for field: _pos3 + */ + private boolean _has_pos3; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Alcodon() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + */ + public void deletePos1( + ) { + this._has_pos1= false; + } + + /** + */ + public void deletePos2( + ) { + this._has_pos2= false; + } + + /** + */ + public void deletePos3( + ) { + this._has_pos3= false; + } + + /** + * Returns the value of field 'pos1'. + * + * @return the value of field 'Pos1'. + */ + public long getPos1( + ) { + return this._pos1; + } + + /** + * Returns the value of field 'pos2'. + * + * @return the value of field 'Pos2'. + */ + public long getPos2( + ) { + return this._pos2; + } + + /** + * Returns the value of field 'pos3'. + * + * @return the value of field 'Pos3'. + */ + public long getPos3( + ) { + return this._pos3; + } + + /** + * Method hasPos1. + * + * @return true if at least one Pos1 has been added + */ + public boolean hasPos1( + ) { + return this._has_pos1; + } + + /** + * Method hasPos2. + * + * @return true if at least one Pos2 has been added + */ + public boolean hasPos2( + ) { + return this._has_pos2; + } + + /** + * Method hasPos3. + * + * @return true if at least one Pos3 has been added + */ + public boolean hasPos3( + ) { + return this._has_pos3; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'pos1'. + * + * @param pos1 the value of field 'pos1'. + */ + public void setPos1( + final long pos1) { + this._pos1 = pos1; + this._has_pos1 = true; + } + + /** + * Sets the value of field 'pos2'. + * + * @param pos2 the value of field 'pos2'. + */ + public void setPos2( + final long pos2) { + this._pos2 = pos2; + this._has_pos2 = true; + } + + /** + * Sets the value of field 'pos3'. + * + * @param pos3 the value of field 'pos3'. + */ + public void setPos3( + final long pos3) { + this._pos3 = pos3; + this._has_pos3 = true; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled jalview.schemabinding.version2.Alcodo + */ + public static jalview.schemabinding.version2.Alcodon unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(jalview.schemabinding.version2.Alcodon.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} diff --git a/src/jalview/schemabinding/version2/AlcodonFrame.java b/src/jalview/schemabinding/version2/AlcodonFrame.java new file mode 100644 index 0000000..b8b2a41 --- /dev/null +++ b/src/jalview/schemabinding/version2/AlcodonFrame.java @@ -0,0 +1,432 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class AlcodonFrame. + * + * @version $Revision$ $Date$ + */ +public class AlcodonFrame implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _alcodonList. + */ + private java.util.Vector _alcodonList; + + /** + * Field _alcodMapList. + */ + private java.util.Vector _alcodMapList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AlcodonFrame() { + super(); + this._alcodonList = new java.util.Vector(); + this._alcodMapList = new java.util.Vector(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vAlcodMap + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addAlcodMap( + final jalview.schemabinding.version2.AlcodMap vAlcodMap) + throws java.lang.IndexOutOfBoundsException { + this._alcodMapList.addElement(vAlcodMap); + } + + /** + * + * + * @param index + * @param vAlcodMap + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addAlcodMap( + final int index, + final jalview.schemabinding.version2.AlcodMap vAlcodMap) + throws java.lang.IndexOutOfBoundsException { + this._alcodMapList.add(index, vAlcodMap); + } + + /** + * + * + * @param vAlcodon + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addAlcodon( + final jalview.schemabinding.version2.Alcodon vAlcodon) + throws java.lang.IndexOutOfBoundsException { + this._alcodonList.addElement(vAlcodon); + } + + /** + * + * + * @param index + * @param vAlcodon + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addAlcodon( + final int index, + final jalview.schemabinding.version2.Alcodon vAlcodon) + throws java.lang.IndexOutOfBoundsException { + this._alcodonList.add(index, vAlcodon); + } + + /** + * Method enumerateAlcodMap. + * + * @return an Enumeration over all + * jalview.schemabinding.version2.AlcodMap elements + */ + public java.util.Enumeration enumerateAlcodMap( + ) { + return this._alcodMapList.elements(); + } + + /** + * Method enumerateAlcodon. + * + * @return an Enumeration over all + * jalview.schemabinding.version2.Alcodon elements + */ + public java.util.Enumeration enumerateAlcodon( + ) { + return this._alcodonList.elements(); + } + + /** + * Method getAlcodMap. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.AlcodMap at the given index + */ + public jalview.schemabinding.version2.AlcodMap getAlcodMap( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._alcodMapList.size()) { + throw new IndexOutOfBoundsException("getAlcodMap: Index value '" + index + "' not in range [0.." + (this._alcodMapList.size() - 1) + "]"); + } + + return (jalview.schemabinding.version2.AlcodMap) _alcodMapList.get(index); + } + + /** + * Method getAlcodMap.Returns the contents of the collection in + * an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public jalview.schemabinding.version2.AlcodMap[] getAlcodMap( + ) { + jalview.schemabinding.version2.AlcodMap[] array = new jalview.schemabinding.version2.AlcodMap[0]; + return (jalview.schemabinding.version2.AlcodMap[]) this._alcodMapList.toArray(array); + } + + /** + * Method getAlcodMapCount. + * + * @return the size of this collection + */ + public int getAlcodMapCount( + ) { + return this._alcodMapList.size(); + } + + /** + * Method getAlcodon. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.Alcodon at the given index + */ + public jalview.schemabinding.version2.Alcodon getAlcodon( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._alcodonList.size()) { + throw new IndexOutOfBoundsException("getAlcodon: Index value '" + index + "' not in range [0.." + (this._alcodonList.size() - 1) + "]"); + } + + return (jalview.schemabinding.version2.Alcodon) _alcodonList.get(index); + } + + /** + * Method getAlcodon.Returns the contents of the collection in + * an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public jalview.schemabinding.version2.Alcodon[] getAlcodon( + ) { + jalview.schemabinding.version2.Alcodon[] array = new jalview.schemabinding.version2.Alcodon[0]; + return (jalview.schemabinding.version2.Alcodon[]) this._alcodonList.toArray(array); + } + + /** + * Method getAlcodonCount. + * + * @return the size of this collection + */ + public int getAlcodonCount( + ) { + return this._alcodonList.size(); + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, handler); + } + + /** + * Method removeAlcodMap. + * + * @param vAlcodMap + * @return true if the object was removed from the collection. + */ + public boolean removeAlcodMap( + final jalview.schemabinding.version2.AlcodMap vAlcodMap) { + boolean removed = _alcodMapList.remove(vAlcodMap); + return removed; + } + + /** + * Method removeAlcodMapAt. + * + * @param index + * @return the element removed from the collection + */ + public jalview.schemabinding.version2.AlcodMap removeAlcodMapAt( + final int index) { + java.lang.Object obj = this._alcodMapList.remove(index); + return (jalview.schemabinding.version2.AlcodMap) obj; + } + + /** + * Method removeAlcodon. + * + * @param vAlcodon + * @return true if the object was removed from the collection. + */ + public boolean removeAlcodon( + final jalview.schemabinding.version2.Alcodon vAlcodon) { + boolean removed = _alcodonList.remove(vAlcodon); + return removed; + } + + /** + * Method removeAlcodonAt. + * + * @param index + * @return the element removed from the collection + */ + public jalview.schemabinding.version2.Alcodon removeAlcodonAt( + final int index) { + java.lang.Object obj = this._alcodonList.remove(index); + return (jalview.schemabinding.version2.Alcodon) obj; + } + + /** + */ + public void removeAllAlcodMap( + ) { + this._alcodMapList.clear(); + } + + /** + */ + public void removeAllAlcodon( + ) { + this._alcodonList.clear(); + } + + /** + * + * + * @param index + * @param vAlcodMap + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setAlcodMap( + final int index, + final jalview.schemabinding.version2.AlcodMap vAlcodMap) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._alcodMapList.size()) { + throw new IndexOutOfBoundsException("setAlcodMap: Index value '" + index + "' not in range [0.." + (this._alcodMapList.size() - 1) + "]"); + } + + this._alcodMapList.set(index, vAlcodMap); + } + + /** + * + * + * @param vAlcodMapArray + */ + public void setAlcodMap( + final jalview.schemabinding.version2.AlcodMap[] vAlcodMapArray) { + //-- copy array + _alcodMapList.clear(); + + for (int i = 0; i < vAlcodMapArray.length; i++) { + this._alcodMapList.add(vAlcodMapArray[i]); + } + } + + /** + * + * + * @param index + * @param vAlcodon + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setAlcodon( + final int index, + final jalview.schemabinding.version2.Alcodon vAlcodon) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._alcodonList.size()) { + throw new IndexOutOfBoundsException("setAlcodon: Index value '" + index + "' not in range [0.." + (this._alcodonList.size() - 1) + "]"); + } + + this._alcodonList.set(index, vAlcodon); + } + + /** + * + * + * @param vAlcodonArray + */ + public void setAlcodon( + final jalview.schemabinding.version2.Alcodon[] vAlcodonArray) { + //-- copy array + _alcodonList.clear(); + + for (int i = 0; i < vAlcodonArray.length; i++) { + this._alcodonList.add(vAlcodonArray[i]); + } + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * jalview.schemabinding.version2.AlcodonFrame + */ + public static jalview.schemabinding.version2.AlcodonFrame unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.AlcodonFrame) Unmarshaller.unmarshal(jalview.schemabinding.version2.AlcodonFrame.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} diff --git a/src/jalview/schemabinding/version2/DBRef.java b/src/jalview/schemabinding/version2/DBRef.java index e6c4220..4d67250 100644 --- a/src/jalview/schemabinding/version2/DBRef.java +++ b/src/jalview/schemabinding/version2/DBRef.java @@ -41,6 +41,11 @@ public class DBRef implements java.io.Serializable { */ private java.lang.String _accessionId; + /** + * Field _mapping. + */ + private jalview.schemabinding.version2.Mapping _mapping; + //----------------/ //- Constructors -/ @@ -66,6 +71,16 @@ public class DBRef implements java.io.Serializable { } /** + * Returns the value of field 'mapping'. + * + * @return the value of field 'Mapping'. + */ + public jalview.schemabinding.version2.Mapping getMapping( + ) { + return this._mapping; + } + + /** * Returns the value of field 'source'. * * @return the value of field 'Source'. @@ -143,6 +158,16 @@ public class DBRef implements java.io.Serializable { } /** + * Sets the value of field 'mapping'. + * + * @param mapping the value of field 'mapping'. + */ + public void setMapping( + final jalview.schemabinding.version2.Mapping mapping) { + this._mapping = mapping; + } + + /** * Sets the value of field 'source'. * * @param source the value of field 'source'. diff --git a/src/jalview/schemabinding/version2/MapListFrom.java b/src/jalview/schemabinding/version2/MapListFrom.java new file mode 100644 index 0000000..acfe18e --- /dev/null +++ b/src/jalview/schemabinding/version2/MapListFrom.java @@ -0,0 +1,216 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * a region from start to end inclusive + * + * @version $Revision$ $Date$ + */ +public class MapListFrom 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 MapListFrom() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + */ + public void deleteEnd( + ) { + this._has_end= false; + } + + /** + */ + public void deleteStart( + ) { + this._has_start= false; + } + + /** + * Returns the value of field 'end'. + * + * @return the value of field 'End'. + */ + public int getEnd( + ) { + return this._end; + } + + /** + * Returns the value of field 'start'. + * + * @return the value of field 'Start'. + */ + public int getStart( + ) { + return this._start; + } + + /** + * Method hasEnd. + * + * @return true if at least one End has been added + */ + public boolean hasEnd( + ) { + return this._has_end; + } + + /** + * Method hasStart. + * + * @return true if at least one Start has been added + */ + public boolean hasStart( + ) { + return this._has_start; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'end'. + * + * @param end the value of field 'end'. + */ + public void setEnd( + final int end) { + this._end = end; + this._has_end = true; + } + + /** + * Sets the value of field 'start'. + * + * @param start the value of field 'start'. + */ + public void setStart( + final int start) { + this._start = start; + this._has_start = true; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * jalview.schemabinding.version2.MapListFrom + */ + public static jalview.schemabinding.version2.MapListFrom unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.MapListFrom) Unmarshaller.unmarshal(jalview.schemabinding.version2.MapListFrom.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} diff --git a/src/jalview/schemabinding/version2/MapListTo.java b/src/jalview/schemabinding/version2/MapListTo.java new file mode 100644 index 0000000..8c3a7e0 --- /dev/null +++ b/src/jalview/schemabinding/version2/MapListTo.java @@ -0,0 +1,216 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * a region from start to end inclusive + * + * @version $Revision$ $Date$ + */ +public class MapListTo 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 MapListTo() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + */ + public void deleteEnd( + ) { + this._has_end= false; + } + + /** + */ + public void deleteStart( + ) { + this._has_start= false; + } + + /** + * Returns the value of field 'end'. + * + * @return the value of field 'End'. + */ + public int getEnd( + ) { + return this._end; + } + + /** + * Returns the value of field 'start'. + * + * @return the value of field 'Start'. + */ + public int getStart( + ) { + return this._start; + } + + /** + * Method hasEnd. + * + * @return true if at least one End has been added + */ + public boolean hasEnd( + ) { + return this._has_end; + } + + /** + * Method hasStart. + * + * @return true if at least one Start has been added + */ + public boolean hasStart( + ) { + return this._has_start; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'end'. + * + * @param end the value of field 'end'. + */ + public void setEnd( + final int end) { + this._end = end; + this._has_end = true; + } + + /** + * Sets the value of field 'start'. + * + * @param start the value of field 'start'. + */ + public void setStart( + final int start) { + this._start = start; + this._has_start = true; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * jalview.schemabinding.version2.MapListTo + */ + public static jalview.schemabinding.version2.MapListTo unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.MapListTo) Unmarshaller.unmarshal(jalview.schemabinding.version2.MapListTo.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} diff --git a/src/jalview/schemabinding/version2/MapListType.java b/src/jalview/schemabinding/version2/MapListType.java new file mode 100644 index 0000000..21d56e7 --- /dev/null +++ b/src/jalview/schemabinding/version2/MapListType.java @@ -0,0 +1,582 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * developed after mapRangeType from + * http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes + * + * This effectively represents a java.util.MapList object + * + * + * @version $Revision$ $Date$ + */ +public class MapListType implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * number of dictionary symbol widths involved in each + * mapped position on this sequence (for example, 3 for a dna + * sequence exon + * region that is being mapped to a protein sequence). This is + * optional, + * since the unit can be usually be inferred from the + * dictionary type of + * each sequence involved in the mapping. + */ + private long _mapFromUnit; + + /** + * keeps track of state for field: _mapFromUnit + */ + private boolean _has_mapFromUnit; + + /** + * number of dictionary symbol widths involved in each + * mapped position on this sequence (for example, 3 for a dna + * sequence exon + * region that is being mapped to a protein sequence). This is + * optional, + * since the unit can be usually be inferred from the + * dictionary type of + * each sequence involved in the mapping. + */ + private long _mapToUnit; + + /** + * keeps track of state for field: _mapToUnit + */ + private boolean _has_mapToUnit; + + /** + * a region from start to end inclusive + */ + private java.util.Vector _mapListFromList; + + /** + * a region from start to end inclusive + */ + private java.util.Vector _mapListToList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MapListType() { + super(); + this._mapListFromList = new java.util.Vector(); + this._mapListToList = new java.util.Vector(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * + * + * @param vMapListFrom + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addMapListFrom( + final jalview.schemabinding.version2.MapListFrom vMapListFrom) + throws java.lang.IndexOutOfBoundsException { + this._mapListFromList.addElement(vMapListFrom); + } + + /** + * + * + * @param index + * @param vMapListFrom + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addMapListFrom( + final int index, + final jalview.schemabinding.version2.MapListFrom vMapListFrom) + throws java.lang.IndexOutOfBoundsException { + this._mapListFromList.add(index, vMapListFrom); + } + + /** + * + * + * @param vMapListTo + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addMapListTo( + final jalview.schemabinding.version2.MapListTo vMapListTo) + throws java.lang.IndexOutOfBoundsException { + this._mapListToList.addElement(vMapListTo); + } + + /** + * + * + * @param index + * @param vMapListTo + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addMapListTo( + final int index, + final jalview.schemabinding.version2.MapListTo vMapListTo) + throws java.lang.IndexOutOfBoundsException { + this._mapListToList.add(index, vMapListTo); + } + + /** + */ + public void deleteMapFromUnit( + ) { + this._has_mapFromUnit= false; + } + + /** + */ + public void deleteMapToUnit( + ) { + this._has_mapToUnit= false; + } + + /** + * Method enumerateMapListFrom. + * + * @return an Enumeration over all + * jalview.schemabinding.version2.MapListFrom elements + */ + public java.util.Enumeration enumerateMapListFrom( + ) { + return this._mapListFromList.elements(); + } + + /** + * Method enumerateMapListTo. + * + * @return an Enumeration over all + * jalview.schemabinding.version2.MapListTo elements + */ + public java.util.Enumeration enumerateMapListTo( + ) { + return this._mapListToList.elements(); + } + + /** + * Returns the value of field 'mapFromUnit'. The field + * 'mapFromUnit' has the following description: number of + * dictionary symbol widths involved in each + * mapped position on this sequence (for example, 3 for a dna + * sequence exon + * region that is being mapped to a protein sequence). This is + * optional, + * since the unit can be usually be inferred from the + * dictionary type of + * each sequence involved in the mapping. + * + * @return the value of field 'MapFromUnit'. + */ + public long getMapFromUnit( + ) { + return this._mapFromUnit; + } + + /** + * Method getMapListFrom. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.MapListFrom at the given index + */ + public jalview.schemabinding.version2.MapListFrom getMapListFrom( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._mapListFromList.size()) { + throw new IndexOutOfBoundsException("getMapListFrom: Index value '" + index + "' not in range [0.." + (this._mapListFromList.size() - 1) + "]"); + } + + return (jalview.schemabinding.version2.MapListFrom) _mapListFromList.get(index); + } + + /** + * Method getMapListFrom.Returns the contents of the collection + * in an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public jalview.schemabinding.version2.MapListFrom[] getMapListFrom( + ) { + jalview.schemabinding.version2.MapListFrom[] array = new jalview.schemabinding.version2.MapListFrom[0]; + return (jalview.schemabinding.version2.MapListFrom[]) this._mapListFromList.toArray(array); + } + + /** + * Method getMapListFromCount. + * + * @return the size of this collection + */ + public int getMapListFromCount( + ) { + return this._mapListFromList.size(); + } + + /** + * Method getMapListTo. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.MapListTo at the given index + */ + public jalview.schemabinding.version2.MapListTo getMapListTo( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._mapListToList.size()) { + throw new IndexOutOfBoundsException("getMapListTo: Index value '" + index + "' not in range [0.." + (this._mapListToList.size() - 1) + "]"); + } + + return (jalview.schemabinding.version2.MapListTo) _mapListToList.get(index); + } + + /** + * Method getMapListTo.Returns the contents of the collection + * in an Array.

Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public jalview.schemabinding.version2.MapListTo[] getMapListTo( + ) { + jalview.schemabinding.version2.MapListTo[] array = new jalview.schemabinding.version2.MapListTo[0]; + return (jalview.schemabinding.version2.MapListTo[]) this._mapListToList.toArray(array); + } + + /** + * Method getMapListToCount. + * + * @return the size of this collection + */ + public int getMapListToCount( + ) { + return this._mapListToList.size(); + } + + /** + * Returns the value of field 'mapToUnit'. The field + * 'mapToUnit' has the following description: number of + * dictionary symbol widths involved in each + * mapped position on this sequence (for example, 3 for a dna + * sequence exon + * region that is being mapped to a protein sequence). This is + * optional, + * since the unit can be usually be inferred from the + * dictionary type of + * each sequence involved in the mapping. + * + * @return the value of field 'MapToUnit'. + */ + public long getMapToUnit( + ) { + return this._mapToUnit; + } + + /** + * Method hasMapFromUnit. + * + * @return true if at least one MapFromUnit has been added + */ + public boolean hasMapFromUnit( + ) { + return this._has_mapFromUnit; + } + + /** + * Method hasMapToUnit. + * + * @return true if at least one MapToUnit has been added + */ + public boolean hasMapToUnit( + ) { + return this._has_mapToUnit; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, handler); + } + + /** + */ + public void removeAllMapListFrom( + ) { + this._mapListFromList.clear(); + } + + /** + */ + public void removeAllMapListTo( + ) { + this._mapListToList.clear(); + } + + /** + * Method removeMapListFrom. + * + * @param vMapListFrom + * @return true if the object was removed from the collection. + */ + public boolean removeMapListFrom( + final jalview.schemabinding.version2.MapListFrom vMapListFrom) { + boolean removed = _mapListFromList.remove(vMapListFrom); + return removed; + } + + /** + * Method removeMapListFromAt. + * + * @param index + * @return the element removed from the collection + */ + public jalview.schemabinding.version2.MapListFrom removeMapListFromAt( + final int index) { + java.lang.Object obj = this._mapListFromList.remove(index); + return (jalview.schemabinding.version2.MapListFrom) obj; + } + + /** + * Method removeMapListTo. + * + * @param vMapListTo + * @return true if the object was removed from the collection. + */ + public boolean removeMapListTo( + final jalview.schemabinding.version2.MapListTo vMapListTo) { + boolean removed = _mapListToList.remove(vMapListTo); + return removed; + } + + /** + * Method removeMapListToAt. + * + * @param index + * @return the element removed from the collection + */ + public jalview.schemabinding.version2.MapListTo removeMapListToAt( + final int index) { + java.lang.Object obj = this._mapListToList.remove(index); + return (jalview.schemabinding.version2.MapListTo) obj; + } + + /** + * Sets the value of field 'mapFromUnit'. The field + * 'mapFromUnit' has the following description: number of + * dictionary symbol widths involved in each + * mapped position on this sequence (for example, 3 for a dna + * sequence exon + * region that is being mapped to a protein sequence). This is + * optional, + * since the unit can be usually be inferred from the + * dictionary type of + * each sequence involved in the mapping. + * + * @param mapFromUnit the value of field 'mapFromUnit'. + */ + public void setMapFromUnit( + final long mapFromUnit) { + this._mapFromUnit = mapFromUnit; + this._has_mapFromUnit = true; + } + + /** + * + * + * @param index + * @param vMapListFrom + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setMapListFrom( + final int index, + final jalview.schemabinding.version2.MapListFrom vMapListFrom) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._mapListFromList.size()) { + throw new IndexOutOfBoundsException("setMapListFrom: Index value '" + index + "' not in range [0.." + (this._mapListFromList.size() - 1) + "]"); + } + + this._mapListFromList.set(index, vMapListFrom); + } + + /** + * + * + * @param vMapListFromArray + */ + public void setMapListFrom( + final jalview.schemabinding.version2.MapListFrom[] vMapListFromArray) { + //-- copy array + _mapListFromList.clear(); + + for (int i = 0; i < vMapListFromArray.length; i++) { + this._mapListFromList.add(vMapListFromArray[i]); + } + } + + /** + * + * + * @param index + * @param vMapListTo + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setMapListTo( + final int index, + final jalview.schemabinding.version2.MapListTo vMapListTo) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._mapListToList.size()) { + throw new IndexOutOfBoundsException("setMapListTo: Index value '" + index + "' not in range [0.." + (this._mapListToList.size() - 1) + "]"); + } + + this._mapListToList.set(index, vMapListTo); + } + + /** + * + * + * @param vMapListToArray + */ + public void setMapListTo( + final jalview.schemabinding.version2.MapListTo[] vMapListToArray) { + //-- copy array + _mapListToList.clear(); + + for (int i = 0; i < vMapListToArray.length; i++) { + this._mapListToList.add(vMapListToArray[i]); + } + } + + /** + * Sets the value of field 'mapToUnit'. The field 'mapToUnit' + * has the following description: number of dictionary symbol + * widths involved in each + * mapped position on this sequence (for example, 3 for a dna + * sequence exon + * region that is being mapped to a protein sequence). This is + * optional, + * since the unit can be usually be inferred from the + * dictionary type of + * each sequence involved in the mapping. + * + * @param mapToUnit the value of field 'mapToUnit'. + */ + public void setMapToUnit( + final long mapToUnit) { + this._mapToUnit = mapToUnit; + this._has_mapToUnit = true; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * jalview.schemabinding.version2.MapListType + */ + public static jalview.schemabinding.version2.MapListType unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.MapListType) Unmarshaller.unmarshal(jalview.schemabinding.version2.MapListType.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} diff --git a/src/jalview/schemabinding/version2/Mapping.java b/src/jalview/schemabinding/version2/Mapping.java new file mode 100644 index 0000000..8dbc12f --- /dev/null +++ b/src/jalview/schemabinding/version2/Mapping.java @@ -0,0 +1,165 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class Mapping. + * + * @version $Revision$ $Date$ + */ +public class Mapping extends jalview.schemabinding.version2.MapListType +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Internal choice value storage + */ + private java.lang.Object _choiceValue; + + /** + * Field _mappingChoice. + */ + private jalview.schemabinding.version2.MappingChoice _mappingChoice; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Mapping() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'choiceValue'. The field + * 'choiceValue' has the following description: Internal choice + * value storage + * + * @return the value of field 'ChoiceValue'. + */ + public java.lang.Object getChoiceValue( + ) { + return this._choiceValue; + } + + /** + * Returns the value of field 'mappingChoice'. + * + * @return the value of field 'MappingChoice'. + */ + public jalview.schemabinding.version2.MappingChoice getMappingChoice( + ) { + return this._mappingChoice; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'mappingChoice'. + * + * @param mappingChoice the value of field 'mappingChoice'. + */ + public void setMappingChoice( + final jalview.schemabinding.version2.MappingChoice mappingChoice) { + this._mappingChoice = mappingChoice; + this._choiceValue = mappingChoice; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * jalview.schemabinding.version2.MapListType + */ + public static jalview.schemabinding.version2.MapListType unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.MapListType) Unmarshaller.unmarshal(jalview.schemabinding.version2.Mapping.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} diff --git a/src/jalview/schemabinding/version2/MappingChoice.java b/src/jalview/schemabinding/version2/MappingChoice.java new file mode 100644 index 0000000..5f1930d --- /dev/null +++ b/src/jalview/schemabinding/version2/MappingChoice.java @@ -0,0 +1,170 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class MappingChoice. + * + * @version $Revision$ $Date$ + */ +public class MappingChoice implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _sequence. + */ + private jalview.schemabinding.version2.Sequence _sequence; + + /** + * Field _dseqFor. + */ + private java.lang.String _dseqFor; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MappingChoice() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'dseqFor'. + * + * @return the value of field 'DseqFor'. + */ + public java.lang.String getDseqFor( + ) { + return this._dseqFor; + } + + /** + * Returns the value of field 'sequence'. + * + * @return the value of field 'Sequence'. + */ + public jalview.schemabinding.version2.Sequence getSequence( + ) { + return this._sequence; + } + + /** + * Method isValid. + * + * @return true if this object is valid according to the schema + */ + public boolean isValid( + ) { + try { + validate(); + } catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } + + /** + * + * + * @param out + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, out); + } + + /** + * + * + * @param handler + * @throws java.io.IOException if an IOException occurs during + * marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + */ + public void marshal( + final org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, handler); + } + + /** + * Sets the value of field 'dseqFor'. + * + * @param dseqFor the value of field 'dseqFor'. + */ + public void setDseqFor( + final java.lang.String dseqFor) { + this._dseqFor = dseqFor; + } + + /** + * Sets the value of field 'sequence'. + * + * @param sequence the value of field 'sequence'. + */ + public void setSequence( + final jalview.schemabinding.version2.Sequence sequence) { + this._sequence = sequence; + } + + /** + * Method unmarshal. + * + * @param reader + * @throws org.exolab.castor.xml.MarshalException if object is + * null or if any SAXException is thrown during marshaling + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + * @return the unmarshaled + * jalview.schemabinding.version2.MappingChoice + */ + public static jalview.schemabinding.version2.MappingChoice unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.MappingChoice) Unmarshaller.unmarshal(jalview.schemabinding.version2.MappingChoice.class, reader); + } + + /** + * + * + * @throws org.exolab.castor.xml.ValidationException if this + * object is an invalid instance according to the schema + */ + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } + +} diff --git a/src/jalview/schemabinding/version2/Sequence.java b/src/jalview/schemabinding/version2/Sequence.java index e6da4f6..e606eeb 100755 --- a/src/jalview/schemabinding/version2/Sequence.java +++ b/src/jalview/schemabinding/version2/Sequence.java @@ -29,6 +29,13 @@ implements java.io.Serializable //--------------------------/ /** + * dataset sequence id for this sequence. Will be created as + * union of sequences. + * + */ + private java.lang.String _dsseqid; + + /** * Field _DBRefList. */ private java.util.Vector _DBRefList; @@ -133,6 +140,19 @@ implements java.io.Serializable } /** + * Returns the value of field 'dsseqid'. The field 'dsseqid' + * has the following description: dataset sequence id for this + * sequence. Will be created as union of sequences. + * + * + * @return the value of field 'Dsseqid'. + */ + public java.lang.String getDsseqid( + ) { + return this._dsseqid; + } + + /** * Method isValid. * * @return true if this object is valid according to the schema @@ -246,6 +266,19 @@ implements java.io.Serializable } /** + * Sets the value of field 'dsseqid'. The field 'dsseqid' has + * the following description: dataset sequence id for this + * sequence. Will be created as union of sequences. + * + * + * @param dsseqid the value of field 'dsseqid'. + */ + public void setDsseqid( + final java.lang.String dsseqid) { + this._dsseqid = dsseqid; + } + + /** * Method unmarshal. * * @param reader diff --git a/src/jalview/schemabinding/version2/SequenceSet.java b/src/jalview/schemabinding/version2/SequenceSet.java index 67c34ad..481c37f 100755 --- a/src/jalview/schemabinding/version2/SequenceSet.java +++ b/src/jalview/schemabinding/version2/SequenceSet.java @@ -32,6 +32,13 @@ public class SequenceSet implements java.io.Serializable { private java.lang.String _gapChar; /** + * reference to set where jalview will gather the dataset + * sequences for all sequences in the set. + * + */ + private java.lang.String _datasetId; + + /** * Field _sequenceList. */ private java.util.Vector _sequenceList; @@ -46,6 +53,11 @@ public class SequenceSet implements java.io.Serializable { */ private java.util.Vector _sequenceSetPropertiesList; + /** + * Field _alcodonFrameList. + */ + private java.util.Vector _alcodonFrameList; + //----------------/ //- Constructors -/ @@ -56,6 +68,7 @@ public class SequenceSet implements java.io.Serializable { this._sequenceList = new java.util.Vector(); this._annotationList = new java.util.Vector(); this._sequenceSetPropertiesList = new java.util.Vector(); + this._alcodonFrameList = new java.util.Vector(); } @@ -66,6 +79,34 @@ public class SequenceSet implements java.io.Serializable { /** * * + * @param vAlcodonFrame + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addAlcodonFrame( + final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame) + throws java.lang.IndexOutOfBoundsException { + this._alcodonFrameList.addElement(vAlcodonFrame); + } + + /** + * + * + * @param index + * @param vAlcodonFrame + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addAlcodonFrame( + final int index, + final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame) + throws java.lang.IndexOutOfBoundsException { + this._alcodonFrameList.add(index, vAlcodonFrame); + } + + /** + * + * * @param vAnnotation * @throws java.lang.IndexOutOfBoundsException if the index * given is outside the bounds of the collection @@ -148,6 +189,17 @@ public class SequenceSet implements java.io.Serializable { } /** + * Method enumerateAlcodonFrame. + * + * @return an Enumeration over all + * jalview.schemabinding.version2.AlcodonFrame elements + */ + public java.util.Enumeration enumerateAlcodonFrame( + ) { + return this._alcodonFrameList.elements(); + } + + /** * Method enumerateAnnotation. * * @return an Enumeration over all @@ -181,6 +233,52 @@ public class SequenceSet implements java.io.Serializable { } /** + * Method getAlcodonFrame. + * + * @param index + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.AlcodonFrame at the given inde + */ + public jalview.schemabinding.version2.AlcodonFrame getAlcodonFrame( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._alcodonFrameList.size()) { + throw new IndexOutOfBoundsException("getAlcodonFrame: Index value '" + index + "' not in range [0.." + (this._alcodonFrameList.size() - 1) + "]"); + } + + return (jalview.schemabinding.version2.AlcodonFrame) _alcodonFrameList.get(index); + } + + /** + * Method getAlcodonFrame.Returns the contents of the + * collection in an Array.

Note: Just in case the + * collection contents are changing in another thread, we pass + * a 0-length Array of the correct type into the API call. + * This way we know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public jalview.schemabinding.version2.AlcodonFrame[] getAlcodonFrame( + ) { + jalview.schemabinding.version2.AlcodonFrame[] array = new jalview.schemabinding.version2.AlcodonFrame[0]; + return (jalview.schemabinding.version2.AlcodonFrame[]) this._alcodonFrameList.toArray(array); + } + + /** + * Method getAlcodonFrameCount. + * + * @return the size of this collection + */ + public int getAlcodonFrameCount( + ) { + return this._alcodonFrameList.size(); + } + + /** * Method getAnnotation. * * @param index @@ -226,6 +324,20 @@ public class SequenceSet implements java.io.Serializable { } /** + * Returns the value of field 'datasetId'. The field + * 'datasetId' has the following description: reference to set + * where jalview will gather the dataset sequences for all + * sequences in the set. + * + * + * @return the value of field 'DatasetId'. + */ + public java.lang.String getDatasetId( + ) { + return this._datasetId; + } + + /** * Returns the value of field 'gapChar'. * * @return the value of field 'GapChar'. @@ -375,6 +487,37 @@ public class SequenceSet implements java.io.Serializable { } /** + * Method removeAlcodonFrame. + * + * @param vAlcodonFrame + * @return true if the object was removed from the collection. + */ + public boolean removeAlcodonFrame( + final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame) { + boolean removed = _alcodonFrameList.remove(vAlcodonFrame); + return removed; + } + + /** + * Method removeAlcodonFrameAt. + * + * @param index + * @return the element removed from the collection + */ + public jalview.schemabinding.version2.AlcodonFrame removeAlcodonFrameAt( + final int index) { + java.lang.Object obj = this._alcodonFrameList.remove(index); + return (jalview.schemabinding.version2.AlcodonFrame) obj; + } + + /** + */ + public void removeAllAlcodonFrame( + ) { + this._alcodonFrameList.clear(); + } + + /** */ public void removeAllAnnotation( ) { @@ -471,6 +614,41 @@ public class SequenceSet implements java.io.Serializable { * * * @param index + * @param vAlcodonFrame + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setAlcodonFrame( + final int index, + final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._alcodonFrameList.size()) { + throw new IndexOutOfBoundsException("setAlcodonFrame: Index value '" + index + "' not in range [0.." + (this._alcodonFrameList.size() - 1) + "]"); + } + + this._alcodonFrameList.set(index, vAlcodonFrame); + } + + /** + * + * + * @param vAlcodonFrameArray + */ + public void setAlcodonFrame( + final jalview.schemabinding.version2.AlcodonFrame[] vAlcodonFrameArray) { + //-- copy array + _alcodonFrameList.clear(); + + for (int i = 0; i < vAlcodonFrameArray.length; i++) { + this._alcodonFrameList.add(vAlcodonFrameArray[i]); + } + } + + /** + * + * + * @param index * @param vAnnotation * @throws java.lang.IndexOutOfBoundsException if the index * given is outside the bounds of the collection @@ -503,6 +681,20 @@ public class SequenceSet implements java.io.Serializable { } /** + * Sets the value of field 'datasetId'. The field 'datasetId' + * has the following description: reference to set where + * jalview will gather the dataset sequences for all sequences + * in the set. + * + * + * @param datasetId the value of field 'datasetId'. + */ + public void setDatasetId( + final java.lang.String datasetId) { + this._datasetId = datasetId; + } + + /** * Sets the value of field 'gapChar'. * * @param gapChar the value of field 'gapChar'. diff --git a/src/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.java new file mode 100644 index 0000000..fbc56a3 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.java @@ -0,0 +1,234 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import jalview.schemabinding.version2.AlcodMap; + +/** + * Class AlcodMapDescriptor. + * + * @version $Revision$ $Date$ + */ +public class AlcodMapDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AlcodMapDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "alcodMap"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _dnasq + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dnasq", "dnasq", 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 + { + AlcodMap target = (AlcodMap) object; + return target.getDnasq(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AlcodMap target = (AlcodMap) object; + target.setDnasq( (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); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _dnasq + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _mapping + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Mapping.class, "_mapping", "Mapping", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AlcodMap target = (AlcodMap) object; + return target.getMapping(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AlcodMap target = (AlcodMap) object; + target.setMapping( (jalview.schemabinding.version2.Mapping) 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.Mapping(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _mapping + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return super.getIdentity(); + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.AlcodMap.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} diff --git a/src/jalview/schemabinding/version2/descriptors/AlcodonDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AlcodonDescriptor.java new file mode 100644 index 0000000..cd87309 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/AlcodonDescriptor.java @@ -0,0 +1,280 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import jalview.schemabinding.version2.Alcodon; + +/** + * Class AlcodonDescriptor. + * + * @version $Revision$ $Date$ + */ +public class AlcodonDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AlcodonDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "alcodon"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _pos1 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_pos1", "pos1", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Alcodon target = (Alcodon) object; + if (!target.hasPos1()) { return null; } + return new java.lang.Long(target.getPos1()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Alcodon target = (Alcodon) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deletePos1(); + return; + } + target.setPos1( ((java.lang.Long) value).longValue()); + } 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.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _pos1 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.LongValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.LongValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _pos2 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_pos2", "pos2", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Alcodon target = (Alcodon) object; + if (!target.hasPos2()) { return null; } + return new java.lang.Long(target.getPos2()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Alcodon target = (Alcodon) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deletePos2(); + return; + } + target.setPos2( ((java.lang.Long) value).longValue()); + } 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.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _pos2 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.LongValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.LongValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _pos3 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_pos3", "pos3", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Alcodon target = (Alcodon) object; + if (!target.hasPos3()) { return null; } + return new java.lang.Long(target.getPos3()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Alcodon target = (Alcodon) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deletePos3(); + return; + } + target.setPos3( ((java.lang.Long) value).longValue()); + } 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.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _pos3 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.LongValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.LongValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return super.getIdentity(); + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Alcodon.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} diff --git a/src/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.java new file mode 100644 index 0000000..5341376 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.java @@ -0,0 +1,244 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import jalview.schemabinding.version2.AlcodonFrame; + +/** + * Class AlcodonFrameDescriptor. + * + * @version $Revision$ $Date$ + */ +public class AlcodonFrameDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AlcodonFrameDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "AlcodonFrame"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _alcodonList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Alcodon.class, "_alcodonList", "alcodon", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AlcodonFrame target = (AlcodonFrame) object; + return target.getAlcodon(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AlcodonFrame target = (AlcodonFrame) object; + target.addAlcodon( (jalview.schemabinding.version2.Alcodon) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + AlcodonFrame target = (AlcodonFrame) object; + target.removeAllAlcodon(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.Alcodon(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _alcodonList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _alcodMapList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.AlcodMap.class, "_alcodMapList", "alcodMap", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AlcodonFrame target = (AlcodonFrame) object; + return target.getAlcodMap(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AlcodonFrame target = (AlcodonFrame) object; + target.addAlcodMap( (jalview.schemabinding.version2.AlcodMap) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + AlcodonFrame target = (AlcodonFrame) object; + target.removeAllAlcodMap(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.AlcodMap(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _alcodMapList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return super.getIdentity(); + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.AlcodonFrame.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} diff --git a/src/jalview/schemabinding/version2/descriptors/DBRefDescriptor.java b/src/jalview/schemabinding/version2/descriptors/DBRefDescriptor.java index 877f931..1a55978 100644 --- a/src/jalview/schemabinding/version2/descriptors/DBRefDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/DBRefDescriptor.java @@ -55,6 +55,9 @@ public class DBRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript _nsURI = "www.vamsas.ac.uk/jalview/version2"; _xmlName = "DBRef"; _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsSequence(); org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; org.exolab.castor.mapping.FieldHandler handler = null; org.exolab.castor.xml.FieldValidator fieldValidator = null; @@ -173,6 +176,39 @@ public class DBRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript desc.setValidator(fieldValidator); //-- initialize element descriptors + //-- _mapping + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Mapping.class, "_mapping", "Mapping", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DBRef target = (DBRef) object; + return target.getMapping(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DBRef target = (DBRef) object; + target.setMapping( (jalview.schemabinding.version2.Mapping) 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.Mapping(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _mapping + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); } diff --git a/src/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.java new file mode 100644 index 0000000..f39b18f --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.java @@ -0,0 +1,243 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import jalview.schemabinding.version2.MapListFrom; + +/** + * Class MapListFromDescriptor. + * + * @version $Revision$ $Date$ + */ +public class MapListFromDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MapListFromDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "mapListFrom"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler 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 + { + MapListFrom target = (MapListFrom) 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 { + MapListFrom target = (MapListFrom) 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); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _start + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); + } + 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 + { + MapListFrom target = (MapListFrom) 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 { + MapListFrom target = (MapListFrom) 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); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _end + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return super.getIdentity(); + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.MapListFrom.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} diff --git a/src/jalview/schemabinding/version2/descriptors/MapListToDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MapListToDescriptor.java new file mode 100644 index 0000000..4de1738 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/MapListToDescriptor.java @@ -0,0 +1,243 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import jalview.schemabinding.version2.MapListTo; + +/** + * Class MapListToDescriptor. + * + * @version $Revision$ $Date$ + */ +public class MapListToDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MapListToDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "mapListTo"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler 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 + { + MapListTo target = (MapListTo) 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 { + MapListTo target = (MapListTo) 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); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _start + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); + } + 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 + { + MapListTo target = (MapListTo) 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 { + MapListTo target = (MapListTo) 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); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _end + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.IntValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.IntValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-2147483648); + typeValidator.setMaxInclusive(2147483647); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return super.getIdentity(); + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.MapListTo.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} diff --git a/src/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.java new file mode 100644 index 0000000..7dc7bc5 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.java @@ -0,0 +1,328 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import jalview.schemabinding.version2.MapListType; + +/** + * Class MapListTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class MapListTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MapListTypeDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "mapListType"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _mapFromUnit + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_mapFromUnit", "mapFromUnit", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MapListType target = (MapListType) object; + if (!target.hasMapFromUnit()) { return null; } + return new java.lang.Long(target.getMapFromUnit()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MapListType target = (MapListType) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.setMapFromUnit( ((java.lang.Long) value).longValue()); + } 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); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _mapFromUnit + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.LongValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.LongValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(1L); + } + desc.setValidator(fieldValidator); + //-- _mapToUnit + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_mapToUnit", "mapToUnit", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MapListType target = (MapListType) object; + if (!target.hasMapToUnit()) { return null; } + return new java.lang.Long(target.getMapToUnit()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MapListType target = (MapListType) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.setMapToUnit( ((java.lang.Long) value).longValue()); + } 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); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _mapToUnit + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.LongValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.LongValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(1L); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _mapListFromList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.MapListFrom.class, "_mapListFromList", "mapListFrom", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MapListType target = (MapListType) object; + return target.getMapListFrom(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MapListType target = (MapListType) object; + target.addMapListFrom( (jalview.schemabinding.version2.MapListFrom) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + MapListType target = (MapListType) object; + target.removeAllMapListFrom(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.MapListFrom(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _mapListFromList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _mapListToList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.MapListTo.class, "_mapListToList", "mapListTo", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + MapListType target = (MapListType) object; + return target.getMapListTo(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MapListType target = (MapListType) object; + target.addMapListTo( (jalview.schemabinding.version2.MapListTo) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + MapListType target = (MapListType) object; + target.removeAllMapListTo(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.MapListTo(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _mapListToList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return super.getIdentity(); + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.MapListType.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} diff --git a/src/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.java new file mode 100644 index 0000000..63543d7 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.java @@ -0,0 +1,230 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import jalview.schemabinding.version2.MappingChoice; + +/** + * Class MappingChoiceDescriptor. + * + * @version $Revision$ $Date$ + */ +public class MappingChoiceDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MappingChoiceDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _elementDefinition = false; + + //-- set grouping compositor + setCompositorAsChoice(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _sequence + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Sequence.class, "_sequence", "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 + { + MappingChoice target = (MappingChoice) object; + return target.getSequence(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MappingChoice target = (MappingChoice) object; + target.setSequence( (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(false); + addFieldDescriptor(desc); + + //-- validation code for: _sequence + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _dseqFor + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dseqFor", "dseqFor", 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 + { + MappingChoice target = (MappingChoice) object; + return target.getDseqFor(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + MappingChoice target = (MappingChoice) object; + target.setDseqFor( (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: _dseqFor + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return super.getIdentity(); + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.MappingChoice.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} diff --git a/src/jalview/schemabinding/version2/descriptors/MappingDescriptor.java b/src/jalview/schemabinding/version2/descriptors/MappingDescriptor.java new file mode 100644 index 0000000..95e1a87 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/MappingDescriptor.java @@ -0,0 +1,196 @@ +/* + * This class was automatically generated with + * Castor 1.1, using an XML + * Schema. + * $Id$ + */ + +package jalview.schemabinding.version2.descriptors; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import jalview.schemabinding.version2.Mapping; + +/** + * Class MappingDescriptor. + * + * @version $Revision$ $Date$ + */ +public class MappingDescriptor extends jalview.schemabinding.version2.descriptors.MapListTypeDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _elementDefinition. + */ + private boolean _elementDefinition; + + /** + * Field _nsPrefix. + */ + private java.lang.String _nsPrefix; + + /** + * Field _nsURI. + */ + private java.lang.String _nsURI; + + /** + * Field _xmlName. + */ + private java.lang.String _xmlName; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MappingDescriptor() { + super(); + setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.MapListTypeDescriptor()); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "Mapping"; + _elementDefinition = true; + + //-- set grouping compositor + setCompositorAsChoice(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _mappingChoice + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.MappingChoice.class, "_mappingChoice", "-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 + { + Mapping target = (Mapping) object; + return target.getMappingChoice(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Mapping target = (Mapping) object; + target.setMappingChoice( (jalview.schemabinding.version2.MappingChoice) 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.MappingChoice(); + } + }; + desc.setHandler(handler); + desc.setContainer(true); + desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor()); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _mappingChoice + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; + } + + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return super.getIdentity(); + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Mapping.class; + } + + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; + } + + /** + * Method getNameSpaceURI. + * + * @return the namespace URI used when marshaling and + * unmarshaling as XML. + */ + public java.lang.String getNameSpaceURI( + ) { + return _nsURI; + } + + /** + * Method getValidator. + * + * @return a specific validator for the class described by this + * ClassDescriptor. + */ + public org.exolab.castor.xml.TypeValidator getValidator( + ) { + return this; + } + + /** + * Method getXMLName. + * + * @return the XML Name for the Class being described. + */ + public java.lang.String getXMLName( + ) { + return _xmlName; + } + + /** + * Method isElementDefinition. + * + * @return true if XML schema definition of this Class is that + * of a global + * element or element with anonymous type definition. + */ + public boolean isElementDefinition( + ) { + return _elementDefinition; + } + +} diff --git a/src/jalview/schemabinding/version2/descriptors/SequenceDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SequenceDescriptor.java index 15a81e2..4dfd168 100644 --- a/src/jalview/schemabinding/version2/descriptors/SequenceDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/SequenceDescriptor.java @@ -64,6 +64,43 @@ public class SequenceDescriptor extends jalview.schemabinding.version2.descripto org.exolab.castor.xml.FieldValidator fieldValidator = null; //-- initialize attribute descriptors + //-- _dsseqid + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dsseqid", "dsseqid", 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 + { + Sequence target = (Sequence) object; + return target.getDsseqid(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Sequence target = (Sequence) object; + target.setDsseqid( (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.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _dsseqid + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); //-- initialize element descriptors //-- _DBRefList diff --git a/src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java index ca59cf3..aa0c798 100644 --- a/src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java @@ -102,6 +102,43 @@ public class SequenceSetDescriptor extends org.exolab.castor.xml.util.XMLClassDe typeValidator.setWhiteSpace("preserve"); } desc.setValidator(fieldValidator); + //-- _datasetId + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_datasetId", "datasetId", 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.getDatasetId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceSet target = (SequenceSet) object; + target.setDatasetId( (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.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _datasetId + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); //-- initialize element descriptors //-- _sequenceList @@ -230,6 +267,48 @@ public class SequenceSetDescriptor extends org.exolab.castor.xml.util.XMLClassDe { //-- local scope } desc.setValidator(fieldValidator); + //-- _alcodonFrameList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.AlcodonFrame.class, "_alcodonFrameList", "AlcodonFrame", 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.getAlcodonFrame(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceSet target = (SequenceSet) object; + target.addAlcodonFrame( (jalview.schemabinding.version2.AlcodonFrame) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + SequenceSet target = (SequenceSet) object; + target.removeAllAlcodonFrame(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.AlcodonFrame(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _alcodonFrameList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); } -- 1.7.10.2