From: jprocter Date: Thu, 17 May 2007 17:06:31 +0000 (+0000) Subject: modified castor-1.1 library and refactored uk.ac.vamsas X-Git-Tag: Release_2_4~407 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=09ee1649c4427f534331aa2017a890529f0932f5;p=jalview.git modified castor-1.1 library and refactored uk.ac.vamsas --- diff --git a/build.xml b/build.xml index d9253b0..89bd1ca 100755 --- a/build.xml +++ b/build.xml @@ -384,32 +384,36 @@ + classname="org.castor.anttask.CastorCodeGenTask" + classpathref="build.classpath" /> - - + + + diff --git a/lib/castor-0.9.6-xml.jar b/lib/castor-0.9.6-xml.jar deleted file mode 100755 index 444c5a1..0000000 Binary files a/lib/castor-0.9.6-xml.jar and /dev/null differ diff --git a/lib/castor-1.1-xml.jar b/lib/castor-1.1-xml.jar new file mode 100644 index 0000000..9427fed Binary files /dev/null and b/lib/castor-1.1-xml.jar differ diff --git a/lib/vamsas-client.jar b/lib/vamsas-client.jar index e0c7d95..14c7b33 100644 Binary files a/lib/vamsas-client.jar and b/lib/vamsas-client.jar differ diff --git a/src/jalview/gui/VamsasClient.java b/src/jalview/gui/VamsasClient.java index 7c37bd3..de62c6d 100755 --- a/src/jalview/gui/VamsasClient.java +++ b/src/jalview/gui/VamsasClient.java @@ -16,14 +16,14 @@ import javax.swing.JInternalFrame; import jalview.bin.Cache; import jalview.io.VamsasDatastore; -import org.vamsas.client.UserHandle; -import org.vamsas.client.simpleclient.FileWatcher; -import org.vamsas.client.simpleclient.VamsasArchive; -import org.vamsas.client.simpleclient.VamsasFile; -import org.vamsas.objects.core.Entry; -import org.vamsas.objects.core.VamsasDocument; -import org.vamsas.test.simpleclient.ArchiveClient; -import org.vamsas.test.simpleclient.ClientDoc; +import uk.ac.vamsas.client.UserHandle; +import uk.ac.vamsas.client.simpleclient.FileWatcher; +import uk.ac.vamsas.client.simpleclient.VamsasArchive; +import uk.ac.vamsas.client.simpleclient.VamsasFile; +import uk.ac.vamsas.objects.core.Entry; +import uk.ac.vamsas.objects.core.VamsasDocument; +import uk.ac.vamsas.test.simpleclient.ArchiveClient; +import uk.ac.vamsas.test.simpleclient.ClientDoc; /** * @author jimp @@ -127,7 +127,7 @@ public class VamsasClient watchForChange = true; if (watcher != null) { - watcher.start(); + startWatcher(); /// TODO: check this works... must recreate watcher to start it... } // collect all uncached alignments and put them into the vamsas dataset. // store them. @@ -208,7 +208,7 @@ public class VamsasClient private Entry baseProvEntry() { - org.vamsas.objects.core.Entry pentry = new org.vamsas.objects.core.Entry(); + uk.ac.vamsas.objects.core.Entry pentry = new uk.ac.vamsas.objects.core.Entry(); pentry.setUser(this.getProvenanceUser()); pentry.setApp(this.getClientHandle().getClientName()); pentry.setDate(new org.exolab.castor.types.Date(new java.util.Date())); diff --git a/src/jalview/io/VamsasDatastore.java b/src/jalview/io/VamsasDatastore.java index 2632b2a..aca86c6 100755 --- a/src/jalview/io/VamsasDatastore.java +++ b/src/jalview/io/VamsasDatastore.java @@ -36,30 +36,30 @@ import java.util.Hashtable; import java.util.IdentityHashMap; import java.util.Vector; -import org.vamsas.client.Vobject; -import org.vamsas.client.VorbaId; -import org.vamsas.objects.core.Alignment; -import org.vamsas.objects.core.AlignmentSequence; -import org.vamsas.objects.core.AlignmentSequenceAnnotation; -import org.vamsas.objects.core.AnnotationElement; -import org.vamsas.objects.core.DataSet; -import org.vamsas.objects.core.DataSetAnnotations; -import org.vamsas.objects.core.DbRef; -import org.vamsas.objects.core.Entry; -import org.vamsas.objects.core.Glyph; -import org.vamsas.objects.core.Input; -import org.vamsas.objects.core.Link; -import org.vamsas.objects.core.Newick; -import org.vamsas.objects.core.Param; -import org.vamsas.objects.core.Property; -import org.vamsas.objects.core.Provenance; -import org.vamsas.objects.core.RangeAnnotation; -import org.vamsas.objects.core.RangeType; -import org.vamsas.objects.core.Seg; -import org.vamsas.objects.core.Sequence; -import org.vamsas.objects.core.Tree; -import org.vamsas.objects.core.VAMSAS; -import org.vamsas.test.simpleclient.ClientDoc; +import uk.ac.vamsas.client.Vobject; +import uk.ac.vamsas.client.VorbaId; +import uk.ac.vamsas.objects.core.Alignment; +import uk.ac.vamsas.objects.core.AlignmentSequence; +import uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation; +import uk.ac.vamsas.objects.core.AnnotationElement; +import uk.ac.vamsas.objects.core.DataSet; +import uk.ac.vamsas.objects.core.DataSetAnnotations; +import uk.ac.vamsas.objects.core.DbRef; +import uk.ac.vamsas.objects.core.Entry; +import uk.ac.vamsas.objects.core.Glyph; +import uk.ac.vamsas.objects.core.Input; +import uk.ac.vamsas.objects.core.Link; +import uk.ac.vamsas.objects.core.Newick; +import uk.ac.vamsas.objects.core.Param; +import uk.ac.vamsas.objects.core.Property; +import uk.ac.vamsas.objects.core.Provenance; +import uk.ac.vamsas.objects.core.RangeAnnotation; +import uk.ac.vamsas.objects.core.RangeType; +import uk.ac.vamsas.objects.core.Seg; +import uk.ac.vamsas.objects.core.Sequence; +import uk.ac.vamsas.objects.core.Tree; +import uk.ac.vamsas.objects.core.VAMSAS; +import uk.ac.vamsas.test.simpleclient.ClientDoc; /* * @@ -126,7 +126,7 @@ public class VamsasDatastore * @param vobj * @return Jalview datamodel object bound to the vamsas document object */ - protected Object getvObj2jv(org.vamsas.client.Vobject vobj) + protected Object getvObj2jv(uk.ac.vamsas.client.Vobject vobj) { VorbaId id = vobj.getVorbaId(); if (id == null) @@ -143,7 +143,7 @@ public class VamsasDatastore return null; } - protected void bindjvvobj(Object jvobj, org.vamsas.client.Vobject vobj) + protected void bindjvvobj(Object jvobj, uk.ac.vamsas.client.Vobject vobj) { VorbaId id = vobj.getVorbaId(); if (id == null) @@ -222,8 +222,8 @@ public class VamsasDatastore // this *will* break when alignment contains both nucleotide and amino // acid sequences. String dict = jal.isNucleotide() ? - org.vamsas.objects.utils.SymbolDictionary.STANDARD_NA - : org.vamsas.objects.utils.SymbolDictionary.STANDARD_AA; + uk.ac.vamsas.objects.utils.SymbolDictionary.STANDARD_NA + : uk.ac.vamsas.objects.utils.SymbolDictionary.STANDARD_AA; for (int i = 0; i < jal.getHeight(); i++) { SequenceI sq = jal.getSequenceAt(i).getDatasetSequence(); // only insert @@ -360,7 +360,7 @@ public class VamsasDatastore else { // todo: verify and update mutable alignment props. - if (alignment.getModifiable()) + if (alignment.getModifiable()==null) // TODO: USE VAMSAS LIBRARY OBJECT LOCK METHODS { System.out.println("update alignment in document."); } @@ -427,9 +427,9 @@ public class VamsasDatastore } if (aa[i].sequenceRef != null) { - org.vamsas.objects.core.AlignmentSequence alsref = (org.vamsas. + uk.ac.vamsas.objects.core.AlignmentSequence alsref = (uk.ac.vamsas. objects.core.AlignmentSequence) getjv2vObj(aa[i].sequenceRef); - org.vamsas.objects.core.AlignmentSequenceAnnotation an = (org. + uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation an = (uk.ac. vamsas.objects.core.AlignmentSequenceAnnotation) getjv2vObj(aa[ i]); int[] gapMap = null; @@ -449,7 +449,7 @@ public class VamsasDatastore } if (an == null) { - an = new org.vamsas.objects.core.AlignmentSequenceAnnotation(); + an = new uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation(); Seg vSeg = new Seg(); vSeg.setStart(1); vSeg.setInclusive(true); @@ -513,7 +513,7 @@ public class VamsasDatastore // we only write an annotation where it really exists. Glyph ss = new Glyph(); ss - .setDict(org.vamsas.objects.utils.GlyphDictionary. + .setDict(uk.ac.vamsas.objects.utils.GlyphDictionary. PROTEIN_SS_3STATE); ss.setContent(String .valueOf(aa[i].annotations[a]. @@ -526,7 +526,7 @@ public class VamsasDatastore else { // update reference sequence Annotation - if (an.getModifiable()) + if (an.getModifiable()==null) // TODO: USE VAMSAS LIBRARY OBJECT LOCK METHODS) { // verify existing alignment sequence annotation is up to date System.out.println("update alignment sequence annotation."); @@ -543,11 +543,11 @@ public class VamsasDatastore else { // add Alignment Annotation - org.vamsas.objects.core.AlignmentAnnotation an = (org.vamsas. + uk.ac.vamsas.objects.core.AlignmentAnnotation an = (uk.ac.vamsas. objects.core.AlignmentAnnotation) getjv2vObj(aa[i]); if (an == null) { - an = new org.vamsas.objects.core.AlignmentAnnotation(); + an = new uk.ac.vamsas.objects.core.AlignmentAnnotation(); an.setType("jalview:AnnotationRow"); an.setDescription(aa[i].description); alignment.addAlignmentAnnotation(an); @@ -604,7 +604,7 @@ public class VamsasDatastore { Glyph ss = new Glyph(); ss - .setDict(org.vamsas.objects.utils.GlyphDictionary. + .setDict(uk.ac.vamsas.objects.utils.GlyphDictionary. PROTEIN_SS_3STATE); ss.setContent(String .valueOf(aa[i].annotations[a]. @@ -616,7 +616,7 @@ public class VamsasDatastore if (aa[i].editable) { //an.addProperty(newProperty("jalview:editable", null, "true")); - an.setModifiable(true); + // an.setModifiable(""); // TODO: This is not the way the modifiable flag is supposed to be used. } if (aa[i].graph != jalview.datamodel.AlignmentAnnotation.NO_GRAPH) { @@ -638,7 +638,7 @@ public class VamsasDatastore } else { - if (an.getModifiable()) + if (an.getModifiable()==null) // TODO: USE VAMSAS LIBRARY OBJECT LOCK METHODS) { // verify annotation - update (perhaps) Cache.log.info( @@ -688,7 +688,7 @@ public class VamsasDatastore } else { - if (tree.getModifiable()) + if (tree.getModifiable()==null) // TODO: USE VAMSAS LIBRARY OBJECT LOCK METHODS) { // verify any changes. System.out.println("Update tree in document."); @@ -842,10 +842,10 @@ public class VamsasDatastore } // LATER: deal sensibly with multiple inputs. Input vInput = tp.getEntry(pe).getInput(0); - if (vInput.getObjRef() instanceof org.vamsas.objects.core.Alignment) + if (vInput.getObjRef() instanceof uk.ac.vamsas.objects.core.Alignment) { // recover an AlignmentView for the input data - AlignViewport javport = (AlignViewport) getvObj2jv( (org.vamsas. + AlignViewport javport = (AlignViewport) getvObj2jv( (uk.ac.vamsas. client.Vobject) vInput .getObjRef()); jalview.datamodel.AlignmentI jal = javport.getAlignment(); @@ -1005,8 +1005,8 @@ public class VamsasDatastore dsseq = new jalview.datamodel.Sequence( dataset.getSequence(i).getName(), dataset.getSequence(i).getSequence(), - dataset.getSequence(i).getStart(), - dataset.getSequence(i).getEnd()); + (int)dataset.getSequence(i).getStart(), + (int)dataset.getSequence(i).getEnd()); dsseq.setDescription(dataset.getSequence(i).getDescription()); bindjvvobj(dsseq, dataset.getSequence(i)); dsseq.setVamsasId(dataset.getSequence(i).getVorbaId().getId()); @@ -1091,7 +1091,7 @@ public class VamsasDatastore for (int al = 0, nal = dataset.getAlignmentCount(); al < nal; al++) { - org.vamsas.objects.core.Alignment alignment = dataset.getAlignment( + uk.ac.vamsas.objects.core.Alignment alignment = dataset.getAlignment( al); AlignViewport av = (AlignViewport) getvObj2jv(alignment); jalview.datamodel.AlignmentI jal = null; @@ -1137,8 +1137,8 @@ public class VamsasDatastore alseq = new jalview.datamodel.Sequence( valseq.getName(), valseq.getSequence().replace(valGapchar, gapChar), - valseq.getStart(), - valseq.getEnd()); + (int)valseq.getStart(), + (int)valseq.getEnd()); Vobject datsetseq = (Vobject) valseq.getRefid(); if (datsetseq != null) @@ -1175,7 +1175,7 @@ public class VamsasDatastore else { // update existing annotation - can do this in place - if (vasannot[a].getModifiable()) + if (vasannot[a].getModifiable()==null) // TODO: USE VAMSAS LIBRARY OBJECT LOCK METHODS) { Cache.log.info( "UNIMPLEMENTED: not recovering user modifiable sequence alignment annotation"); @@ -1220,7 +1220,7 @@ public class VamsasDatastore // //////////////////////////////////// if (alignment.getAlignmentAnnotationCount() > 0) { - org.vamsas.objects.core.AlignmentAnnotation[] an = alignment. + uk.ac.vamsas.objects.core.AlignmentAnnotation[] an = alignment. getAlignmentAnnotation(); for (int j = 0; j < an.length; j++) @@ -1235,7 +1235,7 @@ public class VamsasDatastore // jan.update(getjAlignmentAnnotation(jal, an[a])); // update from another annotation object in place. Cache.log.debug("update from vamsas alignment annotation to existing jalview alignment annotation."); - if (an[j].getModifiable()) + if (an[j].getModifiable()==null) // TODO: USE VAMSAS LIBRARY OBJECT LOCK METHODS) { // TODO: user defined annotation is totally mutable... - so load it up or throw away if locally edited. Cache.log.info( @@ -1349,7 +1349,7 @@ public class VamsasDatastore * @param annotation * @return { boolean[static int constants ], int[ae.length] - map to annotated object frame, jalview.datamodel.Annotation[], jalview.datamodel.Annotation[] (after)} */ - private Object[] parseRangeAnnotation(org.vamsas.objects.core.RangeAnnotation + private Object[] parseRangeAnnotation(uk.ac.vamsas.objects.core.RangeAnnotation annotation) { // set these attributes by looking in the annotation to decide what kind of alignment annotation rows will be made @@ -1372,7 +1372,7 @@ public class VamsasDatastore AnnotationElement ae[] = annotation.getAnnotationElement(); for (int aa = 0; aa < ae.length; aa++) { - int pos = ae[aa].getPosition() - 1; // pos counts from 1 to (|seg.start-seg.end|+1) + int pos = (int) ae[aa].getPosition() - 1; // pos counts from 1 to (|seg.start-seg.end|+1) if (pos >= 0 && pos < rangeMap.length) { int row = ae[aa].getAfter() ? 1 : 0; @@ -1404,13 +1404,13 @@ public class VamsasDatastore Glyph[] glyphs = ae[aa].getGlyph(); for (int g = 0; g < glyphs.length; g++) { - if (glyphs[g].getDict().equals(org.vamsas.objects.utils. + if (glyphs[g].getDict().equals(uk.ac.vamsas.objects.utils. GlyphDictionary.PROTEIN_SS_3STATE)) { ss = glyphs[g].getContent(); AeContent[HASSECSTR] = true; } - else if (glyphs[g].getDict().equals(org.vamsas.objects.utils. + else if (glyphs[g].getDict().equals(uk.ac.vamsas.objects.utils. GlyphDictionary. PROTEIN_HD_HYDRO)) { @@ -1423,7 +1423,7 @@ public class VamsasDatastore c == '-' ? 255 : 0); } - else if (glyphs[g].getDict().equals(org.vamsas.objects.utils. + else if (glyphs[g].getDict().equals(uk.ac.vamsas.objects.utils. GlyphDictionary.DEFAULT)) { dc = glyphs[g].getContent(); @@ -1508,15 +1508,15 @@ public class VamsasDatastore */ private jalview.datamodel.AlignmentAnnotation getjAlignmentAnnotation(jalview. datamodel.AlignmentI jal, - org.vamsas.objects.core.RangeAnnotation annotation) + uk.ac.vamsas.objects.core.RangeAnnotation annotation) { jalview.datamodel.AlignmentAnnotation jan = null; if (annotation == null) { return null; } - // boolean hasSequenceRef=annotation.getClass().equals(org.vamsas.objects.core.AlignmentSequenceAnnotation.class); - //boolean hasProvenance=hasSequenceRef || (annotation.getClass().equals(org.vamsas.objects.core.AlignmentAnnotation.class)); + // boolean hasSequenceRef=annotation.getClass().equals(uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation.class); + //boolean hasProvenance=hasSequenceRef || (annotation.getClass().equals(uk.ac.vamsas.objects.core.AlignmentAnnotation.class)); /*int se[] = getBounds(annotation); if (se==null) se=new int[] {0,jal.getWidth()-1}; @@ -1553,8 +1553,8 @@ public class VamsasDatastore parsedRangeAnnotation[2]; boolean[] has = (boolean[]) parsedRangeAnnotation[0]; // VAMSAS: getGraph is only on derived annotation for alignments - in this way its 'odd' - there is already an existing TODO about removing this flag as being redundant - /*if ((annotation.getClass().equals(org.vamsas.objects.core.AlignmentAnnotation.class) && ((org.vamsas.objects.core.AlignmentAnnotation)annotation).getGraph()) - || (hasSequenceRef=true && ((org.vamsas.objects.core.AlignmentSequenceAnnotation)annotation).getGraph())) { + /*if ((annotation.getClass().equals(uk.ac.vamsas.objects.core.AlignmentAnnotation.class) && ((uk.ac.vamsas.objects.core.AlignmentAnnotation)annotation).getGraph()) + || (hasSequenceRef=true && ((uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation)annotation).getGraph())) { */ if (has[HASVALS]) { @@ -1629,7 +1629,7 @@ public class VamsasDatastore Cache.log.warn("Ignoring " + annotation.getLinkCount() + "links added to AlignmentAnnotation."); } - if (annotation.getModifiable()) + if (annotation.getModifiable()==null) // TODO: USE VAMSAS LIBRARY OBJECT LOCK METHODS) { jan.editable = true; } @@ -1637,7 +1637,7 @@ public class VamsasDatastore if (annotation.getPropertyCount() > 0) { // look for special jalview properties - org.vamsas.objects.core.Property[] props = annotation.getProperty(); + uk.ac.vamsas.objects.core.Property[] props = annotation.getProperty(); for (int p = 0; p < props.length; p++) { if (props[p].getName().equalsIgnoreCase("jalview:graphType")) diff --git a/src/jalview/schemabinding/version2/.castor.cdr b/src/jalview/schemabinding/version2/.castor.cdr new file mode 100644 index 0000000..f617206 --- /dev/null +++ b/src/jalview/schemabinding/version2/.castor.cdr @@ -0,0 +1,34 @@ +#Tue May 15 19:58:04 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 +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.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.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.UserColourScheme=jalview.schemabinding.version2.descriptors.UserColourSchemeDescriptor +jalview.schemabinding.version2.Pdbids=jalview.schemabinding.version2.descriptors.PdbidsDescriptor +jalview.schemabinding.version2.HiddenColumns=jalview.schemabinding.version2.descriptors.HiddenColumnsDescriptor +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.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 diff --git a/src/jalview/schemabinding/version2/Annotation.java b/src/jalview/schemabinding/version2/Annotation.java index 0084c75..9ee76e3 100755 --- a/src/jalview/schemabinding/version2/Annotation.java +++ b/src/jalview/schemabinding/version2/Annotation.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class Annotation. @@ -36,7 +27,7 @@ public class Annotation implements java.io.Serializable { //--------------------------/ /** - * Field _graph + * Field _graph. */ private boolean _graph; @@ -46,7 +37,7 @@ public class Annotation implements java.io.Serializable { private boolean _has_graph; /** - * Field _graphType + * Field _graphType. */ private int _graphType; @@ -56,12 +47,12 @@ public class Annotation implements java.io.Serializable { private boolean _has_graphType; /** - * Field _sequenceRef + * Field _sequenceRef. */ private java.lang.String _sequenceRef; /** - * Field _graphColour + * Field _graphColour. */ private int _graphColour; @@ -71,7 +62,7 @@ public class Annotation implements java.io.Serializable { private boolean _has_graphColour; /** - * Field _graphGroup + * Field _graphGroup. */ private int _graphGroup; @@ -81,12 +72,12 @@ public class Annotation implements java.io.Serializable { private boolean _has_graphGroup; /** - * Field _id + * Field _id. */ private java.lang.String _id; /** - * Field _scoreOnly + * Field _scoreOnly. */ private boolean _scoreOnly = false; @@ -96,7 +87,7 @@ public class Annotation implements java.io.Serializable { private boolean _has_scoreOnly; /** - * Field _score + * Field _score. */ private double _score; @@ -106,7 +97,7 @@ public class Annotation implements java.io.Serializable { private boolean _has_score; /** - * Field _visible + * Field _visible. */ private boolean _visible; @@ -116,22 +107,22 @@ public class Annotation implements java.io.Serializable { private boolean _has_visible; /** - * Field _annotationElementList + * Field _annotationElementList. */ private java.util.Vector _annotationElementList; /** - * Field _label + * Field _label. */ private java.lang.String _label; /** - * Field _description + * Field _description. */ private java.lang.String _description; /** - * Field _thresholdLine + * Field _thresholdLine. */ private jalview.schemabinding.version2.ThresholdLine _thresholdLine; @@ -142,8 +133,8 @@ public class Annotation implements java.io.Serializable { public Annotation() { super(); - _annotationElementList = new Vector(); - } //-- jalview.schemabinding.version2.Annotation() + this._annotationElementList = new java.util.Vector(); + } //-----------/ @@ -151,625 +142,628 @@ public class Annotation implements java.io.Serializable { //-----------/ /** - * Method addAnnotationElement - * * * * @param vAnnotationElement + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement vAnnotationElement) - throws java.lang.IndexOutOfBoundsException - { - _annotationElementList.addElement(vAnnotationElement); - } //-- void addAnnotationElement(jalview.schemabinding.version2.AnnotationElement) + public void addAnnotationElement( + final jalview.schemabinding.version2.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException { + this._annotationElementList.addElement(vAnnotationElement); + } /** - * Method addAnnotationElement - * * * * @param index * @param vAnnotationElement + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addAnnotationElement(int index, jalview.schemabinding.version2.AnnotationElement vAnnotationElement) - throws java.lang.IndexOutOfBoundsException - { - _annotationElementList.insertElementAt(vAnnotationElement, index); - } //-- void addAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement) + public void addAnnotationElement( + final int index, + final jalview.schemabinding.version2.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException { + this._annotationElementList.add(index, vAnnotationElement); + } /** - * Method deleteGraph - * */ - public void deleteGraph() - { + public void deleteGraph( + ) { this._has_graph= false; - } //-- void deleteGraph() + } /** - * Method deleteGraphColour - * */ - public void deleteGraphColour() - { + public void deleteGraphColour( + ) { this._has_graphColour= false; - } //-- void deleteGraphColour() + } /** - * Method deleteGraphGroup - * */ - public void deleteGraphGroup() - { + public void deleteGraphGroup( + ) { this._has_graphGroup= false; - } //-- void deleteGraphGroup() + } /** - * Method deleteGraphType - * */ - public void deleteGraphType() - { + public void deleteGraphType( + ) { this._has_graphType= false; - } //-- void deleteGraphType() + } /** - * Method deleteScore - * */ - public void deleteScore() - { + public void deleteScore( + ) { this._has_score= false; - } //-- void deleteScore() + } /** - * Method deleteScoreOnly - * */ - public void deleteScoreOnly() - { + public void deleteScoreOnly( + ) { this._has_scoreOnly= false; - } //-- void deleteScoreOnly() + } /** - * Method deleteVisible - * */ - public void deleteVisible() - { + public void deleteVisible( + ) { this._has_visible= false; - } //-- void deleteVisible() + } /** - * Method enumerateAnnotationElement + * Method enumerateAnnotationElement. * - * - * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.AnnotationElement elements */ - public java.util.Enumeration enumerateAnnotationElement() - { - return _annotationElementList.elements(); - } //-- java.util.Enumeration enumerateAnnotationElement() + public java.util.Enumeration enumerateAnnotationElement( + ) { + return this._annotationElementList.elements(); + } /** - * Method getAnnotationElement - * - * + * Method getAnnotationElement. * * @param index - * @return AnnotationElement - */ - public jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _annotationElementList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.AnnotationElement at the + * given index + */ + public jalview.schemabinding.version2.AnnotationElement getAnnotationElement( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._annotationElementList.size()) { + throw new IndexOutOfBoundsException("getAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.elementAt(index); - } //-- jalview.schemabinding.version2.AnnotationElement getAnnotationElement(int) + return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.get(index); + } /** - * Method getAnnotationElement + * Method getAnnotationElement.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 AnnotationElement + * @return this collection as an Array */ - public jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement() - { - int size = _annotationElementList.size(); - jalview.schemabinding.version2.AnnotationElement[] mArray = new jalview.schemabinding.version2.AnnotationElement[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement() + public jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement( + ) { + jalview.schemabinding.version2.AnnotationElement[] array = new jalview.schemabinding.version2.AnnotationElement[0]; + return (jalview.schemabinding.version2.AnnotationElement[]) this._annotationElementList.toArray(array); + } /** - * Method getAnnotationElementCount - * + * Method getAnnotationElementCount. * - * - * @return int + * @return the size of this collection */ - public int getAnnotationElementCount() - { - return _annotationElementList.size(); - } //-- int getAnnotationElementCount() + public int getAnnotationElementCount( + ) { + return this._annotationElementList.size(); + } /** * Returns the value of field 'description'. * - * @return String - * @return the value of field 'description'. + * @return the value of field 'Description'. */ - public java.lang.String getDescription() - { + public java.lang.String getDescription( + ) { return this._description; - } //-- java.lang.String getDescription() + } /** * Returns the value of field 'graph'. * - * @return boolean - * @return the value of field 'graph'. + * @return the value of field 'Graph'. */ - public boolean getGraph() - { + public boolean getGraph( + ) { return this._graph; - } //-- boolean getGraph() + } /** * Returns the value of field 'graphColour'. * - * @return int - * @return the value of field 'graphColour'. + * @return the value of field 'GraphColour'. */ - public int getGraphColour() - { + public int getGraphColour( + ) { return this._graphColour; - } //-- int getGraphColour() + } /** * Returns the value of field 'graphGroup'. * - * @return int - * @return the value of field 'graphGroup'. + * @return the value of field 'GraphGroup'. */ - public int getGraphGroup() - { + public int getGraphGroup( + ) { return this._graphGroup; - } //-- int getGraphGroup() + } /** * Returns the value of field 'graphType'. * - * @return int - * @return the value of field 'graphType'. + * @return the value of field 'GraphType'. */ - public int getGraphType() - { + public int getGraphType( + ) { return this._graphType; - } //-- int getGraphType() + } /** * Returns the value of field 'id'. * - * @return String - * @return the value of field 'id'. + * @return the value of field 'Id'. */ - public java.lang.String getId() - { + public java.lang.String getId( + ) { return this._id; - } //-- java.lang.String getId() + } /** * Returns the value of field 'label'. * - * @return String - * @return the value of field 'label'. + * @return the value of field 'Label'. */ - public java.lang.String getLabel() - { + public java.lang.String getLabel( + ) { return this._label; - } //-- java.lang.String getLabel() + } /** * Returns the value of field 'score'. * - * @return double - * @return the value of field 'score'. + * @return the value of field 'Score'. */ - public double getScore() - { + public double getScore( + ) { return this._score; - } //-- double getScore() + } /** * Returns the value of field 'scoreOnly'. * - * @return boolean - * @return the value of field 'scoreOnly'. + * @return the value of field 'ScoreOnly'. */ - public boolean getScoreOnly() - { + public boolean getScoreOnly( + ) { return this._scoreOnly; - } //-- boolean getScoreOnly() + } /** * Returns the value of field 'sequenceRef'. * - * @return String - * @return the value of field 'sequenceRef'. + * @return the value of field 'SequenceRef'. */ - public java.lang.String getSequenceRef() - { + public java.lang.String getSequenceRef( + ) { return this._sequenceRef; - } //-- java.lang.String getSequenceRef() + } /** * Returns the value of field 'thresholdLine'. * - * @return ThresholdLine - * @return the value of field 'thresholdLine'. + * @return the value of field 'ThresholdLine'. */ - public jalview.schemabinding.version2.ThresholdLine getThresholdLine() - { + public jalview.schemabinding.version2.ThresholdLine getThresholdLine( + ) { return this._thresholdLine; - } //-- jalview.schemabinding.version2.ThresholdLine getThresholdLine() + } /** * Returns the value of field 'visible'. * - * @return boolean - * @return the value of field 'visible'. + * @return the value of field 'Visible'. */ - public boolean getVisible() - { + public boolean getVisible( + ) { return this._visible; - } //-- boolean getVisible() + } /** - * Method hasGraph - * - * + * Method hasGraph. * - * @return boolean + * @return true if at least one Graph has been added */ - public boolean hasGraph() - { + public boolean hasGraph( + ) { return this._has_graph; - } //-- boolean hasGraph() + } /** - * Method hasGraphColour - * - * + * Method hasGraphColour. * - * @return boolean + * @return true if at least one GraphColour has been added */ - public boolean hasGraphColour() - { + public boolean hasGraphColour( + ) { return this._has_graphColour; - } //-- boolean hasGraphColour() + } /** - * Method hasGraphGroup + * Method hasGraphGroup. * - * - * - * @return boolean + * @return true if at least one GraphGroup has been added */ - public boolean hasGraphGroup() - { + public boolean hasGraphGroup( + ) { return this._has_graphGroup; - } //-- boolean hasGraphGroup() + } /** - * Method hasGraphType - * - * + * Method hasGraphType. * - * @return boolean + * @return true if at least one GraphType has been added */ - public boolean hasGraphType() - { + public boolean hasGraphType( + ) { return this._has_graphType; - } //-- boolean hasGraphType() + } /** - * Method hasScore + * Method hasScore. * - * - * - * @return boolean + * @return true if at least one Score has been added */ - public boolean hasScore() - { + public boolean hasScore( + ) { return this._has_score; - } //-- boolean hasScore() + } /** - * Method hasScoreOnly - * - * + * Method hasScoreOnly. * - * @return boolean + * @return true if at least one ScoreOnly has been added */ - public boolean hasScoreOnly() - { + public boolean hasScoreOnly( + ) { return this._has_scoreOnly; - } //-- boolean hasScoreOnly() + } /** - * Method hasVisible + * Method hasVisible. * - * - * - * @return boolean + * @return true if at least one Visible has been added */ - public boolean hasVisible() - { + public boolean hasVisible( + ) { return this._has_visible; - } //-- boolean hasVisible() + } /** - * Method isValid + * Returns the value of field 'graph'. * + * @return the value of field 'Graph'. + */ + public boolean isGraph( + ) { + return this._graph; + } + + /** + * Returns the value of field 'scoreOnly'. * + * @return the value of field 'ScoreOnly'. + */ + public boolean isScoreOnly( + ) { + return this._scoreOnly; + } + + /** + * Method isValid. * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal + * Returns the value of field 'visible'. * + * @return the value of field 'Visible'. + */ + public boolean isVisible( + ) { + return this._visible; + } + + /** * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllAnnotationElement - * */ - public void removeAllAnnotationElement() - { - _annotationElementList.removeAllElements(); - } //-- void removeAllAnnotationElement() + public void removeAllAnnotationElement( + ) { + this._annotationElementList.clear(); + } /** - * Method removeAnnotationElement - * + * Method removeAnnotationElement. * + * @param vAnnotationElement + * @return true if the object was removed from the collection. + */ + public boolean removeAnnotationElement( + final jalview.schemabinding.version2.AnnotationElement vAnnotationElement) { + boolean removed = _annotationElementList.remove(vAnnotationElement); + return removed; + } + + /** + * Method removeAnnotationElementAt. * * @param index - * @return AnnotationElement + * @return the element removed from the collection */ - public jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int index) - { - java.lang.Object obj = _annotationElementList.elementAt(index); - _annotationElementList.removeElementAt(index); + public jalview.schemabinding.version2.AnnotationElement removeAnnotationElementAt( + final int index) { + java.lang.Object obj = this._annotationElementList.remove(index); return (jalview.schemabinding.version2.AnnotationElement) obj; - } //-- jalview.schemabinding.version2.AnnotationElement removeAnnotationElement(int) + } /** - * Method setAnnotationElement - * * * * @param index * @param vAnnotationElement - */ - public void setAnnotationElement(int index, jalview.schemabinding.version2.AnnotationElement vAnnotationElement) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _annotationElementList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setAnnotationElement( + final int index, + final jalview.schemabinding.version2.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._annotationElementList.size()) { + throw new IndexOutOfBoundsException("setAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]"); } - _annotationElementList.setElementAt(vAnnotationElement, index); - } //-- void setAnnotationElement(int, jalview.schemabinding.version2.AnnotationElement) + + this._annotationElementList.set(index, vAnnotationElement); + } /** - * Method setAnnotationElement * * - * - * @param annotationElementArray + * @param vAnnotationElementArray */ - public void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement[] annotationElementArray) - { + public void setAnnotationElement( + final jalview.schemabinding.version2.AnnotationElement[] vAnnotationElementArray) { //-- copy array - _annotationElementList.removeAllElements(); - for (int i = 0; i < annotationElementArray.length; i++) { - _annotationElementList.addElement(annotationElementArray[i]); + _annotationElementList.clear(); + + for (int i = 0; i < vAnnotationElementArray.length; i++) { + this._annotationElementList.add(vAnnotationElementArray[i]); } - } //-- void setAnnotationElement(jalview.schemabinding.version2.AnnotationElement) + } /** * Sets the value of field 'description'. * * @param description the value of field 'description'. */ - public void setDescription(java.lang.String description) - { + public void setDescription( + final java.lang.String description) { this._description = description; - } //-- void setDescription(java.lang.String) + } /** * Sets the value of field 'graph'. * * @param graph the value of field 'graph'. */ - public void setGraph(boolean graph) - { + public void setGraph( + final boolean graph) { this._graph = graph; this._has_graph = true; - } //-- void setGraph(boolean) + } /** * Sets the value of field 'graphColour'. * * @param graphColour the value of field 'graphColour'. */ - public void setGraphColour(int graphColour) - { + public void setGraphColour( + final int graphColour) { this._graphColour = graphColour; this._has_graphColour = true; - } //-- void setGraphColour(int) + } /** * Sets the value of field 'graphGroup'. * * @param graphGroup the value of field 'graphGroup'. */ - public void setGraphGroup(int graphGroup) - { + public void setGraphGroup( + final int graphGroup) { this._graphGroup = graphGroup; this._has_graphGroup = true; - } //-- void setGraphGroup(int) + } /** * Sets the value of field 'graphType'. * * @param graphType the value of field 'graphType'. */ - public void setGraphType(int graphType) - { + public void setGraphType( + final int graphType) { this._graphType = graphType; this._has_graphType = true; - } //-- void setGraphType(int) + } /** * Sets the value of field 'id'. * * @param id the value of field 'id'. */ - public void setId(java.lang.String id) - { + public void setId( + final java.lang.String id) { this._id = id; - } //-- void setId(java.lang.String) + } /** * Sets the value of field 'label'. * * @param label the value of field 'label'. */ - public void setLabel(java.lang.String label) - { + public void setLabel( + final java.lang.String label) { this._label = label; - } //-- void setLabel(java.lang.String) + } /** * Sets the value of field 'score'. * * @param score the value of field 'score'. */ - public void setScore(double score) - { + public void setScore( + final double score) { this._score = score; this._has_score = true; - } //-- void setScore(double) + } /** * Sets the value of field 'scoreOnly'. * * @param scoreOnly the value of field 'scoreOnly'. */ - public void setScoreOnly(boolean scoreOnly) - { + public void setScoreOnly( + final boolean scoreOnly) { this._scoreOnly = scoreOnly; this._has_scoreOnly = true; - } //-- void setScoreOnly(boolean) + } /** * Sets the value of field 'sequenceRef'. * * @param sequenceRef the value of field 'sequenceRef'. */ - public void setSequenceRef(java.lang.String sequenceRef) - { + public void setSequenceRef( + final java.lang.String sequenceRef) { this._sequenceRef = sequenceRef; - } //-- void setSequenceRef(java.lang.String) + } /** * Sets the value of field 'thresholdLine'. * * @param thresholdLine the value of field 'thresholdLine'. */ - public void setThresholdLine(jalview.schemabinding.version2.ThresholdLine thresholdLine) - { + public void setThresholdLine( + final jalview.schemabinding.version2.ThresholdLine thresholdLine) { this._thresholdLine = thresholdLine; - } //-- void setThresholdLine(jalview.schemabinding.version2.ThresholdLine) + } /** * Sets the value of field 'visible'. * * @param visible the value of field 'visible'. */ - public void setVisible(boolean visible) - { + public void setVisible( + final boolean visible) { this._visible = visible; this._has_visible = true; - } //-- void setVisible(boolean) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.Annotation + */ + public static jalview.schemabinding.version2.Annotation unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.Annotation) Unmarshaller.unmarshal(jalview.schemabinding.version2.Annotation.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/AnnotationColours.java b/src/jalview/schemabinding/version2/AnnotationColours.java index b2af2c4..36f9f93 100755 --- a/src/jalview/schemabinding/version2/AnnotationColours.java +++ b/src/jalview/schemabinding/version2/AnnotationColours.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class AnnotationColours. @@ -34,7 +27,7 @@ public class AnnotationColours implements java.io.Serializable { //--------------------------/ /** - * Field _aboveThreshold + * Field _aboveThreshold. */ private int _aboveThreshold; @@ -44,12 +37,12 @@ public class AnnotationColours implements java.io.Serializable { private boolean _has_aboveThreshold; /** - * Field _annotation + * Field _annotation. */ private java.lang.String _annotation; /** - * Field _minColour + * Field _minColour. */ private int _minColour; @@ -59,7 +52,7 @@ public class AnnotationColours implements java.io.Serializable { private boolean _has_minColour; /** - * Field _maxColour + * Field _maxColour. */ private int _maxColour; @@ -69,12 +62,12 @@ public class AnnotationColours implements java.io.Serializable { private boolean _has_maxColour; /** - * Field _colourScheme + * Field _colourScheme. */ private java.lang.String _colourScheme; /** - * Field _threshold + * Field _threshold. */ private float _threshold; @@ -90,7 +83,7 @@ public class AnnotationColours implements java.io.Serializable { public AnnotationColours() { super(); - } //-- jalview.schemabinding.version2.AnnotationColours() + } //-----------/ @@ -98,288 +91,272 @@ public class AnnotationColours implements java.io.Serializable { //-----------/ /** - * Method deleteAboveThreshold - * */ - public void deleteAboveThreshold() - { + public void deleteAboveThreshold( + ) { this._has_aboveThreshold= false; - } //-- void deleteAboveThreshold() + } /** - * Method deleteMaxColour - * */ - public void deleteMaxColour() - { + public void deleteMaxColour( + ) { this._has_maxColour= false; - } //-- void deleteMaxColour() + } /** - * Method deleteMinColour - * */ - public void deleteMinColour() - { + public void deleteMinColour( + ) { this._has_minColour= false; - } //-- void deleteMinColour() + } /** - * Method deleteThreshold - * */ - public void deleteThreshold() - { + public void deleteThreshold( + ) { this._has_threshold= false; - } //-- void deleteThreshold() + } /** * Returns the value of field 'aboveThreshold'. * - * @return int - * @return the value of field 'aboveThreshold'. + * @return the value of field 'AboveThreshold'. */ - public int getAboveThreshold() - { + public int getAboveThreshold( + ) { return this._aboveThreshold; - } //-- int getAboveThreshold() + } /** * Returns the value of field 'annotation'. * - * @return String - * @return the value of field 'annotation'. + * @return the value of field 'Annotation'. */ - public java.lang.String getAnnotation() - { + public java.lang.String getAnnotation( + ) { return this._annotation; - } //-- java.lang.String getAnnotation() + } /** * Returns the value of field 'colourScheme'. * - * @return String - * @return the value of field 'colourScheme'. + * @return the value of field 'ColourScheme'. */ - public java.lang.String getColourScheme() - { + public java.lang.String getColourScheme( + ) { return this._colourScheme; - } //-- java.lang.String getColourScheme() + } /** * Returns the value of field 'maxColour'. * - * @return int - * @return the value of field 'maxColour'. + * @return the value of field 'MaxColour'. */ - public int getMaxColour() - { + public int getMaxColour( + ) { return this._maxColour; - } //-- int getMaxColour() + } /** * Returns the value of field 'minColour'. * - * @return int - * @return the value of field 'minColour'. + * @return the value of field 'MinColour'. */ - public int getMinColour() - { + public int getMinColour( + ) { return this._minColour; - } //-- int getMinColour() + } /** * Returns the value of field 'threshold'. * - * @return float - * @return the value of field 'threshold'. + * @return the value of field 'Threshold'. */ - public float getThreshold() - { + public float getThreshold( + ) { return this._threshold; - } //-- float getThreshold() + } /** - * Method hasAboveThreshold - * - * + * Method hasAboveThreshold. * - * @return boolean + * @return true if at least one AboveThreshold has been added */ - public boolean hasAboveThreshold() - { + public boolean hasAboveThreshold( + ) { return this._has_aboveThreshold; - } //-- boolean hasAboveThreshold() + } /** - * Method hasMaxColour + * Method hasMaxColour. * - * - * - * @return boolean + * @return true if at least one MaxColour has been added */ - public boolean hasMaxColour() - { + public boolean hasMaxColour( + ) { return this._has_maxColour; - } //-- boolean hasMaxColour() + } /** - * Method hasMinColour - * + * Method hasMinColour. * - * - * @return boolean + * @return true if at least one MinColour has been added */ - public boolean hasMinColour() - { + public boolean hasMinColour( + ) { return this._has_minColour; - } //-- boolean hasMinColour() + } /** - * Method hasThreshold - * - * + * Method hasThreshold. * - * @return boolean + * @return true if at least one Threshold has been added */ - public boolean hasThreshold() - { + public boolean hasThreshold( + ) { return this._has_threshold; - } //-- boolean hasThreshold() + } /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'aboveThreshold'. * * @param aboveThreshold the value of field 'aboveThreshold'. */ - public void setAboveThreshold(int aboveThreshold) - { + public void setAboveThreshold( + final int aboveThreshold) { this._aboveThreshold = aboveThreshold; this._has_aboveThreshold = true; - } //-- void setAboveThreshold(int) + } /** * Sets the value of field 'annotation'. * * @param annotation the value of field 'annotation'. */ - public void setAnnotation(java.lang.String annotation) - { + public void setAnnotation( + final java.lang.String annotation) { this._annotation = annotation; - } //-- void setAnnotation(java.lang.String) + } /** * Sets the value of field 'colourScheme'. * * @param colourScheme the value of field 'colourScheme'. */ - public void setColourScheme(java.lang.String colourScheme) - { + public void setColourScheme( + final java.lang.String colourScheme) { this._colourScheme = colourScheme; - } //-- void setColourScheme(java.lang.String) + } /** * Sets the value of field 'maxColour'. * * @param maxColour the value of field 'maxColour'. */ - public void setMaxColour(int maxColour) - { + public void setMaxColour( + final int maxColour) { this._maxColour = maxColour; this._has_maxColour = true; - } //-- void setMaxColour(int) + } /** * Sets the value of field 'minColour'. * * @param minColour the value of field 'minColour'. */ - public void setMinColour(int minColour) - { + public void setMinColour( + final int minColour) { this._minColour = minColour; this._has_minColour = true; - } //-- void setMinColour(int) + } /** * Sets the value of field 'threshold'. * * @param threshold the value of field 'threshold'. */ - public void setThreshold(float threshold) - { + public void setThreshold( + final float threshold) { this._threshold = threshold; this._has_threshold = true; - } //-- void setThreshold(float) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.AnnotationColours + */ + public static jalview.schemabinding.version2.AnnotationColours unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationColours.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/AnnotationElement.java b/src/jalview/schemabinding/version2/AnnotationElement.java index 2507197..eca3e6a 100755 --- a/src/jalview/schemabinding/version2/AnnotationElement.java +++ b/src/jalview/schemabinding/version2/AnnotationElement.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class AnnotationElement. @@ -34,7 +27,7 @@ public class AnnotationElement implements java.io.Serializable { //--------------------------/ /** - * Field _position + * Field _position. */ private int _position; @@ -44,7 +37,7 @@ public class AnnotationElement implements java.io.Serializable { private boolean _has_position; /** - * Field _colour + * Field _colour. */ private int _colour; @@ -54,22 +47,22 @@ public class AnnotationElement implements java.io.Serializable { private boolean _has_colour; /** - * Field _displayCharacter + * Field _displayCharacter. */ private java.lang.String _displayCharacter; /** - * Field _description + * Field _description. */ private java.lang.String _description; /** - * Field _secondaryStructure + * Field _secondaryStructure. */ private java.lang.String _secondaryStructure; /** - * Field _value + * Field _value. */ private float _value; @@ -85,7 +78,7 @@ public class AnnotationElement implements java.io.Serializable { public AnnotationElement() { super(); - } //-- jalview.schemabinding.version2.AnnotationElement() + } //-----------/ @@ -93,221 +86,204 @@ public class AnnotationElement implements java.io.Serializable { //-----------/ /** - * Method deleteColour - * */ - public void deleteColour() - { + public void deleteColour( + ) { this._has_colour= false; - } //-- void deleteColour() + } /** - * Method deletePosition - * */ - public void deletePosition() - { + public void deletePosition( + ) { this._has_position= false; - } //-- void deletePosition() + } /** - * Method deleteValue - * */ - public void deleteValue() - { + public void deleteValue( + ) { this._has_value= false; - } //-- void deleteValue() + } /** * Returns the value of field 'colour'. * - * @return int - * @return the value of field 'colour'. + * @return the value of field 'Colour'. */ - public int getColour() - { + public int getColour( + ) { return this._colour; - } //-- int getColour() + } /** * Returns the value of field 'description'. * - * @return String - * @return the value of field 'description'. + * @return the value of field 'Description'. */ - public java.lang.String getDescription() - { + public java.lang.String getDescription( + ) { return this._description; - } //-- java.lang.String getDescription() + } /** * Returns the value of field 'displayCharacter'. * - * @return String - * @return the value of field 'displayCharacter'. + * @return the value of field 'DisplayCharacter'. */ - public java.lang.String getDisplayCharacter() - { + public java.lang.String getDisplayCharacter( + ) { return this._displayCharacter; - } //-- java.lang.String getDisplayCharacter() + } /** * Returns the value of field 'position'. * - * @return int - * @return the value of field 'position'. + * @return the value of field 'Position'. */ - public int getPosition() - { + public int getPosition( + ) { return this._position; - } //-- int getPosition() + } /** * Returns the value of field 'secondaryStructure'. * - * @return String - * @return the value of field 'secondaryStructure'. + * @return the value of field 'SecondaryStructure'. */ - public java.lang.String getSecondaryStructure() - { + public java.lang.String getSecondaryStructure( + ) { return this._secondaryStructure; - } //-- java.lang.String getSecondaryStructure() + } /** * Returns the value of field 'value'. * - * @return float - * @return the value of field 'value'. + * @return the value of field 'Value'. */ - public float getValue() - { + public float getValue( + ) { return this._value; - } //-- float getValue() + } /** - * Method hasColour - * - * + * Method hasColour. * - * @return boolean + * @return true if at least one Colour has been added */ - public boolean hasColour() - { + public boolean hasColour( + ) { return this._has_colour; - } //-- boolean hasColour() + } /** - * Method hasPosition + * Method hasPosition. * - * - * - * @return boolean + * @return true if at least one Position has been added */ - public boolean hasPosition() - { + public boolean hasPosition( + ) { return this._has_position; - } //-- boolean hasPosition() + } /** - * Method hasValue - * + * Method hasValue. * - * - * @return boolean + * @return true if at least one Value has been added */ - public boolean hasValue() - { + public boolean hasValue( + ) { return this._has_value; - } //-- boolean hasValue() + } /** - * Method isValid - * + * Method isValid. * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'colour'. * * @param colour the value of field 'colour'. */ - public void setColour(int colour) - { + public void setColour( + final int colour) { this._colour = colour; this._has_colour = true; - } //-- void setColour(int) + } /** * Sets the value of field 'description'. * * @param description the value of field 'description'. */ - public void setDescription(java.lang.String description) - { + public void setDescription( + final java.lang.String description) { this._description = description; - } //-- void setDescription(java.lang.String) + } /** * Sets the value of field 'displayCharacter'. * * @param displayCharacter the value of field 'displayCharacter' */ - public void setDisplayCharacter(java.lang.String displayCharacter) - { + public void setDisplayCharacter( + final java.lang.String displayCharacter) { this._displayCharacter = displayCharacter; - } //-- void setDisplayCharacter(java.lang.String) + } /** * Sets the value of field 'position'. * * @param position the value of field 'position'. */ - public void setPosition(int position) - { + public void setPosition( + final int position) { this._position = position; this._has_position = true; - } //-- void setPosition(int) + } /** * Sets the value of field 'secondaryStructure'. @@ -315,45 +291,50 @@ public class AnnotationElement implements java.io.Serializable { * @param secondaryStructure the value of field * 'secondaryStructure'. */ - public void setSecondaryStructure(java.lang.String secondaryStructure) - { + public void setSecondaryStructure( + final java.lang.String secondaryStructure) { this._secondaryStructure = secondaryStructure; - } //-- void setSecondaryStructure(java.lang.String) + } /** * Sets the value of field 'value'. * * @param value the value of field 'value'. */ - public void setValue(float value) - { + public void setValue( + final float value) { this._value = value; this._has_value = true; - } //-- void setValue(float) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.AnnotationElement + */ + public static jalview.schemabinding.version2.AnnotationElement unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.AnnotationElement) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationElement.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/Colour.java b/src/jalview/schemabinding/version2/Colour.java index bcc4642..54d64ff 100755 --- a/src/jalview/schemabinding/version2/Colour.java +++ b/src/jalview/schemabinding/version2/Colour.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class Colour. @@ -34,12 +27,12 @@ public class Colour implements java.io.Serializable { //--------------------------/ /** - * Field _name + * Field _name. */ private java.lang.String _name; /** - * Field _RGB + * Field _RGB. */ private java.lang.String _RGB; @@ -50,7 +43,7 @@ public class Colour implements java.io.Serializable { public Colour() { super(); - } //-- jalview.schemabinding.version2.Colour() + } //-----------/ @@ -60,114 +53,117 @@ public class Colour implements java.io.Serializable { /** * Returns the value of field 'name'. * - * @return String - * @return the value of field 'name'. + * @return the value of field 'Name'. */ - public java.lang.String getName() - { + public java.lang.String getName( + ) { return this._name; - } //-- java.lang.String getName() + } /** * Returns the value of field 'RGB'. * - * @return String * @return the value of field 'RGB'. */ - public java.lang.String getRGB() - { + public java.lang.String getRGB( + ) { return this._RGB; - } //-- java.lang.String getRGB() + } /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'name'. * * @param name the value of field 'name'. */ - public void setName(java.lang.String name) - { + public void setName( + final java.lang.String name) { this._name = name; - } //-- void setName(java.lang.String) + } /** * Sets the value of field 'RGB'. * * @param RGB the value of field 'RGB'. */ - public void setRGB(java.lang.String RGB) - { + public void setRGB( + final java.lang.String RGB) { this._RGB = RGB; - } //-- void setRGB(java.lang.String) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.Colour */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + public static jalview.schemabinding.version2.Colour unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.Colour) Unmarshaller.unmarshal(jalview.schemabinding.version2.Colour.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/DBRef.java b/src/jalview/schemabinding/version2/DBRef.java index 576a4ad..e6c4220 100644 --- a/src/jalview/schemabinding/version2/DBRef.java +++ b/src/jalview/schemabinding/version2/DBRef.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class DBRef. @@ -34,17 +27,17 @@ public class DBRef implements java.io.Serializable { //--------------------------/ /** - * Field _source + * Field _source. */ private java.lang.String _source; /** - * Field _version + * Field _version. */ private java.lang.String _version; /** - * Field _accessionId + * Field _accessionId. */ private java.lang.String _accessionId; @@ -55,7 +48,7 @@ public class DBRef implements java.io.Serializable { public DBRef() { super(); - } //-- jalview.schemabinding.version2.DBRef() + } //-----------/ @@ -65,135 +58,137 @@ public class DBRef implements java.io.Serializable { /** * Returns the value of field 'accessionId'. * - * @return String - * @return the value of field 'accessionId'. + * @return the value of field 'AccessionId'. */ - public java.lang.String getAccessionId() - { + public java.lang.String getAccessionId( + ) { return this._accessionId; - } //-- java.lang.String getAccessionId() + } /** * Returns the value of field 'source'. * - * @return String - * @return the value of field 'source'. + * @return the value of field 'Source'. */ - public java.lang.String getSource() - { + public java.lang.String getSource( + ) { return this._source; - } //-- java.lang.String getSource() + } /** * Returns the value of field 'version'. * - * @return String - * @return the value of field 'version'. + * @return the value of field 'Version'. */ - public java.lang.String getVersion() - { + public java.lang.String getVersion( + ) { return this._version; - } //-- java.lang.String getVersion() + } /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'accessionId'. * * @param accessionId the value of field 'accessionId'. */ - public void setAccessionId(java.lang.String accessionId) - { + public void setAccessionId( + final java.lang.String accessionId) { this._accessionId = accessionId; - } //-- void setAccessionId(java.lang.String) + } /** * Sets the value of field 'source'. * * @param source the value of field 'source'. */ - public void setSource(java.lang.String source) - { + public void setSource( + final java.lang.String source) { this._source = source; - } //-- void setSource(java.lang.String) + } /** * Sets the value of field 'version'. * * @param version the value of field 'version'. */ - public void setVersion(java.lang.String version) - { + public void setVersion( + final java.lang.String version) { this._version = version; - } //-- void setVersion(java.lang.String) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.DBRef */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + public static jalview.schemabinding.version2.DBRef unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(jalview.schemabinding.version2.DBRef.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/Feature.java b/src/jalview/schemabinding/version2/Feature.java index 305e287..109ec6e 100755 --- a/src/jalview/schemabinding/version2/Feature.java +++ b/src/jalview/schemabinding/version2/Feature.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class Feature. @@ -36,7 +27,7 @@ public class Feature implements java.io.Serializable { //--------------------------/ /** - * Field _begin + * Field _begin. */ private int _begin; @@ -46,7 +37,7 @@ public class Feature implements java.io.Serializable { private boolean _has_begin; /** - * Field _end + * Field _end. */ private int _end; @@ -56,27 +47,27 @@ public class Feature implements java.io.Serializable { private boolean _has_end; /** - * Field _type + * Field _type. */ private java.lang.String _type; /** - * Field _description + * Field _description. */ private java.lang.String _description; /** - * Field _status + * Field _status. */ private java.lang.String _status; /** - * Field _featureGroup + * Field _featureGroup. */ private java.lang.String _featureGroup; /** - * Field _score + * Field _score. */ private float _score; @@ -86,7 +77,7 @@ public class Feature implements java.io.Serializable { private boolean _has_score; /** - * Field _otherDataList + * Field _otherDataList. */ private java.util.Vector _otherDataList; @@ -97,8 +88,8 @@ public class Feature implements java.io.Serializable { public Feature() { super(); - _otherDataList = new Vector(); - } //-- jalview.schemabinding.version2.Feature() + this._otherDataList = new java.util.Vector(); + } //-----------/ @@ -106,432 +97,423 @@ public class Feature implements java.io.Serializable { //-----------/ /** - * Method addOtherData - * * * * @param vOtherData + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addOtherData(jalview.schemabinding.version2.OtherData vOtherData) - throws java.lang.IndexOutOfBoundsException - { - _otherDataList.addElement(vOtherData); - } //-- void addOtherData(jalview.schemabinding.version2.OtherData) + public void addOtherData( + final jalview.schemabinding.version2.OtherData vOtherData) + throws java.lang.IndexOutOfBoundsException { + this._otherDataList.addElement(vOtherData); + } /** - * Method addOtherData - * * * * @param index * @param vOtherData + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addOtherData(int index, jalview.schemabinding.version2.OtherData vOtherData) - throws java.lang.IndexOutOfBoundsException - { - _otherDataList.insertElementAt(vOtherData, index); - } //-- void addOtherData(int, jalview.schemabinding.version2.OtherData) + public void addOtherData( + final int index, + final jalview.schemabinding.version2.OtherData vOtherData) + throws java.lang.IndexOutOfBoundsException { + this._otherDataList.add(index, vOtherData); + } /** - * Method deleteBegin - * */ - public void deleteBegin() - { + public void deleteBegin( + ) { this._has_begin= false; - } //-- void deleteBegin() + } /** - * Method deleteEnd - * */ - public void deleteEnd() - { + public void deleteEnd( + ) { this._has_end= false; - } //-- void deleteEnd() + } /** - * Method deleteScore - * */ - public void deleteScore() - { + public void deleteScore( + ) { this._has_score= false; - } //-- void deleteScore() + } /** - * Method enumerateOtherData - * + * Method enumerateOtherData. * - * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.OtherData elements */ - public java.util.Enumeration enumerateOtherData() - { - return _otherDataList.elements(); - } //-- java.util.Enumeration enumerateOtherData() + public java.util.Enumeration enumerateOtherData( + ) { + return this._otherDataList.elements(); + } /** * Returns the value of field 'begin'. * - * @return int - * @return the value of field 'begin'. + * @return the value of field 'Begin'. */ - public int getBegin() - { + public int getBegin( + ) { return this._begin; - } //-- int getBegin() + } /** * Returns the value of field 'description'. * - * @return String - * @return the value of field 'description'. + * @return the value of field 'Description'. */ - public java.lang.String getDescription() - { + public java.lang.String getDescription( + ) { return this._description; - } //-- java.lang.String getDescription() + } /** * Returns the value of field 'end'. * - * @return int - * @return the value of field 'end'. + * @return the value of field 'End'. */ - public int getEnd() - { + public int getEnd( + ) { return this._end; - } //-- int getEnd() + } /** * Returns the value of field 'featureGroup'. * - * @return String - * @return the value of field 'featureGroup'. + * @return the value of field 'FeatureGroup'. */ - public java.lang.String getFeatureGroup() - { + public java.lang.String getFeatureGroup( + ) { return this._featureGroup; - } //-- java.lang.String getFeatureGroup() + } /** - * Method getOtherData - * - * + * Method getOtherData. * * @param index - * @return OtherData - */ - public jalview.schemabinding.version2.OtherData getOtherData(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _otherDataList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.OtherData at the given index + */ + public jalview.schemabinding.version2.OtherData getOtherData( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._otherDataList.size()) { + throw new IndexOutOfBoundsException("getOtherData: Index value '" + index + "' not in range [0.." + (this._otherDataList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.OtherData) _otherDataList.elementAt(index); - } //-- jalview.schemabinding.version2.OtherData getOtherData(int) + return (jalview.schemabinding.version2.OtherData) _otherDataList.get(index); + } /** - * Method getOtherData - * - * + * Method getOtherData.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 OtherData + * @return this collection as an Array */ - public jalview.schemabinding.version2.OtherData[] getOtherData() - { - int size = _otherDataList.size(); - jalview.schemabinding.version2.OtherData[] mArray = new jalview.schemabinding.version2.OtherData[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.OtherData) _otherDataList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.OtherData[] getOtherData() + public jalview.schemabinding.version2.OtherData[] getOtherData( + ) { + jalview.schemabinding.version2.OtherData[] array = new jalview.schemabinding.version2.OtherData[0]; + return (jalview.schemabinding.version2.OtherData[]) this._otherDataList.toArray(array); + } /** - * Method getOtherDataCount - * - * + * Method getOtherDataCount. * - * @return int + * @return the size of this collection */ - public int getOtherDataCount() - { - return _otherDataList.size(); - } //-- int getOtherDataCount() + public int getOtherDataCount( + ) { + return this._otherDataList.size(); + } /** * Returns the value of field 'score'. * - * @return float - * @return the value of field 'score'. + * @return the value of field 'Score'. */ - public float getScore() - { + public float getScore( + ) { return this._score; - } //-- float getScore() + } /** * Returns the value of field 'status'. * - * @return String - * @return the value of field 'status'. + * @return the value of field 'Status'. */ - public java.lang.String getStatus() - { + public java.lang.String getStatus( + ) { return this._status; - } //-- java.lang.String getStatus() + } /** * Returns the value of field 'type'. * - * @return String - * @return the value of field 'type'. + * @return the value of field 'Type'. */ - public java.lang.String getType() - { + public java.lang.String getType( + ) { return this._type; - } //-- java.lang.String getType() + } /** - * Method hasBegin + * Method hasBegin. * - * - * - * @return boolean + * @return true if at least one Begin has been added */ - public boolean hasBegin() - { + public boolean hasBegin( + ) { return this._has_begin; - } //-- boolean hasBegin() + } /** - * Method hasEnd - * + * Method hasEnd. * - * - * @return boolean + * @return true if at least one End has been added */ - public boolean hasEnd() - { + public boolean hasEnd( + ) { return this._has_end; - } //-- boolean hasEnd() + } /** - * Method hasScore - * - * + * Method hasScore. * - * @return boolean + * @return true if at least one Score has been added */ - public boolean hasScore() - { + public boolean hasScore( + ) { return this._has_score; - } //-- boolean hasScore() + } /** - * Method isValid - * - * + * Method isValid. * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllOtherData - * */ - public void removeAllOtherData() - { - _otherDataList.removeAllElements(); - } //-- void removeAllOtherData() + public void removeAllOtherData( + ) { + this._otherDataList.clear(); + } /** - * Method removeOtherData - * + * Method removeOtherData. * + * @param vOtherData + * @return true if the object was removed from the collection. + */ + public boolean removeOtherData( + final jalview.schemabinding.version2.OtherData vOtherData) { + boolean removed = _otherDataList.remove(vOtherData); + return removed; + } + + /** + * Method removeOtherDataAt. * * @param index - * @return OtherData + * @return the element removed from the collection */ - public jalview.schemabinding.version2.OtherData removeOtherData(int index) - { - java.lang.Object obj = _otherDataList.elementAt(index); - _otherDataList.removeElementAt(index); + public jalview.schemabinding.version2.OtherData removeOtherDataAt( + final int index) { + java.lang.Object obj = this._otherDataList.remove(index); return (jalview.schemabinding.version2.OtherData) obj; - } //-- jalview.schemabinding.version2.OtherData removeOtherData(int) + } /** * Sets the value of field 'begin'. * * @param begin the value of field 'begin'. */ - public void setBegin(int begin) - { + public void setBegin( + final int begin) { this._begin = begin; this._has_begin = true; - } //-- void setBegin(int) + } /** * Sets the value of field 'description'. * * @param description the value of field 'description'. */ - public void setDescription(java.lang.String description) - { + public void setDescription( + final java.lang.String description) { this._description = description; - } //-- void setDescription(java.lang.String) + } /** * Sets the value of field 'end'. * * @param end the value of field 'end'. */ - public void setEnd(int end) - { + public void setEnd( + final int end) { this._end = end; this._has_end = true; - } //-- void setEnd(int) + } /** * Sets the value of field 'featureGroup'. * * @param featureGroup the value of field 'featureGroup'. */ - public void setFeatureGroup(java.lang.String featureGroup) - { + public void setFeatureGroup( + final java.lang.String featureGroup) { this._featureGroup = featureGroup; - } //-- void setFeatureGroup(java.lang.String) + } /** - * Method setOtherData - * * * * @param index * @param vOtherData - */ - public void setOtherData(int index, jalview.schemabinding.version2.OtherData vOtherData) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _otherDataList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setOtherData( + final int index, + final jalview.schemabinding.version2.OtherData vOtherData) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._otherDataList.size()) { + throw new IndexOutOfBoundsException("setOtherData: Index value '" + index + "' not in range [0.." + (this._otherDataList.size() - 1) + "]"); } - _otherDataList.setElementAt(vOtherData, index); - } //-- void setOtherData(int, jalview.schemabinding.version2.OtherData) + + this._otherDataList.set(index, vOtherData); + } /** - * Method setOtherData - * * * - * @param otherDataArray + * @param vOtherDataArray */ - public void setOtherData(jalview.schemabinding.version2.OtherData[] otherDataArray) - { + public void setOtherData( + final jalview.schemabinding.version2.OtherData[] vOtherDataArray) { //-- copy array - _otherDataList.removeAllElements(); - for (int i = 0; i < otherDataArray.length; i++) { - _otherDataList.addElement(otherDataArray[i]); + _otherDataList.clear(); + + for (int i = 0; i < vOtherDataArray.length; i++) { + this._otherDataList.add(vOtherDataArray[i]); } - } //-- void setOtherData(jalview.schemabinding.version2.OtherData) + } /** * Sets the value of field 'score'. * * @param score the value of field 'score'. */ - public void setScore(float score) - { + public void setScore( + final float score) { this._score = score; this._has_score = true; - } //-- void setScore(float) + } /** * Sets the value of field 'status'. * * @param status the value of field 'status'. */ - public void setStatus(java.lang.String status) - { + public void setStatus( + final java.lang.String status) { this._status = status; - } //-- void setStatus(java.lang.String) + } /** * Sets the value of field 'type'. * * @param type the value of field 'type'. */ - public void setType(java.lang.String type) - { + public void setType( + final java.lang.String type) { this._type = type; - } //-- void setType(java.lang.String) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.Featur + */ + public static jalview.schemabinding.version2.Feature unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.Feature) Unmarshaller.unmarshal(jalview.schemabinding.version2.Feature.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/FeatureSettings.java b/src/jalview/schemabinding/version2/FeatureSettings.java index 6f64136..5ce4054 100755 --- a/src/jalview/schemabinding/version2/FeatureSettings.java +++ b/src/jalview/schemabinding/version2/FeatureSettings.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class FeatureSettings. @@ -36,12 +27,12 @@ public class FeatureSettings implements java.io.Serializable { //--------------------------/ /** - * Field _settingList + * Field _settingList. */ private java.util.Vector _settingList; /** - * Field _groupList + * Field _groupList. */ private java.util.Vector _groupList; @@ -52,9 +43,9 @@ public class FeatureSettings implements java.io.Serializable { public FeatureSettings() { super(); - _settingList = new Vector(); - _groupList = new Vector(); - } //-- jalview.schemabinding.version2.FeatureSettings() + this._settingList = new java.util.Vector(); + this._groupList = new java.util.Vector(); + } //-----------/ @@ -62,364 +53,380 @@ public class FeatureSettings implements java.io.Serializable { //-----------/ /** - * Method addGroup - * * * * @param vGroup + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addGroup(jalview.schemabinding.version2.Group vGroup) - throws java.lang.IndexOutOfBoundsException - { - _groupList.addElement(vGroup); - } //-- void addGroup(jalview.schemabinding.version2.Group) + public void addGroup( + final jalview.schemabinding.version2.Group vGroup) + throws java.lang.IndexOutOfBoundsException { + this._groupList.addElement(vGroup); + } /** - * Method addGroup - * * * * @param index * @param vGroup + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addGroup(int index, jalview.schemabinding.version2.Group vGroup) - throws java.lang.IndexOutOfBoundsException - { - _groupList.insertElementAt(vGroup, index); - } //-- void addGroup(int, jalview.schemabinding.version2.Group) + public void addGroup( + final int index, + final jalview.schemabinding.version2.Group vGroup) + throws java.lang.IndexOutOfBoundsException { + this._groupList.add(index, vGroup); + } /** - * Method addSetting - * * * * @param vSetting + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addSetting(jalview.schemabinding.version2.Setting vSetting) - throws java.lang.IndexOutOfBoundsException - { - _settingList.addElement(vSetting); - } //-- void addSetting(jalview.schemabinding.version2.Setting) + public void addSetting( + final jalview.schemabinding.version2.Setting vSetting) + throws java.lang.IndexOutOfBoundsException { + this._settingList.addElement(vSetting); + } /** - * Method addSetting - * * * * @param index * @param vSetting + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addSetting(int index, jalview.schemabinding.version2.Setting vSetting) - throws java.lang.IndexOutOfBoundsException - { - _settingList.insertElementAt(vSetting, index); - } //-- void addSetting(int, jalview.schemabinding.version2.Setting) + public void addSetting( + final int index, + final jalview.schemabinding.version2.Setting vSetting) + throws java.lang.IndexOutOfBoundsException { + this._settingList.add(index, vSetting); + } /** - * Method enumerateGroup + * Method enumerateGroup. * - * - * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.Group elements */ - public java.util.Enumeration enumerateGroup() - { - return _groupList.elements(); - } //-- java.util.Enumeration enumerateGroup() + public java.util.Enumeration enumerateGroup( + ) { + return this._groupList.elements(); + } /** - * Method enumerateSetting - * + * Method enumerateSetting. * - * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.Setting elements */ - public java.util.Enumeration enumerateSetting() - { - return _settingList.elements(); - } //-- java.util.Enumeration enumerateSetting() + public java.util.Enumeration enumerateSetting( + ) { + return this._settingList.elements(); + } /** - * Method getGroup - * - * + * Method getGroup. * * @param index - * @return Group + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.Group at the given index */ - public jalview.schemabinding.version2.Group getGroup(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _groupList.size())) { - throw new IndexOutOfBoundsException(); + public jalview.schemabinding.version2.Group getGroup( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._groupList.size()) { + throw new IndexOutOfBoundsException("getGroup: Index value '" + index + "' not in range [0.." + (this._groupList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.Group) _groupList.elementAt(index); - } //-- jalview.schemabinding.version2.Group getGroup(int) + return (jalview.schemabinding.version2.Group) _groupList.get(index); + } /** - * Method getGroup + * Method getGroup.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 Group + * @return this collection as an Array */ - public jalview.schemabinding.version2.Group[] getGroup() - { - int size = _groupList.size(); - jalview.schemabinding.version2.Group[] mArray = new jalview.schemabinding.version2.Group[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.Group) _groupList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Group[] getGroup() + public jalview.schemabinding.version2.Group[] getGroup( + ) { + jalview.schemabinding.version2.Group[] array = new jalview.schemabinding.version2.Group[0]; + return (jalview.schemabinding.version2.Group[]) this._groupList.toArray(array); + } /** - * Method getGroupCount + * Method getGroupCount. * - * - * - * @return int + * @return the size of this collection */ - public int getGroupCount() - { - return _groupList.size(); - } //-- int getGroupCount() + public int getGroupCount( + ) { + return this._groupList.size(); + } /** - * Method getSetting - * - * + * Method getSetting. * * @param index - * @return Setting + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.Setting at the given index */ - public jalview.schemabinding.version2.Setting getSetting(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _settingList.size())) { - throw new IndexOutOfBoundsException(); + public jalview.schemabinding.version2.Setting getSetting( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._settingList.size()) { + throw new IndexOutOfBoundsException("getSetting: Index value '" + index + "' not in range [0.." + (this._settingList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.Setting) _settingList.elementAt(index); - } //-- jalview.schemabinding.version2.Setting getSetting(int) + return (jalview.schemabinding.version2.Setting) _settingList.get(index); + } /** - * Method getSetting + * Method getSetting.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 Setting + * @return this collection as an Array */ - public jalview.schemabinding.version2.Setting[] getSetting() - { - int size = _settingList.size(); - jalview.schemabinding.version2.Setting[] mArray = new jalview.schemabinding.version2.Setting[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.Setting) _settingList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Setting[] getSetting() + public jalview.schemabinding.version2.Setting[] getSetting( + ) { + jalview.schemabinding.version2.Setting[] array = new jalview.schemabinding.version2.Setting[0]; + return (jalview.schemabinding.version2.Setting[]) this._settingList.toArray(array); + } /** - * Method getSettingCount + * Method getSettingCount. * - * - * - * @return int + * @return the size of this collection */ - public int getSettingCount() - { - return _settingList.size(); - } //-- int getSettingCount() + public int getSettingCount( + ) { + return this._settingList.size(); + } /** - * Method isValid - * + * Method isValid. * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllGroup - * */ - public void removeAllGroup() - { - _groupList.removeAllElements(); - } //-- void removeAllGroup() + public void removeAllGroup( + ) { + this._groupList.clear(); + } /** - * Method removeAllSetting - * */ - public void removeAllSetting() - { - _settingList.removeAllElements(); - } //-- void removeAllSetting() + public void removeAllSetting( + ) { + this._settingList.clear(); + } /** - * Method removeGroup - * + * Method removeGroup. * + * @param vGroup + * @return true if the object was removed from the collection. + */ + public boolean removeGroup( + final jalview.schemabinding.version2.Group vGroup) { + boolean removed = _groupList.remove(vGroup); + return removed; + } + + /** + * Method removeGroupAt. * * @param index - * @return Group + * @return the element removed from the collection */ - public jalview.schemabinding.version2.Group removeGroup(int index) - { - java.lang.Object obj = _groupList.elementAt(index); - _groupList.removeElementAt(index); + public jalview.schemabinding.version2.Group removeGroupAt( + final int index) { + java.lang.Object obj = this._groupList.remove(index); return (jalview.schemabinding.version2.Group) obj; - } //-- jalview.schemabinding.version2.Group removeGroup(int) + } /** - * Method removeSetting - * + * Method removeSetting. * + * @param vSetting + * @return true if the object was removed from the collection. + */ + public boolean removeSetting( + final jalview.schemabinding.version2.Setting vSetting) { + boolean removed = _settingList.remove(vSetting); + return removed; + } + + /** + * Method removeSettingAt. * * @param index - * @return Setting + * @return the element removed from the collection */ - public jalview.schemabinding.version2.Setting removeSetting(int index) - { - java.lang.Object obj = _settingList.elementAt(index); - _settingList.removeElementAt(index); + public jalview.schemabinding.version2.Setting removeSettingAt( + final int index) { + java.lang.Object obj = this._settingList.remove(index); return (jalview.schemabinding.version2.Setting) obj; - } //-- jalview.schemabinding.version2.Setting removeSetting(int) + } /** - * Method setGroup - * * * * @param index * @param vGroup + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void setGroup(int index, jalview.schemabinding.version2.Group vGroup) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _groupList.size())) { - throw new IndexOutOfBoundsException(); + public void setGroup( + final int index, + final jalview.schemabinding.version2.Group vGroup) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._groupList.size()) { + throw new IndexOutOfBoundsException("setGroup: Index value '" + index + "' not in range [0.." + (this._groupList.size() - 1) + "]"); } - _groupList.setElementAt(vGroup, index); - } //-- void setGroup(int, jalview.schemabinding.version2.Group) + + this._groupList.set(index, vGroup); + } /** - * Method setGroup * * - * - * @param groupArray + * @param vGroupArray */ - public void setGroup(jalview.schemabinding.version2.Group[] groupArray) - { + public void setGroup( + final jalview.schemabinding.version2.Group[] vGroupArray) { //-- copy array - _groupList.removeAllElements(); - for (int i = 0; i < groupArray.length; i++) { - _groupList.addElement(groupArray[i]); + _groupList.clear(); + + for (int i = 0; i < vGroupArray.length; i++) { + this._groupList.add(vGroupArray[i]); } - } //-- void setGroup(jalview.schemabinding.version2.Group) + } /** - * Method setSetting - * * * * @param index * @param vSetting + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void setSetting(int index, jalview.schemabinding.version2.Setting vSetting) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _settingList.size())) { - throw new IndexOutOfBoundsException(); + public void setSetting( + final int index, + final jalview.schemabinding.version2.Setting vSetting) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._settingList.size()) { + throw new IndexOutOfBoundsException("setSetting: Index value '" + index + "' not in range [0.." + (this._settingList.size() - 1) + "]"); } - _settingList.setElementAt(vSetting, index); - } //-- void setSetting(int, jalview.schemabinding.version2.Setting) + + this._settingList.set(index, vSetting); + } /** - * Method setSetting - * * * - * @param settingArray + * @param vSettingArray */ - public void setSetting(jalview.schemabinding.version2.Setting[] settingArray) - { + public void setSetting( + final jalview.schemabinding.version2.Setting[] vSettingArray) { //-- copy array - _settingList.removeAllElements(); - for (int i = 0; i < settingArray.length; i++) { - _settingList.addElement(settingArray[i]); + _settingList.clear(); + + for (int i = 0; i < vSettingArray.length; i++) { + this._settingList.add(vSettingArray[i]); } - } //-- void setSetting(jalview.schemabinding.version2.Setting) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.FeatureSettings */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + public static jalview.schemabinding.version2.FeatureSettings unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.FeatureSettings) Unmarshaller.unmarshal(jalview.schemabinding.version2.FeatureSettings.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/Features.java b/src/jalview/schemabinding/version2/Features.java index 72321c6..47b28a3 100755 --- a/src/jalview/schemabinding/version2/Features.java +++ b/src/jalview/schemabinding/version2/Features.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class Features. @@ -37,7 +30,7 @@ implements java.io.Serializable public Features() { super(); - } //-- jalview.schemabinding.version2.Features() + } //-----------/ @@ -45,74 +38,79 @@ implements java.io.Serializable //-----------/ /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.Featur */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (jalview.schemabinding.version2.Features) Unmarshaller.unmarshal(jalview.schemabinding.version2.Features.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + public static jalview.schemabinding.version2.Feature unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.Feature) Unmarshaller.unmarshal(jalview.schemabinding.version2.Features.class, reader); + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/Group.java b/src/jalview/schemabinding/version2/Group.java index cdb082d..826667e 100644 --- a/src/jalview/schemabinding/version2/Group.java +++ b/src/jalview/schemabinding/version2/Group.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class Group. @@ -34,12 +27,12 @@ public class Group implements java.io.Serializable { //--------------------------/ /** - * Field _name + * Field _name. */ private java.lang.String _name; /** - * Field _display + * Field _display. */ private boolean _display; @@ -55,7 +48,7 @@ public class Group implements java.io.Serializable { public Group() { super(); - } //-- jalview.schemabinding.version2.Group() + } //-----------/ @@ -63,138 +56,147 @@ public class Group implements java.io.Serializable { //-----------/ /** - * Method deleteDisplay - * */ - public void deleteDisplay() - { + public void deleteDisplay( + ) { this._has_display= false; - } //-- void deleteDisplay() + } /** * Returns the value of field 'display'. * - * @return boolean - * @return the value of field 'display'. + * @return the value of field 'Display'. */ - public boolean getDisplay() - { + public boolean getDisplay( + ) { return this._display; - } //-- boolean getDisplay() + } /** * Returns the value of field 'name'. * - * @return String - * @return the value of field 'name'. + * @return the value of field 'Name'. */ - public java.lang.String getName() - { + public java.lang.String getName( + ) { return this._name; - } //-- java.lang.String getName() + } /** - * Method hasDisplay - * + * Method hasDisplay. * - * - * @return boolean + * @return true if at least one Display has been added */ - public boolean hasDisplay() - { + public boolean hasDisplay( + ) { return this._has_display; - } //-- boolean hasDisplay() + } /** - * Method isValid - * + * Returns the value of field 'display'. * + * @return the value of field 'Display'. + */ + public boolean isDisplay( + ) { + return this._display; + } + + /** + * Method isValid. * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'display'. * * @param display the value of field 'display'. */ - public void setDisplay(boolean display) - { + public void setDisplay( + final boolean display) { this._display = display; this._has_display = true; - } //-- void setDisplay(boolean) + } /** * Sets the value of field 'name'. * * @param name the value of field 'name'. */ - public void setName(java.lang.String name) - { + public void setName( + final java.lang.String name) { this._name = name; - } //-- void setName(java.lang.String) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.Group */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + public static jalview.schemabinding.version2.Group unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.Group) Unmarshaller.unmarshal(jalview.schemabinding.version2.Group.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/HiddenColumns.java b/src/jalview/schemabinding/version2/HiddenColumns.java index 5b83e64..716bfbc 100644 --- a/src/jalview/schemabinding/version2/HiddenColumns.java +++ b/src/jalview/schemabinding/version2/HiddenColumns.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class HiddenColumns. @@ -34,7 +27,7 @@ public class HiddenColumns implements java.io.Serializable { //--------------------------/ /** - * Field _start + * Field _start. */ private int _start; @@ -44,7 +37,7 @@ public class HiddenColumns implements java.io.Serializable { private boolean _has_start; /** - * Field _end + * Field _end. */ private int _end; @@ -60,7 +53,7 @@ public class HiddenColumns implements java.io.Serializable { public HiddenColumns() { super(); - } //-- jalview.schemabinding.version2.HiddenColumns() + } //-----------/ @@ -68,160 +61,156 @@ public class HiddenColumns implements java.io.Serializable { //-----------/ /** - * Method deleteEnd - * */ - public void deleteEnd() - { + public void deleteEnd( + ) { this._has_end= false; - } //-- void deleteEnd() + } /** - * Method deleteStart - * */ - public void deleteStart() - { + public void deleteStart( + ) { this._has_start= false; - } //-- void deleteStart() + } /** * Returns the value of field 'end'. * - * @return int - * @return the value of field 'end'. + * @return the value of field 'End'. */ - public int getEnd() - { + public int getEnd( + ) { return this._end; - } //-- int getEnd() + } /** * Returns the value of field 'start'. * - * @return int - * @return the value of field 'start'. + * @return the value of field 'Start'. */ - public int getStart() - { + public int getStart( + ) { return this._start; - } //-- int getStart() + } /** - * Method hasEnd - * + * Method hasEnd. * - * - * @return boolean + * @return true if at least one End has been added */ - public boolean hasEnd() - { + public boolean hasEnd( + ) { return this._has_end; - } //-- boolean hasEnd() + } /** - * Method hasStart - * + * Method hasStart. * - * - * @return boolean + * @return true if at least one Start has been added */ - public boolean hasStart() - { + public boolean hasStart( + ) { return this._has_start; - } //-- boolean hasStart() + } /** - * Method isValid - * + * Method isValid. * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'end'. * * @param end the value of field 'end'. */ - public void setEnd(int end) - { + public void setEnd( + final int end) { this._end = end; this._has_end = true; - } //-- void setEnd(int) + } /** * Sets the value of field 'start'. * * @param start the value of field 'start'. */ - public void setStart(int start) - { + public void setStart( + final int start) { this._start = start; this._has_start = true; - } //-- void setStart(int) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.HiddenColumns + */ + public static jalview.schemabinding.version2.HiddenColumns unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.HiddenColumns) Unmarshaller.unmarshal(jalview.schemabinding.version2.HiddenColumns.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/JGroup.java b/src/jalview/schemabinding/version2/JGroup.java index 06eb940..86458e6 100755 --- a/src/jalview/schemabinding/version2/JGroup.java +++ b/src/jalview/schemabinding/version2/JGroup.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class JGroup. @@ -36,7 +27,7 @@ public class JGroup implements java.io.Serializable { //--------------------------/ /** - * Field _start + * Field _start. */ private int _start; @@ -46,7 +37,7 @@ public class JGroup implements java.io.Serializable { private boolean _has_start; /** - * Field _end + * Field _end. */ private int _end; @@ -56,17 +47,17 @@ public class JGroup implements java.io.Serializable { private boolean _has_end; /** - * Field _name + * Field _name. */ private java.lang.String _name; /** - * Field _colour + * Field _colour. */ private java.lang.String _colour; /** - * Field _consThreshold + * Field _consThreshold. */ private int _consThreshold; @@ -76,7 +67,7 @@ public class JGroup implements java.io.Serializable { private boolean _has_consThreshold; /** - * Field _pidThreshold + * Field _pidThreshold. */ private int _pidThreshold; @@ -86,7 +77,7 @@ public class JGroup implements java.io.Serializable { private boolean _has_pidThreshold; /** - * Field _outlineColour + * Field _outlineColour. */ private int _outlineColour; @@ -96,7 +87,7 @@ public class JGroup implements java.io.Serializable { private boolean _has_outlineColour; /** - * Field _displayBoxes + * Field _displayBoxes. */ private boolean _displayBoxes; @@ -106,7 +97,7 @@ public class JGroup implements java.io.Serializable { private boolean _has_displayBoxes; /** - * Field _displayText + * Field _displayText. */ private boolean _displayText; @@ -116,7 +107,7 @@ public class JGroup implements java.io.Serializable { private boolean _has_displayText; /** - * Field _colourText + * Field _colourText. */ private boolean _colourText; @@ -126,7 +117,7 @@ public class JGroup implements java.io.Serializable { private boolean _has_colourText; /** - * Field _textCol1 + * Field _textCol1. */ private int _textCol1; @@ -136,7 +127,7 @@ public class JGroup implements java.io.Serializable { private boolean _has_textCol1; /** - * Field _textCol2 + * Field _textCol2. */ private int _textCol2; @@ -146,7 +137,7 @@ public class JGroup implements java.io.Serializable { private boolean _has_textCol2; /** - * Field _textColThreshold + * Field _textColThreshold. */ private int _textColThreshold; @@ -156,7 +147,7 @@ public class JGroup implements java.io.Serializable { private boolean _has_textColThreshold; /** - * Field _seqList + * Field _seqList. */ private java.util.Vector _seqList; @@ -167,8 +158,8 @@ public class JGroup implements java.io.Serializable { public JGroup() { super(); - _seqList = new Vector(); - } //-- jalview.schemabinding.version2.JGroup() + this._seqList = new java.util.Vector(); + } //-----------/ @@ -176,734 +167,717 @@ public class JGroup implements java.io.Serializable { //-----------/ /** - * Method addSeq - * * * * @param vSeq + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addSeq(int vSeq) - throws java.lang.IndexOutOfBoundsException - { - _seqList.addElement(new java.lang.Integer(vSeq)); - } //-- void addSeq(int) + public void addSeq( + final int vSeq) + throws java.lang.IndexOutOfBoundsException { + this._seqList.addElement(new java.lang.Integer(vSeq)); + } /** - * Method addSeq - * * * * @param index * @param vSeq + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addSeq(int index, int vSeq) - throws java.lang.IndexOutOfBoundsException - { - _seqList.insertElementAt(new java.lang.Integer(vSeq), index); - } //-- void addSeq(int, int) + public void addSeq( + final int index, + final int vSeq) + throws java.lang.IndexOutOfBoundsException { + this._seqList.add(index, new java.lang.Integer(vSeq)); + } /** - * Method deleteColourText - * */ - public void deleteColourText() - { + public void deleteColourText( + ) { this._has_colourText= false; - } //-- void deleteColourText() + } /** - * Method deleteConsThreshold - * */ - public void deleteConsThreshold() - { + public void deleteConsThreshold( + ) { this._has_consThreshold= false; - } //-- void deleteConsThreshold() + } /** - * Method deleteDisplayBoxes - * */ - public void deleteDisplayBoxes() - { + public void deleteDisplayBoxes( + ) { this._has_displayBoxes= false; - } //-- void deleteDisplayBoxes() + } /** - * Method deleteDisplayText - * */ - public void deleteDisplayText() - { + public void deleteDisplayText( + ) { this._has_displayText= false; - } //-- void deleteDisplayText() + } /** - * Method deleteEnd - * */ - public void deleteEnd() - { + public void deleteEnd( + ) { this._has_end= false; - } //-- void deleteEnd() + } /** - * Method deleteOutlineColour - * */ - public void deleteOutlineColour() - { + public void deleteOutlineColour( + ) { this._has_outlineColour= false; - } //-- void deleteOutlineColour() + } /** - * Method deletePidThreshold - * */ - public void deletePidThreshold() - { + public void deletePidThreshold( + ) { this._has_pidThreshold= false; - } //-- void deletePidThreshold() + } /** - * Method deleteStart - * */ - public void deleteStart() - { + public void deleteStart( + ) { this._has_start= false; - } //-- void deleteStart() + } /** - * Method deleteTextCol1 - * */ - public void deleteTextCol1() - { + public void deleteTextCol1( + ) { this._has_textCol1= false; - } //-- void deleteTextCol1() + } /** - * Method deleteTextCol2 - * */ - public void deleteTextCol2() - { + public void deleteTextCol2( + ) { this._has_textCol2= false; - } //-- void deleteTextCol2() + } /** - * Method deleteTextColThreshold - * */ - public void deleteTextColThreshold() - { + public void deleteTextColThreshold( + ) { this._has_textColThreshold= false; - } //-- void deleteTextColThreshold() + } /** - * Method enumerateSeq - * + * Method enumerateSeq. * - * - * @return Enumeration + * @return an Enumeration over all int elements */ - public java.util.Enumeration enumerateSeq() - { - return _seqList.elements(); - } //-- java.util.Enumeration enumerateSeq() + public java.util.Enumeration enumerateSeq( + ) { + return this._seqList.elements(); + } /** * Returns the value of field 'colour'. * - * @return String - * @return the value of field 'colour'. + * @return the value of field 'Colour'. */ - public java.lang.String getColour() - { + public java.lang.String getColour( + ) { return this._colour; - } //-- java.lang.String getColour() + } /** * Returns the value of field 'colourText'. * - * @return boolean - * @return the value of field 'colourText'. + * @return the value of field 'ColourText'. */ - public boolean getColourText() - { + public boolean getColourText( + ) { return this._colourText; - } //-- boolean getColourText() + } /** * Returns the value of field 'consThreshold'. * - * @return int - * @return the value of field 'consThreshold'. + * @return the value of field 'ConsThreshold'. */ - public int getConsThreshold() - { + public int getConsThreshold( + ) { return this._consThreshold; - } //-- int getConsThreshold() + } /** * Returns the value of field 'displayBoxes'. * - * @return boolean - * @return the value of field 'displayBoxes'. + * @return the value of field 'DisplayBoxes'. */ - public boolean getDisplayBoxes() - { + public boolean getDisplayBoxes( + ) { return this._displayBoxes; - } //-- boolean getDisplayBoxes() + } /** * Returns the value of field 'displayText'. * - * @return boolean - * @return the value of field 'displayText'. + * @return the value of field 'DisplayText'. */ - public boolean getDisplayText() - { + public boolean getDisplayText( + ) { return this._displayText; - } //-- boolean getDisplayText() + } /** * Returns the value of field 'end'. * - * @return int - * @return the value of field 'end'. + * @return the value of field 'End'. */ - public int getEnd() - { + public int getEnd( + ) { return this._end; - } //-- int getEnd() + } /** * Returns the value of field 'name'. * - * @return String - * @return the value of field 'name'. + * @return the value of field 'Name'. */ - public java.lang.String getName() - { + public java.lang.String getName( + ) { return this._name; - } //-- java.lang.String getName() + } /** * Returns the value of field 'outlineColour'. * - * @return int - * @return the value of field 'outlineColour'. + * @return the value of field 'OutlineColour'. */ - public int getOutlineColour() - { + public int getOutlineColour( + ) { return this._outlineColour; - } //-- int getOutlineColour() + } /** * Returns the value of field 'pidThreshold'. * - * @return int - * @return the value of field 'pidThreshold'. + * @return the value of field 'PidThreshold'. */ - public int getPidThreshold() - { + public int getPidThreshold( + ) { return this._pidThreshold; - } //-- int getPidThreshold() + } /** - * Method getSeq - * - * + * Method getSeq. * * @param index - * @return int - */ - public int getSeq(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _seqList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the int at the given index + */ + public int getSeq( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._seqList.size()) { + throw new IndexOutOfBoundsException("getSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]"); } - return ((java.lang.Integer)_seqList.elementAt(index)).intValue(); - } //-- int getSeq(int) + return ((java.lang.Integer) _seqList.get(index)).intValue(); + } /** - * Method getSeq - * - * + * Method getSeq.Returns the contents of the collection in an + * Array. * - * @return int + * @return this collection as an Array */ - public int[] getSeq() - { - int size = _seqList.size(); - int[] mArray = new int[size]; + public int[] getSeq( + ) { + int size = this._seqList.size(); + int[] array = new int[size]; + java.util.Iterator iter = _seqList.iterator(); for (int index = 0; index < size; index++) { - mArray[index] = ((java.lang.Integer)_seqList.elementAt(index)).intValue(); + array[index] = ((java.lang.Integer) iter.next()).intValue(); } - return mArray; - } //-- int[] getSeq() + return array; + } /** - * Method getSeqCount - * - * + * Method getSeqCount. * - * @return int + * @return the size of this collection */ - public int getSeqCount() - { - return _seqList.size(); - } //-- int getSeqCount() + public int getSeqCount( + ) { + return this._seqList.size(); + } /** * Returns the value of field 'start'. * - * @return int - * @return the value of field 'start'. + * @return the value of field 'Start'. */ - public int getStart() - { + public int getStart( + ) { return this._start; - } //-- int getStart() + } /** * Returns the value of field 'textCol1'. * - * @return int - * @return the value of field 'textCol1'. + * @return the value of field 'TextCol1'. */ - public int getTextCol1() - { + public int getTextCol1( + ) { return this._textCol1; - } //-- int getTextCol1() + } /** * Returns the value of field 'textCol2'. * - * @return int - * @return the value of field 'textCol2'. + * @return the value of field 'TextCol2'. */ - public int getTextCol2() - { + public int getTextCol2( + ) { return this._textCol2; - } //-- int getTextCol2() + } /** * Returns the value of field 'textColThreshold'. * - * @return int - * @return the value of field 'textColThreshold'. + * @return the value of field 'TextColThreshold'. */ - public int getTextColThreshold() - { + public int getTextColThreshold( + ) { return this._textColThreshold; - } //-- int getTextColThreshold() + } /** - * Method hasColourText + * Method hasColourText. * - * - * - * @return boolean + * @return true if at least one ColourText has been added */ - public boolean hasColourText() - { + public boolean hasColourText( + ) { return this._has_colourText; - } //-- boolean hasColourText() + } /** - * Method hasConsThreshold - * + * Method hasConsThreshold. * - * - * @return boolean + * @return true if at least one ConsThreshold has been added */ - public boolean hasConsThreshold() - { + public boolean hasConsThreshold( + ) { return this._has_consThreshold; - } //-- boolean hasConsThreshold() + } /** - * Method hasDisplayBoxes - * + * Method hasDisplayBoxes. * - * - * @return boolean + * @return true if at least one DisplayBoxes has been added */ - public boolean hasDisplayBoxes() - { + public boolean hasDisplayBoxes( + ) { return this._has_displayBoxes; - } //-- boolean hasDisplayBoxes() + } /** - * Method hasDisplayText - * - * + * Method hasDisplayText. * - * @return boolean + * @return true if at least one DisplayText has been added */ - public boolean hasDisplayText() - { + public boolean hasDisplayText( + ) { return this._has_displayText; - } //-- boolean hasDisplayText() + } /** - * Method hasEnd - * - * + * Method hasEnd. * - * @return boolean + * @return true if at least one End has been added */ - public boolean hasEnd() - { + public boolean hasEnd( + ) { return this._has_end; - } //-- boolean hasEnd() + } /** - * Method hasOutlineColour + * Method hasOutlineColour. * - * - * - * @return boolean + * @return true if at least one OutlineColour has been added */ - public boolean hasOutlineColour() - { + public boolean hasOutlineColour( + ) { return this._has_outlineColour; - } //-- boolean hasOutlineColour() + } /** - * Method hasPidThreshold - * + * Method hasPidThreshold. * - * - * @return boolean + * @return true if at least one PidThreshold has been added */ - public boolean hasPidThreshold() - { + public boolean hasPidThreshold( + ) { return this._has_pidThreshold; - } //-- boolean hasPidThreshold() + } /** - * Method hasStart - * + * Method hasStart. * - * - * @return boolean + * @return true if at least one Start has been added */ - public boolean hasStart() - { + public boolean hasStart( + ) { return this._has_start; - } //-- boolean hasStart() + } /** - * Method hasTextCol1 - * - * + * Method hasTextCol1. * - * @return boolean + * @return true if at least one TextCol1 has been added */ - public boolean hasTextCol1() - { + public boolean hasTextCol1( + ) { return this._has_textCol1; - } //-- boolean hasTextCol1() + } /** - * Method hasTextCol2 - * - * + * Method hasTextCol2. * - * @return boolean + * @return true if at least one TextCol2 has been added */ - public boolean hasTextCol2() - { + public boolean hasTextCol2( + ) { return this._has_textCol2; - } //-- boolean hasTextCol2() + } /** - * Method hasTextColThreshold + * Method hasTextColThreshold. * - * - * - * @return boolean + * @return true if at least one TextColThreshold has been added */ - public boolean hasTextColThreshold() - { + public boolean hasTextColThreshold( + ) { return this._has_textColThreshold; - } //-- boolean hasTextColThreshold() + } + + /** + * Returns the value of field 'colourText'. + * + * @return the value of field 'ColourText'. + */ + public boolean isColourText( + ) { + return this._colourText; + } /** - * Method isValid + * Returns the value of field 'displayBoxes'. * + * @return the value of field 'DisplayBoxes'. + */ + public boolean isDisplayBoxes( + ) { + return this._displayBoxes; + } + + /** + * Returns the value of field 'displayText'. * + * @return the value of field 'DisplayText'. + */ + public boolean isDisplayText( + ) { + return this._displayText; + } + + /** + * Method isValid. * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllSeq - * */ - public void removeAllSeq() - { - _seqList.removeAllElements(); - } //-- void removeAllSeq() + public void removeAllSeq( + ) { + this._seqList.clear(); + } /** - * Method removeSeq - * + * Method removeSeq. * + * @param vSeq + * @return true if the object was removed from the collection. + */ + public boolean removeSeq( + final int vSeq) { + boolean removed = _seqList.remove(new java.lang.Integer(vSeq)); + return removed; + } + + /** + * Method removeSeqAt. * * @param index - * @return int + * @return the element removed from the collection */ - public int removeSeq(int index) - { - java.lang.Object obj = _seqList.elementAt(index); - _seqList.removeElementAt(index); - return ((java.lang.Integer)obj).intValue(); - } //-- int removeSeq(int) + public int removeSeqAt( + final int index) { + java.lang.Object obj = this._seqList.remove(index); + return ((java.lang.Integer) obj).intValue(); + } /** * Sets the value of field 'colour'. * * @param colour the value of field 'colour'. */ - public void setColour(java.lang.String colour) - { + public void setColour( + final java.lang.String colour) { this._colour = colour; - } //-- void setColour(java.lang.String) + } /** * Sets the value of field 'colourText'. * * @param colourText the value of field 'colourText'. */ - public void setColourText(boolean colourText) - { + public void setColourText( + final boolean colourText) { this._colourText = colourText; this._has_colourText = true; - } //-- void setColourText(boolean) + } /** * Sets the value of field 'consThreshold'. * * @param consThreshold the value of field 'consThreshold'. */ - public void setConsThreshold(int consThreshold) - { + public void setConsThreshold( + final int consThreshold) { this._consThreshold = consThreshold; this._has_consThreshold = true; - } //-- void setConsThreshold(int) + } /** * Sets the value of field 'displayBoxes'. * * @param displayBoxes the value of field 'displayBoxes'. */ - public void setDisplayBoxes(boolean displayBoxes) - { + public void setDisplayBoxes( + final boolean displayBoxes) { this._displayBoxes = displayBoxes; this._has_displayBoxes = true; - } //-- void setDisplayBoxes(boolean) + } /** * Sets the value of field 'displayText'. * * @param displayText the value of field 'displayText'. */ - public void setDisplayText(boolean displayText) - { + public void setDisplayText( + final boolean displayText) { this._displayText = displayText; this._has_displayText = true; - } //-- void setDisplayText(boolean) + } /** * Sets the value of field 'end'. * * @param end the value of field 'end'. */ - public void setEnd(int end) - { + public void setEnd( + final int end) { this._end = end; this._has_end = true; - } //-- void setEnd(int) + } /** * Sets the value of field 'name'. * * @param name the value of field 'name'. */ - public void setName(java.lang.String name) - { + public void setName( + final java.lang.String name) { this._name = name; - } //-- void setName(java.lang.String) + } /** * Sets the value of field 'outlineColour'. * * @param outlineColour the value of field 'outlineColour'. */ - public void setOutlineColour(int outlineColour) - { + public void setOutlineColour( + final int outlineColour) { this._outlineColour = outlineColour; this._has_outlineColour = true; - } //-- void setOutlineColour(int) + } /** * Sets the value of field 'pidThreshold'. * * @param pidThreshold the value of field 'pidThreshold'. */ - public void setPidThreshold(int pidThreshold) - { + public void setPidThreshold( + final int pidThreshold) { this._pidThreshold = pidThreshold; this._has_pidThreshold = true; - } //-- void setPidThreshold(int) + } /** - * Method setSeq - * * * * @param index * @param vSeq - */ - public void setSeq(int index, int vSeq) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _seqList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setSeq( + final int index, + final int vSeq) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._seqList.size()) { + throw new IndexOutOfBoundsException("setSeq: Index value '" + index + "' not in range [0.." + (this._seqList.size() - 1) + "]"); } - _seqList.setElementAt(new java.lang.Integer(vSeq), index); - } //-- void setSeq(int, int) + + this._seqList.set(index, new java.lang.Integer(vSeq)); + } /** - * Method setSeq - * * * - * @param seqArray + * @param vSeqArray */ - public void setSeq(int[] seqArray) - { + public void setSeq( + final int[] vSeqArray) { //-- copy array - _seqList.removeAllElements(); - for (int i = 0; i < seqArray.length; i++) { - _seqList.addElement(new java.lang.Integer(seqArray[i])); + _seqList.clear(); + + for (int i = 0; i < vSeqArray.length; i++) { + this._seqList.add(new java.lang.Integer(vSeqArray[i])); } - } //-- void setSeq(int) + } /** * Sets the value of field 'start'. * * @param start the value of field 'start'. */ - public void setStart(int start) - { + public void setStart( + final int start) { this._start = start; this._has_start = true; - } //-- void setStart(int) + } /** * Sets the value of field 'textCol1'. * * @param textCol1 the value of field 'textCol1'. */ - public void setTextCol1(int textCol1) - { + public void setTextCol1( + final int textCol1) { this._textCol1 = textCol1; this._has_textCol1 = true; - } //-- void setTextCol1(int) + } /** * Sets the value of field 'textCol2'. * * @param textCol2 the value of field 'textCol2'. */ - public void setTextCol2(int textCol2) - { + public void setTextCol2( + final int textCol2) { this._textCol2 = textCol2; this._has_textCol2 = true; - } //-- void setTextCol2(int) + } /** * Sets the value of field 'textColThreshold'. * * @param textColThreshold the value of field 'textColThreshold' */ - public void setTextColThreshold(int textColThreshold) - { + public void setTextColThreshold( + final int textColThreshold) { this._textColThreshold = textColThreshold; this._has_textColThreshold = true; - } //-- void setTextColThreshold(int) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.JGroup + */ + public static jalview.schemabinding.version2.JGroup unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.JGroup) Unmarshaller.unmarshal(jalview.schemabinding.version2.JGroup.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/JSeq.java b/src/jalview/schemabinding/version2/JSeq.java index 19e2e6d..9010829 100755 --- a/src/jalview/schemabinding/version2/JSeq.java +++ b/src/jalview/schemabinding/version2/JSeq.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class JSeq. @@ -36,7 +27,7 @@ public class JSeq implements java.io.Serializable { //--------------------------/ /** - * Field _colour + * Field _colour. */ private int _colour; @@ -46,7 +37,7 @@ public class JSeq implements java.io.Serializable { private boolean _has_colour; /** - * Field _start + * Field _start. */ private int _start; @@ -56,7 +47,7 @@ public class JSeq implements java.io.Serializable { private boolean _has_start; /** - * Field _end + * Field _end. */ private int _end; @@ -66,7 +57,7 @@ public class JSeq implements java.io.Serializable { private boolean _has_end; /** - * Field _id + * Field _id. */ private int _id; @@ -76,7 +67,7 @@ public class JSeq implements java.io.Serializable { private boolean _has_id; /** - * Field _hidden + * Field _hidden. */ private boolean _hidden; @@ -86,17 +77,17 @@ public class JSeq implements java.io.Serializable { private boolean _has_hidden; /** - * Field _featuresList + * Field _featuresList. */ private java.util.Vector _featuresList; /** - * Field _pdbidsList + * Field _pdbidsList. */ private java.util.Vector _pdbidsList; /** - * Field _hiddenSequencesList + * Field _hiddenSequencesList. */ private java.util.Vector _hiddenSequencesList; @@ -107,10 +98,10 @@ public class JSeq implements java.io.Serializable { public JSeq() { super(); - _featuresList = new Vector(); - _pdbidsList = new Vector(); - _hiddenSequencesList = new Vector(); - } //-- jalview.schemabinding.version2.JSeq() + this._featuresList = new java.util.Vector(); + this._pdbidsList = new java.util.Vector(); + this._hiddenSequencesList = new java.util.Vector(); + } //-----------/ @@ -118,724 +109,729 @@ public class JSeq implements java.io.Serializable { //-----------/ /** - * Method addFeatures - * * * * @param vFeatures + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addFeatures(jalview.schemabinding.version2.Features vFeatures) - throws java.lang.IndexOutOfBoundsException - { - _featuresList.addElement(vFeatures); - } //-- void addFeatures(jalview.schemabinding.version2.Features) + public void addFeatures( + final jalview.schemabinding.version2.Features vFeatures) + throws java.lang.IndexOutOfBoundsException { + this._featuresList.addElement(vFeatures); + } /** - * Method addFeatures - * * * * @param index * @param vFeatures + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addFeatures(int index, jalview.schemabinding.version2.Features vFeatures) - throws java.lang.IndexOutOfBoundsException - { - _featuresList.insertElementAt(vFeatures, index); - } //-- void addFeatures(int, jalview.schemabinding.version2.Features) + public void addFeatures( + final int index, + final jalview.schemabinding.version2.Features vFeatures) + throws java.lang.IndexOutOfBoundsException { + this._featuresList.add(index, vFeatures); + } /** - * Method addHiddenSequences - * * * * @param vHiddenSequences + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addHiddenSequences(int vHiddenSequences) - throws java.lang.IndexOutOfBoundsException - { - _hiddenSequencesList.addElement(new java.lang.Integer(vHiddenSequences)); - } //-- void addHiddenSequences(int) + public void addHiddenSequences( + final int vHiddenSequences) + throws java.lang.IndexOutOfBoundsException { + this._hiddenSequencesList.addElement(new java.lang.Integer(vHiddenSequences)); + } /** - * Method addHiddenSequences - * * * * @param index * @param vHiddenSequences + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addHiddenSequences(int index, int vHiddenSequences) - throws java.lang.IndexOutOfBoundsException - { - _hiddenSequencesList.insertElementAt(new java.lang.Integer(vHiddenSequences), index); - } //-- void addHiddenSequences(int, int) + public void addHiddenSequences( + final int index, + final int vHiddenSequences) + throws java.lang.IndexOutOfBoundsException { + this._hiddenSequencesList.add(index, new java.lang.Integer(vHiddenSequences)); + } /** - * Method addPdbids - * * * * @param vPdbids + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addPdbids(jalview.schemabinding.version2.Pdbids vPdbids) - throws java.lang.IndexOutOfBoundsException - { - _pdbidsList.addElement(vPdbids); - } //-- void addPdbids(jalview.schemabinding.version2.Pdbids) + public void addPdbids( + final jalview.schemabinding.version2.Pdbids vPdbids) + throws java.lang.IndexOutOfBoundsException { + this._pdbidsList.addElement(vPdbids); + } /** - * Method addPdbids - * * * * @param index * @param vPdbids + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addPdbids(int index, jalview.schemabinding.version2.Pdbids vPdbids) - throws java.lang.IndexOutOfBoundsException - { - _pdbidsList.insertElementAt(vPdbids, index); - } //-- void addPdbids(int, jalview.schemabinding.version2.Pdbids) + public void addPdbids( + final int index, + final jalview.schemabinding.version2.Pdbids vPdbids) + throws java.lang.IndexOutOfBoundsException { + this._pdbidsList.add(index, vPdbids); + } /** - * Method deleteColour - * */ - public void deleteColour() - { + public void deleteColour( + ) { this._has_colour= false; - } //-- void deleteColour() + } /** - * Method deleteEnd - * */ - public void deleteEnd() - { + public void deleteEnd( + ) { this._has_end= false; - } //-- void deleteEnd() + } /** - * Method deleteHidden - * */ - public void deleteHidden() - { + public void deleteHidden( + ) { this._has_hidden= false; - } //-- void deleteHidden() + } /** - * Method deleteId - * */ - public void deleteId() - { + public void deleteId( + ) { this._has_id= false; - } //-- void deleteId() + } /** - * Method deleteStart - * */ - public void deleteStart() - { + public void deleteStart( + ) { this._has_start= false; - } //-- void deleteStart() + } /** - * Method enumerateFeatures - * - * + * Method enumerateFeatures. * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.Features elements */ - public java.util.Enumeration enumerateFeatures() - { - return _featuresList.elements(); - } //-- java.util.Enumeration enumerateFeatures() + public java.util.Enumeration enumerateFeatures( + ) { + return this._featuresList.elements(); + } /** - * Method enumerateHiddenSequences + * Method enumerateHiddenSequences. * - * - * - * @return Enumeration + * @return an Enumeration over all int elements */ - public java.util.Enumeration enumerateHiddenSequences() - { - return _hiddenSequencesList.elements(); - } //-- java.util.Enumeration enumerateHiddenSequences() + public java.util.Enumeration enumerateHiddenSequences( + ) { + return this._hiddenSequencesList.elements(); + } /** - * Method enumeratePdbids - * + * Method enumeratePdbids. * - * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.Pdbids elements */ - public java.util.Enumeration enumeratePdbids() - { - return _pdbidsList.elements(); - } //-- java.util.Enumeration enumeratePdbids() + public java.util.Enumeration enumeratePdbids( + ) { + return this._pdbidsList.elements(); + } /** * Returns the value of field 'colour'. * - * @return int - * @return the value of field 'colour'. + * @return the value of field 'Colour'. */ - public int getColour() - { + public int getColour( + ) { return this._colour; - } //-- int getColour() + } /** * Returns the value of field 'end'. * - * @return int - * @return the value of field 'end'. + * @return the value of field 'End'. */ - public int getEnd() - { + public int getEnd( + ) { return this._end; - } //-- int getEnd() + } /** - * Method getFeatures - * - * + * Method getFeatures. * * @param index - * @return Features - */ - public jalview.schemabinding.version2.Features getFeatures(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _featuresList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.Features at the given index + */ + public jalview.schemabinding.version2.Features getFeatures( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._featuresList.size()) { + throw new IndexOutOfBoundsException("getFeatures: Index value '" + index + "' not in range [0.." + (this._featuresList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.Features) _featuresList.elementAt(index); - } //-- jalview.schemabinding.version2.Features getFeatures(int) + return (jalview.schemabinding.version2.Features) _featuresList.get(index); + } /** - * Method getFeatures + * Method getFeatures.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 Features + * @return this collection as an Array */ - public jalview.schemabinding.version2.Features[] getFeatures() - { - int size = _featuresList.size(); - jalview.schemabinding.version2.Features[] mArray = new jalview.schemabinding.version2.Features[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.Features) _featuresList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Features[] getFeatures() + public jalview.schemabinding.version2.Features[] getFeatures( + ) { + jalview.schemabinding.version2.Features[] array = new jalview.schemabinding.version2.Features[0]; + return (jalview.schemabinding.version2.Features[]) this._featuresList.toArray(array); + } /** - * Method getFeaturesCount - * - * + * Method getFeaturesCount. * - * @return int + * @return the size of this collection */ - public int getFeaturesCount() - { - return _featuresList.size(); - } //-- int getFeaturesCount() + public int getFeaturesCount( + ) { + return this._featuresList.size(); + } /** * Returns the value of field 'hidden'. * - * @return boolean - * @return the value of field 'hidden'. + * @return the value of field 'Hidden'. */ - public boolean getHidden() - { + public boolean getHidden( + ) { return this._hidden; - } //-- boolean getHidden() + } /** - * Method getHiddenSequences - * - * + * Method getHiddenSequences. * * @param index - * @return int - */ - public int getHiddenSequences(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _hiddenSequencesList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the int at the given index + */ + public int getHiddenSequences( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._hiddenSequencesList.size()) { + throw new IndexOutOfBoundsException("getHiddenSequences: Index value '" + index + "' not in range [0.." + (this._hiddenSequencesList.size() - 1) + "]"); } - return ((java.lang.Integer)_hiddenSequencesList.elementAt(index)).intValue(); - } //-- int getHiddenSequences(int) + return ((java.lang.Integer) _hiddenSequencesList.get(index)).intValue(); + } /** - * Method getHiddenSequences - * - * + * Method getHiddenSequences.Returns the contents of the + * collection in an Array. * - * @return int + * @return this collection as an Array */ - public int[] getHiddenSequences() - { - int size = _hiddenSequencesList.size(); - int[] mArray = new int[size]; + public int[] getHiddenSequences( + ) { + int size = this._hiddenSequencesList.size(); + int[] array = new int[size]; + java.util.Iterator iter = _hiddenSequencesList.iterator(); for (int index = 0; index < size; index++) { - mArray[index] = ((java.lang.Integer)_hiddenSequencesList.elementAt(index)).intValue(); + array[index] = ((java.lang.Integer) iter.next()).intValue(); } - return mArray; - } //-- int[] getHiddenSequences() + return array; + } /** - * Method getHiddenSequencesCount + * Method getHiddenSequencesCount. * - * - * - * @return int + * @return the size of this collection */ - public int getHiddenSequencesCount() - { - return _hiddenSequencesList.size(); - } //-- int getHiddenSequencesCount() + public int getHiddenSequencesCount( + ) { + return this._hiddenSequencesList.size(); + } /** * Returns the value of field 'id'. * - * @return int - * @return the value of field 'id'. + * @return the value of field 'Id'. */ - public int getId() - { + public int getId( + ) { return this._id; - } //-- int getId() + } /** - * Method getPdbids - * - * + * Method getPdbids. * * @param index - * @return Pdbids - */ - public jalview.schemabinding.version2.Pdbids getPdbids(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _pdbidsList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.Pdbids at the given index + */ + public jalview.schemabinding.version2.Pdbids getPdbids( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._pdbidsList.size()) { + throw new IndexOutOfBoundsException("getPdbids: Index value '" + index + "' not in range [0.." + (this._pdbidsList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.Pdbids) _pdbidsList.elementAt(index); - } //-- jalview.schemabinding.version2.Pdbids getPdbids(int) + return (jalview.schemabinding.version2.Pdbids) _pdbidsList.get(index); + } /** - * Method getPdbids - * - * + * Method getPdbids.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 Pdbids + * @return this collection as an Array */ - public jalview.schemabinding.version2.Pdbids[] getPdbids() - { - int size = _pdbidsList.size(); - jalview.schemabinding.version2.Pdbids[] mArray = new jalview.schemabinding.version2.Pdbids[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.Pdbids) _pdbidsList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Pdbids[] getPdbids() + public jalview.schemabinding.version2.Pdbids[] getPdbids( + ) { + jalview.schemabinding.version2.Pdbids[] array = new jalview.schemabinding.version2.Pdbids[0]; + return (jalview.schemabinding.version2.Pdbids[]) this._pdbidsList.toArray(array); + } /** - * Method getPdbidsCount - * + * Method getPdbidsCount. * - * - * @return int + * @return the size of this collection */ - public int getPdbidsCount() - { - return _pdbidsList.size(); - } //-- int getPdbidsCount() + public int getPdbidsCount( + ) { + return this._pdbidsList.size(); + } /** * Returns the value of field 'start'. * - * @return int - * @return the value of field 'start'. + * @return the value of field 'Start'. */ - public int getStart() - { + public int getStart( + ) { return this._start; - } //-- int getStart() + } /** - * Method hasColour - * - * + * Method hasColour. * - * @return boolean + * @return true if at least one Colour has been added */ - public boolean hasColour() - { + public boolean hasColour( + ) { return this._has_colour; - } //-- boolean hasColour() + } /** - * Method hasEnd + * Method hasEnd. * - * - * - * @return boolean + * @return true if at least one End has been added */ - public boolean hasEnd() - { + public boolean hasEnd( + ) { return this._has_end; - } //-- boolean hasEnd() + } /** - * Method hasHidden - * + * Method hasHidden. * - * - * @return boolean + * @return true if at least one Hidden has been added */ - public boolean hasHidden() - { + public boolean hasHidden( + ) { return this._has_hidden; - } //-- boolean hasHidden() + } /** - * Method hasId - * - * + * Method hasId. * - * @return boolean + * @return true if at least one Id has been added */ - public boolean hasId() - { + public boolean hasId( + ) { return this._has_id; - } //-- boolean hasId() + } /** - * Method hasStart + * Method hasStart. * - * - * - * @return boolean + * @return true if at least one Start has been added */ - public boolean hasStart() - { + public boolean hasStart( + ) { return this._has_start; - } //-- boolean hasStart() + } /** - * Method isValid - * + * Returns the value of field 'hidden'. * + * @return the value of field 'Hidden'. + */ + public boolean isHidden( + ) { + return this._hidden; + } + + /** + * Method isValid. * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllFeatures - * */ - public void removeAllFeatures() - { - _featuresList.removeAllElements(); - } //-- void removeAllFeatures() + public void removeAllFeatures( + ) { + this._featuresList.clear(); + } /** - * Method removeAllHiddenSequences - * */ - public void removeAllHiddenSequences() - { - _hiddenSequencesList.removeAllElements(); - } //-- void removeAllHiddenSequences() + public void removeAllHiddenSequences( + ) { + this._hiddenSequencesList.clear(); + } /** - * Method removeAllPdbids - * */ - public void removeAllPdbids() - { - _pdbidsList.removeAllElements(); - } //-- void removeAllPdbids() + public void removeAllPdbids( + ) { + this._pdbidsList.clear(); + } /** - * Method removeFeatures - * + * Method removeFeatures. * + * @param vFeatures + * @return true if the object was removed from the collection. + */ + public boolean removeFeatures( + final jalview.schemabinding.version2.Features vFeatures) { + boolean removed = _featuresList.remove(vFeatures); + return removed; + } + + /** + * Method removeFeaturesAt. * * @param index - * @return Features + * @return the element removed from the collection */ - public jalview.schemabinding.version2.Features removeFeatures(int index) - { - java.lang.Object obj = _featuresList.elementAt(index); - _featuresList.removeElementAt(index); + public jalview.schemabinding.version2.Features removeFeaturesAt( + final int index) { + java.lang.Object obj = this._featuresList.remove(index); return (jalview.schemabinding.version2.Features) obj; - } //-- jalview.schemabinding.version2.Features removeFeatures(int) + } /** - * Method removeHiddenSequences - * + * Method removeHiddenSequences. * + * @param vHiddenSequences + * @return true if the object was removed from the collection. + */ + public boolean removeHiddenSequences( + final int vHiddenSequences) { + boolean removed = _hiddenSequencesList.remove(new java.lang.Integer(vHiddenSequences)); + return removed; + } + + /** + * Method removeHiddenSequencesAt. * * @param index - * @return int + * @return the element removed from the collection */ - public int removeHiddenSequences(int index) - { - java.lang.Object obj = _hiddenSequencesList.elementAt(index); - _hiddenSequencesList.removeElementAt(index); - return ((java.lang.Integer)obj).intValue(); - } //-- int removeHiddenSequences(int) + public int removeHiddenSequencesAt( + final int index) { + java.lang.Object obj = this._hiddenSequencesList.remove(index); + return ((java.lang.Integer) obj).intValue(); + } /** - * Method removePdbids - * + * Method removePdbids. * + * @param vPdbids + * @return true if the object was removed from the collection. + */ + public boolean removePdbids( + final jalview.schemabinding.version2.Pdbids vPdbids) { + boolean removed = _pdbidsList.remove(vPdbids); + return removed; + } + + /** + * Method removePdbidsAt. * * @param index - * @return Pdbids + * @return the element removed from the collection */ - public jalview.schemabinding.version2.Pdbids removePdbids(int index) - { - java.lang.Object obj = _pdbidsList.elementAt(index); - _pdbidsList.removeElementAt(index); + public jalview.schemabinding.version2.Pdbids removePdbidsAt( + final int index) { + java.lang.Object obj = this._pdbidsList.remove(index); return (jalview.schemabinding.version2.Pdbids) obj; - } //-- jalview.schemabinding.version2.Pdbids removePdbids(int) + } /** * Sets the value of field 'colour'. * * @param colour the value of field 'colour'. */ - public void setColour(int colour) - { + public void setColour( + final int colour) { this._colour = colour; this._has_colour = true; - } //-- void setColour(int) + } /** * Sets the value of field 'end'. * * @param end the value of field 'end'. */ - public void setEnd(int end) - { + public void setEnd( + final int end) { this._end = end; this._has_end = true; - } //-- void setEnd(int) + } /** - * Method setFeatures - * * * * @param index * @param vFeatures - */ - public void setFeatures(int index, jalview.schemabinding.version2.Features vFeatures) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _featuresList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setFeatures( + final int index, + final jalview.schemabinding.version2.Features vFeatures) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._featuresList.size()) { + throw new IndexOutOfBoundsException("setFeatures: Index value '" + index + "' not in range [0.." + (this._featuresList.size() - 1) + "]"); } - _featuresList.setElementAt(vFeatures, index); - } //-- void setFeatures(int, jalview.schemabinding.version2.Features) + + this._featuresList.set(index, vFeatures); + } /** - * Method setFeatures - * * * - * @param featuresArray + * @param vFeaturesArray */ - public void setFeatures(jalview.schemabinding.version2.Features[] featuresArray) - { + public void setFeatures( + final jalview.schemabinding.version2.Features[] vFeaturesArray) { //-- copy array - _featuresList.removeAllElements(); - for (int i = 0; i < featuresArray.length; i++) { - _featuresList.addElement(featuresArray[i]); + _featuresList.clear(); + + for (int i = 0; i < vFeaturesArray.length; i++) { + this._featuresList.add(vFeaturesArray[i]); } - } //-- void setFeatures(jalview.schemabinding.version2.Features) + } /** * Sets the value of field 'hidden'. * * @param hidden the value of field 'hidden'. */ - public void setHidden(boolean hidden) - { + public void setHidden( + final boolean hidden) { this._hidden = hidden; this._has_hidden = true; - } //-- void setHidden(boolean) + } /** - * Method setHiddenSequences - * * * * @param index * @param vHiddenSequences - */ - public void setHiddenSequences(int index, int vHiddenSequences) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _hiddenSequencesList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setHiddenSequences( + final int index, + final int vHiddenSequences) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._hiddenSequencesList.size()) { + throw new IndexOutOfBoundsException("setHiddenSequences: Index value '" + index + "' not in range [0.." + (this._hiddenSequencesList.size() - 1) + "]"); } - _hiddenSequencesList.setElementAt(new java.lang.Integer(vHiddenSequences), index); - } //-- void setHiddenSequences(int, int) + + this._hiddenSequencesList.set(index, new java.lang.Integer(vHiddenSequences)); + } /** - * Method setHiddenSequences - * * * - * @param hiddenSequencesArray + * @param vHiddenSequencesArray */ - public void setHiddenSequences(int[] hiddenSequencesArray) - { + public void setHiddenSequences( + final int[] vHiddenSequencesArray) { //-- copy array - _hiddenSequencesList.removeAllElements(); - for (int i = 0; i < hiddenSequencesArray.length; i++) { - _hiddenSequencesList.addElement(new java.lang.Integer(hiddenSequencesArray[i])); + _hiddenSequencesList.clear(); + + for (int i = 0; i < vHiddenSequencesArray.length; i++) { + this._hiddenSequencesList.add(new java.lang.Integer(vHiddenSequencesArray[i])); } - } //-- void setHiddenSequences(int) + } /** * Sets the value of field 'id'. * * @param id the value of field 'id'. */ - public void setId(int id) - { + public void setId( + final int id) { this._id = id; this._has_id = true; - } //-- void setId(int) + } /** - * Method setPdbids - * * * * @param index * @param vPdbids - */ - public void setPdbids(int index, jalview.schemabinding.version2.Pdbids vPdbids) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _pdbidsList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setPdbids( + final int index, + final jalview.schemabinding.version2.Pdbids vPdbids) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._pdbidsList.size()) { + throw new IndexOutOfBoundsException("setPdbids: Index value '" + index + "' not in range [0.." + (this._pdbidsList.size() - 1) + "]"); } - _pdbidsList.setElementAt(vPdbids, index); - } //-- void setPdbids(int, jalview.schemabinding.version2.Pdbids) + + this._pdbidsList.set(index, vPdbids); + } /** - * Method setPdbids * * - * - * @param pdbidsArray + * @param vPdbidsArray */ - public void setPdbids(jalview.schemabinding.version2.Pdbids[] pdbidsArray) - { + public void setPdbids( + final jalview.schemabinding.version2.Pdbids[] vPdbidsArray) { //-- copy array - _pdbidsList.removeAllElements(); - for (int i = 0; i < pdbidsArray.length; i++) { - _pdbidsList.addElement(pdbidsArray[i]); + _pdbidsList.clear(); + + for (int i = 0; i < vPdbidsArray.length; i++) { + this._pdbidsList.add(vPdbidsArray[i]); } - } //-- void setPdbids(jalview.schemabinding.version2.Pdbids) + } /** * Sets the value of field 'start'. * * @param start the value of field 'start'. */ - public void setStart(int start) - { + public void setStart( + final int start) { this._start = start; this._has_start = true; - } //-- void setStart(int) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.JSeq + */ + public static jalview.schemabinding.version2.JSeq unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.JSeq) Unmarshaller.unmarshal(jalview.schemabinding.version2.JSeq.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/JalviewModel.java b/src/jalview/schemabinding/version2/JalviewModel.java index fe8deef..f7e049a 100755 --- a/src/jalview/schemabinding/version2/JalviewModel.java +++ b/src/jalview/schemabinding/version2/JalviewModel.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,16 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Date; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class JalviewModel. @@ -35,22 +27,22 @@ public class JalviewModel implements java.io.Serializable { //--------------------------/ /** - * Field _creationDate + * Field _creationDate. */ private java.util.Date _creationDate; /** - * Field _version + * Field _version. */ private java.lang.String _version; /** - * Field _vamsasModel + * Field _vamsasModel. */ private jalview.schemabinding.version2.VamsasModel _vamsasModel; /** - * Field _jalviewModelSequence + * Field _jalviewModelSequence. */ private jalview.schemabinding.version2.JalviewModelSequence _jalviewModelSequence; @@ -61,7 +53,7 @@ public class JalviewModel implements java.io.Serializable { public JalviewModel() { super(); - } //-- jalview.schemabinding.version2.JalviewModel() + } //-----------/ @@ -71,102 +63,99 @@ public class JalviewModel implements java.io.Serializable { /** * Returns the value of field 'creationDate'. * - * @return Date - * @return the value of field 'creationDate'. + * @return the value of field 'CreationDate'. */ - public java.util.Date getCreationDate() - { + public java.util.Date getCreationDate( + ) { return this._creationDate; - } //-- java.util.Date getCreationDate() + } /** * Returns the value of field 'jalviewModelSequence'. * - * @return JalviewModelSequence - * @return the value of field 'jalviewModelSequence'. + * @return the value of field 'JalviewModelSequence'. */ - public jalview.schemabinding.version2.JalviewModelSequence getJalviewModelSequence() - { + public jalview.schemabinding.version2.JalviewModelSequence getJalviewModelSequence( + ) { return this._jalviewModelSequence; - } //-- jalview.schemabinding.version2.JalviewModelSequence getJalviewModelSequence() + } /** * Returns the value of field 'vamsasModel'. * - * @return VamsasModel - * @return the value of field 'vamsasModel'. + * @return the value of field 'VamsasModel'. */ - public jalview.schemabinding.version2.VamsasModel getVamsasModel() - { + public jalview.schemabinding.version2.VamsasModel getVamsasModel( + ) { return this._vamsasModel; - } //-- jalview.schemabinding.version2.VamsasModel getVamsasModel() + } /** * Returns the value of field 'version'. * - * @return String - * @return the value of field 'version'. + * @return the value of field 'Version'. */ - public java.lang.String getVersion() - { + public java.lang.String getVersion( + ) { return this._version; - } //-- java.lang.String getVersion() + } /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'creationDate'. * * @param creationDate the value of field 'creationDate'. */ - public void setCreationDate(java.util.Date creationDate) - { + public void setCreationDate( + final java.util.Date creationDate) { this._creationDate = creationDate; - } //-- void setCreationDate(java.util.Date) + } /** * Sets the value of field 'jalviewModelSequence'. @@ -174,54 +163,59 @@ public class JalviewModel implements java.io.Serializable { * @param jalviewModelSequence the value of field * 'jalviewModelSequence'. */ - public void setJalviewModelSequence(jalview.schemabinding.version2.JalviewModelSequence jalviewModelSequence) - { + public void setJalviewModelSequence( + final jalview.schemabinding.version2.JalviewModelSequence jalviewModelSequence) { this._jalviewModelSequence = jalviewModelSequence; - } //-- void setJalviewModelSequence(jalview.schemabinding.version2.JalviewModelSequence) + } /** * Sets the value of field 'vamsasModel'. * * @param vamsasModel the value of field 'vamsasModel'. */ - public void setVamsasModel(jalview.schemabinding.version2.VamsasModel vamsasModel) - { + public void setVamsasModel( + final jalview.schemabinding.version2.VamsasModel vamsasModel) { this._vamsasModel = vamsasModel; - } //-- void setVamsasModel(jalview.schemabinding.version2.VamsasModel) + } /** * Sets the value of field 'version'. * * @param version the value of field 'version'. */ - public void setVersion(java.lang.String version) - { + public void setVersion( + final java.lang.String version) { this._version = version; - } //-- void setVersion(java.lang.String) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.JalviewModel + */ + public static jalview.schemabinding.version2.JalviewModel unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.JalviewModel) Unmarshaller.unmarshal(jalview.schemabinding.version2.JalviewModel.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/JalviewModelSequence.java b/src/jalview/schemabinding/version2/JalviewModelSequence.java index 45f486b..cb66b37 100755 --- a/src/jalview/schemabinding/version2/JalviewModelSequence.java +++ b/src/jalview/schemabinding/version2/JalviewModelSequence.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class JalviewModelSequence. @@ -36,32 +27,32 @@ public class JalviewModelSequence implements java.io.Serializable { //--------------------------/ /** - * Field _JSeqList + * Field _JSeqList. */ private java.util.Vector _JSeqList; /** - * Field _JGroupList + * Field _JGroupList. */ private java.util.Vector _JGroupList; /** - * Field _viewportList + * Field _viewportList. */ private java.util.Vector _viewportList; /** - * Field _userColoursList + * Field _userColoursList. */ private java.util.Vector _userColoursList; /** - * Field _treeList + * Field _treeList. */ private java.util.Vector _treeList; /** - * Field _featureSettings + * Field _featureSettings. */ private jalview.schemabinding.version2.FeatureSettings _featureSettings; @@ -72,12 +63,12 @@ public class JalviewModelSequence implements java.io.Serializable { public JalviewModelSequence() { super(); - _JSeqList = new Vector(); - _JGroupList = new Vector(); - _viewportList = new Vector(); - _userColoursList = new Vector(); - _treeList = new Vector(); - } //-- jalview.schemabinding.version2.JalviewModelSequence() + this._JSeqList = new java.util.Vector(); + this._JGroupList = new java.util.Vector(); + this._viewportList = new java.util.Vector(); + this._userColoursList = new java.util.Vector(); + this._treeList = new java.util.Vector(); + } //-----------/ @@ -85,820 +76,850 @@ public class JalviewModelSequence implements java.io.Serializable { //-----------/ /** - * Method addJGroup - * * * * @param vJGroup + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addJGroup(jalview.schemabinding.version2.JGroup vJGroup) - throws java.lang.IndexOutOfBoundsException - { - _JGroupList.addElement(vJGroup); - } //-- void addJGroup(jalview.schemabinding.version2.JGroup) + public void addJGroup( + final jalview.schemabinding.version2.JGroup vJGroup) + throws java.lang.IndexOutOfBoundsException { + this._JGroupList.addElement(vJGroup); + } /** - * Method addJGroup - * * * * @param index * @param vJGroup + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addJGroup(int index, jalview.schemabinding.version2.JGroup vJGroup) - throws java.lang.IndexOutOfBoundsException - { - _JGroupList.insertElementAt(vJGroup, index); - } //-- void addJGroup(int, jalview.schemabinding.version2.JGroup) + public void addJGroup( + final int index, + final jalview.schemabinding.version2.JGroup vJGroup) + throws java.lang.IndexOutOfBoundsException { + this._JGroupList.add(index, vJGroup); + } /** - * Method addJSeq - * * * * @param vJSeq + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addJSeq(jalview.schemabinding.version2.JSeq vJSeq) - throws java.lang.IndexOutOfBoundsException - { - _JSeqList.addElement(vJSeq); - } //-- void addJSeq(jalview.schemabinding.version2.JSeq) + public void addJSeq( + final jalview.schemabinding.version2.JSeq vJSeq) + throws java.lang.IndexOutOfBoundsException { + this._JSeqList.addElement(vJSeq); + } /** - * Method addJSeq - * * * * @param index * @param vJSeq + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addJSeq(int index, jalview.schemabinding.version2.JSeq vJSeq) - throws java.lang.IndexOutOfBoundsException - { - _JSeqList.insertElementAt(vJSeq, index); - } //-- void addJSeq(int, jalview.schemabinding.version2.JSeq) + public void addJSeq( + final int index, + final jalview.schemabinding.version2.JSeq vJSeq) + throws java.lang.IndexOutOfBoundsException { + this._JSeqList.add(index, vJSeq); + } /** - * Method addTree - * * * * @param vTree + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addTree(jalview.schemabinding.version2.Tree vTree) - throws java.lang.IndexOutOfBoundsException - { - _treeList.addElement(vTree); - } //-- void addTree(jalview.schemabinding.version2.Tree) + public void addTree( + final jalview.schemabinding.version2.Tree vTree) + throws java.lang.IndexOutOfBoundsException { + this._treeList.addElement(vTree); + } /** - * Method addTree - * * * * @param index * @param vTree + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addTree(int index, jalview.schemabinding.version2.Tree vTree) - throws java.lang.IndexOutOfBoundsException - { - _treeList.insertElementAt(vTree, index); - } //-- void addTree(int, jalview.schemabinding.version2.Tree) + public void addTree( + final int index, + final jalview.schemabinding.version2.Tree vTree) + throws java.lang.IndexOutOfBoundsException { + this._treeList.add(index, vTree); + } /** - * Method addUserColours - * * * * @param vUserColours + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addUserColours(jalview.schemabinding.version2.UserColours vUserColours) - throws java.lang.IndexOutOfBoundsException - { - _userColoursList.addElement(vUserColours); - } //-- void addUserColours(jalview.schemabinding.version2.UserColours) + public void addUserColours( + final jalview.schemabinding.version2.UserColours vUserColours) + throws java.lang.IndexOutOfBoundsException { + this._userColoursList.addElement(vUserColours); + } /** - * Method addUserColours - * * * * @param index * @param vUserColours + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addUserColours(int index, jalview.schemabinding.version2.UserColours vUserColours) - throws java.lang.IndexOutOfBoundsException - { - _userColoursList.insertElementAt(vUserColours, index); - } //-- void addUserColours(int, jalview.schemabinding.version2.UserColours) + public void addUserColours( + final int index, + final jalview.schemabinding.version2.UserColours vUserColours) + throws java.lang.IndexOutOfBoundsException { + this._userColoursList.add(index, vUserColours); + } /** - * Method addViewport - * * * * @param vViewport + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addViewport(jalview.schemabinding.version2.Viewport vViewport) - throws java.lang.IndexOutOfBoundsException - { - _viewportList.addElement(vViewport); - } //-- void addViewport(jalview.schemabinding.version2.Viewport) + public void addViewport( + final jalview.schemabinding.version2.Viewport vViewport) + throws java.lang.IndexOutOfBoundsException { + this._viewportList.addElement(vViewport); + } /** - * Method addViewport - * * * * @param index * @param vViewport + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addViewport(int index, jalview.schemabinding.version2.Viewport vViewport) - throws java.lang.IndexOutOfBoundsException - { - _viewportList.insertElementAt(vViewport, index); - } //-- void addViewport(int, jalview.schemabinding.version2.Viewport) + public void addViewport( + final int index, + final jalview.schemabinding.version2.Viewport vViewport) + throws java.lang.IndexOutOfBoundsException { + this._viewportList.add(index, vViewport); + } /** - * Method enumerateJGroup - * - * + * Method enumerateJGroup. * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.JGroup elements */ - public java.util.Enumeration enumerateJGroup() - { - return _JGroupList.elements(); - } //-- java.util.Enumeration enumerateJGroup() + public java.util.Enumeration enumerateJGroup( + ) { + return this._JGroupList.elements(); + } /** - * Method enumerateJSeq + * Method enumerateJSeq. * - * - * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.JSeq elements */ - public java.util.Enumeration enumerateJSeq() - { - return _JSeqList.elements(); - } //-- java.util.Enumeration enumerateJSeq() + public java.util.Enumeration enumerateJSeq( + ) { + return this._JSeqList.elements(); + } /** - * Method enumerateTree - * - * + * Method enumerateTree. * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.Tree elements */ - public java.util.Enumeration enumerateTree() - { - return _treeList.elements(); - } //-- java.util.Enumeration enumerateTree() + public java.util.Enumeration enumerateTree( + ) { + return this._treeList.elements(); + } /** - * Method enumerateUserColours + * Method enumerateUserColours. * - * - * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.UserColours elements */ - public java.util.Enumeration enumerateUserColours() - { - return _userColoursList.elements(); - } //-- java.util.Enumeration enumerateUserColours() + public java.util.Enumeration enumerateUserColours( + ) { + return this._userColoursList.elements(); + } /** - * Method enumerateViewport - * - * + * Method enumerateViewport. * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.Viewport elements */ - public java.util.Enumeration enumerateViewport() - { - return _viewportList.elements(); - } //-- java.util.Enumeration enumerateViewport() + public java.util.Enumeration enumerateViewport( + ) { + return this._viewportList.elements(); + } /** * Returns the value of field 'featureSettings'. * - * @return FeatureSettings - * @return the value of field 'featureSettings'. + * @return the value of field 'FeatureSettings'. */ - public jalview.schemabinding.version2.FeatureSettings getFeatureSettings() - { + public jalview.schemabinding.version2.FeatureSettings getFeatureSettings( + ) { return this._featureSettings; - } //-- jalview.schemabinding.version2.FeatureSettings getFeatureSettings() + } /** - * Method getJGroup - * - * + * Method getJGroup. * * @param index - * @return JGroup - */ - public jalview.schemabinding.version2.JGroup getJGroup(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _JGroupList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.JGroup at the given index + */ + public jalview.schemabinding.version2.JGroup getJGroup( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._JGroupList.size()) { + throw new IndexOutOfBoundsException("getJGroup: Index value '" + index + "' not in range [0.." + (this._JGroupList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.JGroup) _JGroupList.elementAt(index); - } //-- jalview.schemabinding.version2.JGroup getJGroup(int) + return (jalview.schemabinding.version2.JGroup) _JGroupList.get(index); + } /** - * Method getJGroup - * - * + * Method getJGroup.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 JGroup + * @return this collection as an Array */ - public jalview.schemabinding.version2.JGroup[] getJGroup() - { - int size = _JGroupList.size(); - jalview.schemabinding.version2.JGroup[] mArray = new jalview.schemabinding.version2.JGroup[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.JGroup) _JGroupList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.JGroup[] getJGroup() + public jalview.schemabinding.version2.JGroup[] getJGroup( + ) { + jalview.schemabinding.version2.JGroup[] array = new jalview.schemabinding.version2.JGroup[0]; + return (jalview.schemabinding.version2.JGroup[]) this._JGroupList.toArray(array); + } /** - * Method getJGroupCount - * + * Method getJGroupCount. * - * - * @return int + * @return the size of this collection */ - public int getJGroupCount() - { - return _JGroupList.size(); - } //-- int getJGroupCount() + public int getJGroupCount( + ) { + return this._JGroupList.size(); + } /** - * Method getJSeq - * - * + * Method getJSeq. * * @param index - * @return JSeq - */ - public jalview.schemabinding.version2.JSeq getJSeq(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _JSeqList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the jalview.schemabinding.version2.JSeq + * at the given index + */ + public jalview.schemabinding.version2.JSeq getJSeq( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._JSeqList.size()) { + throw new IndexOutOfBoundsException("getJSeq: Index value '" + index + "' not in range [0.." + (this._JSeqList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.JSeq) _JSeqList.elementAt(index); - } //-- jalview.schemabinding.version2.JSeq getJSeq(int) + return (jalview.schemabinding.version2.JSeq) _JSeqList.get(index); + } /** - * Method getJSeq - * - * + * Method getJSeq.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 JSeq + * @return this collection as an Array */ - public jalview.schemabinding.version2.JSeq[] getJSeq() - { - int size = _JSeqList.size(); - jalview.schemabinding.version2.JSeq[] mArray = new jalview.schemabinding.version2.JSeq[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.JSeq) _JSeqList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.JSeq[] getJSeq() + public jalview.schemabinding.version2.JSeq[] getJSeq( + ) { + jalview.schemabinding.version2.JSeq[] array = new jalview.schemabinding.version2.JSeq[0]; + return (jalview.schemabinding.version2.JSeq[]) this._JSeqList.toArray(array); + } /** - * Method getJSeqCount - * + * Method getJSeqCount. * - * - * @return int + * @return the size of this collection */ - public int getJSeqCount() - { - return _JSeqList.size(); - } //-- int getJSeqCount() + public int getJSeqCount( + ) { + return this._JSeqList.size(); + } /** - * Method getTree - * - * + * Method getTree. * * @param index - * @return Tree - */ - public jalview.schemabinding.version2.Tree getTree(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _treeList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the jalview.schemabinding.version2.Tree + * at the given index + */ + public jalview.schemabinding.version2.Tree getTree( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._treeList.size()) { + throw new IndexOutOfBoundsException("getTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.Tree) _treeList.elementAt(index); - } //-- jalview.schemabinding.version2.Tree getTree(int) + return (jalview.schemabinding.version2.Tree) _treeList.get(index); + } /** - * Method getTree - * + * Method getTree.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 Tree + * @return this collection as an Array */ - public jalview.schemabinding.version2.Tree[] getTree() - { - int size = _treeList.size(); - jalview.schemabinding.version2.Tree[] mArray = new jalview.schemabinding.version2.Tree[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.Tree) _treeList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Tree[] getTree() + public jalview.schemabinding.version2.Tree[] getTree( + ) { + jalview.schemabinding.version2.Tree[] array = new jalview.schemabinding.version2.Tree[0]; + return (jalview.schemabinding.version2.Tree[]) this._treeList.toArray(array); + } /** - * Method getTreeCount + * Method getTreeCount. * - * - * - * @return int + * @return the size of this collection */ - public int getTreeCount() - { - return _treeList.size(); - } //-- int getTreeCount() + public int getTreeCount( + ) { + return this._treeList.size(); + } /** - * Method getUserColours - * - * + * Method getUserColours. * * @param index - * @return UserColours - */ - public jalview.schemabinding.version2.UserColours getUserColours(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _userColoursList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.UserColours at the given index + */ + public jalview.schemabinding.version2.UserColours getUserColours( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._userColoursList.size()) { + throw new IndexOutOfBoundsException("getUserColours: Index value '" + index + "' not in range [0.." + (this._userColoursList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.UserColours) _userColoursList.elementAt(index); - } //-- jalview.schemabinding.version2.UserColours getUserColours(int) + return (jalview.schemabinding.version2.UserColours) _userColoursList.get(index); + } /** - * Method getUserColours + * Method getUserColours.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 UserColours + * @return this collection as an Array */ - public jalview.schemabinding.version2.UserColours[] getUserColours() - { - int size = _userColoursList.size(); - jalview.schemabinding.version2.UserColours[] mArray = new jalview.schemabinding.version2.UserColours[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.UserColours) _userColoursList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.UserColours[] getUserColours() + public jalview.schemabinding.version2.UserColours[] getUserColours( + ) { + jalview.schemabinding.version2.UserColours[] array = new jalview.schemabinding.version2.UserColours[0]; + return (jalview.schemabinding.version2.UserColours[]) this._userColoursList.toArray(array); + } /** - * Method getUserColoursCount - * + * Method getUserColoursCount. * - * - * @return int + * @return the size of this collection */ - public int getUserColoursCount() - { - return _userColoursList.size(); - } //-- int getUserColoursCount() + public int getUserColoursCount( + ) { + return this._userColoursList.size(); + } /** - * Method getViewport - * - * + * Method getViewport. * * @param index - * @return Viewport - */ - public jalview.schemabinding.version2.Viewport getViewport(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _viewportList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.Viewport at the given index + */ + public jalview.schemabinding.version2.Viewport getViewport( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._viewportList.size()) { + throw new IndexOutOfBoundsException("getViewport: Index value '" + index + "' not in range [0.." + (this._viewportList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.Viewport) _viewportList.elementAt(index); - } //-- jalview.schemabinding.version2.Viewport getViewport(int) + return (jalview.schemabinding.version2.Viewport) _viewportList.get(index); + } /** - * Method getViewport - * + * Method getViewport.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 Viewport + * @return this collection as an Array */ - public jalview.schemabinding.version2.Viewport[] getViewport() - { - int size = _viewportList.size(); - jalview.schemabinding.version2.Viewport[] mArray = new jalview.schemabinding.version2.Viewport[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.Viewport) _viewportList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Viewport[] getViewport() + public jalview.schemabinding.version2.Viewport[] getViewport( + ) { + jalview.schemabinding.version2.Viewport[] array = new jalview.schemabinding.version2.Viewport[0]; + return (jalview.schemabinding.version2.Viewport[]) this._viewportList.toArray(array); + } /** - * Method getViewportCount - * - * + * Method getViewportCount. * - * @return int + * @return the size of this collection */ - public int getViewportCount() - { - return _viewportList.size(); - } //-- int getViewportCount() + public int getViewportCount( + ) { + return this._viewportList.size(); + } /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllJGroup - * */ - public void removeAllJGroup() - { - _JGroupList.removeAllElements(); - } //-- void removeAllJGroup() + public void removeAllJGroup( + ) { + this._JGroupList.clear(); + } /** - * Method removeAllJSeq - * */ - public void removeAllJSeq() - { - _JSeqList.removeAllElements(); - } //-- void removeAllJSeq() + public void removeAllJSeq( + ) { + this._JSeqList.clear(); + } /** - * Method removeAllTree - * */ - public void removeAllTree() - { - _treeList.removeAllElements(); - } //-- void removeAllTree() + public void removeAllTree( + ) { + this._treeList.clear(); + } /** - * Method removeAllUserColours - * */ - public void removeAllUserColours() - { - _userColoursList.removeAllElements(); - } //-- void removeAllUserColours() + public void removeAllUserColours( + ) { + this._userColoursList.clear(); + } /** - * Method removeAllViewport - * */ - public void removeAllViewport() - { - _viewportList.removeAllElements(); - } //-- void removeAllViewport() + public void removeAllViewport( + ) { + this._viewportList.clear(); + } /** - * Method removeJGroup - * + * Method removeJGroup. * + * @param vJGroup + * @return true if the object was removed from the collection. + */ + public boolean removeJGroup( + final jalview.schemabinding.version2.JGroup vJGroup) { + boolean removed = _JGroupList.remove(vJGroup); + return removed; + } + + /** + * Method removeJGroupAt. * * @param index - * @return JGroup + * @return the element removed from the collection */ - public jalview.schemabinding.version2.JGroup removeJGroup(int index) - { - java.lang.Object obj = _JGroupList.elementAt(index); - _JGroupList.removeElementAt(index); + public jalview.schemabinding.version2.JGroup removeJGroupAt( + final int index) { + java.lang.Object obj = this._JGroupList.remove(index); return (jalview.schemabinding.version2.JGroup) obj; - } //-- jalview.schemabinding.version2.JGroup removeJGroup(int) + } /** - * Method removeJSeq - * + * Method removeJSeq. * + * @param vJSeq + * @return true if the object was removed from the collection. + */ + public boolean removeJSeq( + final jalview.schemabinding.version2.JSeq vJSeq) { + boolean removed = _JSeqList.remove(vJSeq); + return removed; + } + + /** + * Method removeJSeqAt. * * @param index - * @return JSeq + * @return the element removed from the collection */ - public jalview.schemabinding.version2.JSeq removeJSeq(int index) - { - java.lang.Object obj = _JSeqList.elementAt(index); - _JSeqList.removeElementAt(index); + public jalview.schemabinding.version2.JSeq removeJSeqAt( + final int index) { + java.lang.Object obj = this._JSeqList.remove(index); return (jalview.schemabinding.version2.JSeq) obj; - } //-- jalview.schemabinding.version2.JSeq removeJSeq(int) + } /** - * Method removeTree - * + * Method removeTree. * + * @param vTree + * @return true if the object was removed from the collection. + */ + public boolean removeTree( + final jalview.schemabinding.version2.Tree vTree) { + boolean removed = _treeList.remove(vTree); + return removed; + } + + /** + * Method removeTreeAt. * * @param index - * @return Tree + * @return the element removed from the collection */ - public jalview.schemabinding.version2.Tree removeTree(int index) - { - java.lang.Object obj = _treeList.elementAt(index); - _treeList.removeElementAt(index); + public jalview.schemabinding.version2.Tree removeTreeAt( + final int index) { + java.lang.Object obj = this._treeList.remove(index); return (jalview.schemabinding.version2.Tree) obj; - } //-- jalview.schemabinding.version2.Tree removeTree(int) + } /** - * Method removeUserColours - * + * Method removeUserColours. * + * @param vUserColours + * @return true if the object was removed from the collection. + */ + public boolean removeUserColours( + final jalview.schemabinding.version2.UserColours vUserColours) { + boolean removed = _userColoursList.remove(vUserColours); + return removed; + } + + /** + * Method removeUserColoursAt. * * @param index - * @return UserColours + * @return the element removed from the collection */ - public jalview.schemabinding.version2.UserColours removeUserColours(int index) - { - java.lang.Object obj = _userColoursList.elementAt(index); - _userColoursList.removeElementAt(index); + public jalview.schemabinding.version2.UserColours removeUserColoursAt( + final int index) { + java.lang.Object obj = this._userColoursList.remove(index); return (jalview.schemabinding.version2.UserColours) obj; - } //-- jalview.schemabinding.version2.UserColours removeUserColours(int) + } /** - * Method removeViewport - * + * Method removeViewport. * + * @param vViewport + * @return true if the object was removed from the collection. + */ + public boolean removeViewport( + final jalview.schemabinding.version2.Viewport vViewport) { + boolean removed = _viewportList.remove(vViewport); + return removed; + } + + /** + * Method removeViewportAt. * * @param index - * @return Viewport + * @return the element removed from the collection */ - public jalview.schemabinding.version2.Viewport removeViewport(int index) - { - java.lang.Object obj = _viewportList.elementAt(index); - _viewportList.removeElementAt(index); + public jalview.schemabinding.version2.Viewport removeViewportAt( + final int index) { + java.lang.Object obj = this._viewportList.remove(index); return (jalview.schemabinding.version2.Viewport) obj; - } //-- jalview.schemabinding.version2.Viewport removeViewport(int) + } /** * Sets the value of field 'featureSettings'. * * @param featureSettings the value of field 'featureSettings'. */ - public void setFeatureSettings(jalview.schemabinding.version2.FeatureSettings featureSettings) - { + public void setFeatureSettings( + final jalview.schemabinding.version2.FeatureSettings featureSettings) { this._featureSettings = featureSettings; - } //-- void setFeatureSettings(jalview.schemabinding.version2.FeatureSettings) + } /** - * Method setJGroup - * * * * @param index * @param vJGroup - */ - public void setJGroup(int index, jalview.schemabinding.version2.JGroup vJGroup) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _JGroupList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setJGroup( + final int index, + final jalview.schemabinding.version2.JGroup vJGroup) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._JGroupList.size()) { + throw new IndexOutOfBoundsException("setJGroup: Index value '" + index + "' not in range [0.." + (this._JGroupList.size() - 1) + "]"); } - _JGroupList.setElementAt(vJGroup, index); - } //-- void setJGroup(int, jalview.schemabinding.version2.JGroup) + + this._JGroupList.set(index, vJGroup); + } /** - * Method setJGroup * * - * - * @param JGroupArray + * @param vJGroupArray */ - public void setJGroup(jalview.schemabinding.version2.JGroup[] JGroupArray) - { + public void setJGroup( + final jalview.schemabinding.version2.JGroup[] vJGroupArray) { //-- copy array - _JGroupList.removeAllElements(); - for (int i = 0; i < JGroupArray.length; i++) { - _JGroupList.addElement(JGroupArray[i]); + _JGroupList.clear(); + + for (int i = 0; i < vJGroupArray.length; i++) { + this._JGroupList.add(vJGroupArray[i]); } - } //-- void setJGroup(jalview.schemabinding.version2.JGroup) + } /** - * Method setJSeq - * * * * @param index * @param vJSeq - */ - public void setJSeq(int index, jalview.schemabinding.version2.JSeq vJSeq) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _JSeqList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setJSeq( + final int index, + final jalview.schemabinding.version2.JSeq vJSeq) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._JSeqList.size()) { + throw new IndexOutOfBoundsException("setJSeq: Index value '" + index + "' not in range [0.." + (this._JSeqList.size() - 1) + "]"); } - _JSeqList.setElementAt(vJSeq, index); - } //-- void setJSeq(int, jalview.schemabinding.version2.JSeq) + + this._JSeqList.set(index, vJSeq); + } /** - * Method setJSeq - * * * - * @param JSeqArray + * @param vJSeqArray */ - public void setJSeq(jalview.schemabinding.version2.JSeq[] JSeqArray) - { + public void setJSeq( + final jalview.schemabinding.version2.JSeq[] vJSeqArray) { //-- copy array - _JSeqList.removeAllElements(); - for (int i = 0; i < JSeqArray.length; i++) { - _JSeqList.addElement(JSeqArray[i]); + _JSeqList.clear(); + + for (int i = 0; i < vJSeqArray.length; i++) { + this._JSeqList.add(vJSeqArray[i]); } - } //-- void setJSeq(jalview.schemabinding.version2.JSeq) + } /** - * Method setTree - * * * * @param index * @param vTree - */ - public void setTree(int index, jalview.schemabinding.version2.Tree vTree) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _treeList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setTree( + final int index, + final jalview.schemabinding.version2.Tree vTree) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._treeList.size()) { + throw new IndexOutOfBoundsException("setTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]"); } - _treeList.setElementAt(vTree, index); - } //-- void setTree(int, jalview.schemabinding.version2.Tree) + + this._treeList.set(index, vTree); + } /** - * Method setTree - * * * - * @param treeArray + * @param vTreeArray */ - public void setTree(jalview.schemabinding.version2.Tree[] treeArray) - { + public void setTree( + final jalview.schemabinding.version2.Tree[] vTreeArray) { //-- copy array - _treeList.removeAllElements(); - for (int i = 0; i < treeArray.length; i++) { - _treeList.addElement(treeArray[i]); + _treeList.clear(); + + for (int i = 0; i < vTreeArray.length; i++) { + this._treeList.add(vTreeArray[i]); } - } //-- void setTree(jalview.schemabinding.version2.Tree) + } /** - * Method setUserColours - * * * * @param index * @param vUserColours - */ - public void setUserColours(int index, jalview.schemabinding.version2.UserColours vUserColours) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _userColoursList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setUserColours( + final int index, + final jalview.schemabinding.version2.UserColours vUserColours) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._userColoursList.size()) { + throw new IndexOutOfBoundsException("setUserColours: Index value '" + index + "' not in range [0.." + (this._userColoursList.size() - 1) + "]"); } - _userColoursList.setElementAt(vUserColours, index); - } //-- void setUserColours(int, jalview.schemabinding.version2.UserColours) + + this._userColoursList.set(index, vUserColours); + } /** - * Method setUserColours * * - * - * @param userColoursArray + * @param vUserColoursArray */ - public void setUserColours(jalview.schemabinding.version2.UserColours[] userColoursArray) - { + public void setUserColours( + final jalview.schemabinding.version2.UserColours[] vUserColoursArray) { //-- copy array - _userColoursList.removeAllElements(); - for (int i = 0; i < userColoursArray.length; i++) { - _userColoursList.addElement(userColoursArray[i]); + _userColoursList.clear(); + + for (int i = 0; i < vUserColoursArray.length; i++) { + this._userColoursList.add(vUserColoursArray[i]); } - } //-- void setUserColours(jalview.schemabinding.version2.UserColours) + } /** - * Method setViewport - * * * * @param index * @param vViewport - */ - public void setViewport(int index, jalview.schemabinding.version2.Viewport vViewport) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _viewportList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setViewport( + final int index, + final jalview.schemabinding.version2.Viewport vViewport) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._viewportList.size()) { + throw new IndexOutOfBoundsException("setViewport: Index value '" + index + "' not in range [0.." + (this._viewportList.size() - 1) + "]"); } - _viewportList.setElementAt(vViewport, index); - } //-- void setViewport(int, jalview.schemabinding.version2.Viewport) + + this._viewportList.set(index, vViewport); + } /** - * Method setViewport - * * * - * @param viewportArray + * @param vViewportArray */ - public void setViewport(jalview.schemabinding.version2.Viewport[] viewportArray) - { + public void setViewport( + final jalview.schemabinding.version2.Viewport[] vViewportArray) { //-- copy array - _viewportList.removeAllElements(); - for (int i = 0; i < viewportArray.length; i++) { - _viewportList.addElement(viewportArray[i]); + _viewportList.clear(); + + for (int i = 0; i < vViewportArray.length; i++) { + this._viewportList.add(vViewportArray[i]); } - } //-- void setViewport(jalview.schemabinding.version2.Viewport) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.JalviewModelSequence + */ + public static jalview.schemabinding.version2.JalviewModelSequence unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.JalviewModelSequence) Unmarshaller.unmarshal(jalview.schemabinding.version2.JalviewModelSequence.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/JalviewUserColours.java b/src/jalview/schemabinding/version2/JalviewUserColours.java index 7963596..7c059da 100755 --- a/src/jalview/schemabinding/version2/JalviewUserColours.java +++ b/src/jalview/schemabinding/version2/JalviewUserColours.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class JalviewUserColours. @@ -36,12 +27,12 @@ public class JalviewUserColours implements java.io.Serializable { //--------------------------/ /** - * Field _schemeName + * Field _schemeName. */ private java.lang.String _schemeName; /** - * Field _colourList + * Field _colourList. */ private java.util.Vector _colourList; @@ -52,8 +43,8 @@ public class JalviewUserColours implements java.io.Serializable { public JalviewUserColours() { super(); - _colourList = new Vector(); - } //-- jalview.schemabinding.version2.JalviewUserColours() + this._colourList = new java.util.Vector(); + } //-----------/ @@ -61,240 +52,248 @@ public class JalviewUserColours implements java.io.Serializable { //-----------/ /** - * Method addColour - * * * * @param vColour + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addColour(jalview.schemabinding.version2.Colour vColour) - throws java.lang.IndexOutOfBoundsException - { - _colourList.addElement(vColour); - } //-- void addColour(jalview.schemabinding.version2.Colour) + public void addColour( + final Colour vColour) + throws java.lang.IndexOutOfBoundsException { + this._colourList.addElement(vColour); + } /** - * Method addColour - * * * * @param index * @param vColour + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addColour(int index, jalview.schemabinding.version2.Colour vColour) - throws java.lang.IndexOutOfBoundsException - { - _colourList.insertElementAt(vColour, index); - } //-- void addColour(int, jalview.schemabinding.version2.Colour) + public void addColour( + final int index, + final Colour vColour) + throws java.lang.IndexOutOfBoundsException { + this._colourList.add(index, vColour); + } /** - * Method enumerateColour - * - * + * Method enumerateColour. * - * @return Enumeration + * @return an Enumeration over all Colour elements */ - public java.util.Enumeration enumerateColour() - { - return _colourList.elements(); - } //-- java.util.Enumeration enumerateColour() + public java.util.Enumeration enumerateColour( + ) { + return this._colourList.elements(); + } /** - * Method getColour - * - * + * Method getColour. * * @param index - * @return Colour + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the Colour at the given index */ - public jalview.schemabinding.version2.Colour getColour(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _colourList.size())) { - throw new IndexOutOfBoundsException(); + public Colour getColour( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._colourList.size()) { + throw new IndexOutOfBoundsException("getColour: Index value '" + index + "' not in range [0.." + (this._colourList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.Colour) _colourList.elementAt(index); - } //-- jalview.schemabinding.version2.Colour getColour(int) + return (Colour) _colourList.get(index); + } /** - * Method getColour - * - * + * Method getColour.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 Colour + * @return this collection as an Array */ - public jalview.schemabinding.version2.Colour[] getColour() - { - int size = _colourList.size(); - jalview.schemabinding.version2.Colour[] mArray = new jalview.schemabinding.version2.Colour[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.Colour) _colourList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Colour[] getColour() + public Colour[] getColour( + ) { + Colour[] array = new Colour[0]; + return (Colour[]) this._colourList.toArray(array); + } /** - * Method getColourCount - * + * Method getColourCount. * - * - * @return int + * @return the size of this collection */ - public int getColourCount() - { - return _colourList.size(); - } //-- int getColourCount() + public int getColourCount( + ) { + return this._colourList.size(); + } /** * Returns the value of field 'schemeName'. * - * @return String - * @return the value of field 'schemeName'. + * @return the value of field 'SchemeName'. */ - public java.lang.String getSchemeName() - { + public java.lang.String getSchemeName( + ) { return this._schemeName; - } //-- java.lang.String getSchemeName() + } /** - * Method isValid - * + * Method isValid. * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllColour - * */ - public void removeAllColour() - { - _colourList.removeAllElements(); - } //-- void removeAllColour() + public void removeAllColour( + ) { + this._colourList.clear(); + } /** - * Method removeColour - * + * Method removeColour. * + * @param vColour + * @return true if the object was removed from the collection. + */ + public boolean removeColour( + final Colour vColour) { + boolean removed = _colourList.remove(vColour); + return removed; + } + + /** + * Method removeColourAt. * * @param index - * @return Colour + * @return the element removed from the collection */ - public jalview.schemabinding.version2.Colour removeColour(int index) - { - java.lang.Object obj = _colourList.elementAt(index); - _colourList.removeElementAt(index); - return (jalview.schemabinding.version2.Colour) obj; - } //-- jalview.schemabinding.version2.Colour removeColour(int) + public Colour removeColourAt( + final int index) { + java.lang.Object obj = this._colourList.remove(index); + return (Colour) obj; + } /** - * Method setColour - * * * * @param index * @param vColour + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void setColour(int index, jalview.schemabinding.version2.Colour vColour) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _colourList.size())) { - throw new IndexOutOfBoundsException(); + public void setColour( + final int index, + final Colour vColour) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._colourList.size()) { + throw new IndexOutOfBoundsException("setColour: Index value '" + index + "' not in range [0.." + (this._colourList.size() - 1) + "]"); } - _colourList.setElementAt(vColour, index); - } //-- void setColour(int, jalview.schemabinding.version2.Colour) + + this._colourList.set(index, vColour); + } /** - * Method setColour * * - * - * @param colourArray + * @param vColourArray */ - public void setColour(jalview.schemabinding.version2.Colour[] colourArray) - { + public void setColour( + final Colour[] vColourArray) { //-- copy array - _colourList.removeAllElements(); - for (int i = 0; i < colourArray.length; i++) { - _colourList.addElement(colourArray[i]); + _colourList.clear(); + + for (int i = 0; i < vColourArray.length; i++) { + this._colourList.add(vColourArray[i]); } - } //-- void setColour(jalview.schemabinding.version2.Colour) + } /** * Sets the value of field 'schemeName'. * * @param schemeName the value of field 'schemeName'. */ - public void setSchemeName(java.lang.String schemeName) - { + public void setSchemeName( + final java.lang.String schemeName) { this._schemeName = schemeName; - } //-- void setSchemeName(java.lang.String) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.JalviewUserColours */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + public static jalview.schemabinding.version2.JalviewUserColours unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.JalviewUserColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.JalviewUserColours.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/OtherData.java b/src/jalview/schemabinding/version2/OtherData.java index 47423eb..94a5566 100644 --- a/src/jalview/schemabinding/version2/OtherData.java +++ b/src/jalview/schemabinding/version2/OtherData.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class OtherData. @@ -34,12 +27,12 @@ public class OtherData implements java.io.Serializable { //--------------------------/ /** - * Field _key + * Field _key. */ private java.lang.String _key; /** - * Field _value + * Field _value. */ private java.lang.String _value; @@ -50,7 +43,7 @@ public class OtherData implements java.io.Serializable { public OtherData() { super(); - } //-- jalview.schemabinding.version2.OtherData() + } //-----------/ @@ -60,114 +53,118 @@ public class OtherData implements java.io.Serializable { /** * Returns the value of field 'key'. * - * @return String - * @return the value of field 'key'. + * @return the value of field 'Key'. */ - public java.lang.String getKey() - { + public java.lang.String getKey( + ) { return this._key; - } //-- java.lang.String getKey() + } /** * Returns the value of field 'value'. * - * @return String - * @return the value of field 'value'. + * @return the value of field 'Value'. */ - public java.lang.String getValue() - { + public java.lang.String getValue( + ) { return this._value; - } //-- java.lang.String getValue() + } /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'key'. * * @param key the value of field 'key'. */ - public void setKey(java.lang.String key) - { + public void setKey( + final java.lang.String key) { this._key = key; - } //-- void setKey(java.lang.String) + } /** * Sets the value of field 'value'. * * @param value the value of field 'value'. */ - public void setValue(java.lang.String value) - { + public void setValue( + final java.lang.String value) { this._value = value; - } //-- void setValue(java.lang.String) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.OtherData */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + public static jalview.schemabinding.version2.OtherData unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.OtherData) Unmarshaller.unmarshal(jalview.schemabinding.version2.OtherData.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/Pdbentry.java b/src/jalview/schemabinding/version2/Pdbentry.java index 93c2748..6ff1819 100755 --- a/src/jalview/schemabinding/version2/Pdbentry.java +++ b/src/jalview/schemabinding/version2/Pdbentry.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class Pdbentry. @@ -36,22 +27,22 @@ public class Pdbentry implements java.io.Serializable { //--------------------------/ /** - * Field _id + * Field _id. */ private java.lang.String _id; /** - * Field _type + * Field _type. */ private java.lang.String _type; /** - * Field _file + * Field _file. */ private java.lang.String _file; /** - * Field _items + * Field _items. */ private java.util.Vector _items; @@ -62,8 +53,8 @@ public class Pdbentry implements java.io.Serializable { public Pdbentry() { super(); - _items = new Vector(); - } //-- jalview.schemabinding.version2.Pdbentry() + this._items = new java.util.Vector(); + } //-----------/ @@ -71,282 +62,291 @@ public class Pdbentry implements java.io.Serializable { //-----------/ /** - * Method addPdbentryItem - * * * * @param vPdbentryItem + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addPdbentryItem(jalview.schemabinding.version2.PdbentryItem vPdbentryItem) - throws java.lang.IndexOutOfBoundsException - { - _items.addElement(vPdbentryItem); - } //-- void addPdbentryItem(jalview.schemabinding.version2.PdbentryItem) + public void addPdbentryItem( + final jalview.schemabinding.version2.PdbentryItem vPdbentryItem) + throws java.lang.IndexOutOfBoundsException { + this._items.addElement(vPdbentryItem); + } /** - * Method addPdbentryItem - * * * * @param index * @param vPdbentryItem + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addPdbentryItem(int index, jalview.schemabinding.version2.PdbentryItem vPdbentryItem) - throws java.lang.IndexOutOfBoundsException - { - _items.insertElementAt(vPdbentryItem, index); - } //-- void addPdbentryItem(int, jalview.schemabinding.version2.PdbentryItem) + public void addPdbentryItem( + final int index, + final jalview.schemabinding.version2.PdbentryItem vPdbentryItem) + throws java.lang.IndexOutOfBoundsException { + this._items.add(index, vPdbentryItem); + } /** - * Method enumeratePdbentryItem - * - * + * Method enumeratePdbentryItem. * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.PdbentryItem elements */ - public java.util.Enumeration enumeratePdbentryItem() - { - return _items.elements(); - } //-- java.util.Enumeration enumeratePdbentryItem() + public java.util.Enumeration enumeratePdbentryItem( + ) { + return this._items.elements(); + } /** * Returns the value of field 'file'. * - * @return String - * @return the value of field 'file'. + * @return the value of field 'File'. */ - public java.lang.String getFile() - { + public java.lang.String getFile( + ) { return this._file; - } //-- java.lang.String getFile() + } /** * Returns the value of field 'id'. * - * @return String - * @return the value of field 'id'. + * @return the value of field 'Id'. */ - public java.lang.String getId() - { + public java.lang.String getId( + ) { return this._id; - } //-- java.lang.String getId() + } /** - * Method getPdbentryItem - * - * + * Method getPdbentryItem. * * @param index - * @return PdbentryItem + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.PdbentryItem at the given inde */ - public jalview.schemabinding.version2.PdbentryItem getPdbentryItem(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _items.size())) { - throw new IndexOutOfBoundsException(); + public jalview.schemabinding.version2.PdbentryItem getPdbentryItem( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._items.size()) { + throw new IndexOutOfBoundsException("getPdbentryItem: Index value '" + index + "' not in range [0.." + (this._items.size() - 1) + "]"); } - return (jalview.schemabinding.version2.PdbentryItem) _items.elementAt(index); - } //-- jalview.schemabinding.version2.PdbentryItem getPdbentryItem(int) + return (jalview.schemabinding.version2.PdbentryItem) _items.get(index); + } /** - * Method getPdbentryItem - * - * - * - * @return PdbentryItem + * Method getPdbentryItem.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.PdbentryItem[] getPdbentryItem() - { - int size = _items.size(); - jalview.schemabinding.version2.PdbentryItem[] mArray = new jalview.schemabinding.version2.PdbentryItem[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.PdbentryItem) _items.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.PdbentryItem[] getPdbentryItem() + public jalview.schemabinding.version2.PdbentryItem[] getPdbentryItem( + ) { + jalview.schemabinding.version2.PdbentryItem[] array = new jalview.schemabinding.version2.PdbentryItem[0]; + return (jalview.schemabinding.version2.PdbentryItem[]) this._items.toArray(array); + } /** - * Method getPdbentryItemCount - * - * + * Method getPdbentryItemCount. * - * @return int + * @return the size of this collection */ - public int getPdbentryItemCount() - { - return _items.size(); - } //-- int getPdbentryItemCount() + public int getPdbentryItemCount( + ) { + return this._items.size(); + } /** * Returns the value of field 'type'. * - * @return String - * @return the value of field 'type'. + * @return the value of field 'Type'. */ - public java.lang.String getType() - { + public java.lang.String getType( + ) { return this._type; - } //-- java.lang.String getType() + } /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllPdbentryItem - * */ - public void removeAllPdbentryItem() - { - _items.removeAllElements(); - } //-- void removeAllPdbentryItem() + public void removeAllPdbentryItem( + ) { + this._items.clear(); + } /** - * Method removePdbentryItem - * + * Method removePdbentryItem. * + * @param vPdbentryItem + * @return true if the object was removed from the collection. + */ + public boolean removePdbentryItem( + final jalview.schemabinding.version2.PdbentryItem vPdbentryItem) { + boolean removed = _items.remove(vPdbentryItem); + return removed; + } + + /** + * Method removePdbentryItemAt. * * @param index - * @return PdbentryItem + * @return the element removed from the collection */ - public jalview.schemabinding.version2.PdbentryItem removePdbentryItem(int index) - { - java.lang.Object obj = _items.elementAt(index); - _items.removeElementAt(index); + public jalview.schemabinding.version2.PdbentryItem removePdbentryItemAt( + final int index) { + java.lang.Object obj = this._items.remove(index); return (jalview.schemabinding.version2.PdbentryItem) obj; - } //-- jalview.schemabinding.version2.PdbentryItem removePdbentryItem(int) + } /** * Sets the value of field 'file'. * * @param file the value of field 'file'. */ - public void setFile(java.lang.String file) - { + public void setFile( + final java.lang.String file) { this._file = file; - } //-- void setFile(java.lang.String) + } /** * Sets the value of field 'id'. * * @param id the value of field 'id'. */ - public void setId(java.lang.String id) - { + public void setId( + final java.lang.String id) { this._id = id; - } //-- void setId(java.lang.String) + } /** - * Method setPdbentryItem - * * * * @param index * @param vPdbentryItem + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void setPdbentryItem(int index, jalview.schemabinding.version2.PdbentryItem vPdbentryItem) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _items.size())) { - throw new IndexOutOfBoundsException(); + public void setPdbentryItem( + final int index, + final jalview.schemabinding.version2.PdbentryItem vPdbentryItem) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._items.size()) { + throw new IndexOutOfBoundsException("setPdbentryItem: Index value '" + index + "' not in range [0.." + (this._items.size() - 1) + "]"); } - _items.setElementAt(vPdbentryItem, index); - } //-- void setPdbentryItem(int, jalview.schemabinding.version2.PdbentryItem) + + this._items.set(index, vPdbentryItem); + } /** - * Method setPdbentryItem - * * * - * @param pdbentryItemArray + * @param vPdbentryItemArray */ - public void setPdbentryItem(jalview.schemabinding.version2.PdbentryItem[] pdbentryItemArray) - { + public void setPdbentryItem( + final jalview.schemabinding.version2.PdbentryItem[] vPdbentryItemArray) { //-- copy array - _items.removeAllElements(); - for (int i = 0; i < pdbentryItemArray.length; i++) { - _items.addElement(pdbentryItemArray[i]); + _items.clear(); + + for (int i = 0; i < vPdbentryItemArray.length; i++) { + this._items.add(vPdbentryItemArray[i]); } - } //-- void setPdbentryItem(jalview.schemabinding.version2.PdbentryItem) + } /** * Sets the value of field 'type'. * * @param type the value of field 'type'. */ - public void setType(java.lang.String type) - { + public void setType( + final java.lang.String type) { this._type = type; - } //-- void setType(java.lang.String) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.Pdbentry */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + public static jalview.schemabinding.version2.Pdbentry unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.Pdbentry) Unmarshaller.unmarshal(jalview.schemabinding.version2.Pdbentry.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/PdbentryItem.java b/src/jalview/schemabinding/version2/PdbentryItem.java index 6f64036..3dbc99c 100755 --- a/src/jalview/schemabinding/version2/PdbentryItem.java +++ b/src/jalview/schemabinding/version2/PdbentryItem.java @@ -1,22 +1,12 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.Serializable; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; - /** * Class PdbentryItem. * @@ -30,7 +20,7 @@ public class PdbentryItem implements java.io.Serializable { //--------------------------/ /** - * Field _propertyList + * Field _propertyList. */ private java.util.Vector _propertyList; @@ -41,8 +31,8 @@ public class PdbentryItem implements java.io.Serializable { public PdbentryItem() { super(); - _propertyList = new Vector(); - } //-- jalview.schemabinding.version2.PdbentryItem() + this._propertyList = new java.util.Vector(); + } //-----------/ @@ -50,148 +40,153 @@ public class PdbentryItem implements java.io.Serializable { //-----------/ /** - * Method addProperty - * * * * @param vProperty + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addProperty(jalview.schemabinding.version2.Property vProperty) - throws java.lang.IndexOutOfBoundsException - { - _propertyList.addElement(vProperty); - } //-- void addProperty(jalview.schemabinding.version2.Property) + public void addProperty( + final jalview.schemabinding.version2.Property vProperty) + throws java.lang.IndexOutOfBoundsException { + this._propertyList.addElement(vProperty); + } /** - * Method addProperty - * * * * @param index * @param vProperty + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addProperty(int index, jalview.schemabinding.version2.Property vProperty) - throws java.lang.IndexOutOfBoundsException - { - _propertyList.insertElementAt(vProperty, index); - } //-- void addProperty(int, jalview.schemabinding.version2.Property) + public void addProperty( + final int index, + final jalview.schemabinding.version2.Property vProperty) + throws java.lang.IndexOutOfBoundsException { + this._propertyList.add(index, vProperty); + } /** - * Method enumerateProperty - * - * + * Method enumerateProperty. * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.Property elements */ - public java.util.Enumeration enumerateProperty() - { - return _propertyList.elements(); - } //-- java.util.Enumeration enumerateProperty() + public java.util.Enumeration enumerateProperty( + ) { + return this._propertyList.elements(); + } /** - * Method getProperty - * - * + * Method getProperty. * * @param index - * @return Property + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.Property at the given index */ - public jalview.schemabinding.version2.Property getProperty(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _propertyList.size())) { - throw new IndexOutOfBoundsException(); + public jalview.schemabinding.version2.Property getProperty( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._propertyList.size()) { + throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.Property) _propertyList.elementAt(index); - } //-- jalview.schemabinding.version2.Property getProperty(int) + return (jalview.schemabinding.version2.Property) _propertyList.get(index); + } /** - * Method getProperty - * + * Method getProperty.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 Property + * @return this collection as an Array */ - public jalview.schemabinding.version2.Property[] getProperty() - { - int size = _propertyList.size(); - jalview.schemabinding.version2.Property[] mArray = new jalview.schemabinding.version2.Property[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.Property) _propertyList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Property[] getProperty() + public jalview.schemabinding.version2.Property[] getProperty( + ) { + jalview.schemabinding.version2.Property[] array = new jalview.schemabinding.version2.Property[0]; + return (jalview.schemabinding.version2.Property[]) this._propertyList.toArray(array); + } /** - * Method getPropertyCount - * + * Method getPropertyCount. * - * - * @return int + * @return the size of this collection */ - public int getPropertyCount() - { - return _propertyList.size(); - } //-- int getPropertyCount() + public int getPropertyCount( + ) { + return this._propertyList.size(); + } /** - * Method removeAllProperty - * */ - public void removeAllProperty() - { - _propertyList.removeAllElements(); - } //-- void removeAllProperty() + public void removeAllProperty( + ) { + this._propertyList.clear(); + } /** - * Method removeProperty - * + * Method removeProperty. * + * @param vProperty + * @return true if the object was removed from the collection. + */ + public boolean removeProperty( + final jalview.schemabinding.version2.Property vProperty) { + boolean removed = _propertyList.remove(vProperty); + return removed; + } + + /** + * Method removePropertyAt. * * @param index - * @return Property + * @return the element removed from the collection */ - public jalview.schemabinding.version2.Property removeProperty(int index) - { - java.lang.Object obj = _propertyList.elementAt(index); - _propertyList.removeElementAt(index); + public jalview.schemabinding.version2.Property removePropertyAt( + final int index) { + java.lang.Object obj = this._propertyList.remove(index); return (jalview.schemabinding.version2.Property) obj; - } //-- jalview.schemabinding.version2.Property removeProperty(int) + } /** - * Method setProperty - * * * * @param index * @param vProperty + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void setProperty(int index, jalview.schemabinding.version2.Property vProperty) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _propertyList.size())) { - throw new IndexOutOfBoundsException(); + public void setProperty( + final int index, + final jalview.schemabinding.version2.Property vProperty) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._propertyList.size()) { + throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]"); } - _propertyList.setElementAt(vProperty, index); - } //-- void setProperty(int, jalview.schemabinding.version2.Property) + + this._propertyList.set(index, vProperty); + } /** - * Method setProperty * * - * - * @param propertyArray + * @param vPropertyArray */ - public void setProperty(jalview.schemabinding.version2.Property[] propertyArray) - { + public void setProperty( + final jalview.schemabinding.version2.Property[] vPropertyArray) { //-- copy array - _propertyList.removeAllElements(); - for (int i = 0; i < propertyArray.length; i++) { - _propertyList.addElement(propertyArray[i]); + _propertyList.clear(); + + for (int i = 0; i < vPropertyArray.length; i++) { + this._propertyList.add(vPropertyArray[i]); } - } //-- void setProperty(jalview.schemabinding.version2.Property) + } } diff --git a/src/jalview/schemabinding/version2/Pdbids.java b/src/jalview/schemabinding/version2/Pdbids.java index 347ff35..04685b9 100755 --- a/src/jalview/schemabinding/version2/Pdbids.java +++ b/src/jalview/schemabinding/version2/Pdbids.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class Pdbids. @@ -38,7 +29,7 @@ implements java.io.Serializable //--------------------------/ /** - * Field _structureStateList + * Field _structureStateList. */ private java.util.Vector _structureStateList; @@ -49,8 +40,8 @@ implements java.io.Serializable public Pdbids() { super(); - _structureStateList = new Vector(); - } //-- jalview.schemabinding.version2.Pdbids() + this._structureStateList = new java.util.Vector(); + } //-----------/ @@ -58,219 +49,232 @@ implements java.io.Serializable //-----------/ /** - * Method addStructureState - * * * * @param vStructureState + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addStructureState(jalview.schemabinding.version2.StructureState vStructureState) - throws java.lang.IndexOutOfBoundsException - { - _structureStateList.addElement(vStructureState); - } //-- void addStructureState(jalview.schemabinding.version2.StructureState) + public void addStructureState( + final jalview.schemabinding.version2.StructureState vStructureState) + throws java.lang.IndexOutOfBoundsException { + this._structureStateList.addElement(vStructureState); + } /** - * Method addStructureState - * * * * @param index * @param vStructureState + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addStructureState(int index, jalview.schemabinding.version2.StructureState vStructureState) - throws java.lang.IndexOutOfBoundsException - { - _structureStateList.insertElementAt(vStructureState, index); - } //-- void addStructureState(int, jalview.schemabinding.version2.StructureState) + public void addStructureState( + final int index, + final jalview.schemabinding.version2.StructureState vStructureState) + throws java.lang.IndexOutOfBoundsException { + this._structureStateList.add(index, vStructureState); + } /** - * Method enumerateStructureState - * - * + * Method enumerateStructureState. * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.StructureState elements */ - public java.util.Enumeration enumerateStructureState() - { - return _structureStateList.elements(); - } //-- java.util.Enumeration enumerateStructureState() + public java.util.Enumeration enumerateStructureState( + ) { + return this._structureStateList.elements(); + } /** - * Method getStructureState - * - * + * Method getStructureState. * * @param index - * @return StructureState + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.StructureState at the given + * index */ - public jalview.schemabinding.version2.StructureState getStructureState(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _structureStateList.size())) { - throw new IndexOutOfBoundsException(); + public jalview.schemabinding.version2.StructureState getStructureState( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._structureStateList.size()) { + throw new IndexOutOfBoundsException("getStructureState: Index value '" + index + "' not in range [0.." + (this._structureStateList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.StructureState) _structureStateList.elementAt(index); - } //-- jalview.schemabinding.version2.StructureState getStructureState(int) + return (jalview.schemabinding.version2.StructureState) _structureStateList.get(index); + } /** - * Method getStructureState - * - * - * - * @return StructureState + * Method getStructureState.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.StructureState[] getStructureState() - { - int size = _structureStateList.size(); - jalview.schemabinding.version2.StructureState[] mArray = new jalview.schemabinding.version2.StructureState[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.StructureState) _structureStateList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.StructureState[] getStructureState() + public jalview.schemabinding.version2.StructureState[] getStructureState( + ) { + jalview.schemabinding.version2.StructureState[] array = new jalview.schemabinding.version2.StructureState[0]; + return (jalview.schemabinding.version2.StructureState[]) this._structureStateList.toArray(array); + } /** - * Method getStructureStateCount - * - * + * Method getStructureStateCount. * - * @return int + * @return the size of this collection */ - public int getStructureStateCount() - { - return _structureStateList.size(); - } //-- int getStructureStateCount() + public int getStructureStateCount( + ) { + return this._structureStateList.size(); + } /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllStructureState - * */ - public void removeAllStructureState() - { - _structureStateList.removeAllElements(); - } //-- void removeAllStructureState() + public void removeAllStructureState( + ) { + this._structureStateList.clear(); + } /** - * Method removeStructureState - * + * Method removeStructureState. * + * @param vStructureState + * @return true if the object was removed from the collection. + */ + public boolean removeStructureState( + final jalview.schemabinding.version2.StructureState vStructureState) { + boolean removed = _structureStateList.remove(vStructureState); + return removed; + } + + /** + * Method removeStructureStateAt. * * @param index - * @return StructureState + * @return the element removed from the collection */ - public jalview.schemabinding.version2.StructureState removeStructureState(int index) - { - java.lang.Object obj = _structureStateList.elementAt(index); - _structureStateList.removeElementAt(index); + public jalview.schemabinding.version2.StructureState removeStructureStateAt( + final int index) { + java.lang.Object obj = this._structureStateList.remove(index); return (jalview.schemabinding.version2.StructureState) obj; - } //-- jalview.schemabinding.version2.StructureState removeStructureState(int) + } /** - * Method setStructureState - * * * * @param index * @param vStructureState + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void setStructureState(int index, jalview.schemabinding.version2.StructureState vStructureState) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _structureStateList.size())) { - throw new IndexOutOfBoundsException(); + public void setStructureState( + final int index, + final jalview.schemabinding.version2.StructureState vStructureState) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._structureStateList.size()) { + throw new IndexOutOfBoundsException("setStructureState: Index value '" + index + "' not in range [0.." + (this._structureStateList.size() - 1) + "]"); } - _structureStateList.setElementAt(vStructureState, index); - } //-- void setStructureState(int, jalview.schemabinding.version2.StructureState) + + this._structureStateList.set(index, vStructureState); + } /** - * Method setStructureState - * * * - * @param structureStateArray + * @param vStructureStateArray */ - public void setStructureState(jalview.schemabinding.version2.StructureState[] structureStateArray) - { + public void setStructureState( + final jalview.schemabinding.version2.StructureState[] vStructureStateArray) { //-- copy array - _structureStateList.removeAllElements(); - for (int i = 0; i < structureStateArray.length; i++) { - _structureStateList.addElement(structureStateArray[i]); + _structureStateList.clear(); + + for (int i = 0; i < vStructureStateArray.length; i++) { + this._structureStateList.add(vStructureStateArray[i]); } - } //-- void setStructureState(jalview.schemabinding.version2.StructureState) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.Pdbentry */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (jalview.schemabinding.version2.Pdbids) Unmarshaller.unmarshal(jalview.schemabinding.version2.Pdbids.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + public static jalview.schemabinding.version2.Pdbentry unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.Pdbentry) Unmarshaller.unmarshal(jalview.schemabinding.version2.Pdbids.class, reader); + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/Property.java b/src/jalview/schemabinding/version2/Property.java index 338dd90..bfc4dde 100755 --- a/src/jalview/schemabinding/version2/Property.java +++ b/src/jalview/schemabinding/version2/Property.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class Property. @@ -34,12 +27,12 @@ public class Property implements java.io.Serializable { //--------------------------/ /** - * Field _name + * Field _name. */ private java.lang.String _name; /** - * Field _value + * Field _value. */ private java.lang.String _value; @@ -50,7 +43,7 @@ public class Property implements java.io.Serializable { public Property() { super(); - } //-- jalview.schemabinding.version2.Property() + } //-----------/ @@ -60,114 +53,118 @@ public class Property implements java.io.Serializable { /** * Returns the value of field 'name'. * - * @return String - * @return the value of field 'name'. + * @return the value of field 'Name'. */ - public java.lang.String getName() - { + public java.lang.String getName( + ) { return this._name; - } //-- java.lang.String getName() + } /** * Returns the value of field 'value'. * - * @return String - * @return the value of field 'value'. + * @return the value of field 'Value'. */ - public java.lang.String getValue() - { + public java.lang.String getValue( + ) { return this._value; - } //-- java.lang.String getValue() + } /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'name'. * * @param name the value of field 'name'. */ - public void setName(java.lang.String name) - { + public void setName( + final java.lang.String name) { this._name = name; - } //-- void setName(java.lang.String) + } /** * Sets the value of field 'value'. * * @param value the value of field 'value'. */ - public void setValue(java.lang.String value) - { + public void setValue( + final java.lang.String value) { this._value = value; - } //-- void setValue(java.lang.String) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.Property */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + public static jalview.schemabinding.version2.Property unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.Property) Unmarshaller.unmarshal(jalview.schemabinding.version2.Property.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/Sequence.java b/src/jalview/schemabinding/version2/Sequence.java index 993ad23..e6da4f6 100755 --- a/src/jalview/schemabinding/version2/Sequence.java +++ b/src/jalview/schemabinding/version2/Sequence.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class Sequence. @@ -38,7 +29,7 @@ implements java.io.Serializable //--------------------------/ /** - * Field _DBRefList + * Field _DBRefList. */ private java.util.Vector _DBRefList; @@ -49,8 +40,8 @@ implements java.io.Serializable public Sequence() { super(); - _DBRefList = new Vector(); - } //-- jalview.schemabinding.version2.Sequence() + this._DBRefList = new java.util.Vector(); + } //-----------/ @@ -58,219 +49,230 @@ implements java.io.Serializable //-----------/ /** - * Method addDBRef - * * * * @param vDBRef + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addDBRef(jalview.schemabinding.version2.DBRef vDBRef) - throws java.lang.IndexOutOfBoundsException - { - _DBRefList.addElement(vDBRef); - } //-- void addDBRef(jalview.schemabinding.version2.DBRef) + public void addDBRef( + final jalview.schemabinding.version2.DBRef vDBRef) + throws java.lang.IndexOutOfBoundsException { + this._DBRefList.addElement(vDBRef); + } /** - * Method addDBRef - * * * * @param index * @param vDBRef + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addDBRef(int index, jalview.schemabinding.version2.DBRef vDBRef) - throws java.lang.IndexOutOfBoundsException - { - _DBRefList.insertElementAt(vDBRef, index); - } //-- void addDBRef(int, jalview.schemabinding.version2.DBRef) + public void addDBRef( + final int index, + final jalview.schemabinding.version2.DBRef vDBRef) + throws java.lang.IndexOutOfBoundsException { + this._DBRefList.add(index, vDBRef); + } /** - * Method enumerateDBRef - * - * + * Method enumerateDBRef. * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.DBRef elements */ - public java.util.Enumeration enumerateDBRef() - { - return _DBRefList.elements(); - } //-- java.util.Enumeration enumerateDBRef() + public java.util.Enumeration enumerateDBRef( + ) { + return this._DBRefList.elements(); + } /** - * Method getDBRef - * - * + * Method getDBRef. * * @param index - * @return DBRef + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.DBRef at the given index */ - public jalview.schemabinding.version2.DBRef getDBRef(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _DBRefList.size())) { - throw new IndexOutOfBoundsException(); + public jalview.schemabinding.version2.DBRef getDBRef( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._DBRefList.size()) { + throw new IndexOutOfBoundsException("getDBRef: Index value '" + index + "' not in range [0.." + (this._DBRefList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.DBRef) _DBRefList.elementAt(index); - } //-- jalview.schemabinding.version2.DBRef getDBRef(int) + return (jalview.schemabinding.version2.DBRef) _DBRefList.get(index); + } /** - * Method getDBRef - * - * + * Method getDBRef.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 DBRef + * @return this collection as an Array */ - public jalview.schemabinding.version2.DBRef[] getDBRef() - { - int size = _DBRefList.size(); - jalview.schemabinding.version2.DBRef[] mArray = new jalview.schemabinding.version2.DBRef[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.DBRef) _DBRefList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.DBRef[] getDBRef() + public jalview.schemabinding.version2.DBRef[] getDBRef( + ) { + jalview.schemabinding.version2.DBRef[] array = new jalview.schemabinding.version2.DBRef[0]; + return (jalview.schemabinding.version2.DBRef[]) this._DBRefList.toArray(array); + } /** - * Method getDBRefCount - * + * Method getDBRefCount. * - * - * @return int + * @return the size of this collection */ - public int getDBRefCount() - { - return _DBRefList.size(); - } //-- int getDBRefCount() + public int getDBRefCount( + ) { + return this._DBRefList.size(); + } /** - * Method isValid - * + * Method isValid. * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllDBRef - * */ - public void removeAllDBRef() - { - _DBRefList.removeAllElements(); - } //-- void removeAllDBRef() + public void removeAllDBRef( + ) { + this._DBRefList.clear(); + } /** - * Method removeDBRef - * + * Method removeDBRef. * + * @param vDBRef + * @return true if the object was removed from the collection. + */ + public boolean removeDBRef( + final jalview.schemabinding.version2.DBRef vDBRef) { + boolean removed = _DBRefList.remove(vDBRef); + return removed; + } + + /** + * Method removeDBRefAt. * * @param index - * @return DBRef + * @return the element removed from the collection */ - public jalview.schemabinding.version2.DBRef removeDBRef(int index) - { - java.lang.Object obj = _DBRefList.elementAt(index); - _DBRefList.removeElementAt(index); + public jalview.schemabinding.version2.DBRef removeDBRefAt( + final int index) { + java.lang.Object obj = this._DBRefList.remove(index); return (jalview.schemabinding.version2.DBRef) obj; - } //-- jalview.schemabinding.version2.DBRef removeDBRef(int) + } /** - * Method setDBRef - * * * * @param index * @param vDBRef + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void setDBRef(int index, jalview.schemabinding.version2.DBRef vDBRef) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _DBRefList.size())) { - throw new IndexOutOfBoundsException(); + public void setDBRef( + final int index, + final jalview.schemabinding.version2.DBRef vDBRef) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._DBRefList.size()) { + throw new IndexOutOfBoundsException("setDBRef: Index value '" + index + "' not in range [0.." + (this._DBRefList.size() - 1) + "]"); } - _DBRefList.setElementAt(vDBRef, index); - } //-- void setDBRef(int, jalview.schemabinding.version2.DBRef) + + this._DBRefList.set(index, vDBRef); + } /** - * Method setDBRef * * - * - * @param DBRefArray + * @param vDBRefArray */ - public void setDBRef(jalview.schemabinding.version2.DBRef[] DBRefArray) - { + public void setDBRef( + final jalview.schemabinding.version2.DBRef[] vDBRefArray) { //-- copy array - _DBRefList.removeAllElements(); - for (int i = 0; i < DBRefArray.length; i++) { - _DBRefList.addElement(DBRefArray[i]); + _DBRefList.clear(); + + for (int i = 0; i < vDBRefArray.length; i++) { + this._DBRefList.add(vDBRefArray[i]); } - } //-- void setDBRef(jalview.schemabinding.version2.DBRef) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.SequenceType */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (jalview.schemabinding.version2.Sequence) Unmarshaller.unmarshal(jalview.schemabinding.version2.Sequence.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + public static jalview.schemabinding.version2.SequenceType unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.SequenceType) Unmarshaller.unmarshal(jalview.schemabinding.version2.Sequence.class, reader); + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/SequenceSet.java b/src/jalview/schemabinding/version2/SequenceSet.java index 91b0057..67c34ad 100755 --- a/src/jalview/schemabinding/version2/SequenceSet.java +++ b/src/jalview/schemabinding/version2/SequenceSet.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class SequenceSet. @@ -36,22 +27,22 @@ public class SequenceSet implements java.io.Serializable { //--------------------------/ /** - * Field _gapChar + * Field _gapChar. */ private java.lang.String _gapChar; /** - * Field _sequenceList + * Field _sequenceList. */ private java.util.Vector _sequenceList; /** - * Field _annotationList + * Field _annotationList. */ private java.util.Vector _annotationList; /** - * Field _sequenceSetPropertiesList + * Field _sequenceSetPropertiesList. */ private java.util.Vector _sequenceSetPropertiesList; @@ -62,10 +53,10 @@ public class SequenceSet implements java.io.Serializable { public SequenceSet() { super(); - _sequenceList = new Vector(); - _annotationList = new Vector(); - _sequenceSetPropertiesList = new Vector(); - } //-- jalview.schemabinding.version2.SequenceSet() + this._sequenceList = new java.util.Vector(); + this._annotationList = new java.util.Vector(); + this._sequenceSetPropertiesList = new java.util.Vector(); + } //-----------/ @@ -73,530 +64,552 @@ public class SequenceSet implements java.io.Serializable { //-----------/ /** - * Method addAnnotation - * * * * @param vAnnotation + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addAnnotation(jalview.schemabinding.version2.Annotation vAnnotation) - throws java.lang.IndexOutOfBoundsException - { - _annotationList.addElement(vAnnotation); - } //-- void addAnnotation(jalview.schemabinding.version2.Annotation) + public void addAnnotation( + final jalview.schemabinding.version2.Annotation vAnnotation) + throws java.lang.IndexOutOfBoundsException { + this._annotationList.addElement(vAnnotation); + } /** - * Method addAnnotation - * * * * @param index * @param vAnnotation + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addAnnotation(int index, jalview.schemabinding.version2.Annotation vAnnotation) - throws java.lang.IndexOutOfBoundsException - { - _annotationList.insertElementAt(vAnnotation, index); - } //-- void addAnnotation(int, jalview.schemabinding.version2.Annotation) + public void addAnnotation( + final int index, + final jalview.schemabinding.version2.Annotation vAnnotation) + throws java.lang.IndexOutOfBoundsException { + this._annotationList.add(index, vAnnotation); + } /** - * Method addSequence - * * * * @param vSequence + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addSequence(jalview.schemabinding.version2.Sequence vSequence) - throws java.lang.IndexOutOfBoundsException - { - _sequenceList.addElement(vSequence); - } //-- void addSequence(jalview.schemabinding.version2.Sequence) + public void addSequence( + final jalview.schemabinding.version2.Sequence vSequence) + throws java.lang.IndexOutOfBoundsException { + this._sequenceList.addElement(vSequence); + } /** - * Method addSequence - * * * * @param index * @param vSequence + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addSequence(int index, jalview.schemabinding.version2.Sequence vSequence) - throws java.lang.IndexOutOfBoundsException - { - _sequenceList.insertElementAt(vSequence, index); - } //-- void addSequence(int, jalview.schemabinding.version2.Sequence) + public void addSequence( + final int index, + final jalview.schemabinding.version2.Sequence vSequence) + throws java.lang.IndexOutOfBoundsException { + this._sequenceList.add(index, vSequence); + } /** - * Method addSequenceSetProperties - * * * * @param vSequenceSetProperties + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addSequenceSetProperties(jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties) - throws java.lang.IndexOutOfBoundsException - { - _sequenceSetPropertiesList.addElement(vSequenceSetProperties); - } //-- void addSequenceSetProperties(jalview.schemabinding.version2.SequenceSetProperties) + public void addSequenceSetProperties( + final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties) + throws java.lang.IndexOutOfBoundsException { + this._sequenceSetPropertiesList.addElement(vSequenceSetProperties); + } /** - * Method addSequenceSetProperties - * * * * @param index * @param vSequenceSetProperties + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addSequenceSetProperties(int index, jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties) - throws java.lang.IndexOutOfBoundsException - { - _sequenceSetPropertiesList.insertElementAt(vSequenceSetProperties, index); - } //-- void addSequenceSetProperties(int, jalview.schemabinding.version2.SequenceSetProperties) + public void addSequenceSetProperties( + final int index, + final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties) + throws java.lang.IndexOutOfBoundsException { + this._sequenceSetPropertiesList.add(index, vSequenceSetProperties); + } /** - * Method enumerateAnnotation - * - * + * Method enumerateAnnotation. * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.Annotation elements */ - public java.util.Enumeration enumerateAnnotation() - { - return _annotationList.elements(); - } //-- java.util.Enumeration enumerateAnnotation() + public java.util.Enumeration enumerateAnnotation( + ) { + return this._annotationList.elements(); + } /** - * Method enumerateSequence - * - * + * Method enumerateSequence. * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.Sequence elements */ - public java.util.Enumeration enumerateSequence() - { - return _sequenceList.elements(); - } //-- java.util.Enumeration enumerateSequence() + public java.util.Enumeration enumerateSequence( + ) { + return this._sequenceList.elements(); + } /** - * Method enumerateSequenceSetProperties + * Method enumerateSequenceSetProperties. * - * - * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.SequenceSetProperties elements */ - public java.util.Enumeration enumerateSequenceSetProperties() - { - return _sequenceSetPropertiesList.elements(); - } //-- java.util.Enumeration enumerateSequenceSetProperties() + public java.util.Enumeration enumerateSequenceSetProperties( + ) { + return this._sequenceSetPropertiesList.elements(); + } /** - * Method getAnnotation - * - * + * Method getAnnotation. * * @param index - * @return Annotation - */ - public jalview.schemabinding.version2.Annotation getAnnotation(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _annotationList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.Annotation at the given index + */ + public jalview.schemabinding.version2.Annotation getAnnotation( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._annotationList.size()) { + throw new IndexOutOfBoundsException("getAnnotation: Index value '" + index + "' not in range [0.." + (this._annotationList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.Annotation) _annotationList.elementAt(index); - } //-- jalview.schemabinding.version2.Annotation getAnnotation(int) + return (jalview.schemabinding.version2.Annotation) _annotationList.get(index); + } /** - * Method getAnnotation - * + * Method getAnnotation.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 Annotation + * @return this collection as an Array */ - public jalview.schemabinding.version2.Annotation[] getAnnotation() - { - int size = _annotationList.size(); - jalview.schemabinding.version2.Annotation[] mArray = new jalview.schemabinding.version2.Annotation[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.Annotation) _annotationList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Annotation[] getAnnotation() + public jalview.schemabinding.version2.Annotation[] getAnnotation( + ) { + jalview.schemabinding.version2.Annotation[] array = new jalview.schemabinding.version2.Annotation[0]; + return (jalview.schemabinding.version2.Annotation[]) this._annotationList.toArray(array); + } /** - * Method getAnnotationCount - * + * Method getAnnotationCount. * - * - * @return int + * @return the size of this collection */ - public int getAnnotationCount() - { - return _annotationList.size(); - } //-- int getAnnotationCount() + public int getAnnotationCount( + ) { + return this._annotationList.size(); + } /** * Returns the value of field 'gapChar'. * - * @return String - * @return the value of field 'gapChar'. + * @return the value of field 'GapChar'. */ - public java.lang.String getGapChar() - { + public java.lang.String getGapChar( + ) { return this._gapChar; - } //-- java.lang.String getGapChar() + } /** - * Method getSequence - * - * + * Method getSequence. * * @param index - * @return Sequence - */ - public jalview.schemabinding.version2.Sequence getSequence(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _sequenceList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.Sequence at the given index + */ + public jalview.schemabinding.version2.Sequence getSequence( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._sequenceList.size()) { + throw new IndexOutOfBoundsException("getSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.Sequence) _sequenceList.elementAt(index); - } //-- jalview.schemabinding.version2.Sequence getSequence(int) + return (jalview.schemabinding.version2.Sequence) _sequenceList.get(index); + } /** - * Method getSequence - * - * + * Method getSequence.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 Sequence + * @return this collection as an Array */ - public jalview.schemabinding.version2.Sequence[] getSequence() - { - int size = _sequenceList.size(); - jalview.schemabinding.version2.Sequence[] mArray = new jalview.schemabinding.version2.Sequence[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.Sequence) _sequenceList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.Sequence[] getSequence() + public jalview.schemabinding.version2.Sequence[] getSequence( + ) { + jalview.schemabinding.version2.Sequence[] array = new jalview.schemabinding.version2.Sequence[0]; + return (jalview.schemabinding.version2.Sequence[]) this._sequenceList.toArray(array); + } /** - * Method getSequenceCount - * + * Method getSequenceCount. * - * - * @return int + * @return the size of this collection */ - public int getSequenceCount() - { - return _sequenceList.size(); - } //-- int getSequenceCount() + public int getSequenceCount( + ) { + return this._sequenceList.size(); + } /** - * Method getSequenceSetProperties - * - * + * Method getSequenceSetProperties. * * @param index - * @return SequenceSetProperties - */ - public jalview.schemabinding.version2.SequenceSetProperties getSequenceSetProperties(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _sequenceSetPropertiesList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.SequenceSetProperties at the + * given index + */ + public jalview.schemabinding.version2.SequenceSetProperties getSequenceSetProperties( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._sequenceSetPropertiesList.size()) { + throw new IndexOutOfBoundsException("getSequenceSetProperties: Index value '" + index + "' not in range [0.." + (this._sequenceSetPropertiesList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.SequenceSetProperties) _sequenceSetPropertiesList.elementAt(index); - } //-- jalview.schemabinding.version2.SequenceSetProperties getSequenceSetProperties(int) + return (jalview.schemabinding.version2.SequenceSetProperties) _sequenceSetPropertiesList.get(index); + } /** - * Method getSequenceSetProperties - * - * + * Method getSequenceSetProperties.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 SequenceSetProperties + * @return this collection as an Array */ - public jalview.schemabinding.version2.SequenceSetProperties[] getSequenceSetProperties() - { - int size = _sequenceSetPropertiesList.size(); - jalview.schemabinding.version2.SequenceSetProperties[] mArray = new jalview.schemabinding.version2.SequenceSetProperties[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.SequenceSetProperties) _sequenceSetPropertiesList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.SequenceSetProperties[] getSequenceSetProperties() + public jalview.schemabinding.version2.SequenceSetProperties[] getSequenceSetProperties( + ) { + jalview.schemabinding.version2.SequenceSetProperties[] array = new jalview.schemabinding.version2.SequenceSetProperties[0]; + return (jalview.schemabinding.version2.SequenceSetProperties[]) this._sequenceSetPropertiesList.toArray(array); + } /** - * Method getSequenceSetPropertiesCount - * - * + * Method getSequenceSetPropertiesCount. * - * @return int + * @return the size of this collection */ - public int getSequenceSetPropertiesCount() - { - return _sequenceSetPropertiesList.size(); - } //-- int getSequenceSetPropertiesCount() + public int getSequenceSetPropertiesCount( + ) { + return this._sequenceSetPropertiesList.size(); + } /** - * Method isValid - * - * + * Method isValid. * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllAnnotation - * */ - public void removeAllAnnotation() - { - _annotationList.removeAllElements(); - } //-- void removeAllAnnotation() + public void removeAllAnnotation( + ) { + this._annotationList.clear(); + } /** - * Method removeAllSequence - * */ - public void removeAllSequence() - { - _sequenceList.removeAllElements(); - } //-- void removeAllSequence() + public void removeAllSequence( + ) { + this._sequenceList.clear(); + } /** - * Method removeAllSequenceSetProperties - * */ - public void removeAllSequenceSetProperties() - { - _sequenceSetPropertiesList.removeAllElements(); - } //-- void removeAllSequenceSetProperties() + public void removeAllSequenceSetProperties( + ) { + this._sequenceSetPropertiesList.clear(); + } /** - * Method removeAnnotation - * + * Method removeAnnotation. * + * @param vAnnotation + * @return true if the object was removed from the collection. + */ + public boolean removeAnnotation( + final jalview.schemabinding.version2.Annotation vAnnotation) { + boolean removed = _annotationList.remove(vAnnotation); + return removed; + } + + /** + * Method removeAnnotationAt. * * @param index - * @return Annotation + * @return the element removed from the collection */ - public jalview.schemabinding.version2.Annotation removeAnnotation(int index) - { - java.lang.Object obj = _annotationList.elementAt(index); - _annotationList.removeElementAt(index); + public jalview.schemabinding.version2.Annotation removeAnnotationAt( + final int index) { + java.lang.Object obj = this._annotationList.remove(index); return (jalview.schemabinding.version2.Annotation) obj; - } //-- jalview.schemabinding.version2.Annotation removeAnnotation(int) + } /** - * Method removeSequence - * + * Method removeSequence. * + * @param vSequence + * @return true if the object was removed from the collection. + */ + public boolean removeSequence( + final jalview.schemabinding.version2.Sequence vSequence) { + boolean removed = _sequenceList.remove(vSequence); + return removed; + } + + /** + * Method removeSequenceAt. * * @param index - * @return Sequence + * @return the element removed from the collection */ - public jalview.schemabinding.version2.Sequence removeSequence(int index) - { - java.lang.Object obj = _sequenceList.elementAt(index); - _sequenceList.removeElementAt(index); + public jalview.schemabinding.version2.Sequence removeSequenceAt( + final int index) { + java.lang.Object obj = this._sequenceList.remove(index); return (jalview.schemabinding.version2.Sequence) obj; - } //-- jalview.schemabinding.version2.Sequence removeSequence(int) + } /** - * Method removeSequenceSetProperties - * + * Method removeSequenceSetProperties. * + * @param vSequenceSetProperties + * @return true if the object was removed from the collection. + */ + public boolean removeSequenceSetProperties( + final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties) { + boolean removed = _sequenceSetPropertiesList.remove(vSequenceSetProperties); + return removed; + } + + /** + * Method removeSequenceSetPropertiesAt. * * @param index - * @return SequenceSetProperties + * @return the element removed from the collection */ - public jalview.schemabinding.version2.SequenceSetProperties removeSequenceSetProperties(int index) - { - java.lang.Object obj = _sequenceSetPropertiesList.elementAt(index); - _sequenceSetPropertiesList.removeElementAt(index); + public jalview.schemabinding.version2.SequenceSetProperties removeSequenceSetPropertiesAt( + final int index) { + java.lang.Object obj = this._sequenceSetPropertiesList.remove(index); return (jalview.schemabinding.version2.SequenceSetProperties) obj; - } //-- jalview.schemabinding.version2.SequenceSetProperties removeSequenceSetProperties(int) + } /** - * Method setAnnotation - * * * * @param index * @param vAnnotation - */ - public void setAnnotation(int index, jalview.schemabinding.version2.Annotation vAnnotation) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _annotationList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setAnnotation( + final int index, + final jalview.schemabinding.version2.Annotation vAnnotation) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._annotationList.size()) { + throw new IndexOutOfBoundsException("setAnnotation: Index value '" + index + "' not in range [0.." + (this._annotationList.size() - 1) + "]"); } - _annotationList.setElementAt(vAnnotation, index); - } //-- void setAnnotation(int, jalview.schemabinding.version2.Annotation) + + this._annotationList.set(index, vAnnotation); + } /** - * Method setAnnotation * * - * - * @param annotationArray + * @param vAnnotationArray */ - public void setAnnotation(jalview.schemabinding.version2.Annotation[] annotationArray) - { + public void setAnnotation( + final jalview.schemabinding.version2.Annotation[] vAnnotationArray) { //-- copy array - _annotationList.removeAllElements(); - for (int i = 0; i < annotationArray.length; i++) { - _annotationList.addElement(annotationArray[i]); + _annotationList.clear(); + + for (int i = 0; i < vAnnotationArray.length; i++) { + this._annotationList.add(vAnnotationArray[i]); } - } //-- void setAnnotation(jalview.schemabinding.version2.Annotation) + } /** * Sets the value of field 'gapChar'. * * @param gapChar the value of field 'gapChar'. */ - public void setGapChar(java.lang.String gapChar) - { + public void setGapChar( + final java.lang.String gapChar) { this._gapChar = gapChar; - } //-- void setGapChar(java.lang.String) + } /** - * Method setSequence - * * * * @param index * @param vSequence - */ - public void setSequence(int index, jalview.schemabinding.version2.Sequence vSequence) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _sequenceList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setSequence( + final int index, + final jalview.schemabinding.version2.Sequence vSequence) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._sequenceList.size()) { + throw new IndexOutOfBoundsException("setSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]"); } - _sequenceList.setElementAt(vSequence, index); - } //-- void setSequence(int, jalview.schemabinding.version2.Sequence) + + this._sequenceList.set(index, vSequence); + } /** - * Method setSequence * * - * - * @param sequenceArray + * @param vSequenceArray */ - public void setSequence(jalview.schemabinding.version2.Sequence[] sequenceArray) - { + public void setSequence( + final jalview.schemabinding.version2.Sequence[] vSequenceArray) { //-- copy array - _sequenceList.removeAllElements(); - for (int i = 0; i < sequenceArray.length; i++) { - _sequenceList.addElement(sequenceArray[i]); + _sequenceList.clear(); + + for (int i = 0; i < vSequenceArray.length; i++) { + this._sequenceList.add(vSequenceArray[i]); } - } //-- void setSequence(jalview.schemabinding.version2.Sequence) + } /** - * Method setSequenceSetProperties - * * * * @param index * @param vSequenceSetProperties - */ - public void setSequenceSetProperties(int index, jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _sequenceSetPropertiesList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setSequenceSetProperties( + final int index, + final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._sequenceSetPropertiesList.size()) { + throw new IndexOutOfBoundsException("setSequenceSetProperties: Index value '" + index + "' not in range [0.." + (this._sequenceSetPropertiesList.size() - 1) + "]"); } - _sequenceSetPropertiesList.setElementAt(vSequenceSetProperties, index); - } //-- void setSequenceSetProperties(int, jalview.schemabinding.version2.SequenceSetProperties) + + this._sequenceSetPropertiesList.set(index, vSequenceSetProperties); + } /** - * Method setSequenceSetProperties * * - * - * @param sequenceSetPropertiesArray + * @param vSequenceSetPropertiesArray */ - public void setSequenceSetProperties(jalview.schemabinding.version2.SequenceSetProperties[] sequenceSetPropertiesArray) - { + public void setSequenceSetProperties( + final jalview.schemabinding.version2.SequenceSetProperties[] vSequenceSetPropertiesArray) { //-- copy array - _sequenceSetPropertiesList.removeAllElements(); - for (int i = 0; i < sequenceSetPropertiesArray.length; i++) { - _sequenceSetPropertiesList.addElement(sequenceSetPropertiesArray[i]); + _sequenceSetPropertiesList.clear(); + + for (int i = 0; i < vSequenceSetPropertiesArray.length; i++) { + this._sequenceSetPropertiesList.add(vSequenceSetPropertiesArray[i]); } - } //-- void setSequenceSetProperties(jalview.schemabinding.version2.SequenceSetProperties) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.SequenceSet + */ + public static jalview.schemabinding.version2.SequenceSet unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.SequenceSet) Unmarshaller.unmarshal(jalview.schemabinding.version2.SequenceSet.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/SequenceSetProperties.java b/src/jalview/schemabinding/version2/SequenceSetProperties.java index 8fd310f..a078c78 100644 --- a/src/jalview/schemabinding/version2/SequenceSetProperties.java +++ b/src/jalview/schemabinding/version2/SequenceSetProperties.java @@ -1,173 +1,170 @@ -/* - * This class was automatically generated with - * Castor 0.9.6, using an XML - * Schema. - * $Id$ - */ - -package jalview.schemabinding.version2; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Class SequenceSetProperties. - * - * @version $Revision$ $Date$ - */ -public class SequenceSetProperties implements java.io.Serializable { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _key - */ - private java.lang.String _key; - - /** - * Field _value - */ - private java.lang.String _value; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public SequenceSetProperties() { - super(); - } //-- jalview.schemabinding.version2.SequenceSetProperties() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Returns the value of field 'key'. - * - * @return String - * @return the value of field 'key'. - */ - public java.lang.String getKey() - { - return this._key; - } //-- java.lang.String getKey() - - /** - * Returns the value of field 'value'. - * - * @return String - * @return the value of field 'value'. - */ - public java.lang.String getValue() - { - return this._value; - } //-- java.lang.String getValue() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'key'. - * - * @param key the value of field 'key'. - */ - public void setKey(java.lang.String key) - { - this._key = key; - } //-- void setKey(java.lang.String) - - /** - * Sets the value of field 'value'. - * - * @param value the value of field 'value'. - */ - public void setValue(java.lang.String value) - { - this._value = value; - } //-- void setValue(java.lang.String) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (jalview.schemabinding.version2.SequenceSetProperties) Unmarshaller.unmarshal(jalview.schemabinding.version2.SequenceSetProperties.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * 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 SequenceSetProperties. + * + * @version $Revision$ $Date$ + */ +public class SequenceSetProperties implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _key. + */ + private java.lang.String _key; + + /** + * Field _value. + */ + private java.lang.String _value; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceSetProperties() { + super(); + } + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'key'. + * + * @return the value of field 'Key'. + */ + public java.lang.String getKey( + ) { + return this._key; + } + + /** + * Returns the value of field 'value'. + * + * @return the value of field 'Value'. + */ + public java.lang.String getValue( + ) { + return this._value; + } + + /** + * 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 'key'. + * + * @param key the value of field 'key'. + */ + public void setKey( + final java.lang.String key) { + this._key = key; + } + + /** + * Sets the value of field 'value'. + * + * @param value the value of field 'value'. + */ + public void setValue( + final java.lang.String value) { + this._value = value; + } + + /** + * 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.SequenceSetProperties + */ + public static jalview.schemabinding.version2.SequenceSetProperties unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.SequenceSetProperties) Unmarshaller.unmarshal(jalview.schemabinding.version2.SequenceSetProperties.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/SequenceType.java b/src/jalview/schemabinding/version2/SequenceType.java index d413e2d..0d07812 100755 --- a/src/jalview/schemabinding/version2/SequenceType.java +++ b/src/jalview/schemabinding/version2/SequenceType.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class SequenceType. @@ -34,22 +27,22 @@ public class SequenceType implements java.io.Serializable { //--------------------------/ /** - * Field _id + * Field _id. */ private java.lang.String _id; /** - * Field _description + * Field _description. */ private java.lang.String _description; /** - * Field _sequence + * Field _sequence. */ private java.lang.String _sequence; /** - * Field _name + * Field _name. */ private java.lang.String _name; @@ -60,7 +53,7 @@ public class SequenceType implements java.io.Serializable { public SequenceType() { super(); - } //-- jalview.schemabinding.version2.SequenceType() + } //-----------/ @@ -70,156 +63,158 @@ public class SequenceType implements java.io.Serializable { /** * Returns the value of field 'description'. * - * @return String - * @return the value of field 'description'. + * @return the value of field 'Description'. */ - public java.lang.String getDescription() - { + public java.lang.String getDescription( + ) { return this._description; - } //-- java.lang.String getDescription() + } /** * Returns the value of field 'id'. * - * @return String - * @return the value of field 'id'. + * @return the value of field 'Id'. */ - public java.lang.String getId() - { + public java.lang.String getId( + ) { return this._id; - } //-- java.lang.String getId() + } /** * Returns the value of field 'name'. * - * @return String - * @return the value of field 'name'. + * @return the value of field 'Name'. */ - public java.lang.String getName() - { + public java.lang.String getName( + ) { return this._name; - } //-- java.lang.String getName() + } /** * Returns the value of field 'sequence'. * - * @return String - * @return the value of field 'sequence'. + * @return the value of field 'Sequence'. */ - public java.lang.String getSequence() - { + public java.lang.String getSequence( + ) { return this._sequence; - } //-- java.lang.String getSequence() + } /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'description'. * * @param description the value of field 'description'. */ - public void setDescription(java.lang.String description) - { + public void setDescription( + final java.lang.String description) { this._description = description; - } //-- void setDescription(java.lang.String) + } /** * Sets the value of field 'id'. * * @param id the value of field 'id'. */ - public void setId(java.lang.String id) - { + public void setId( + final java.lang.String id) { this._id = id; - } //-- void setId(java.lang.String) + } /** * Sets the value of field 'name'. * * @param name the value of field 'name'. */ - public void setName(java.lang.String name) - { + public void setName( + final java.lang.String name) { this._name = name; - } //-- void setName(java.lang.String) + } /** * Sets the value of field 'sequence'. * * @param sequence the value of field 'sequence'. */ - public void setSequence(java.lang.String sequence) - { + public void setSequence( + final java.lang.String sequence) { this._sequence = sequence; - } //-- void setSequence(java.lang.String) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.SequenceType + */ + public static jalview.schemabinding.version2.SequenceType unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.SequenceType) Unmarshaller.unmarshal(jalview.schemabinding.version2.SequenceType.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/Setting.java b/src/jalview/schemabinding/version2/Setting.java index d276b9f..5cd78bd 100755 --- a/src/jalview/schemabinding/version2/Setting.java +++ b/src/jalview/schemabinding/version2/Setting.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class Setting. @@ -34,12 +27,12 @@ public class Setting implements java.io.Serializable { //--------------------------/ /** - * Field _type + * Field _type. */ private java.lang.String _type; /** - * Field _colour + * Field _colour. */ private int _colour; @@ -49,7 +42,7 @@ public class Setting implements java.io.Serializable { private boolean _has_colour; /** - * Field _display + * Field _display. */ private boolean _display; @@ -59,7 +52,7 @@ public class Setting implements java.io.Serializable { private boolean _has_display; /** - * Field _order + * Field _order. */ private float _order; @@ -75,7 +68,7 @@ public class Setting implements java.io.Serializable { public Setting() { super(); - } //-- jalview.schemabinding.version2.Setting() + } //-----------/ @@ -83,224 +76,223 @@ public class Setting implements java.io.Serializable { //-----------/ /** - * Method deleteColour - * */ - public void deleteColour() - { + public void deleteColour( + ) { this._has_colour= false; - } //-- void deleteColour() + } /** - * Method deleteDisplay - * */ - public void deleteDisplay() - { + public void deleteDisplay( + ) { this._has_display= false; - } //-- void deleteDisplay() + } /** - * Method deleteOrder - * */ - public void deleteOrder() - { + public void deleteOrder( + ) { this._has_order= false; - } //-- void deleteOrder() + } /** * Returns the value of field 'colour'. * - * @return int - * @return the value of field 'colour'. + * @return the value of field 'Colour'. */ - public int getColour() - { + public int getColour( + ) { return this._colour; - } //-- int getColour() + } /** * Returns the value of field 'display'. * - * @return boolean - * @return the value of field 'display'. + * @return the value of field 'Display'. */ - public boolean getDisplay() - { + public boolean getDisplay( + ) { return this._display; - } //-- boolean getDisplay() + } /** * Returns the value of field 'order'. * - * @return float - * @return the value of field 'order'. + * @return the value of field 'Order'. */ - public float getOrder() - { + public float getOrder( + ) { return this._order; - } //-- float getOrder() + } /** * Returns the value of field 'type'. * - * @return String - * @return the value of field 'type'. + * @return the value of field 'Type'. */ - public java.lang.String getType() - { + public java.lang.String getType( + ) { return this._type; - } //-- java.lang.String getType() + } /** - * Method hasColour + * Method hasColour. * - * - * - * @return boolean + * @return true if at least one Colour has been added */ - public boolean hasColour() - { + public boolean hasColour( + ) { return this._has_colour; - } //-- boolean hasColour() + } /** - * Method hasDisplay - * + * Method hasDisplay. * - * - * @return boolean + * @return true if at least one Display has been added */ - public boolean hasDisplay() - { + public boolean hasDisplay( + ) { return this._has_display; - } //-- boolean hasDisplay() + } /** - * Method hasOrder - * - * + * Method hasOrder. * - * @return boolean + * @return true if at least one Order has been added */ - public boolean hasOrder() - { + public boolean hasOrder( + ) { return this._has_order; - } //-- boolean hasOrder() + } /** - * Method isValid - * + * Returns the value of field 'display'. * + * @return the value of field 'Display'. + */ + public boolean isDisplay( + ) { + return this._display; + } + + /** + * Method isValid. * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'colour'. * * @param colour the value of field 'colour'. */ - public void setColour(int colour) - { + public void setColour( + final int colour) { this._colour = colour; this._has_colour = true; - } //-- void setColour(int) + } /** * Sets the value of field 'display'. * * @param display the value of field 'display'. */ - public void setDisplay(boolean display) - { + public void setDisplay( + final boolean display) { this._display = display; this._has_display = true; - } //-- void setDisplay(boolean) + } /** * Sets the value of field 'order'. * * @param order the value of field 'order'. */ - public void setOrder(float order) - { + public void setOrder( + final float order) { this._order = order; this._has_order = true; - } //-- void setOrder(float) + } /** * Sets the value of field 'type'. * * @param type the value of field 'type'. */ - public void setType(java.lang.String type) - { + public void setType( + final java.lang.String type) { this._type = type; - } //-- void setType(java.lang.String) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.Settin */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + public static jalview.schemabinding.version2.Setting unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.Setting) Unmarshaller.unmarshal(jalview.schemabinding.version2.Setting.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/StructureState.java b/src/jalview/schemabinding/version2/StructureState.java index 3e913cb..968a559 100644 --- a/src/jalview/schemabinding/version2/StructureState.java +++ b/src/jalview/schemabinding/version2/StructureState.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class StructureState. @@ -39,7 +32,7 @@ public class StructureState implements java.io.Serializable { private java.lang.String _content = ""; /** - * Field _visible + * Field _visible. */ private boolean _visible; @@ -49,7 +42,7 @@ public class StructureState implements java.io.Serializable { private boolean _has_visible; /** - * Field _xpos + * Field _xpos. */ private int _xpos; @@ -59,7 +52,7 @@ public class StructureState implements java.io.Serializable { private boolean _has_xpos; /** - * Field _ypos + * Field _ypos. */ private int _ypos; @@ -69,7 +62,7 @@ public class StructureState implements java.io.Serializable { private boolean _has_ypos; /** - * Field _width + * Field _width. */ private int _width; @@ -79,7 +72,7 @@ public class StructureState implements java.io.Serializable { private boolean _has_width; /** - * Field _height + * Field _height. */ private int _height; @@ -96,7 +89,7 @@ public class StructureState implements java.io.Serializable { public StructureState() { super(); setContent(""); - } //-- jalview.schemabinding.version2.StructureState() + } //-----------/ @@ -104,222 +97,207 @@ public class StructureState implements java.io.Serializable { //-----------/ /** - * Method deleteHeight - * */ - public void deleteHeight() - { + public void deleteHeight( + ) { this._has_height= false; - } //-- void deleteHeight() + } /** - * Method deleteVisible - * */ - public void deleteVisible() - { + public void deleteVisible( + ) { this._has_visible= false; - } //-- void deleteVisible() + } /** - * Method deleteWidth - * */ - public void deleteWidth() - { + public void deleteWidth( + ) { this._has_width= false; - } //-- void deleteWidth() + } /** - * Method deleteXpos - * */ - public void deleteXpos() - { + public void deleteXpos( + ) { this._has_xpos= false; - } //-- void deleteXpos() + } /** - * Method deleteYpos - * */ - public void deleteYpos() - { + public void deleteYpos( + ) { this._has_ypos= false; - } //-- void deleteYpos() + } /** * Returns the value of field 'content'. The field 'content' * has the following description: internal content storage * - * @return String - * @return the value of field 'content'. + * @return the value of field 'Content'. */ - public java.lang.String getContent() - { + public java.lang.String getContent( + ) { return this._content; - } //-- java.lang.String getContent() + } /** * Returns the value of field 'height'. * - * @return int - * @return the value of field 'height'. + * @return the value of field 'Height'. */ - public int getHeight() - { + public int getHeight( + ) { return this._height; - } //-- int getHeight() + } /** * Returns the value of field 'visible'. * - * @return boolean - * @return the value of field 'visible'. + * @return the value of field 'Visible'. */ - public boolean getVisible() - { + public boolean getVisible( + ) { return this._visible; - } //-- boolean getVisible() + } /** * Returns the value of field 'width'. * - * @return int - * @return the value of field 'width'. + * @return the value of field 'Width'. */ - public int getWidth() - { + public int getWidth( + ) { return this._width; - } //-- int getWidth() + } /** * Returns the value of field 'xpos'. * - * @return int - * @return the value of field 'xpos'. + * @return the value of field 'Xpos'. */ - public int getXpos() - { + public int getXpos( + ) { return this._xpos; - } //-- int getXpos() + } /** * Returns the value of field 'ypos'. * - * @return int - * @return the value of field 'ypos'. + * @return the value of field 'Ypos'. */ - public int getYpos() - { + public int getYpos( + ) { return this._ypos; - } //-- int getYpos() + } /** - * Method hasHeight - * + * Method hasHeight. * - * - * @return boolean + * @return true if at least one Height has been added */ - public boolean hasHeight() - { + public boolean hasHeight( + ) { return this._has_height; - } //-- boolean hasHeight() + } /** - * Method hasVisible - * + * Method hasVisible. * - * - * @return boolean + * @return true if at least one Visible has been added */ - public boolean hasVisible() - { + public boolean hasVisible( + ) { return this._has_visible; - } //-- boolean hasVisible() + } /** - * Method hasWidth - * + * Method hasWidth. * - * - * @return boolean + * @return true if at least one Width has been added */ - public boolean hasWidth() - { + public boolean hasWidth( + ) { return this._has_width; - } //-- boolean hasWidth() + } /** - * Method hasXpos - * + * Method hasXpos. * - * - * @return boolean + * @return true if at least one Xpos has been added */ - public boolean hasXpos() - { + public boolean hasXpos( + ) { return this._has_xpos; - } //-- boolean hasXpos() + } /** - * Method hasYpos - * - * + * Method hasYpos. * - * @return boolean + * @return true if at least one Ypos has been added */ - public boolean hasYpos() - { + public boolean hasYpos( + ) { return this._has_ypos; - } //-- boolean hasYpos() + } /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal + * Returns the value of field 'visible'. * + * @return the value of field 'Visible'. + */ + public boolean isVisible( + ) { + return this._visible; + } + + /** * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'content'. The field 'content' has @@ -327,89 +305,94 @@ public class StructureState implements java.io.Serializable { * * @param content the value of field 'content'. */ - public void setContent(java.lang.String content) - { + public void setContent( + final java.lang.String content) { this._content = content; - } //-- void setContent(java.lang.String) + } /** * Sets the value of field 'height'. * * @param height the value of field 'height'. */ - public void setHeight(int height) - { + public void setHeight( + final int height) { this._height = height; this._has_height = true; - } //-- void setHeight(int) + } /** * Sets the value of field 'visible'. * * @param visible the value of field 'visible'. */ - public void setVisible(boolean visible) - { + public void setVisible( + final boolean visible) { this._visible = visible; this._has_visible = true; - } //-- void setVisible(boolean) + } /** * Sets the value of field 'width'. * * @param width the value of field 'width'. */ - public void setWidth(int width) - { + public void setWidth( + final int width) { this._width = width; this._has_width = true; - } //-- void setWidth(int) + } /** * Sets the value of field 'xpos'. * * @param xpos the value of field 'xpos'. */ - public void setXpos(int xpos) - { + public void setXpos( + final int xpos) { this._xpos = xpos; this._has_xpos = true; - } //-- void setXpos(int) + } /** * Sets the value of field 'ypos'. * * @param ypos the value of field 'ypos'. */ - public void setYpos(int ypos) - { + public void setYpos( + final int ypos) { this._ypos = ypos; this._has_ypos = true; - } //-- void setYpos(int) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.StructureState + */ + public static jalview.schemabinding.version2.StructureState unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.StructureState) Unmarshaller.unmarshal(jalview.schemabinding.version2.StructureState.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/ThresholdLine.java b/src/jalview/schemabinding/version2/ThresholdLine.java index 85854c1..4e3f124 100755 --- a/src/jalview/schemabinding/version2/ThresholdLine.java +++ b/src/jalview/schemabinding/version2/ThresholdLine.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class ThresholdLine. @@ -34,12 +27,12 @@ public class ThresholdLine implements java.io.Serializable { //--------------------------/ /** - * Field _label + * Field _label. */ private java.lang.String _label; /** - * Field _value + * Field _value. */ private float _value; @@ -49,7 +42,7 @@ public class ThresholdLine implements java.io.Serializable { private boolean _has_value; /** - * Field _colour + * Field _colour. */ private int _colour; @@ -65,7 +58,7 @@ public class ThresholdLine implements java.io.Serializable { public ThresholdLine() { super(); - } //-- jalview.schemabinding.version2.ThresholdLine() + } //-----------/ @@ -73,181 +66,176 @@ public class ThresholdLine implements java.io.Serializable { //-----------/ /** - * Method deleteColour - * */ - public void deleteColour() - { + public void deleteColour( + ) { this._has_colour= false; - } //-- void deleteColour() + } /** - * Method deleteValue - * */ - public void deleteValue() - { + public void deleteValue( + ) { this._has_value= false; - } //-- void deleteValue() + } /** * Returns the value of field 'colour'. * - * @return int - * @return the value of field 'colour'. + * @return the value of field 'Colour'. */ - public int getColour() - { + public int getColour( + ) { return this._colour; - } //-- int getColour() + } /** * Returns the value of field 'label'. * - * @return String - * @return the value of field 'label'. + * @return the value of field 'Label'. */ - public java.lang.String getLabel() - { + public java.lang.String getLabel( + ) { return this._label; - } //-- java.lang.String getLabel() + } /** * Returns the value of field 'value'. * - * @return float - * @return the value of field 'value'. + * @return the value of field 'Value'. */ - public float getValue() - { + public float getValue( + ) { return this._value; - } //-- float getValue() + } /** - * Method hasColour - * + * Method hasColour. * - * - * @return boolean + * @return true if at least one Colour has been added */ - public boolean hasColour() - { + public boolean hasColour( + ) { return this._has_colour; - } //-- boolean hasColour() + } /** - * Method hasValue - * + * Method hasValue. * - * - * @return boolean + * @return true if at least one Value has been added */ - public boolean hasValue() - { + public boolean hasValue( + ) { return this._has_value; - } //-- boolean hasValue() + } /** - * Method isValid - * + * Method isValid. * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'colour'. * * @param colour the value of field 'colour'. */ - public void setColour(int colour) - { + public void setColour( + final int colour) { this._colour = colour; this._has_colour = true; - } //-- void setColour(int) + } /** * Sets the value of field 'label'. * * @param label the value of field 'label'. */ - public void setLabel(java.lang.String label) - { + public void setLabel( + final java.lang.String label) { this._label = label; - } //-- void setLabel(java.lang.String) + } /** * Sets the value of field 'value'. * * @param value the value of field 'value'. */ - public void setValue(float value) - { + public void setValue( + final float value) { this._value = value; this._has_value = true; - } //-- void setValue(float) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.ThresholdLine + */ + public static jalview.schemabinding.version2.ThresholdLine unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller.unmarshal(jalview.schemabinding.version2.ThresholdLine.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/Tree.java b/src/jalview/schemabinding/version2/Tree.java index 96b2e18..3bbc231 100755 --- a/src/jalview/schemabinding/version2/Tree.java +++ b/src/jalview/schemabinding/version2/Tree.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class Tree. @@ -34,7 +27,7 @@ public class Tree implements java.io.Serializable { //--------------------------/ /** - * Field _width + * Field _width. */ private int _width; @@ -44,7 +37,7 @@ public class Tree implements java.io.Serializable { private boolean _has_width; /** - * Field _height + * Field _height. */ private int _height; @@ -54,7 +47,7 @@ public class Tree implements java.io.Serializable { private boolean _has_height; /** - * Field _xpos + * Field _xpos. */ private int _xpos; @@ -64,7 +57,7 @@ public class Tree implements java.io.Serializable { private boolean _has_xpos; /** - * Field _ypos + * Field _ypos. */ private int _ypos; @@ -74,12 +67,12 @@ public class Tree implements java.io.Serializable { private boolean _has_ypos; /** - * Field _fontName + * Field _fontName. */ private java.lang.String _fontName; /** - * Field _fontSize + * Field _fontSize. */ private int _fontSize; @@ -89,7 +82,7 @@ public class Tree implements java.io.Serializable { private boolean _has_fontSize; /** - * Field _fontStyle + * Field _fontStyle. */ private int _fontStyle; @@ -99,7 +92,7 @@ public class Tree implements java.io.Serializable { private boolean _has_fontStyle; /** - * Field _threshold + * Field _threshold. */ private float _threshold; @@ -109,7 +102,7 @@ public class Tree implements java.io.Serializable { private boolean _has_threshold; /** - * Field _showBootstrap + * Field _showBootstrap. */ private boolean _showBootstrap; @@ -119,7 +112,7 @@ public class Tree implements java.io.Serializable { private boolean _has_showBootstrap; /** - * Field _showDistances + * Field _showDistances. */ private boolean _showDistances; @@ -129,7 +122,7 @@ public class Tree implements java.io.Serializable { private boolean _has_showDistances; /** - * Field _markUnlinked + * Field _markUnlinked. */ private boolean _markUnlinked; @@ -139,7 +132,7 @@ public class Tree implements java.io.Serializable { private boolean _has_markUnlinked; /** - * Field _fitToWindow + * Field _fitToWindow. */ private boolean _fitToWindow; @@ -149,7 +142,7 @@ public class Tree implements java.io.Serializable { private boolean _has_fitToWindow; /** - * Field _currentTree + * Field _currentTree. */ private boolean _currentTree; @@ -159,12 +152,12 @@ public class Tree implements java.io.Serializable { private boolean _has_currentTree; /** - * Field _title + * Field _title. */ private java.lang.String _title; /** - * Field _newick + * Field _newick. */ private java.lang.String _newick; @@ -175,7 +168,7 @@ public class Tree implements java.io.Serializable { public Tree() { super(); - } //-- jalview.schemabinding.version2.Tree() + } //-----------/ @@ -183,653 +176,645 @@ public class Tree implements java.io.Serializable { //-----------/ /** - * Method deleteCurrentTree - * */ - public void deleteCurrentTree() - { + public void deleteCurrentTree( + ) { this._has_currentTree= false; - } //-- void deleteCurrentTree() + } /** - * Method deleteFitToWindow - * */ - public void deleteFitToWindow() - { + public void deleteFitToWindow( + ) { this._has_fitToWindow= false; - } //-- void deleteFitToWindow() + } /** - * Method deleteFontSize - * */ - public void deleteFontSize() - { + public void deleteFontSize( + ) { this._has_fontSize= false; - } //-- void deleteFontSize() + } /** - * Method deleteFontStyle - * */ - public void deleteFontStyle() - { + public void deleteFontStyle( + ) { this._has_fontStyle= false; - } //-- void deleteFontStyle() + } /** - * Method deleteHeight - * */ - public void deleteHeight() - { + public void deleteHeight( + ) { this._has_height= false; - } //-- void deleteHeight() + } /** - * Method deleteMarkUnlinked - * */ - public void deleteMarkUnlinked() - { + public void deleteMarkUnlinked( + ) { this._has_markUnlinked= false; - } //-- void deleteMarkUnlinked() + } /** - * Method deleteShowBootstrap - * */ - public void deleteShowBootstrap() - { + public void deleteShowBootstrap( + ) { this._has_showBootstrap= false; - } //-- void deleteShowBootstrap() + } /** - * Method deleteShowDistances - * */ - public void deleteShowDistances() - { + public void deleteShowDistances( + ) { this._has_showDistances= false; - } //-- void deleteShowDistances() + } /** - * Method deleteThreshold - * */ - public void deleteThreshold() - { + public void deleteThreshold( + ) { this._has_threshold= false; - } //-- void deleteThreshold() + } /** - * Method deleteWidth - * */ - public void deleteWidth() - { + public void deleteWidth( + ) { this._has_width= false; - } //-- void deleteWidth() + } /** - * Method deleteXpos - * */ - public void deleteXpos() - { + public void deleteXpos( + ) { this._has_xpos= false; - } //-- void deleteXpos() + } /** - * Method deleteYpos - * */ - public void deleteYpos() - { + public void deleteYpos( + ) { this._has_ypos= false; - } //-- void deleteYpos() + } /** * Returns the value of field 'currentTree'. * - * @return boolean - * @return the value of field 'currentTree'. + * @return the value of field 'CurrentTree'. */ - public boolean getCurrentTree() - { + public boolean getCurrentTree( + ) { return this._currentTree; - } //-- boolean getCurrentTree() + } /** * Returns the value of field 'fitToWindow'. * - * @return boolean - * @return the value of field 'fitToWindow'. + * @return the value of field 'FitToWindow'. */ - public boolean getFitToWindow() - { + public boolean getFitToWindow( + ) { return this._fitToWindow; - } //-- boolean getFitToWindow() + } /** * Returns the value of field 'fontName'. * - * @return String - * @return the value of field 'fontName'. + * @return the value of field 'FontName'. */ - public java.lang.String getFontName() - { + public java.lang.String getFontName( + ) { return this._fontName; - } //-- java.lang.String getFontName() + } /** * Returns the value of field 'fontSize'. * - * @return int - * @return the value of field 'fontSize'. + * @return the value of field 'FontSize'. */ - public int getFontSize() - { + public int getFontSize( + ) { return this._fontSize; - } //-- int getFontSize() + } /** * Returns the value of field 'fontStyle'. * - * @return int - * @return the value of field 'fontStyle'. + * @return the value of field 'FontStyle'. */ - public int getFontStyle() - { + public int getFontStyle( + ) { return this._fontStyle; - } //-- int getFontStyle() + } /** * Returns the value of field 'height'. * - * @return int - * @return the value of field 'height'. + * @return the value of field 'Height'. */ - public int getHeight() - { + public int getHeight( + ) { return this._height; - } //-- int getHeight() + } /** * Returns the value of field 'markUnlinked'. * - * @return boolean - * @return the value of field 'markUnlinked'. + * @return the value of field 'MarkUnlinked'. */ - public boolean getMarkUnlinked() - { + public boolean getMarkUnlinked( + ) { return this._markUnlinked; - } //-- boolean getMarkUnlinked() + } /** * Returns the value of field 'newick'. * - * @return String - * @return the value of field 'newick'. + * @return the value of field 'Newick'. */ - public java.lang.String getNewick() - { + public java.lang.String getNewick( + ) { return this._newick; - } //-- java.lang.String getNewick() + } /** * Returns the value of field 'showBootstrap'. * - * @return boolean - * @return the value of field 'showBootstrap'. + * @return the value of field 'ShowBootstrap'. */ - public boolean getShowBootstrap() - { + public boolean getShowBootstrap( + ) { return this._showBootstrap; - } //-- boolean getShowBootstrap() + } /** * Returns the value of field 'showDistances'. * - * @return boolean - * @return the value of field 'showDistances'. + * @return the value of field 'ShowDistances'. */ - public boolean getShowDistances() - { + public boolean getShowDistances( + ) { return this._showDistances; - } //-- boolean getShowDistances() + } /** * Returns the value of field 'threshold'. * - * @return float - * @return the value of field 'threshold'. + * @return the value of field 'Threshold'. */ - public float getThreshold() - { + public float getThreshold( + ) { return this._threshold; - } //-- float getThreshold() + } /** * Returns the value of field 'title'. * - * @return String - * @return the value of field 'title'. + * @return the value of field 'Title'. */ - public java.lang.String getTitle() - { + public java.lang.String getTitle( + ) { return this._title; - } //-- java.lang.String getTitle() + } /** * Returns the value of field 'width'. * - * @return int - * @return the value of field 'width'. + * @return the value of field 'Width'. */ - public int getWidth() - { + public int getWidth( + ) { return this._width; - } //-- int getWidth() + } /** * Returns the value of field 'xpos'. * - * @return int - * @return the value of field 'xpos'. + * @return the value of field 'Xpos'. */ - public int getXpos() - { + public int getXpos( + ) { return this._xpos; - } //-- int getXpos() + } /** * Returns the value of field 'ypos'. * - * @return int - * @return the value of field 'ypos'. + * @return the value of field 'Ypos'. */ - public int getYpos() - { + public int getYpos( + ) { return this._ypos; - } //-- int getYpos() + } /** - * Method hasCurrentTree - * - * + * Method hasCurrentTree. * - * @return boolean + * @return true if at least one CurrentTree has been added */ - public boolean hasCurrentTree() - { + public boolean hasCurrentTree( + ) { return this._has_currentTree; - } //-- boolean hasCurrentTree() + } /** - * Method hasFitToWindow + * Method hasFitToWindow. * - * - * - * @return boolean + * @return true if at least one FitToWindow has been added */ - public boolean hasFitToWindow() - { + public boolean hasFitToWindow( + ) { return this._has_fitToWindow; - } //-- boolean hasFitToWindow() + } /** - * Method hasFontSize - * - * + * Method hasFontSize. * - * @return boolean + * @return true if at least one FontSize has been added */ - public boolean hasFontSize() - { + public boolean hasFontSize( + ) { return this._has_fontSize; - } //-- boolean hasFontSize() + } /** - * Method hasFontStyle + * Method hasFontStyle. * - * - * - * @return boolean + * @return true if at least one FontStyle has been added */ - public boolean hasFontStyle() - { + public boolean hasFontStyle( + ) { return this._has_fontStyle; - } //-- boolean hasFontStyle() + } /** - * Method hasHeight - * + * Method hasHeight. * - * - * @return boolean + * @return true if at least one Height has been added */ - public boolean hasHeight() - { + public boolean hasHeight( + ) { return this._has_height; - } //-- boolean hasHeight() + } /** - * Method hasMarkUnlinked - * + * Method hasMarkUnlinked. * - * - * @return boolean + * @return true if at least one MarkUnlinked has been added */ - public boolean hasMarkUnlinked() - { + public boolean hasMarkUnlinked( + ) { return this._has_markUnlinked; - } //-- boolean hasMarkUnlinked() + } /** - * Method hasShowBootstrap - * + * Method hasShowBootstrap. * - * - * @return boolean + * @return true if at least one ShowBootstrap has been added */ - public boolean hasShowBootstrap() - { + public boolean hasShowBootstrap( + ) { return this._has_showBootstrap; - } //-- boolean hasShowBootstrap() + } /** - * Method hasShowDistances - * + * Method hasShowDistances. * - * - * @return boolean + * @return true if at least one ShowDistances has been added */ - public boolean hasShowDistances() - { + public boolean hasShowDistances( + ) { return this._has_showDistances; - } //-- boolean hasShowDistances() + } /** - * Method hasThreshold - * - * + * Method hasThreshold. * - * @return boolean + * @return true if at least one Threshold has been added */ - public boolean hasThreshold() - { + public boolean hasThreshold( + ) { return this._has_threshold; - } //-- boolean hasThreshold() + } /** - * Method hasWidth - * - * + * Method hasWidth. * - * @return boolean + * @return true if at least one Width has been added */ - public boolean hasWidth() - { + public boolean hasWidth( + ) { return this._has_width; - } //-- boolean hasWidth() + } /** - * Method hasXpos + * Method hasXpos. * - * - * - * @return boolean + * @return true if at least one Xpos has been added */ - public boolean hasXpos() - { + public boolean hasXpos( + ) { return this._has_xpos; - } //-- boolean hasXpos() + } /** - * Method hasYpos + * Method hasYpos. * + * @return true if at least one Ypos has been added + */ + public boolean hasYpos( + ) { + return this._has_ypos; + } + + /** + * Returns the value of field 'currentTree'. * + * @return the value of field 'CurrentTree'. + */ + public boolean isCurrentTree( + ) { + return this._currentTree; + } + + /** + * Returns the value of field 'fitToWindow'. * - * @return boolean + * @return the value of field 'FitToWindow'. */ - public boolean hasYpos() - { - return this._has_ypos; - } //-- boolean hasYpos() + public boolean isFitToWindow( + ) { + return this._fitToWindow; + } /** - * Method isValid + * Returns the value of field 'markUnlinked'. * + * @return the value of field 'MarkUnlinked'. + */ + public boolean isMarkUnlinked( + ) { + return this._markUnlinked; + } + + /** + * Returns the value of field 'showBootstrap'. * + * @return the value of field 'ShowBootstrap'. + */ + public boolean isShowBootstrap( + ) { + return this._showBootstrap; + } + + /** + * Returns the value of field 'showDistances'. * - * @return boolean + * @return the value of field 'ShowDistances'. */ - public boolean isValid() - { + public boolean isShowDistances( + ) { + return this._showDistances; + } + + /** + * 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) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'currentTree'. * * @param currentTree the value of field 'currentTree'. */ - public void setCurrentTree(boolean currentTree) - { + public void setCurrentTree( + final boolean currentTree) { this._currentTree = currentTree; this._has_currentTree = true; - } //-- void setCurrentTree(boolean) + } /** * Sets the value of field 'fitToWindow'. * * @param fitToWindow the value of field 'fitToWindow'. */ - public void setFitToWindow(boolean fitToWindow) - { + public void setFitToWindow( + final boolean fitToWindow) { this._fitToWindow = fitToWindow; this._has_fitToWindow = true; - } //-- void setFitToWindow(boolean) + } /** * Sets the value of field 'fontName'. * * @param fontName the value of field 'fontName'. */ - public void setFontName(java.lang.String fontName) - { + public void setFontName( + final java.lang.String fontName) { this._fontName = fontName; - } //-- void setFontName(java.lang.String) + } /** * Sets the value of field 'fontSize'. * * @param fontSize the value of field 'fontSize'. */ - public void setFontSize(int fontSize) - { + public void setFontSize( + final int fontSize) { this._fontSize = fontSize; this._has_fontSize = true; - } //-- void setFontSize(int) + } /** * Sets the value of field 'fontStyle'. * * @param fontStyle the value of field 'fontStyle'. */ - public void setFontStyle(int fontStyle) - { + public void setFontStyle( + final int fontStyle) { this._fontStyle = fontStyle; this._has_fontStyle = true; - } //-- void setFontStyle(int) + } /** * Sets the value of field 'height'. * * @param height the value of field 'height'. */ - public void setHeight(int height) - { + public void setHeight( + final int height) { this._height = height; this._has_height = true; - } //-- void setHeight(int) + } /** * Sets the value of field 'markUnlinked'. * * @param markUnlinked the value of field 'markUnlinked'. */ - public void setMarkUnlinked(boolean markUnlinked) - { + public void setMarkUnlinked( + final boolean markUnlinked) { this._markUnlinked = markUnlinked; this._has_markUnlinked = true; - } //-- void setMarkUnlinked(boolean) + } /** * Sets the value of field 'newick'. * * @param newick the value of field 'newick'. */ - public void setNewick(java.lang.String newick) - { + public void setNewick( + final java.lang.String newick) { this._newick = newick; - } //-- void setNewick(java.lang.String) + } /** * Sets the value of field 'showBootstrap'. * * @param showBootstrap the value of field 'showBootstrap'. */ - public void setShowBootstrap(boolean showBootstrap) - { + public void setShowBootstrap( + final boolean showBootstrap) { this._showBootstrap = showBootstrap; this._has_showBootstrap = true; - } //-- void setShowBootstrap(boolean) + } /** * Sets the value of field 'showDistances'. * * @param showDistances the value of field 'showDistances'. */ - public void setShowDistances(boolean showDistances) - { + public void setShowDistances( + final boolean showDistances) { this._showDistances = showDistances; this._has_showDistances = true; - } //-- void setShowDistances(boolean) + } /** * Sets the value of field 'threshold'. * * @param threshold the value of field 'threshold'. */ - public void setThreshold(float threshold) - { + public void setThreshold( + final float threshold) { this._threshold = threshold; this._has_threshold = true; - } //-- void setThreshold(float) + } /** * Sets the value of field 'title'. * * @param title the value of field 'title'. */ - public void setTitle(java.lang.String title) - { + public void setTitle( + final java.lang.String title) { this._title = title; - } //-- void setTitle(java.lang.String) + } /** * Sets the value of field 'width'. * * @param width the value of field 'width'. */ - public void setWidth(int width) - { + public void setWidth( + final int width) { this._width = width; this._has_width = true; - } //-- void setWidth(int) + } /** * Sets the value of field 'xpos'. * * @param xpos the value of field 'xpos'. */ - public void setXpos(int xpos) - { + public void setXpos( + final int xpos) { this._xpos = xpos; this._has_xpos = true; - } //-- void setXpos(int) + } /** * Sets the value of field 'ypos'. * * @param ypos the value of field 'ypos'. */ - public void setYpos(int ypos) - { + public void setYpos( + final int ypos) { this._ypos = ypos; this._has_ypos = true; - } //-- void setYpos(int) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.Tree + */ + public static jalview.schemabinding.version2.Tree unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.Tree) Unmarshaller.unmarshal(jalview.schemabinding.version2.Tree.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/UserColourScheme.java b/src/jalview/schemabinding/version2/UserColourScheme.java index 00bc181..3cb65e0 100755 --- a/src/jalview/schemabinding/version2/UserColourScheme.java +++ b/src/jalview/schemabinding/version2/UserColourScheme.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class UserColourScheme. @@ -37,7 +30,7 @@ implements java.io.Serializable public UserColourScheme() { super(); - } //-- jalview.schemabinding.version2.UserColourScheme() + } //-----------/ @@ -45,74 +38,80 @@ implements java.io.Serializable //-----------/ /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.JalviewUserColours */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (jalview.schemabinding.version2.UserColourScheme) Unmarshaller.unmarshal(jalview.schemabinding.version2.UserColourScheme.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + public static jalview.schemabinding.version2.JalviewUserColours unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.JalviewUserColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.UserColourScheme.class, reader); + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/UserColours.java b/src/jalview/schemabinding/version2/UserColours.java index 28f2b39..062024f 100755 --- a/src/jalview/schemabinding/version2/UserColours.java +++ b/src/jalview/schemabinding/version2/UserColours.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class UserColours. @@ -34,12 +27,12 @@ public class UserColours implements java.io.Serializable { //--------------------------/ /** - * Field _id + * Field _id. */ private java.lang.String _id; /** - * Field _userColourScheme + * Field _userColourScheme. */ private jalview.schemabinding.version2.UserColourScheme _userColourScheme; @@ -50,7 +43,7 @@ public class UserColours implements java.io.Serializable { public UserColours() { super(); - } //-- jalview.schemabinding.version2.UserColours() + } //-----------/ @@ -60,114 +53,118 @@ public class UserColours implements java.io.Serializable { /** * Returns the value of field 'id'. * - * @return String - * @return the value of field 'id'. + * @return the value of field 'Id'. */ - public java.lang.String getId() - { + public java.lang.String getId( + ) { return this._id; - } //-- java.lang.String getId() + } /** * Returns the value of field 'userColourScheme'. * - * @return UserColourScheme - * @return the value of field 'userColourScheme'. + * @return the value of field 'UserColourScheme'. */ - public jalview.schemabinding.version2.UserColourScheme getUserColourScheme() - { + public jalview.schemabinding.version2.UserColourScheme getUserColourScheme( + ) { return this._userColourScheme; - } //-- jalview.schemabinding.version2.UserColourScheme getUserColourScheme() + } /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** * Sets the value of field 'id'. * * @param id the value of field 'id'. */ - public void setId(java.lang.String id) - { + public void setId( + final java.lang.String id) { this._id = id; - } //-- void setId(java.lang.String) + } /** * Sets the value of field 'userColourScheme'. * * @param userColourScheme the value of field 'userColourScheme' */ - public void setUserColourScheme(jalview.schemabinding.version2.UserColourScheme userColourScheme) - { + public void setUserColourScheme( + final jalview.schemabinding.version2.UserColourScheme userColourScheme) { this._userColourScheme = userColourScheme; - } //-- void setUserColourScheme(jalview.schemabinding.version2.UserColourScheme) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.UserColours */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + public static jalview.schemabinding.version2.UserColours unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.UserColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.UserColours.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/VAMSAS.java b/src/jalview/schemabinding/version2/VAMSAS.java index 03633d6..ae8e17f 100755 --- a/src/jalview/schemabinding/version2/VAMSAS.java +++ b/src/jalview/schemabinding/version2/VAMSAS.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class VAMSAS. @@ -36,12 +27,12 @@ public class VAMSAS implements java.io.Serializable { //--------------------------/ /** - * Field _treeList + * Field _treeList. */ private java.util.Vector _treeList; /** - * Field _sequenceSetList + * Field _sequenceSetList. */ private java.util.Vector _sequenceSetList; @@ -52,9 +43,9 @@ public class VAMSAS implements java.io.Serializable { public VAMSAS() { super(); - _treeList = new Vector(); - _sequenceSetList = new Vector(); - } //-- jalview.schemabinding.version2.VAMSAS() + this._treeList = new java.util.Vector(); + this._sequenceSetList = new java.util.Vector(); + } //-----------/ @@ -62,364 +53,377 @@ public class VAMSAS implements java.io.Serializable { //-----------/ /** - * Method addSequenceSet - * * * * @param vSequenceSet + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addSequenceSet(jalview.schemabinding.version2.SequenceSet vSequenceSet) - throws java.lang.IndexOutOfBoundsException - { - _sequenceSetList.addElement(vSequenceSet); - } //-- void addSequenceSet(jalview.schemabinding.version2.SequenceSet) + public void addSequenceSet( + final jalview.schemabinding.version2.SequenceSet vSequenceSet) + throws java.lang.IndexOutOfBoundsException { + this._sequenceSetList.addElement(vSequenceSet); + } /** - * Method addSequenceSet - * * * * @param index * @param vSequenceSet + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addSequenceSet(int index, jalview.schemabinding.version2.SequenceSet vSequenceSet) - throws java.lang.IndexOutOfBoundsException - { - _sequenceSetList.insertElementAt(vSequenceSet, index); - } //-- void addSequenceSet(int, jalview.schemabinding.version2.SequenceSet) + public void addSequenceSet( + final int index, + final jalview.schemabinding.version2.SequenceSet vSequenceSet) + throws java.lang.IndexOutOfBoundsException { + this._sequenceSetList.add(index, vSequenceSet); + } /** - * Method addTree - * * * * @param vTree + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addTree(java.lang.String vTree) - throws java.lang.IndexOutOfBoundsException - { - _treeList.addElement(vTree); - } //-- void addTree(java.lang.String) + public void addTree( + final java.lang.String vTree) + throws java.lang.IndexOutOfBoundsException { + this._treeList.addElement(vTree); + } /** - * Method addTree - * * * * @param index * @param vTree + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addTree(int index, java.lang.String vTree) - throws java.lang.IndexOutOfBoundsException - { - _treeList.insertElementAt(vTree, index); - } //-- void addTree(int, java.lang.String) + public void addTree( + final int index, + final java.lang.String vTree) + throws java.lang.IndexOutOfBoundsException { + this._treeList.add(index, vTree); + } /** - * Method enumerateSequenceSet + * Method enumerateSequenceSet. * - * - * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.SequenceSet elements */ - public java.util.Enumeration enumerateSequenceSet() - { - return _sequenceSetList.elements(); - } //-- java.util.Enumeration enumerateSequenceSet() + public java.util.Enumeration enumerateSequenceSet( + ) { + return this._sequenceSetList.elements(); + } /** - * Method enumerateTree - * + * Method enumerateTree. * - * - * @return Enumeration + * @return an Enumeration over all java.lang.String elements */ - public java.util.Enumeration enumerateTree() - { - return _treeList.elements(); - } //-- java.util.Enumeration enumerateTree() + public java.util.Enumeration enumerateTree( + ) { + return this._treeList.elements(); + } /** - * Method getSequenceSet - * - * + * Method getSequenceSet. * * @param index - * @return SequenceSet + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.SequenceSet at the given index */ - public jalview.schemabinding.version2.SequenceSet getSequenceSet(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _sequenceSetList.size())) { - throw new IndexOutOfBoundsException(); + public jalview.schemabinding.version2.SequenceSet getSequenceSet( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._sequenceSetList.size()) { + throw new IndexOutOfBoundsException("getSequenceSet: Index value '" + index + "' not in range [0.." + (this._sequenceSetList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.SequenceSet) _sequenceSetList.elementAt(index); - } //-- jalview.schemabinding.version2.SequenceSet getSequenceSet(int) + return (jalview.schemabinding.version2.SequenceSet) _sequenceSetList.get(index); + } /** - * Method getSequenceSet + * Method getSequenceSet.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 SequenceSet + * @return this collection as an Array */ - public jalview.schemabinding.version2.SequenceSet[] getSequenceSet() - { - int size = _sequenceSetList.size(); - jalview.schemabinding.version2.SequenceSet[] mArray = new jalview.schemabinding.version2.SequenceSet[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.SequenceSet) _sequenceSetList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.SequenceSet[] getSequenceSet() + public jalview.schemabinding.version2.SequenceSet[] getSequenceSet( + ) { + jalview.schemabinding.version2.SequenceSet[] array = new jalview.schemabinding.version2.SequenceSet[0]; + return (jalview.schemabinding.version2.SequenceSet[]) this._sequenceSetList.toArray(array); + } /** - * Method getSequenceSetCount + * Method getSequenceSetCount. * - * - * - * @return int + * @return the size of this collection */ - public int getSequenceSetCount() - { - return _sequenceSetList.size(); - } //-- int getSequenceSetCount() + public int getSequenceSetCount( + ) { + return this._sequenceSetList.size(); + } /** - * Method getTree - * - * + * Method getTree. * * @param index - * @return String + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the java.lang.String at the given index */ - public java.lang.String getTree(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _treeList.size())) { - throw new IndexOutOfBoundsException(); + public java.lang.String getTree( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._treeList.size()) { + throw new IndexOutOfBoundsException("getTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]"); } - return (String)_treeList.elementAt(index); - } //-- java.lang.String getTree(int) + return (java.lang.String) _treeList.get(index); + } /** - * Method getTree + * Method getTree.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 String + * @return this collection as an Array */ - public java.lang.String[] getTree() - { - int size = _treeList.size(); - java.lang.String[] mArray = new java.lang.String[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (String)_treeList.elementAt(index); - } - return mArray; - } //-- java.lang.String[] getTree() + public java.lang.String[] getTree( + ) { + java.lang.String[] array = new java.lang.String[0]; + return (java.lang.String[]) this._treeList.toArray(array); + } /** - * Method getTreeCount + * Method getTreeCount. * - * - * - * @return int + * @return the size of this collection */ - public int getTreeCount() - { - return _treeList.size(); - } //-- int getTreeCount() + public int getTreeCount( + ) { + return this._treeList.size(); + } /** - * Method isValid - * + * Method isValid. * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllSequenceSet - * */ - public void removeAllSequenceSet() - { - _sequenceSetList.removeAllElements(); - } //-- void removeAllSequenceSet() + public void removeAllSequenceSet( + ) { + this._sequenceSetList.clear(); + } /** - * Method removeAllTree - * */ - public void removeAllTree() - { - _treeList.removeAllElements(); - } //-- void removeAllTree() + public void removeAllTree( + ) { + this._treeList.clear(); + } /** - * Method removeSequenceSet - * + * Method removeSequenceSet. * + * @param vSequenceSet + * @return true if the object was removed from the collection. + */ + public boolean removeSequenceSet( + final jalview.schemabinding.version2.SequenceSet vSequenceSet) { + boolean removed = _sequenceSetList.remove(vSequenceSet); + return removed; + } + + /** + * Method removeSequenceSetAt. * * @param index - * @return SequenceSet + * @return the element removed from the collection */ - public jalview.schemabinding.version2.SequenceSet removeSequenceSet(int index) - { - java.lang.Object obj = _sequenceSetList.elementAt(index); - _sequenceSetList.removeElementAt(index); + public jalview.schemabinding.version2.SequenceSet removeSequenceSetAt( + final int index) { + java.lang.Object obj = this._sequenceSetList.remove(index); return (jalview.schemabinding.version2.SequenceSet) obj; - } //-- jalview.schemabinding.version2.SequenceSet removeSequenceSet(int) + } /** - * Method removeTree - * + * Method removeTree. * + * @param vTree + * @return true if the object was removed from the collection. + */ + public boolean removeTree( + final java.lang.String vTree) { + boolean removed = _treeList.remove(vTree); + return removed; + } + + /** + * Method removeTreeAt. * * @param index - * @return String + * @return the element removed from the collection */ - public java.lang.String removeTree(int index) - { - java.lang.Object obj = _treeList.elementAt(index); - _treeList.removeElementAt(index); - return (String)obj; - } //-- java.lang.String removeTree(int) + public java.lang.String removeTreeAt( + final int index) { + java.lang.Object obj = this._treeList.remove(index); + return (java.lang.String) obj; + } /** - * Method setSequenceSet - * * * * @param index * @param vSequenceSet + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void setSequenceSet(int index, jalview.schemabinding.version2.SequenceSet vSequenceSet) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _sequenceSetList.size())) { - throw new IndexOutOfBoundsException(); + public void setSequenceSet( + final int index, + final jalview.schemabinding.version2.SequenceSet vSequenceSet) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._sequenceSetList.size()) { + throw new IndexOutOfBoundsException("setSequenceSet: Index value '" + index + "' not in range [0.." + (this._sequenceSetList.size() - 1) + "]"); } - _sequenceSetList.setElementAt(vSequenceSet, index); - } //-- void setSequenceSet(int, jalview.schemabinding.version2.SequenceSet) + + this._sequenceSetList.set(index, vSequenceSet); + } /** - * Method setSequenceSet * * - * - * @param sequenceSetArray + * @param vSequenceSetArray */ - public void setSequenceSet(jalview.schemabinding.version2.SequenceSet[] sequenceSetArray) - { + public void setSequenceSet( + final jalview.schemabinding.version2.SequenceSet[] vSequenceSetArray) { //-- copy array - _sequenceSetList.removeAllElements(); - for (int i = 0; i < sequenceSetArray.length; i++) { - _sequenceSetList.addElement(sequenceSetArray[i]); + _sequenceSetList.clear(); + + for (int i = 0; i < vSequenceSetArray.length; i++) { + this._sequenceSetList.add(vSequenceSetArray[i]); } - } //-- void setSequenceSet(jalview.schemabinding.version2.SequenceSet) + } /** - * Method setTree - * * * * @param index * @param vTree + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void setTree(int index, java.lang.String vTree) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _treeList.size())) { - throw new IndexOutOfBoundsException(); + public void setTree( + final int index, + final java.lang.String vTree) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._treeList.size()) { + throw new IndexOutOfBoundsException("setTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]"); } - _treeList.setElementAt(vTree, index); - } //-- void setTree(int, java.lang.String) + + this._treeList.set(index, vTree); + } /** - * Method setTree - * * * - * @param treeArray + * @param vTreeArray */ - public void setTree(java.lang.String[] treeArray) - { + public void setTree( + final java.lang.String[] vTreeArray) { //-- copy array - _treeList.removeAllElements(); - for (int i = 0; i < treeArray.length; i++) { - _treeList.addElement(treeArray[i]); + _treeList.clear(); + + for (int i = 0; i < vTreeArray.length; i++) { + this._treeList.add(vTreeArray[i]); } - } //-- void setTree(java.lang.String) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.VAMSAS */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + public static jalview.schemabinding.version2.VAMSAS unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.VAMSAS) Unmarshaller.unmarshal(jalview.schemabinding.version2.VAMSAS.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/VamsasModel.java b/src/jalview/schemabinding/version2/VamsasModel.java index 4617903..26814dc 100755 --- a/src/jalview/schemabinding/version2/VamsasModel.java +++ b/src/jalview/schemabinding/version2/VamsasModel.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,15 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class VamsasModel. @@ -37,7 +30,7 @@ implements java.io.Serializable public VamsasModel() { super(); - } //-- jalview.schemabinding.version2.VamsasModel() + } //-----------/ @@ -45,74 +38,79 @@ implements java.io.Serializable //-----------/ /** - * Method isValid + * Method isValid. * - * - * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal - * * * * @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(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + public void marshal( + final java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler + * @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(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + 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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object + * @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.VAMSAS */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (jalview.schemabinding.version2.VamsasModel) Unmarshaller.unmarshal(jalview.schemabinding.version2.VamsasModel.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + public static jalview.schemabinding.version2.VAMSAS unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.VAMSAS) Unmarshaller.unmarshal(jalview.schemabinding.version2.VamsasModel.class, reader); + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/Viewport.java b/src/jalview/schemabinding/version2/Viewport.java index 6dfb14f..aa97a95 100755 --- a/src/jalview/schemabinding/version2/Viewport.java +++ b/src/jalview/schemabinding/version2/Viewport.java @@ -1,6 +1,6 @@ /* * This class was automatically generated with - * Castor 0.9.6, using an XML + * Castor 1.1, using an XML * Schema. * $Id$ */ @@ -11,17 +11,8 @@ package jalview.schemabinding.version2; //- Imported classes and packages -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; /** * Class Viewport. @@ -36,7 +27,7 @@ public class Viewport implements java.io.Serializable { //--------------------------/ /** - * Field _conservationSelected + * Field _conservationSelected. */ private boolean _conservationSelected; @@ -46,7 +37,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_conservationSelected; /** - * Field _pidSelected + * Field _pidSelected. */ private boolean _pidSelected; @@ -56,12 +47,12 @@ public class Viewport implements java.io.Serializable { private boolean _has_pidSelected; /** - * Field _bgColour + * Field _bgColour. */ private java.lang.String _bgColour; /** - * Field _consThreshold + * Field _consThreshold. */ private int _consThreshold; @@ -71,7 +62,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_consThreshold; /** - * Field _pidThreshold + * Field _pidThreshold. */ private int _pidThreshold; @@ -81,12 +72,12 @@ public class Viewport implements java.io.Serializable { private boolean _has_pidThreshold; /** - * Field _title + * Field _title. */ private java.lang.String _title; /** - * Field _showFullId + * Field _showFullId. */ private boolean _showFullId; @@ -96,7 +87,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_showFullId; /** - * Field _rightAlignIds + * Field _rightAlignIds. */ private boolean _rightAlignIds; @@ -106,7 +97,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_rightAlignIds; /** - * Field _showText + * Field _showText. */ private boolean _showText; @@ -116,7 +107,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_showText; /** - * Field _showColourText + * Field _showColourText. */ private boolean _showColourText; @@ -126,7 +117,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_showColourText; /** - * Field _showBoxes + * Field _showBoxes. */ private boolean _showBoxes; @@ -136,7 +127,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_showBoxes; /** - * Field _wrapAlignment + * Field _wrapAlignment. */ private boolean _wrapAlignment; @@ -146,7 +137,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_wrapAlignment; /** - * Field _renderGaps + * Field _renderGaps. */ private boolean _renderGaps; @@ -156,7 +147,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_renderGaps; /** - * Field _showSequenceFeatures + * Field _showSequenceFeatures. */ private boolean _showSequenceFeatures; @@ -166,7 +157,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_showSequenceFeatures; /** - * Field _showAnnotation + * Field _showAnnotation. */ private boolean _showAnnotation; @@ -176,7 +167,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_showAnnotation; /** - * Field _xpos + * Field _xpos. */ private int _xpos; @@ -186,7 +177,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_xpos; /** - * Field _ypos + * Field _ypos. */ private int _ypos; @@ -196,7 +187,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_ypos; /** - * Field _width + * Field _width. */ private int _width; @@ -206,7 +197,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_width; /** - * Field _height + * Field _height. */ private int _height; @@ -216,7 +207,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_height; /** - * Field _startRes + * Field _startRes. */ private int _startRes; @@ -226,7 +217,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_startRes; /** - * Field _startSeq + * Field _startSeq. */ private int _startSeq; @@ -236,12 +227,12 @@ public class Viewport implements java.io.Serializable { private boolean _has_startSeq; /** - * Field _fontName + * Field _fontName. */ private java.lang.String _fontName; /** - * Field _fontSize + * Field _fontSize. */ private int _fontSize; @@ -251,7 +242,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_fontSize; /** - * Field _fontStyle + * Field _fontStyle. */ private int _fontStyle; @@ -261,17 +252,17 @@ public class Viewport implements java.io.Serializable { private boolean _has_fontStyle; /** - * Field _viewName + * Field _viewName. */ private java.lang.String _viewName; /** - * Field _sequenceSetId + * Field _sequenceSetId. */ private java.lang.String _sequenceSetId; /** - * Field _gatheredViews + * Field _gatheredViews. */ private boolean _gatheredViews; @@ -281,7 +272,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_gatheredViews; /** - * Field _textCol1 + * Field _textCol1. */ private int _textCol1; @@ -291,7 +282,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_textCol1; /** - * Field _textCol2 + * Field _textCol2. */ private int _textCol2; @@ -301,7 +292,7 @@ public class Viewport implements java.io.Serializable { private boolean _has_textCol2; /** - * Field _textColThreshold + * Field _textColThreshold. */ private int _textColThreshold; @@ -311,12 +302,12 @@ public class Viewport implements java.io.Serializable { private boolean _has_textColThreshold; /** - * Field _annotationColours + * Field _annotationColours. */ private jalview.schemabinding.version2.AnnotationColours _annotationColours; /** - * Field _hiddenColumnsList + * Field _hiddenColumnsList. */ private java.util.Vector _hiddenColumnsList; @@ -327,8 +318,8 @@ public class Viewport implements java.io.Serializable { public Viewport() { super(); - _hiddenColumnsList = new Vector(); - } //-- jalview.schemabinding.version2.Viewport() + this._hiddenColumnsList = new java.util.Vector(); + } //-----------/ @@ -336,1027 +327,1025 @@ public class Viewport implements java.io.Serializable { //-----------/ /** - * Method addHiddenColumns - * * * * @param vHiddenColumns + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addHiddenColumns(jalview.schemabinding.version2.HiddenColumns vHiddenColumns) - throws java.lang.IndexOutOfBoundsException - { - _hiddenColumnsList.addElement(vHiddenColumns); - } //-- void addHiddenColumns(jalview.schemabinding.version2.HiddenColumns) + public void addHiddenColumns( + final jalview.schemabinding.version2.HiddenColumns vHiddenColumns) + throws java.lang.IndexOutOfBoundsException { + this._hiddenColumnsList.addElement(vHiddenColumns); + } /** - * Method addHiddenColumns - * * * * @param index * @param vHiddenColumns + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection */ - public void addHiddenColumns(int index, jalview.schemabinding.version2.HiddenColumns vHiddenColumns) - throws java.lang.IndexOutOfBoundsException - { - _hiddenColumnsList.insertElementAt(vHiddenColumns, index); - } //-- void addHiddenColumns(int, jalview.schemabinding.version2.HiddenColumns) + public void addHiddenColumns( + final int index, + final jalview.schemabinding.version2.HiddenColumns vHiddenColumns) + throws java.lang.IndexOutOfBoundsException { + this._hiddenColumnsList.add(index, vHiddenColumns); + } /** - * Method deleteConsThreshold - * */ - public void deleteConsThreshold() - { + public void deleteConsThreshold( + ) { this._has_consThreshold= false; - } //-- void deleteConsThreshold() + } /** - * Method deleteConservationSelected - * */ - public void deleteConservationSelected() - { + public void deleteConservationSelected( + ) { this._has_conservationSelected= false; - } //-- void deleteConservationSelected() + } /** - * Method deleteFontSize - * */ - public void deleteFontSize() - { + public void deleteFontSize( + ) { this._has_fontSize= false; - } //-- void deleteFontSize() + } /** - * Method deleteFontStyle - * */ - public void deleteFontStyle() - { + public void deleteFontStyle( + ) { this._has_fontStyle= false; - } //-- void deleteFontStyle() + } /** - * Method deleteGatheredViews - * */ - public void deleteGatheredViews() - { + public void deleteGatheredViews( + ) { this._has_gatheredViews= false; - } //-- void deleteGatheredViews() + } /** - * Method deleteHeight - * */ - public void deleteHeight() - { + public void deleteHeight( + ) { this._has_height= false; - } //-- void deleteHeight() + } /** - * Method deletePidSelected - * */ - public void deletePidSelected() - { + public void deletePidSelected( + ) { this._has_pidSelected= false; - } //-- void deletePidSelected() + } /** - * Method deletePidThreshold - * */ - public void deletePidThreshold() - { + public void deletePidThreshold( + ) { this._has_pidThreshold= false; - } //-- void deletePidThreshold() + } /** - * Method deleteRenderGaps - * */ - public void deleteRenderGaps() - { + public void deleteRenderGaps( + ) { this._has_renderGaps= false; - } //-- void deleteRenderGaps() + } /** - * Method deleteRightAlignIds - * */ - public void deleteRightAlignIds() - { + public void deleteRightAlignIds( + ) { this._has_rightAlignIds= false; - } //-- void deleteRightAlignIds() + } /** - * Method deleteShowAnnotation - * */ - public void deleteShowAnnotation() - { + public void deleteShowAnnotation( + ) { this._has_showAnnotation= false; - } //-- void deleteShowAnnotation() + } /** - * Method deleteShowBoxes - * */ - public void deleteShowBoxes() - { + public void deleteShowBoxes( + ) { this._has_showBoxes= false; - } //-- void deleteShowBoxes() + } /** - * Method deleteShowColourText - * */ - public void deleteShowColourText() - { + public void deleteShowColourText( + ) { this._has_showColourText= false; - } //-- void deleteShowColourText() + } /** - * Method deleteShowFullId - * */ - public void deleteShowFullId() - { + public void deleteShowFullId( + ) { this._has_showFullId= false; - } //-- void deleteShowFullId() + } /** - * Method deleteShowSequenceFeatures - * */ - public void deleteShowSequenceFeatures() - { + public void deleteShowSequenceFeatures( + ) { this._has_showSequenceFeatures= false; - } //-- void deleteShowSequenceFeatures() + } /** - * Method deleteShowText - * */ - public void deleteShowText() - { + public void deleteShowText( + ) { this._has_showText= false; - } //-- void deleteShowText() + } /** - * Method deleteStartRes - * */ - public void deleteStartRes() - { + public void deleteStartRes( + ) { this._has_startRes= false; - } //-- void deleteStartRes() + } /** - * Method deleteStartSeq - * */ - public void deleteStartSeq() - { + public void deleteStartSeq( + ) { this._has_startSeq= false; - } //-- void deleteStartSeq() + } /** - * Method deleteTextCol1 - * */ - public void deleteTextCol1() - { + public void deleteTextCol1( + ) { this._has_textCol1= false; - } //-- void deleteTextCol1() + } /** - * Method deleteTextCol2 - * */ - public void deleteTextCol2() - { + public void deleteTextCol2( + ) { this._has_textCol2= false; - } //-- void deleteTextCol2() + } /** - * Method deleteTextColThreshold - * */ - public void deleteTextColThreshold() - { + public void deleteTextColThreshold( + ) { this._has_textColThreshold= false; - } //-- void deleteTextColThreshold() + } /** - * Method deleteWidth - * */ - public void deleteWidth() - { + public void deleteWidth( + ) { this._has_width= false; - } //-- void deleteWidth() + } /** - * Method deleteWrapAlignment - * */ - public void deleteWrapAlignment() - { + public void deleteWrapAlignment( + ) { this._has_wrapAlignment= false; - } //-- void deleteWrapAlignment() + } /** - * Method deleteXpos - * */ - public void deleteXpos() - { + public void deleteXpos( + ) { this._has_xpos= false; - } //-- void deleteXpos() + } /** - * Method deleteYpos - * */ - public void deleteYpos() - { + public void deleteYpos( + ) { this._has_ypos= false; - } //-- void deleteYpos() + } /** - * Method enumerateHiddenColumns + * Method enumerateHiddenColumns. * - * - * - * @return Enumeration + * @return an Enumeration over all + * jalview.schemabinding.version2.HiddenColumns elements */ - public java.util.Enumeration enumerateHiddenColumns() - { - return _hiddenColumnsList.elements(); - } //-- java.util.Enumeration enumerateHiddenColumns() + public java.util.Enumeration enumerateHiddenColumns( + ) { + return this._hiddenColumnsList.elements(); + } /** * Returns the value of field 'annotationColours'. * - * @return AnnotationColours - * @return the value of field 'annotationColours'. + * @return the value of field 'AnnotationColours'. */ - public jalview.schemabinding.version2.AnnotationColours getAnnotationColours() - { + public jalview.schemabinding.version2.AnnotationColours getAnnotationColours( + ) { return this._annotationColours; - } //-- jalview.schemabinding.version2.AnnotationColours getAnnotationColours() + } /** * Returns the value of field 'bgColour'. * - * @return String - * @return the value of field 'bgColour'. + * @return the value of field 'BgColour'. */ - public java.lang.String getBgColour() - { + public java.lang.String getBgColour( + ) { return this._bgColour; - } //-- java.lang.String getBgColour() + } /** * Returns the value of field 'consThreshold'. * - * @return int - * @return the value of field 'consThreshold'. + * @return the value of field 'ConsThreshold'. */ - public int getConsThreshold() - { + public int getConsThreshold( + ) { return this._consThreshold; - } //-- int getConsThreshold() + } /** * Returns the value of field 'conservationSelected'. * - * @return boolean - * @return the value of field 'conservationSelected'. + * @return the value of field 'ConservationSelected'. */ - public boolean getConservationSelected() - { + public boolean getConservationSelected( + ) { return this._conservationSelected; - } //-- boolean getConservationSelected() + } /** * Returns the value of field 'fontName'. * - * @return String - * @return the value of field 'fontName'. + * @return the value of field 'FontName'. */ - public java.lang.String getFontName() - { + public java.lang.String getFontName( + ) { return this._fontName; - } //-- java.lang.String getFontName() + } /** * Returns the value of field 'fontSize'. * - * @return int - * @return the value of field 'fontSize'. + * @return the value of field 'FontSize'. */ - public int getFontSize() - { + public int getFontSize( + ) { return this._fontSize; - } //-- int getFontSize() + } /** * Returns the value of field 'fontStyle'. * - * @return int - * @return the value of field 'fontStyle'. + * @return the value of field 'FontStyle'. */ - public int getFontStyle() - { + public int getFontStyle( + ) { return this._fontStyle; - } //-- int getFontStyle() + } /** * Returns the value of field 'gatheredViews'. * - * @return boolean - * @return the value of field 'gatheredViews'. + * @return the value of field 'GatheredViews'. */ - public boolean getGatheredViews() - { + public boolean getGatheredViews( + ) { return this._gatheredViews; - } //-- boolean getGatheredViews() + } /** * Returns the value of field 'height'. * - * @return int - * @return the value of field 'height'. + * @return the value of field 'Height'. */ - public int getHeight() - { + public int getHeight( + ) { return this._height; - } //-- int getHeight() + } /** - * Method getHiddenColumns - * - * + * Method getHiddenColumns. * * @param index - * @return HiddenColumns - */ - public jalview.schemabinding.version2.HiddenColumns getHiddenColumns(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _hiddenColumnsList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + * @return the value of the + * jalview.schemabinding.version2.HiddenColumns at the given + * index + */ + public jalview.schemabinding.version2.HiddenColumns getHiddenColumns( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._hiddenColumnsList.size()) { + throw new IndexOutOfBoundsException("getHiddenColumns: Index value '" + index + "' not in range [0.." + (this._hiddenColumnsList.size() - 1) + "]"); } - return (jalview.schemabinding.version2.HiddenColumns) _hiddenColumnsList.elementAt(index); - } //-- jalview.schemabinding.version2.HiddenColumns getHiddenColumns(int) + return (jalview.schemabinding.version2.HiddenColumns) _hiddenColumnsList.get(index); + } /** - * Method getHiddenColumns - * + * Method getHiddenColumns.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 HiddenColumns + * @return this collection as an Array */ - public jalview.schemabinding.version2.HiddenColumns[] getHiddenColumns() - { - int size = _hiddenColumnsList.size(); - jalview.schemabinding.version2.HiddenColumns[] mArray = new jalview.schemabinding.version2.HiddenColumns[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (jalview.schemabinding.version2.HiddenColumns) _hiddenColumnsList.elementAt(index); - } - return mArray; - } //-- jalview.schemabinding.version2.HiddenColumns[] getHiddenColumns() + public jalview.schemabinding.version2.HiddenColumns[] getHiddenColumns( + ) { + jalview.schemabinding.version2.HiddenColumns[] array = new jalview.schemabinding.version2.HiddenColumns[0]; + return (jalview.schemabinding.version2.HiddenColumns[]) this._hiddenColumnsList.toArray(array); + } /** - * Method getHiddenColumnsCount - * + * Method getHiddenColumnsCount. * - * - * @return int + * @return the size of this collection */ - public int getHiddenColumnsCount() - { - return _hiddenColumnsList.size(); - } //-- int getHiddenColumnsCount() + public int getHiddenColumnsCount( + ) { + return this._hiddenColumnsList.size(); + } /** * Returns the value of field 'pidSelected'. * - * @return boolean - * @return the value of field 'pidSelected'. + * @return the value of field 'PidSelected'. */ - public boolean getPidSelected() - { + public boolean getPidSelected( + ) { return this._pidSelected; - } //-- boolean getPidSelected() + } /** * Returns the value of field 'pidThreshold'. * - * @return int - * @return the value of field 'pidThreshold'. + * @return the value of field 'PidThreshold'. */ - public int getPidThreshold() - { + public int getPidThreshold( + ) { return this._pidThreshold; - } //-- int getPidThreshold() + } /** * Returns the value of field 'renderGaps'. * - * @return boolean - * @return the value of field 'renderGaps'. + * @return the value of field 'RenderGaps'. */ - public boolean getRenderGaps() - { + public boolean getRenderGaps( + ) { return this._renderGaps; - } //-- boolean getRenderGaps() + } /** * Returns the value of field 'rightAlignIds'. * - * @return boolean - * @return the value of field 'rightAlignIds'. + * @return the value of field 'RightAlignIds'. */ - public boolean getRightAlignIds() - { + public boolean getRightAlignIds( + ) { return this._rightAlignIds; - } //-- boolean getRightAlignIds() + } /** * Returns the value of field 'sequenceSetId'. * - * @return String - * @return the value of field 'sequenceSetId'. + * @return the value of field 'SequenceSetId'. */ - public java.lang.String getSequenceSetId() - { + public java.lang.String getSequenceSetId( + ) { return this._sequenceSetId; - } //-- java.lang.String getSequenceSetId() + } /** * Returns the value of field 'showAnnotation'. * - * @return boolean - * @return the value of field 'showAnnotation'. + * @return the value of field 'ShowAnnotation'. */ - public boolean getShowAnnotation() - { + public boolean getShowAnnotation( + ) { return this._showAnnotation; - } //-- boolean getShowAnnotation() + } /** * Returns the value of field 'showBoxes'. * - * @return boolean - * @return the value of field 'showBoxes'. + * @return the value of field 'ShowBoxes'. */ - public boolean getShowBoxes() - { + public boolean getShowBoxes( + ) { return this._showBoxes; - } //-- boolean getShowBoxes() + } /** * Returns the value of field 'showColourText'. * - * @return boolean - * @return the value of field 'showColourText'. + * @return the value of field 'ShowColourText'. */ - public boolean getShowColourText() - { + public boolean getShowColourText( + ) { return this._showColourText; - } //-- boolean getShowColourText() + } /** * Returns the value of field 'showFullId'. * - * @return boolean - * @return the value of field 'showFullId'. + * @return the value of field 'ShowFullId'. */ - public boolean getShowFullId() - { + public boolean getShowFullId( + ) { return this._showFullId; - } //-- boolean getShowFullId() + } /** * Returns the value of field 'showSequenceFeatures'. * - * @return boolean - * @return the value of field 'showSequenceFeatures'. + * @return the value of field 'ShowSequenceFeatures'. */ - public boolean getShowSequenceFeatures() - { + public boolean getShowSequenceFeatures( + ) { return this._showSequenceFeatures; - } //-- boolean getShowSequenceFeatures() + } /** * Returns the value of field 'showText'. * - * @return boolean - * @return the value of field 'showText'. + * @return the value of field 'ShowText'. */ - public boolean getShowText() - { + public boolean getShowText( + ) { return this._showText; - } //-- boolean getShowText() + } /** * Returns the value of field 'startRes'. * - * @return int - * @return the value of field 'startRes'. + * @return the value of field 'StartRes'. */ - public int getStartRes() - { + public int getStartRes( + ) { return this._startRes; - } //-- int getStartRes() + } /** * Returns the value of field 'startSeq'. * - * @return int - * @return the value of field 'startSeq'. + * @return the value of field 'StartSeq'. */ - public int getStartSeq() - { + public int getStartSeq( + ) { return this._startSeq; - } //-- int getStartSeq() + } /** * Returns the value of field 'textCol1'. * - * @return int - * @return the value of field 'textCol1'. + * @return the value of field 'TextCol1'. */ - public int getTextCol1() - { + public int getTextCol1( + ) { return this._textCol1; - } //-- int getTextCol1() + } /** * Returns the value of field 'textCol2'. * - * @return int - * @return the value of field 'textCol2'. + * @return the value of field 'TextCol2'. */ - public int getTextCol2() - { + public int getTextCol2( + ) { return this._textCol2; - } //-- int getTextCol2() + } /** * Returns the value of field 'textColThreshold'. * - * @return int - * @return the value of field 'textColThreshold'. + * @return the value of field 'TextColThreshold'. */ - public int getTextColThreshold() - { + public int getTextColThreshold( + ) { return this._textColThreshold; - } //-- int getTextColThreshold() + } /** * Returns the value of field 'title'. * - * @return String - * @return the value of field 'title'. + * @return the value of field 'Title'. */ - public java.lang.String getTitle() - { + public java.lang.String getTitle( + ) { return this._title; - } //-- java.lang.String getTitle() + } /** * Returns the value of field 'viewName'. * - * @return String - * @return the value of field 'viewName'. + * @return the value of field 'ViewName'. */ - public java.lang.String getViewName() - { + public java.lang.String getViewName( + ) { return this._viewName; - } //-- java.lang.String getViewName() + } /** * Returns the value of field 'width'. * - * @return int - * @return the value of field 'width'. + * @return the value of field 'Width'. */ - public int getWidth() - { + public int getWidth( + ) { return this._width; - } //-- int getWidth() + } /** * Returns the value of field 'wrapAlignment'. * - * @return boolean - * @return the value of field 'wrapAlignment'. + * @return the value of field 'WrapAlignment'. */ - public boolean getWrapAlignment() - { + public boolean getWrapAlignment( + ) { return this._wrapAlignment; - } //-- boolean getWrapAlignment() + } /** * Returns the value of field 'xpos'. * - * @return int - * @return the value of field 'xpos'. + * @return the value of field 'Xpos'. */ - public int getXpos() - { + public int getXpos( + ) { return this._xpos; - } //-- int getXpos() + } /** * Returns the value of field 'ypos'. * - * @return int - * @return the value of field 'ypos'. + * @return the value of field 'Ypos'. */ - public int getYpos() - { + public int getYpos( + ) { return this._ypos; - } //-- int getYpos() + } /** - * Method hasConsThreshold - * + * Method hasConsThreshold. * - * - * @return boolean + * @return true if at least one ConsThreshold has been added */ - public boolean hasConsThreshold() - { + public boolean hasConsThreshold( + ) { return this._has_consThreshold; - } //-- boolean hasConsThreshold() + } /** - * Method hasConservationSelected - * - * + * Method hasConservationSelected. * - * @return boolean + * @return true if at least one ConservationSelected has been + * added */ - public boolean hasConservationSelected() - { + public boolean hasConservationSelected( + ) { return this._has_conservationSelected; - } //-- boolean hasConservationSelected() + } /** - * Method hasFontSize - * - * + * Method hasFontSize. * - * @return boolean + * @return true if at least one FontSize has been added */ - public boolean hasFontSize() - { + public boolean hasFontSize( + ) { return this._has_fontSize; - } //-- boolean hasFontSize() + } /** - * Method hasFontStyle + * Method hasFontStyle. * - * - * - * @return boolean + * @return true if at least one FontStyle has been added */ - public boolean hasFontStyle() - { + public boolean hasFontStyle( + ) { return this._has_fontStyle; - } //-- boolean hasFontStyle() + } /** - * Method hasGatheredViews - * + * Method hasGatheredViews. * - * - * @return boolean + * @return true if at least one GatheredViews has been added */ - public boolean hasGatheredViews() - { + public boolean hasGatheredViews( + ) { return this._has_gatheredViews; - } //-- boolean hasGatheredViews() + } /** - * Method hasHeight - * - * + * Method hasHeight. * - * @return boolean + * @return true if at least one Height has been added */ - public boolean hasHeight() - { + public boolean hasHeight( + ) { return this._has_height; - } //-- boolean hasHeight() + } /** - * Method hasPidSelected + * Method hasPidSelected. * - * - * - * @return boolean + * @return true if at least one PidSelected has been added */ - public boolean hasPidSelected() - { + public boolean hasPidSelected( + ) { return this._has_pidSelected; - } //-- boolean hasPidSelected() + } /** - * Method hasPidThreshold - * + * Method hasPidThreshold. * - * - * @return boolean + * @return true if at least one PidThreshold has been added */ - public boolean hasPidThreshold() - { + public boolean hasPidThreshold( + ) { return this._has_pidThreshold; - } //-- boolean hasPidThreshold() + } /** - * Method hasRenderGaps - * + * Method hasRenderGaps. * - * - * @return boolean + * @return true if at least one RenderGaps has been added */ - public boolean hasRenderGaps() - { + public boolean hasRenderGaps( + ) { return this._has_renderGaps; - } //-- boolean hasRenderGaps() + } /** - * Method hasRightAlignIds - * - * + * Method hasRightAlignIds. * - * @return boolean + * @return true if at least one RightAlignIds has been added */ - public boolean hasRightAlignIds() - { + public boolean hasRightAlignIds( + ) { return this._has_rightAlignIds; - } //-- boolean hasRightAlignIds() + } /** - * Method hasShowAnnotation - * - * + * Method hasShowAnnotation. * - * @return boolean + * @return true if at least one ShowAnnotation has been added */ - public boolean hasShowAnnotation() - { + public boolean hasShowAnnotation( + ) { return this._has_showAnnotation; - } //-- boolean hasShowAnnotation() + } /** - * Method hasShowBoxes + * Method hasShowBoxes. * - * - * - * @return boolean + * @return true if at least one ShowBoxes has been added */ - public boolean hasShowBoxes() - { + public boolean hasShowBoxes( + ) { return this._has_showBoxes; - } //-- boolean hasShowBoxes() + } /** - * Method hasShowColourText - * + * Method hasShowColourText. * - * - * @return boolean + * @return true if at least one ShowColourText has been added */ - public boolean hasShowColourText() - { + public boolean hasShowColourText( + ) { return this._has_showColourText; - } //-- boolean hasShowColourText() + } /** - * Method hasShowFullId - * + * Method hasShowFullId. * - * - * @return boolean + * @return true if at least one ShowFullId has been added */ - public boolean hasShowFullId() - { + public boolean hasShowFullId( + ) { return this._has_showFullId; - } //-- boolean hasShowFullId() + } /** - * Method hasShowSequenceFeatures - * - * + * Method hasShowSequenceFeatures. * - * @return boolean + * @return true if at least one ShowSequenceFeatures has been + * added */ - public boolean hasShowSequenceFeatures() - { + public boolean hasShowSequenceFeatures( + ) { return this._has_showSequenceFeatures; - } //-- boolean hasShowSequenceFeatures() + } /** - * Method hasShowText + * Method hasShowText. * - * - * - * @return boolean + * @return true if at least one ShowText has been added */ - public boolean hasShowText() - { + public boolean hasShowText( + ) { return this._has_showText; - } //-- boolean hasShowText() + } /** - * Method hasStartRes - * + * Method hasStartRes. * - * - * @return boolean + * @return true if at least one StartRes has been added */ - public boolean hasStartRes() - { + public boolean hasStartRes( + ) { return this._has_startRes; - } //-- boolean hasStartRes() + } /** - * Method hasStartSeq - * - * + * Method hasStartSeq. * - * @return boolean + * @return true if at least one StartSeq has been added */ - public boolean hasStartSeq() - { + public boolean hasStartSeq( + ) { return this._has_startSeq; - } //-- boolean hasStartSeq() + } /** - * Method hasTextCol1 - * - * + * Method hasTextCol1. * - * @return boolean + * @return true if at least one TextCol1 has been added */ - public boolean hasTextCol1() - { + public boolean hasTextCol1( + ) { return this._has_textCol1; - } //-- boolean hasTextCol1() + } /** - * Method hasTextCol2 + * Method hasTextCol2. * - * - * - * @return boolean + * @return true if at least one TextCol2 has been added */ - public boolean hasTextCol2() - { + public boolean hasTextCol2( + ) { return this._has_textCol2; - } //-- boolean hasTextCol2() + } /** - * Method hasTextColThreshold - * + * Method hasTextColThreshold. * - * - * @return boolean + * @return true if at least one TextColThreshold has been added */ - public boolean hasTextColThreshold() - { + public boolean hasTextColThreshold( + ) { return this._has_textColThreshold; - } //-- boolean hasTextColThreshold() + } + + /** + * Method hasWidth. + * + * @return true if at least one Width has been added + */ + public boolean hasWidth( + ) { + return this._has_width; + } /** - * Method hasWidth + * Method hasWrapAlignment. * + * @return true if at least one WrapAlignment has been added + */ + public boolean hasWrapAlignment( + ) { + return this._has_wrapAlignment; + } + + /** + * Method hasXpos. * + * @return true if at least one Xpos has been added + */ + public boolean hasXpos( + ) { + return this._has_xpos; + } + + /** + * Method hasYpos. * - * @return boolean + * @return true if at least one Ypos has been added */ - public boolean hasWidth() - { - return this._has_width; - } //-- boolean hasWidth() + public boolean hasYpos( + ) { + return this._has_ypos; + } /** - * Method hasWrapAlignment + * Returns the value of field 'conservationSelected'. * + * @return the value of field 'ConservationSelected'. + */ + public boolean isConservationSelected( + ) { + return this._conservationSelected; + } + + /** + * Returns the value of field 'gatheredViews'. * + * @return the value of field 'GatheredViews'. + */ + public boolean isGatheredViews( + ) { + return this._gatheredViews; + } + + /** + * Returns the value of field 'pidSelected'. * - * @return boolean + * @return the value of field 'PidSelected'. */ - public boolean hasWrapAlignment() - { - return this._has_wrapAlignment; - } //-- boolean hasWrapAlignment() + public boolean isPidSelected( + ) { + return this._pidSelected; + } /** - * Method hasXpos + * Returns the value of field 'renderGaps'. * + * @return the value of field 'RenderGaps'. + */ + public boolean isRenderGaps( + ) { + return this._renderGaps; + } + + /** + * Returns the value of field 'rightAlignIds'. * + * @return the value of field 'RightAlignIds'. + */ + public boolean isRightAlignIds( + ) { + return this._rightAlignIds; + } + + /** + * Returns the value of field 'showAnnotation'. * - * @return boolean + * @return the value of field 'ShowAnnotation'. */ - public boolean hasXpos() - { - return this._has_xpos; - } //-- boolean hasXpos() + public boolean isShowAnnotation( + ) { + return this._showAnnotation; + } /** - * Method hasYpos + * Returns the value of field 'showBoxes'. * + * @return the value of field 'ShowBoxes'. + */ + public boolean isShowBoxes( + ) { + return this._showBoxes; + } + + /** + * Returns the value of field 'showColourText'. * + * @return the value of field 'ShowColourText'. + */ + public boolean isShowColourText( + ) { + return this._showColourText; + } + + /** + * Returns the value of field 'showFullId'. * - * @return boolean + * @return the value of field 'ShowFullId'. */ - public boolean hasYpos() - { - return this._has_ypos; - } //-- boolean hasYpos() + public boolean isShowFullId( + ) { + return this._showFullId; + } /** - * Method isValid + * Returns the value of field 'showSequenceFeatures'. * + * @return the value of field 'ShowSequenceFeatures'. + */ + public boolean isShowSequenceFeatures( + ) { + return this._showSequenceFeatures; + } + + /** + * Returns the value of field 'showText'. * + * @return the value of field 'ShowText'. + */ + public boolean isShowText( + ) { + return this._showText; + } + + /** + * Method isValid. * - * @return boolean + * @return true if this object is valid according to the schema */ - public boolean isValid() - { + public boolean isValid( + ) { try { validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { + } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; - } //-- boolean isValid() + } /** - * Method marshal + * Returns the value of field 'wrapAlignment'. * + * @return the value of field 'WrapAlignment'. + */ + public boolean isWrapAlignment( + ) { + return this._wrapAlignment; + } + + /** * * * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(java.io.Writer) + } /** - * Method marshal - * * * * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - + * @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); - } //-- void marshal(org.xml.sax.ContentHandler) + } /** - * Method removeAllHiddenColumns - * */ - public void removeAllHiddenColumns() - { - _hiddenColumnsList.removeAllElements(); - } //-- void removeAllHiddenColumns() + public void removeAllHiddenColumns( + ) { + this._hiddenColumnsList.clear(); + } /** - * Method removeHiddenColumns - * + * Method removeHiddenColumns. * + * @param vHiddenColumns + * @return true if the object was removed from the collection. + */ + public boolean removeHiddenColumns( + final jalview.schemabinding.version2.HiddenColumns vHiddenColumns) { + boolean removed = _hiddenColumnsList.remove(vHiddenColumns); + return removed; + } + + /** + * Method removeHiddenColumnsAt. * * @param index - * @return HiddenColumns + * @return the element removed from the collection */ - public jalview.schemabinding.version2.HiddenColumns removeHiddenColumns(int index) - { - java.lang.Object obj = _hiddenColumnsList.elementAt(index); - _hiddenColumnsList.removeElementAt(index); + public jalview.schemabinding.version2.HiddenColumns removeHiddenColumnsAt( + final int index) { + java.lang.Object obj = this._hiddenColumnsList.remove(index); return (jalview.schemabinding.version2.HiddenColumns) obj; - } //-- jalview.schemabinding.version2.HiddenColumns removeHiddenColumns(int) + } /** * Sets the value of field 'annotationColours'. @@ -1364,31 +1353,31 @@ public class Viewport implements java.io.Serializable { * @param annotationColours the value of field * 'annotationColours'. */ - public void setAnnotationColours(jalview.schemabinding.version2.AnnotationColours annotationColours) - { + public void setAnnotationColours( + final jalview.schemabinding.version2.AnnotationColours annotationColours) { this._annotationColours = annotationColours; - } //-- void setAnnotationColours(jalview.schemabinding.version2.AnnotationColours) + } /** * Sets the value of field 'bgColour'. * * @param bgColour the value of field 'bgColour'. */ - public void setBgColour(java.lang.String bgColour) - { + public void setBgColour( + final java.lang.String bgColour) { this._bgColour = bgColour; - } //-- void setBgColour(java.lang.String) + } /** * Sets the value of field 'consThreshold'. * * @param consThreshold the value of field 'consThreshold'. */ - public void setConsThreshold(int consThreshold) - { + public void setConsThreshold( + final int consThreshold) { this._consThreshold = consThreshold; this._has_consThreshold = true; - } //-- void setConsThreshold(int) + } /** * Sets the value of field 'conservationSelected'. @@ -1396,197 +1385,198 @@ public class Viewport implements java.io.Serializable { * @param conservationSelected the value of field * 'conservationSelected'. */ - public void setConservationSelected(boolean conservationSelected) - { + public void setConservationSelected( + final boolean conservationSelected) { this._conservationSelected = conservationSelected; this._has_conservationSelected = true; - } //-- void setConservationSelected(boolean) + } /** * Sets the value of field 'fontName'. * * @param fontName the value of field 'fontName'. */ - public void setFontName(java.lang.String fontName) - { + public void setFontName( + final java.lang.String fontName) { this._fontName = fontName; - } //-- void setFontName(java.lang.String) + } /** * Sets the value of field 'fontSize'. * * @param fontSize the value of field 'fontSize'. */ - public void setFontSize(int fontSize) - { + public void setFontSize( + final int fontSize) { this._fontSize = fontSize; this._has_fontSize = true; - } //-- void setFontSize(int) + } /** * Sets the value of field 'fontStyle'. * * @param fontStyle the value of field 'fontStyle'. */ - public void setFontStyle(int fontStyle) - { + public void setFontStyle( + final int fontStyle) { this._fontStyle = fontStyle; this._has_fontStyle = true; - } //-- void setFontStyle(int) + } /** * Sets the value of field 'gatheredViews'. * * @param gatheredViews the value of field 'gatheredViews'. */ - public void setGatheredViews(boolean gatheredViews) - { + public void setGatheredViews( + final boolean gatheredViews) { this._gatheredViews = gatheredViews; this._has_gatheredViews = true; - } //-- void setGatheredViews(boolean) + } /** * Sets the value of field 'height'. * * @param height the value of field 'height'. */ - public void setHeight(int height) - { + public void setHeight( + final int height) { this._height = height; this._has_height = true; - } //-- void setHeight(int) + } /** - * Method setHiddenColumns - * * * * @param index * @param vHiddenColumns - */ - public void setHiddenColumns(int index, jalview.schemabinding.version2.HiddenColumns vHiddenColumns) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _hiddenColumnsList.size())) { - throw new IndexOutOfBoundsException(); + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setHiddenColumns( + final int index, + final jalview.schemabinding.version2.HiddenColumns vHiddenColumns) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._hiddenColumnsList.size()) { + throw new IndexOutOfBoundsException("setHiddenColumns: Index value '" + index + "' not in range [0.." + (this._hiddenColumnsList.size() - 1) + "]"); } - _hiddenColumnsList.setElementAt(vHiddenColumns, index); - } //-- void setHiddenColumns(int, jalview.schemabinding.version2.HiddenColumns) + + this._hiddenColumnsList.set(index, vHiddenColumns); + } /** - * Method setHiddenColumns - * * * - * @param hiddenColumnsArray + * @param vHiddenColumnsArray */ - public void setHiddenColumns(jalview.schemabinding.version2.HiddenColumns[] hiddenColumnsArray) - { + public void setHiddenColumns( + final jalview.schemabinding.version2.HiddenColumns[] vHiddenColumnsArray) { //-- copy array - _hiddenColumnsList.removeAllElements(); - for (int i = 0; i < hiddenColumnsArray.length; i++) { - _hiddenColumnsList.addElement(hiddenColumnsArray[i]); + _hiddenColumnsList.clear(); + + for (int i = 0; i < vHiddenColumnsArray.length; i++) { + this._hiddenColumnsList.add(vHiddenColumnsArray[i]); } - } //-- void setHiddenColumns(jalview.schemabinding.version2.HiddenColumns) + } /** * Sets the value of field 'pidSelected'. * * @param pidSelected the value of field 'pidSelected'. */ - public void setPidSelected(boolean pidSelected) - { + public void setPidSelected( + final boolean pidSelected) { this._pidSelected = pidSelected; this._has_pidSelected = true; - } //-- void setPidSelected(boolean) + } /** * Sets the value of field 'pidThreshold'. * * @param pidThreshold the value of field 'pidThreshold'. */ - public void setPidThreshold(int pidThreshold) - { + public void setPidThreshold( + final int pidThreshold) { this._pidThreshold = pidThreshold; this._has_pidThreshold = true; - } //-- void setPidThreshold(int) + } /** * Sets the value of field 'renderGaps'. * * @param renderGaps the value of field 'renderGaps'. */ - public void setRenderGaps(boolean renderGaps) - { + public void setRenderGaps( + final boolean renderGaps) { this._renderGaps = renderGaps; this._has_renderGaps = true; - } //-- void setRenderGaps(boolean) + } /** * Sets the value of field 'rightAlignIds'. * * @param rightAlignIds the value of field 'rightAlignIds'. */ - public void setRightAlignIds(boolean rightAlignIds) - { + public void setRightAlignIds( + final boolean rightAlignIds) { this._rightAlignIds = rightAlignIds; this._has_rightAlignIds = true; - } //-- void setRightAlignIds(boolean) + } /** * Sets the value of field 'sequenceSetId'. * * @param sequenceSetId the value of field 'sequenceSetId'. */ - public void setSequenceSetId(java.lang.String sequenceSetId) - { + public void setSequenceSetId( + final java.lang.String sequenceSetId) { this._sequenceSetId = sequenceSetId; - } //-- void setSequenceSetId(java.lang.String) + } /** * Sets the value of field 'showAnnotation'. * * @param showAnnotation the value of field 'showAnnotation'. */ - public void setShowAnnotation(boolean showAnnotation) - { + public void setShowAnnotation( + final boolean showAnnotation) { this._showAnnotation = showAnnotation; this._has_showAnnotation = true; - } //-- void setShowAnnotation(boolean) + } /** * Sets the value of field 'showBoxes'. * * @param showBoxes the value of field 'showBoxes'. */ - public void setShowBoxes(boolean showBoxes) - { + public void setShowBoxes( + final boolean showBoxes) { this._showBoxes = showBoxes; this._has_showBoxes = true; - } //-- void setShowBoxes(boolean) + } /** * Sets the value of field 'showColourText'. * * @param showColourText the value of field 'showColourText'. */ - public void setShowColourText(boolean showColourText) - { + public void setShowColourText( + final boolean showColourText) { this._showColourText = showColourText; this._has_showColourText = true; - } //-- void setShowColourText(boolean) + } /** * Sets the value of field 'showFullId'. * * @param showFullId the value of field 'showFullId'. */ - public void setShowFullId(boolean showFullId) - { + public void setShowFullId( + final boolean showFullId) { this._showFullId = showFullId; this._has_showFullId = true; - } //-- void setShowFullId(boolean) + } /** * Sets the value of field 'showSequenceFeatures'. @@ -1594,165 +1584,170 @@ public class Viewport implements java.io.Serializable { * @param showSequenceFeatures the value of field * 'showSequenceFeatures'. */ - public void setShowSequenceFeatures(boolean showSequenceFeatures) - { + public void setShowSequenceFeatures( + final boolean showSequenceFeatures) { this._showSequenceFeatures = showSequenceFeatures; this._has_showSequenceFeatures = true; - } //-- void setShowSequenceFeatures(boolean) + } /** * Sets the value of field 'showText'. * * @param showText the value of field 'showText'. */ - public void setShowText(boolean showText) - { + public void setShowText( + final boolean showText) { this._showText = showText; this._has_showText = true; - } //-- void setShowText(boolean) + } /** * Sets the value of field 'startRes'. * * @param startRes the value of field 'startRes'. */ - public void setStartRes(int startRes) - { + public void setStartRes( + final int startRes) { this._startRes = startRes; this._has_startRes = true; - } //-- void setStartRes(int) + } /** * Sets the value of field 'startSeq'. * * @param startSeq the value of field 'startSeq'. */ - public void setStartSeq(int startSeq) - { + public void setStartSeq( + final int startSeq) { this._startSeq = startSeq; this._has_startSeq = true; - } //-- void setStartSeq(int) + } /** * Sets the value of field 'textCol1'. * * @param textCol1 the value of field 'textCol1'. */ - public void setTextCol1(int textCol1) - { + public void setTextCol1( + final int textCol1) { this._textCol1 = textCol1; this._has_textCol1 = true; - } //-- void setTextCol1(int) + } /** * Sets the value of field 'textCol2'. * * @param textCol2 the value of field 'textCol2'. */ - public void setTextCol2(int textCol2) - { + public void setTextCol2( + final int textCol2) { this._textCol2 = textCol2; this._has_textCol2 = true; - } //-- void setTextCol2(int) + } /** * Sets the value of field 'textColThreshold'. * * @param textColThreshold the value of field 'textColThreshold' */ - public void setTextColThreshold(int textColThreshold) - { + public void setTextColThreshold( + final int textColThreshold) { this._textColThreshold = textColThreshold; this._has_textColThreshold = true; - } //-- void setTextColThreshold(int) + } /** * Sets the value of field 'title'. * * @param title the value of field 'title'. */ - public void setTitle(java.lang.String title) - { + public void setTitle( + final java.lang.String title) { this._title = title; - } //-- void setTitle(java.lang.String) + } /** * Sets the value of field 'viewName'. * * @param viewName the value of field 'viewName'. */ - public void setViewName(java.lang.String viewName) - { + public void setViewName( + final java.lang.String viewName) { this._viewName = viewName; - } //-- void setViewName(java.lang.String) + } /** * Sets the value of field 'width'. * * @param width the value of field 'width'. */ - public void setWidth(int width) - { + public void setWidth( + final int width) { this._width = width; this._has_width = true; - } //-- void setWidth(int) + } /** * Sets the value of field 'wrapAlignment'. * * @param wrapAlignment the value of field 'wrapAlignment'. */ - public void setWrapAlignment(boolean wrapAlignment) - { + public void setWrapAlignment( + final boolean wrapAlignment) { this._wrapAlignment = wrapAlignment; this._has_wrapAlignment = true; - } //-- void setWrapAlignment(boolean) + } /** * Sets the value of field 'xpos'. * * @param xpos the value of field 'xpos'. */ - public void setXpos(int xpos) - { + public void setXpos( + final int xpos) { this._xpos = xpos; this._has_xpos = true; - } //-- void setXpos(int) + } /** * Sets the value of field 'ypos'. * * @param ypos the value of field 'ypos'. */ - public void setYpos(int ypos) - { + public void setYpos( + final int ypos) { this._ypos = ypos; this._has_ypos = true; - } //-- void setYpos(int) + } /** - * Method unmarshal - * - * + * Method unmarshal. * * @param reader - * @return Object - */ - public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { + * @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.Viewport + */ + public static jalview.schemabinding.version2.Viewport unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (jalview.schemabinding.version2.Viewport) Unmarshaller.unmarshal(jalview.schemabinding.version2.Viewport.class, reader); - } //-- java.lang.Object unmarshal(java.io.Reader) + } /** - * Method validate * + * + * @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 - { + public void validate( + ) + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } //-- void validate() + } } diff --git a/src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java new file mode 100644 index 0000000..4474867 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.java @@ -0,0 +1,408 @@ +/* + * 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.AnnotationColours; + +/** + * Class AnnotationColoursDescriptor. + * + * @version $Revision$ $Date$ + */ +public class AnnotationColoursDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AnnotationColoursDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "AnnotationColours"; + _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 + + //-- _aboveThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_aboveThreshold", "aboveThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasAboveThreshold()) { return null; } + return new java.lang.Integer(target.getAboveThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteAboveThreshold(); + return; + } + target.setAboveThreshold( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _aboveThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _annotation + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_annotation", "annotation", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + return target.getAnnotation(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + target.setAnnotation( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _annotation + 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); + //-- _minColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_minColour", "minColour", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasMinColour()) { return null; } + return new java.lang.Integer(target.getMinColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteMinColour(); + return; + } + target.setMinColour( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _minColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _maxColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_maxColour", "maxColour", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasMaxColour()) { return null; } + return new java.lang.Integer(target.getMaxColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteMaxColour(); + return; + } + target.setMaxColour( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _maxColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _colourScheme + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_colourScheme", "colourScheme", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + return target.getColourScheme(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + target.setColourScheme( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _colourScheme + 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); + //-- _threshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationColours target = (AnnotationColours) object; + if (!target.hasThreshold()) { return null; } + return new java.lang.Float(target.getThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationColours target = (AnnotationColours) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteThreshold(); + return; + } + target.setThreshold( ((java.lang.Float) value).floatValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _threshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.FloatValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive((float) -3.4028235E38); + typeValidator.setMaxInclusive((float) 3.4028235E38); + } + 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.AnnotationColours.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/AnnotationDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.java new file mode 100644 index 0000000..e06c62c --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.java @@ -0,0 +1,687 @@ +/* + * 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.Annotation; + +/** + * Class AnnotationDescriptor. + * + * @version $Revision$ $Date$ + */ +public class AnnotationDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AnnotationDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "Annotation"; + _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 + + //-- _graph + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_graph", "graph", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + if (!target.hasGraph()) { return null; } + return (target.getGraph() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.setGraph( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _graph + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _graphType + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_graphType", "graphType", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + if (!target.hasGraphType()) { return null; } + return new java.lang.Integer(target.getGraphType()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteGraphType(); + return; + } + target.setGraphType( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _graphType + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _sequenceRef + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequenceRef", "sequenceRef", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + return target.getSequenceRef(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + target.setSequenceRef( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _sequenceRef + 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); + //-- _graphColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_graphColour", "graphColour", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + if (!target.hasGraphColour()) { return null; } + return new java.lang.Integer(target.getGraphColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteGraphColour(); + return; + } + target.setGraphColour( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _graphColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _graphGroup + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_graphGroup", "graphGroup", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + if (!target.hasGraphGroup()) { return null; } + return new java.lang.Integer(target.getGraphGroup()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteGraphGroup(); + return; + } + target.setGraphGroup( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _graphGroup + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + return target.getId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + target.setId( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _id + 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); + //-- _scoreOnly + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_scoreOnly", "scoreOnly", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + if (!target.hasScoreOnly()) { return null; } + return (target.getScoreOnly() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteScoreOnly(); + return; + } + target.setScoreOnly( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _scoreOnly + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _score + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Double.TYPE, "_score", "score", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + if (!target.hasScore()) { return null; } + return new java.lang.Double(target.getScore()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteScore(); + return; + } + target.setScore( ((java.lang.Double) value).doubleValue()); + } 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: _score + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.DoubleValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.DoubleValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive(-1.7976931348623157E308); + typeValidator.setMaxInclusive(1.7976931348623157E308); + } + desc.setValidator(fieldValidator); + //-- _visible + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_visible", "visible", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + if (!target.hasVisible()) { return null; } + return (target.getVisible() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteVisible(); + return; + } + target.setVisible( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _visible + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _annotationElementList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.AnnotationElement.class, "_annotationElementList", "annotationElement", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + return target.getAnnotationElement(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + target.addAnnotationElement( (jalview.schemabinding.version2.AnnotationElement) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Annotation target = (Annotation) object; + target.removeAllAnnotationElement(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.AnnotationElement(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _annotationElementList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _label + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_label", "label", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + return target.getLabel(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + target.setLabel( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _label + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + return target.getDescription(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + target.setDescription( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _description + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _thresholdLine + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.ThresholdLine.class, "_thresholdLine", "thresholdLine", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Annotation target = (Annotation) object; + return target.getThresholdLine(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Annotation target = (Annotation) object; + target.setThresholdLine( (jalview.schemabinding.version2.ThresholdLine) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.ThresholdLine(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _thresholdLine + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Annotation.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/AnnotationElementDescriptor.java b/src/jalview/schemabinding/version2/descriptors/AnnotationElementDescriptor.java new file mode 100644 index 0000000..7441e9e --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/AnnotationElementDescriptor.java @@ -0,0 +1,410 @@ +/* + * 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.AnnotationElement; + +/** + * Class AnnotationElementDescriptor. + * + * @version $Revision$ $Date$ + */ +public class AnnotationElementDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AnnotationElementDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "annotationElement"; + _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 + + //-- _position + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_position", "position", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationElement target = (AnnotationElement) object; + if (!target.hasPosition()) { return null; } + return new java.lang.Integer(target.getPosition()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationElement target = (AnnotationElement) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.setPosition( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _position + 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); + //-- _colour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colour", "colour", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationElement target = (AnnotationElement) object; + if (!target.hasColour()) { return null; } + return new java.lang.Integer(target.getColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationElement target = (AnnotationElement) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteColour(); + return; + } + target.setColour( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _colour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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 + + //-- _displayCharacter + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_displayCharacter", "displayCharacter", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationElement target = (AnnotationElement) object; + return target.getDisplayCharacter(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationElement target = (AnnotationElement) object; + target.setDisplayCharacter( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _displayCharacter + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationElement target = (AnnotationElement) object; + return target.getDescription(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationElement target = (AnnotationElement) object; + target.setDescription( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _description + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _secondaryStructure + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_secondaryStructure", "secondaryStructure", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationElement target = (AnnotationElement) object; + return target.getSecondaryStructure(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationElement target = (AnnotationElement) object; + target.setSecondaryStructure( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _secondaryStructure + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + typeValidator.setLength(1); + } + desc.setValidator(fieldValidator); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_value", "value", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AnnotationElement target = (AnnotationElement) object; + if (!target.hasValue()) { return null; } + return new java.lang.Float(target.getValue()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AnnotationElement target = (AnnotationElement) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteValue(); + return; + } + target.setValue( ((java.lang.Float) value).floatValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _value + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.FloatValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive((float) -3.4028235E38); + typeValidator.setMaxInclusive((float) 3.4028235E38); + } + 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.AnnotationElement.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/ColourDescriptor.java b/src/jalview/schemabinding/version2/descriptors/ColourDescriptor.java new file mode 100644 index 0000000..8dee424 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/ColourDescriptor.java @@ -0,0 +1,237 @@ +/* + * 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.Colour; + +/** + * Class ColourDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ColourDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ColourDescriptor() { + super(); + _xmlName = "colour"; + _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 + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "Name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Colour target = (Colour) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Colour target = (Colour) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + 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); + //-- _RGB + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_RGB", "RGB", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Colour target = (Colour) object; + return target.getRGB(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Colour target = (Colour) object; + target.setRGB( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _RGB + 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 + + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Colour.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 new file mode 100644 index 0000000..9a348b0 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/DBRefDescriptor.java @@ -0,0 +1,273 @@ +/* + * 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.DBRef; + +/** + * Class DBRefDescriptor. + * + * @version $Revision$ $Date$ + */ +public class DBRefDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public DBRefDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "DBRef"; + _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 + + //-- _source + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_source", "source", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DBRef target = (DBRef) object; + return target.getSource(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DBRef target = (DBRef) object; + target.setSource( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _source + 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); + //-- _version + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_version", "version", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DBRef target = (DBRef) object; + return target.getVersion(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DBRef target = (DBRef) object; + target.setVersion( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _version + 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); + //-- _accessionId + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_accessionId", "accessionId", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + DBRef target = (DBRef) object; + return target.getAccessionId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + DBRef target = (DBRef) object; + target.setAccessionId( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _accessionId + 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 + + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.DBRef.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/FeatureDescriptor.java b/src/jalview/schemabinding/version2/descriptors/FeatureDescriptor.java new file mode 100644 index 0000000..b5ac5f5 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/FeatureDescriptor.java @@ -0,0 +1,486 @@ +/* + * 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.Feature; + +/** + * Class FeatureDescriptor. + * + * @version $Revision$ $Date$ + */ +public class FeatureDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FeatureDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "feature"; + _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 + + //-- _begin + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_begin", "begin", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + if (!target.hasBegin()) { return null; } + return new java.lang.Integer(target.getBegin()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.setBegin( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _begin + 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 + { + Feature target = (Feature) object; + if (!target.hasEnd()) { return null; } + return new java.lang.Integer(target.getEnd()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.setEnd( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + 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); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + return target.getType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + target.setType( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + 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); + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + return target.getDescription(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + target.setDescription( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _description + 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); + //-- _status + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_status", "status", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + return target.getStatus(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + target.setStatus( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _status + 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); + //-- _featureGroup + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_featureGroup", "featureGroup", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + return target.getFeatureGroup(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + target.setFeatureGroup( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _featureGroup + 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); + //-- _score + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_score", "score", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + if (!target.hasScore()) { return null; } + return new java.lang.Float(target.getScore()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteScore(); + return; + } + target.setScore( ((java.lang.Float) value).floatValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _score + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.FloatValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive((float) -3.4028235E38); + typeValidator.setMaxInclusive((float) 3.4028235E38); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _otherDataList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.OtherData.class, "_otherDataList", "otherData", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Feature target = (Feature) object; + return target.getOtherData(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Feature target = (Feature) object; + target.addOtherData( (jalview.schemabinding.version2.OtherData) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Feature target = (Feature) object; + target.removeAllOtherData(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.OtherData(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _otherDataList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Feature.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/FeatureSettingsDescriptor.java b/src/jalview/schemabinding/version2/descriptors/FeatureSettingsDescriptor.java new file mode 100644 index 0000000..6097bfa --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/FeatureSettingsDescriptor.java @@ -0,0 +1,249 @@ +/* + * 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.FeatureSettings; + +/** + * Class FeatureSettingsDescriptor. + * + * @version $Revision$ $Date$ + */ +public class FeatureSettingsDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FeatureSettingsDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "FeatureSettings"; + _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 + + //-- _settingList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Setting.class, "_settingList", "setting", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FeatureSettings target = (FeatureSettings) object; + return target.getSetting(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FeatureSettings target = (FeatureSettings) object; + target.addSetting( (jalview.schemabinding.version2.Setting) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + FeatureSettings target = (FeatureSettings) object; + target.removeAllSetting(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.Setting(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _settingList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _groupList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Group.class, "_groupList", "group", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + FeatureSettings target = (FeatureSettings) object; + return target.getGroup(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + FeatureSettings target = (FeatureSettings) object; + target.addGroup( (jalview.schemabinding.version2.Group) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + FeatureSettings target = (FeatureSettings) object; + target.removeAllGroup(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.Group(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _groupList + 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.FeatureSettings.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/FeaturesDescriptor.java b/src/jalview/schemabinding/version2/descriptors/FeaturesDescriptor.java new file mode 100644 index 0000000..6ebbb34 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/FeaturesDescriptor.java @@ -0,0 +1,159 @@ +/* + * 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.Features; + +/** + * Class FeaturesDescriptor. + * + * @version $Revision$ $Date$ + */ +public class FeaturesDescriptor extends jalview.schemabinding.version2.descriptors.FeatureDescriptor { + + + //--------------------------/ + //- 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public FeaturesDescriptor() { + super(); + setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.FeatureDescriptor()); + _nsURI = "www.jalview.org"; + _xmlName = "features"; + _elementDefinition = true; + } + + + //-----------/ + //- 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( + ) { + if (_identity == null) { + return super.getIdentity(); + } + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Features.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/GroupDescriptor.java b/src/jalview/schemabinding/version2/descriptors/GroupDescriptor.java new file mode 100644 index 0000000..a0bacc0 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/GroupDescriptor.java @@ -0,0 +1,242 @@ +/* + * 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.Group; + +/** + * Class GroupDescriptor. + * + * @version $Revision$ $Date$ + */ +public class GroupDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public GroupDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "group"; + _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 + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Group target = (Group) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Group target = (Group) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + 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); + //-- _display + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_display", "display", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Group target = (Group) object; + if (!target.hasDisplay()) { return null; } + return (target.getDisplay() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Group target = (Group) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.setDisplay( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _display + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Group.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/HiddenColumnsDescriptor.java b/src/jalview/schemabinding/version2/descriptors/HiddenColumnsDescriptor.java new file mode 100644 index 0000000..90ef5ab --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/HiddenColumnsDescriptor.java @@ -0,0 +1,248 @@ +/* + * 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.HiddenColumns; + +/** + * Class HiddenColumnsDescriptor. + * + * @version $Revision$ $Date$ + */ +public class HiddenColumnsDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public HiddenColumnsDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "hiddenColumns"; + _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 + { + HiddenColumns target = (HiddenColumns) object; + if (!target.hasStart()) { return null; } + return new java.lang.Integer(target.getStart()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + HiddenColumns target = (HiddenColumns) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteStart(); + return; + } + target.setStart( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _start + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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 + { + HiddenColumns target = (HiddenColumns) object; + if (!target.hasEnd()) { return null; } + return new java.lang.Integer(target.getEnd()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + HiddenColumns target = (HiddenColumns) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteEnd(); + return; + } + target.setEnd( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _end + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.HiddenColumns.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/JGroupDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java new file mode 100644 index 0000000..1ab08a2 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java @@ -0,0 +1,757 @@ +/* + * 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.JGroup; + +/** + * Class JGroupDescriptor. + * + * @version $Revision$ $Date$ + */ +public class JGroupDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JGroupDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "JGroup"; + _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 + + //-- _start + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if (!target.hasStart()) { return null; } + return new java.lang.Integer(target.getStart()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteStart(); + return; + } + target.setStart( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _start + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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 + { + JGroup target = (JGroup) object; + if (!target.hasEnd()) { return null; } + return new java.lang.Integer(target.getEnd()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteEnd(); + return; + } + target.setEnd( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _end + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + 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); + //-- _colour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_colour", "colour", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + return target.getColour(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + target.setColour( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _colour + 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); + //-- _consThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_consThreshold", "consThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if (!target.hasConsThreshold()) { return null; } + return new java.lang.Integer(target.getConsThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteConsThreshold(); + return; + } + target.setConsThreshold( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _consThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _pidThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_pidThreshold", "pidThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if (!target.hasPidThreshold()) { return null; } + return new java.lang.Integer(target.getPidThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deletePidThreshold(); + return; + } + target.setPidThreshold( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _pidThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _outlineColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_outlineColour", "outlineColour", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if (!target.hasOutlineColour()) { return null; } + return new java.lang.Integer(target.getOutlineColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteOutlineColour(); + return; + } + target.setOutlineColour( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _outlineColour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _displayBoxes + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_displayBoxes", "displayBoxes", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if (!target.hasDisplayBoxes()) { return null; } + return (target.getDisplayBoxes() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteDisplayBoxes(); + return; + } + target.setDisplayBoxes( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _displayBoxes + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _displayText + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_displayText", "displayText", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if (!target.hasDisplayText()) { return null; } + return (target.getDisplayText() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteDisplayText(); + return; + } + target.setDisplayText( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _displayText + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _colourText + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourText", "colourText", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if (!target.hasColourText()) { return null; } + return (target.getColourText() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteColourText(); + return; + } + target.setColourText( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _colourText + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _textCol1 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol1", "textCol1", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if (!target.hasTextCol1()) { return null; } + return new java.lang.Integer(target.getTextCol1()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol1(); + return; + } + target.setTextCol1( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _textCol1 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _textCol2 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol2", "textCol2", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if (!target.hasTextCol2()) { return null; } + return new java.lang.Integer(target.getTextCol2()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol2(); + return; + } + target.setTextCol2( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _textCol2 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _textColThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textColThreshold", "textColThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if (!target.hasTextColThreshold()) { return null; } + return new java.lang.Integer(target.getTextColThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextColThreshold(); + return; + } + target.setTextColThreshold( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _textColThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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 + + //-- _seqList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_seqList", "seq", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + return target.getSeq(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.addSeq( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + JGroup target = (JGroup) object; + target.removeAllSeq(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _seqList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + 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); + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.JGroup.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/JSeqDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java new file mode 100644 index 0000000..3d3a4f5 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java @@ -0,0 +1,512 @@ +/* + * 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.JSeq; + +/** + * Class JSeqDescriptor. + * + * @version $Revision$ $Date$ + */ +public class JSeqDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JSeqDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "JSeq"; + _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 + + //-- _colour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colour", "colour", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + if (!target.hasColour()) { return null; } + return new java.lang.Integer(target.getColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteColour(); + return; + } + target.setColour( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _colour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _start + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + if (!target.hasStart()) { return null; } + return new java.lang.Integer(target.getStart()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.setStart( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + 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 + { + JSeq target = (JSeq) object; + if (!target.hasEnd()) { return null; } + return new java.lang.Integer(target.getEnd()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.setEnd( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + 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); + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + if (!target.hasId()) { return null; } + return new java.lang.Integer(target.getId()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.setId( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _id + 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); + //-- _hidden + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_hidden", "hidden", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + if (!target.hasHidden()) { return null; } + return (target.getHidden() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteHidden(); + return; + } + target.setHidden( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _hidden + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _featuresList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Features.class, "_featuresList", "features", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + return target.getFeatures(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + target.addFeatures( (jalview.schemabinding.version2.Features) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + JSeq target = (JSeq) object; + target.removeAllFeatures(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.Features(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _featuresList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _pdbidsList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Pdbids.class, "_pdbidsList", "pdbids", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + return target.getPdbids(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + target.addPdbids( (jalview.schemabinding.version2.Pdbids) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + JSeq target = (JSeq) object; + target.removeAllPdbids(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.Pdbids(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _pdbidsList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _hiddenSequencesList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_hiddenSequencesList", "hiddenSequences", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JSeq target = (JSeq) object; + return target.getHiddenSequences(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.addHiddenSequences( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + JSeq target = (JSeq) object; + target.removeAllHiddenSequences(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _hiddenSequencesList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + 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); + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.JSeq.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/JalviewModelDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JalviewModelDescriptor.java new file mode 100644 index 0000000..eb5e0dd --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/JalviewModelDescriptor.java @@ -0,0 +1,317 @@ +/* + * 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.JalviewModel; + +/** + * Class JalviewModelDescriptor. + * + * @version $Revision$ $Date$ + */ +public class JalviewModelDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JalviewModelDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "JalviewModel"; + _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 + + //-- initialize element descriptors + + //-- _creationDate + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.util.Date.class, "_creationDate", "creationDate", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModel target = (JalviewModel) object; + return target.getCreationDate(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModel target = (JalviewModel) object; + target.setCreationDate( (java.util.Date) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new java.util.Date(); + } + }; + handler = new org.exolab.castor.xml.handlers.DateFieldHandler(handler); + desc.setImmutable(true); + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _creationDate + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.DateTimeValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.DateTimeValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _version + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_version", "version", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModel target = (JalviewModel) object; + return target.getVersion(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModel target = (JalviewModel) object; + target.setVersion( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _version + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _vamsasModel + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.VamsasModel.class, "_vamsasModel", "vamsasModel", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModel target = (JalviewModel) object; + return target.getVamsasModel(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModel target = (JalviewModel) object; + target.setVamsasModel( (jalview.schemabinding.version2.VamsasModel) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.VamsasModel(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _vamsasModel + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _jalviewModelSequence + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.JalviewModelSequence.class, "_jalviewModelSequence", "-error-if-this-is-used-", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModel target = (JalviewModel) object; + return target.getJalviewModelSequence(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModel target = (JalviewModel) object; + target.setJalviewModelSequence( (jalview.schemabinding.version2.JalviewModelSequence) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.JalviewModelSequence(); + } + }; + desc.setHandler(handler); + desc.setContainer(true); + desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.JalviewModelSequenceDescriptor()); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _jalviewModelSequence + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.JalviewModel.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/JalviewModelSequenceDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JalviewModelSequenceDescriptor.java new file mode 100644 index 0000000..2bbb1ff --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/JalviewModelSequenceDescriptor.java @@ -0,0 +1,409 @@ +/* + * 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.JalviewModelSequence; + +/** + * Class JalviewModelSequenceDescriptor. + * + * @version $Revision$ $Date$ + */ +public class JalviewModelSequenceDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JalviewModelSequenceDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _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 + + //-- initialize element descriptors + + //-- _JSeqList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.JSeq.class, "_JSeqList", "JSeq", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModelSequence target = (JalviewModelSequence) object; + return target.getJSeq(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.addJSeq( (jalview.schemabinding.version2.JSeq) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.removeAllJSeq(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.JSeq(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _JSeqList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _JGroupList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.JGroup.class, "_JGroupList", "JGroup", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModelSequence target = (JalviewModelSequence) object; + return target.getJGroup(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.addJGroup( (jalview.schemabinding.version2.JGroup) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.removeAllJGroup(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.JGroup(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _JGroupList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _viewportList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Viewport.class, "_viewportList", "Viewport", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModelSequence target = (JalviewModelSequence) object; + return target.getViewport(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.addViewport( (jalview.schemabinding.version2.Viewport) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.removeAllViewport(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.Viewport(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _viewportList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _userColoursList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.UserColours.class, "_userColoursList", "UserColours", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModelSequence target = (JalviewModelSequence) object; + return target.getUserColours(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.addUserColours( (jalview.schemabinding.version2.UserColours) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.removeAllUserColours(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.UserColours(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _userColoursList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _treeList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Tree.class, "_treeList", "tree", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModelSequence target = (JalviewModelSequence) object; + return target.getTree(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.addTree( (jalview.schemabinding.version2.Tree) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.removeAllTree(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.Tree(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _treeList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _featureSettings + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.FeatureSettings.class, "_featureSettings", "FeatureSettings", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewModelSequence target = (JalviewModelSequence) object; + return target.getFeatureSettings(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewModelSequence target = (JalviewModelSequence) object; + target.setFeatureSettings( (jalview.schemabinding.version2.FeatureSettings) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.FeatureSettings(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _featureSettings + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.JalviewModelSequence.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/JalviewUserColoursDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JalviewUserColoursDescriptor.java new file mode 100644 index 0000000..1b12b63 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/JalviewUserColoursDescriptor.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.JalviewUserColours; +import jalview.schemabinding.version2.Colour; // Added Manually +/** + * Class JalviewUserColoursDescriptor. + * + * @version $Revision$ $Date$ + */ +public class JalviewUserColoursDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JalviewUserColoursDescriptor() { + super(); + _nsURI = "www.jalview.org/colours"; + _xmlName = "JalviewUserColours"; + _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 + + //-- _schemeName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_schemeName", "schemeName", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewUserColours target = (JalviewUserColours) object; + return target.getSchemeName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewUserColours target = (JalviewUserColours) object; + target.setSchemeName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _schemeName + 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 + + //-- _colourList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(Colour.class, "_colourList", "colour", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JalviewUserColours target = (JalviewUserColours) object; + return target.getColour(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JalviewUserColours target = (JalviewUserColours) object; + target.addColour( (Colour) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + JalviewUserColours target = (JalviewUserColours) object; + target.removeAllColour(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new Colour(); + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _colourList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.JalviewUserColours.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/OtherDataDescriptor.java b/src/jalview/schemabinding/version2/descriptors/OtherDataDescriptor.java new file mode 100644 index 0000000..e5dc0b8 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/OtherDataDescriptor.java @@ -0,0 +1,240 @@ +/* + * 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.OtherData; + +/** + * Class OtherDataDescriptor. + * + * @version $Revision$ $Date$ + */ +public class OtherDataDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public OtherDataDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "otherData"; + _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 + + //-- _key + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_key", "key", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + OtherData target = (OtherData) object; + return target.getKey(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + OtherData target = (OtherData) object; + target.setKey( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _key + 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); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + OtherData target = (OtherData) object; + return target.getValue(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + OtherData target = (OtherData) object; + target.setValue( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _value + 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 + + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.OtherData.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/PdbentryDescriptor.java b/src/jalview/schemabinding/version2/descriptors/PdbentryDescriptor.java new file mode 100644 index 0000000..97fedd9 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/PdbentryDescriptor.java @@ -0,0 +1,317 @@ +/* + * 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.Pdbentry; + +/** + * Class PdbentryDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PdbentryDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PdbentryDescriptor() { + super(); + _xmlName = "pdbentry"; + _elementDefinition = false; + 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 + + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Pdbentry target = (Pdbentry) object; + return target.getId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Pdbentry target = (Pdbentry) object; + target.setId( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _id + 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); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Pdbentry target = (Pdbentry) object; + return target.getType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Pdbentry target = (Pdbentry) object; + target.setType( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + 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); + //-- _file + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_file", "file", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Pdbentry target = (Pdbentry) object; + return target.getFile(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Pdbentry target = (Pdbentry) object; + target.setFile( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _file + 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 + + //-- _items + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.PdbentryItem.class, "_items", (java.lang.String) null, org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Pdbentry target = (Pdbentry) object; + return target.getPdbentryItem(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Pdbentry target = (Pdbentry) object; + target.addPdbentryItem( (jalview.schemabinding.version2.PdbentryItem) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Pdbentry target = (Pdbentry) object; + target.removeAllPdbentryItem(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.PdbentryItem(); + } + }; + desc.setHandler(handler); + desc.setContainer(true); + desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.PdbentryItemDescriptor()); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _items + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Pdbentry.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/PdbentryItemDescriptor.java b/src/jalview/schemabinding/version2/descriptors/PdbentryItemDescriptor.java new file mode 100644 index 0000000..ccd26c1 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/PdbentryItemDescriptor.java @@ -0,0 +1,207 @@ +/* + * 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.PdbentryItem; + +/** + * Class PdbentryItemDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PdbentryItemDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PdbentryItemDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "pdbentry"; + _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 + + //-- initialize element descriptors + + //-- _propertyList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + PdbentryItem target = (PdbentryItem) object; + return target.getProperty(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + PdbentryItem target = (PdbentryItem) object; + target.addProperty( (jalview.schemabinding.version2.Property) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + PdbentryItem target = (PdbentryItem) object; + target.removeAllProperty(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.Property(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _propertyList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.PdbentryItem.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/PdbidsDescriptor.java b/src/jalview/schemabinding/version2/descriptors/PdbidsDescriptor.java new file mode 100644 index 0000000..265e907 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/PdbidsDescriptor.java @@ -0,0 +1,211 @@ +/* + * 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.Pdbids; + +/** + * Class PdbidsDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PdbidsDescriptor extends jalview.schemabinding.version2.descriptors.PdbentryDescriptor { + + + //--------------------------/ + //- 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PdbidsDescriptor() { + super(); + setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.PdbentryDescriptor()); + _nsURI = "www.jalview.org"; + _xmlName = "pdbids"; + _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 + + //-- _structureStateList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.StructureState.class, "_structureStateList", "structureState", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Pdbids target = (Pdbids) object; + return target.getStructureState(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Pdbids target = (Pdbids) object; + target.addStructureState( (jalview.schemabinding.version2.StructureState) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Pdbids target = (Pdbids) object; + target.removeAllStructureState(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.StructureState(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _structureStateList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- 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( + ) { + if (_identity == null) { + return super.getIdentity(); + } + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Pdbids.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/PropertyDescriptor.java b/src/jalview/schemabinding/version2/descriptors/PropertyDescriptor.java new file mode 100644 index 0000000..1bdcf5f --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/PropertyDescriptor.java @@ -0,0 +1,240 @@ +/* + * 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.Property; + +/** + * Class PropertyDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PropertyDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PropertyDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "property"; + _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 + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Property target = (Property) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Property target = (Property) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + 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); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Property target = (Property) object; + return target.getValue(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Property target = (Property) object; + target.setValue( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _value + 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 + + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Property.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 new file mode 100644 index 0000000..9f2da96 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/SequenceDescriptor.java @@ -0,0 +1,211 @@ +/* + * 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.Sequence; + +/** + * Class SequenceDescriptor. + * + * @version $Revision$ $Date$ + */ +public class SequenceDescriptor extends jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor { + + + //--------------------------/ + //- 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceDescriptor() { + super(); + setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor()); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "Sequence"; + _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 + + //-- _DBRefList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.DBRef.class, "_DBRefList", "DBRef", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Sequence target = (Sequence) object; + return target.getDBRef(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Sequence target = (Sequence) object; + target.addDBRef( (jalview.schemabinding.version2.DBRef) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Sequence target = (Sequence) object; + target.removeAllDBRef(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.DBRef(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _DBRefList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- 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( + ) { + if (_identity == null) { + return super.getIdentity(); + } + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Sequence.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/SequenceSetDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java new file mode 100644 index 0000000..2801940 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.java @@ -0,0 +1,330 @@ +/* + * 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.SequenceSet; + +/** + * Class SequenceSetDescriptor. + * + * @version $Revision$ $Date$ + */ +public class SequenceSetDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceSetDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "SequenceSet"; + _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 + + //-- _gapChar + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_gapChar", "gapChar", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceSet target = (SequenceSet) object; + return target.getGapChar(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceSet target = (SequenceSet) object; + target.setGapChar( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _gapChar + 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 + + //-- _sequenceList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Sequence.class, "_sequenceList", "Sequence", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceSet target = (SequenceSet) object; + return target.getSequence(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceSet target = (SequenceSet) object; + target.addSequence( (jalview.schemabinding.version2.Sequence) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + SequenceSet target = (SequenceSet) object; + target.removeAllSequence(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.Sequence(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _sequenceList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _annotationList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Annotation.class, "_annotationList", "Annotation", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceSet target = (SequenceSet) object; + return target.getAnnotation(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceSet target = (SequenceSet) object; + target.addAnnotation( (jalview.schemabinding.version2.Annotation) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + SequenceSet target = (SequenceSet) object; + target.removeAllAnnotation(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.Annotation(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _annotationList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _sequenceSetPropertiesList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.SequenceSetProperties.class, "_sequenceSetPropertiesList", "sequenceSetProperties", 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.getSequenceSetProperties(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceSet target = (SequenceSet) object; + target.addSequenceSetProperties( (jalview.schemabinding.version2.SequenceSetProperties) 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.removeAllSequenceSetProperties(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.SequenceSetProperties(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _sequenceSetPropertiesList + 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.SequenceSet.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/SequenceSetPropertiesDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SequenceSetPropertiesDescriptor.java new file mode 100644 index 0000000..af6975d --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/SequenceSetPropertiesDescriptor.java @@ -0,0 +1,236 @@ +/* + * 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.SequenceSetProperties; + +/** + * Class SequenceSetPropertiesDescriptor. + * + * @version $Revision$ $Date$ + */ +public class SequenceSetPropertiesDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceSetPropertiesDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "sequenceSetProperties"; + _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 + + //-- _key + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_key", "key", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceSetProperties target = (SequenceSetProperties) object; + return target.getKey(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceSetProperties target = (SequenceSetProperties) object; + target.setKey( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _key + 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); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceSetProperties target = (SequenceSetProperties) object; + return target.getValue(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceSetProperties target = (SequenceSetProperties) object; + target.setValue( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _value + 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 + + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.SequenceSetProperties.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/SequenceTypeDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SequenceTypeDescriptor.java new file mode 100644 index 0000000..9d7d579 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/SequenceTypeDescriptor.java @@ -0,0 +1,315 @@ +/* + * 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.SequenceType; + +/** + * Class SequenceTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class SequenceTypeDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceTypeDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "SequenceType"; + _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 + + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceType target = (SequenceType) object; + return target.getId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceType target = (SequenceType) object; + target.setId( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _id + 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); + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceType target = (SequenceType) object; + return target.getDescription(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceType target = (SequenceType) object; + target.setDescription( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _description + 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 + + //-- _sequence + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequence", "sequence", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceType target = (SequenceType) object; + return target.getSequence(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceType target = (SequenceType) object; + target.setSequence( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _sequence + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + SequenceType target = (SequenceType) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + SequenceType target = (SequenceType) object; + target.setName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.SequenceType.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/SettingDescriptor.java b/src/jalview/schemabinding/version2/descriptors/SettingDescriptor.java new file mode 100644 index 0000000..8214765 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/SettingDescriptor.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.Setting; + +/** + * Class SettingDescriptor. + * + * @version $Revision$ $Date$ + */ +public class SettingDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SettingDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "setting"; + _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 + + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Setting target = (Setting) object; + return target.getType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Setting target = (Setting) object; + target.setType( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + 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); + //-- _colour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colour", "colour", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Setting target = (Setting) object; + if (!target.hasColour()) { return null; } + return new java.lang.Integer(target.getColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Setting target = (Setting) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.setColour( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _colour + 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); + //-- _display + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_display", "display", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Setting target = (Setting) object; + if (!target.hasDisplay()) { return null; } + return (target.getDisplay() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Setting target = (Setting) object; + // ignore null values for non optional primitives + if (value == null) { return; } + + target.setDisplay( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _display + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _order + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_order", "order", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Setting target = (Setting) object; + if (!target.hasOrder()) { return null; } + return new java.lang.Float(target.getOrder()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Setting target = (Setting) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteOrder(); + return; + } + target.setOrder( ((java.lang.Float) value).floatValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _order + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.FloatValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive((float) -3.4028235E38); + typeValidator.setMaxInclusive((float) 3.4028235E38); + } + 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Setting.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/StructureStateDescriptor.java b/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java new file mode 100644 index 0000000..31f2389 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.java @@ -0,0 +1,411 @@ +/* + * 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.StructureState; + +/** + * Class StructureStateDescriptor. + * + * @version $Revision$ $Date$ + */ +public class StructureStateDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public StructureStateDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "structureState"; + _elementDefinition = true; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- _content + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + StructureState target = (StructureState) object; + return target.getContent(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + StructureState target = (StructureState) object; + target.setContent( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _content + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + 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 attribute descriptors + + //-- _visible + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_visible", "visible", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + StructureState target = (StructureState) object; + if (!target.hasVisible()) { return null; } + return (target.getVisible() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + StructureState target = (StructureState) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteVisible(); + return; + } + target.setVisible( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _visible + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _xpos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + StructureState target = (StructureState) object; + if (!target.hasXpos()) { return null; } + return new java.lang.Integer(target.getXpos()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + StructureState target = (StructureState) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteXpos(); + return; + } + target.setXpos( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _xpos + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _ypos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + StructureState target = (StructureState) object; + if (!target.hasYpos()) { return null; } + return new java.lang.Integer(target.getYpos()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + StructureState target = (StructureState) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteYpos(); + return; + } + target.setYpos( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _ypos + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _width + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + StructureState target = (StructureState) object; + if (!target.hasWidth()) { return null; } + return new java.lang.Integer(target.getWidth()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + StructureState target = (StructureState) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteWidth(); + return; + } + target.setWidth( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _width + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _height + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + StructureState target = (StructureState) object; + if (!target.hasHeight()) { return null; } + return new java.lang.Integer(target.getHeight()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + StructureState target = (StructureState) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteHeight(); + return; + } + target.setHeight( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _height + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.StructureState.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/ThresholdLineDescriptor.java b/src/jalview/schemabinding/version2/descriptors/ThresholdLineDescriptor.java new file mode 100644 index 0000000..e43b8cc --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/ThresholdLineDescriptor.java @@ -0,0 +1,285 @@ +/* + * 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.ThresholdLine; + +/** + * Class ThresholdLineDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ThresholdLineDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ThresholdLineDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "thresholdLine"; + _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 + + //-- _label + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_label", "label", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ThresholdLine target = (ThresholdLine) object; + return target.getLabel(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ThresholdLine target = (ThresholdLine) object; + target.setLabel( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _label + 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); + //-- _value + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ThresholdLine target = (ThresholdLine) object; + if (!target.hasValue()) { return null; } + return new java.lang.Float(target.getValue()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ThresholdLine target = (ThresholdLine) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteValue(); + return; + } + target.setValue( ((java.lang.Float) value).floatValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _value + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.FloatValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive((float) -3.4028235E38); + typeValidator.setMaxInclusive((float) 3.4028235E38); + } + desc.setValidator(fieldValidator); + //-- _colour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colour", "colour", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + ThresholdLine target = (ThresholdLine) object; + if (!target.hasColour()) { return null; } + return new java.lang.Integer(target.getColour()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + ThresholdLine target = (ThresholdLine) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteColour(); + return; + } + target.setColour( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _colour + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.ThresholdLine.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/TreeDescriptor.java b/src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java new file mode 100644 index 0000000..8ac65d0 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/TreeDescriptor.java @@ -0,0 +1,784 @@ +/* + * 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.Tree; + +/** + * Class TreeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class TreeDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public TreeDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "tree"; + _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 + + //-- _width + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if (!target.hasWidth()) { return null; } + return new java.lang.Integer(target.getWidth()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteWidth(); + return; + } + target.setWidth( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _width + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _height + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if (!target.hasHeight()) { return null; } + return new java.lang.Integer(target.getHeight()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteHeight(); + return; + } + target.setHeight( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _height + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _xpos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if (!target.hasXpos()) { return null; } + return new java.lang.Integer(target.getXpos()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteXpos(); + return; + } + target.setXpos( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _xpos + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _ypos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if (!target.hasYpos()) { return null; } + return new java.lang.Integer(target.getYpos()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteYpos(); + return; + } + target.setYpos( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _ypos + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _fontName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + return target.getFontName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + target.setFontName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _fontName + 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); + //-- _fontSize + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if (!target.hasFontSize()) { return null; } + return new java.lang.Integer(target.getFontSize()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteFontSize(); + return; + } + target.setFontSize( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _fontSize + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _fontStyle + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if (!target.hasFontStyle()) { return null; } + return new java.lang.Integer(target.getFontStyle()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteFontStyle(); + return; + } + target.setFontStyle( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _fontStyle + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _threshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if (!target.hasThreshold()) { return null; } + return new java.lang.Float(target.getThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteThreshold(); + return; + } + target.setThreshold( ((java.lang.Float) value).floatValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _threshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.FloatValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setMinInclusive((float) -3.4028235E38); + typeValidator.setMaxInclusive((float) 3.4028235E38); + } + desc.setValidator(fieldValidator); + //-- _showBootstrap + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showBootstrap", "showBootstrap", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if (!target.hasShowBootstrap()) { return null; } + return (target.getShowBootstrap() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowBootstrap(); + return; + } + target.setShowBootstrap( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _showBootstrap + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showDistances + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showDistances", "showDistances", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if (!target.hasShowDistances()) { return null; } + return (target.getShowDistances() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowDistances(); + return; + } + target.setShowDistances( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _showDistances + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _markUnlinked + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_markUnlinked", "markUnlinked", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if (!target.hasMarkUnlinked()) { return null; } + return (target.getMarkUnlinked() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteMarkUnlinked(); + return; + } + target.setMarkUnlinked( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _markUnlinked + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _fitToWindow + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_fitToWindow", "fitToWindow", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if (!target.hasFitToWindow()) { return null; } + return (target.getFitToWindow() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteFitToWindow(); + return; + } + target.setFitToWindow( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _fitToWindow + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _currentTree + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_currentTree", "currentTree", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + if (!target.hasCurrentTree()) { return null; } + return (target.getCurrentTree() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteCurrentTree(); + return; + } + target.setCurrentTree( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _currentTree + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _title + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_title", "title", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + return target.getTitle(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + target.setTitle( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _title + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _newick + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_newick", "newick", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Tree target = (Tree) object; + return target.getNewick(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Tree target = (Tree) object; + target.setNewick( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _newick + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Tree.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/UserColourSchemeDescriptor.java b/src/jalview/schemabinding/version2/descriptors/UserColourSchemeDescriptor.java new file mode 100644 index 0000000..634239f --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/UserColourSchemeDescriptor.java @@ -0,0 +1,159 @@ +/* + * 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.UserColourScheme; + +/** + * Class UserColourSchemeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class UserColourSchemeDescriptor extends jalview.schemabinding.version2.descriptors.JalviewUserColoursDescriptor { + + + //--------------------------/ + //- 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public UserColourSchemeDescriptor() { + super(); + setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.JalviewUserColoursDescriptor()); + _nsURI = "www.jalview.org"; + _xmlName = "UserColourScheme"; + _elementDefinition = true; + } + + + //-----------/ + //- 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( + ) { + if (_identity == null) { + return super.getIdentity(); + } + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.UserColourScheme.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/UserColoursDescriptor.java b/src/jalview/schemabinding/version2/descriptors/UserColoursDescriptor.java new file mode 100644 index 0000000..32382a4 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/UserColoursDescriptor.java @@ -0,0 +1,237 @@ +/* + * 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.UserColours; + +/** + * Class UserColoursDescriptor. + * + * @version $Revision$ $Date$ + */ +public class UserColoursDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public UserColoursDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "UserColours"; + _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 + + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + UserColours target = (UserColours) object; + return target.getId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + UserColours target = (UserColours) object; + target.setId( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _id + 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 + + //-- _userColourScheme + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.UserColourScheme.class, "_userColourScheme", "UserColourScheme", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + UserColours target = (UserColours) object; + return target.getUserColourScheme(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + UserColours target = (UserColours) object; + target.setUserColourScheme( (jalview.schemabinding.version2.UserColourScheme) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.UserColourScheme(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _userColourScheme + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.UserColours.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/VAMSASDescriptor.java b/src/jalview/schemabinding/version2/descriptors/VAMSASDescriptor.java new file mode 100644 index 0000000..f8d9ba8 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/VAMSASDescriptor.java @@ -0,0 +1,254 @@ +/* + * 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.VAMSAS; + +/** + * Class VAMSASDescriptor. + * + * @version $Revision$ $Date$ + */ +public class VAMSASDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public VAMSASDescriptor() { + super(); + _nsURI = "www.vamsas.ac.uk/jalview/version2"; + _xmlName = "VAMSAS"; + _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 + + //-- initialize element descriptors + + //-- _treeList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_treeList", "Tree", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + VAMSAS target = (VAMSAS) object; + return target.getTree(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + VAMSAS target = (VAMSAS) object; + target.addTree( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + VAMSAS target = (VAMSAS) object; + target.removeAllTree(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _treeList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + org.exolab.castor.xml.validators.StringValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.StringValidator(); + fieldValidator.setValidator(typeValidator); + typeValidator.setWhiteSpace("preserve"); + } + desc.setValidator(fieldValidator); + //-- _sequenceSetList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.SequenceSet.class, "_sequenceSetList", "SequenceSet", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + VAMSAS target = (VAMSAS) object; + return target.getSequenceSet(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + VAMSAS target = (VAMSAS) object; + target.addSequenceSet( (jalview.schemabinding.version2.SequenceSet) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + VAMSAS target = (VAMSAS) object; + target.removeAllSequenceSet(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.SequenceSet(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _sequenceSetList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.VAMSAS.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/VamsasModelDescriptor.java b/src/jalview/schemabinding/version2/descriptors/VamsasModelDescriptor.java new file mode 100644 index 0000000..5f46219 --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/VamsasModelDescriptor.java @@ -0,0 +1,159 @@ +/* + * 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.VamsasModel; + +/** + * Class VamsasModelDescriptor. + * + * @version $Revision$ $Date$ + */ +public class VamsasModelDescriptor extends jalview.schemabinding.version2.descriptors.VAMSASDescriptor { + + + //--------------------------/ + //- 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public VamsasModelDescriptor() { + super(); + setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.VAMSASDescriptor()); + _nsURI = "www.jalview.org"; + _xmlName = "vamsasModel"; + _elementDefinition = true; + } + + + //-----------/ + //- 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( + ) { + if (_identity == null) { + return super.getIdentity(); + } + return _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.VamsasModel.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/ViewportDescriptor.java b/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java new file mode 100644 index 0000000..f1fe49e --- /dev/null +++ b/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java @@ -0,0 +1,1476 @@ +/* + * 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.Viewport; + +/** + * Class ViewportDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ViewportDescriptor 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; + + /** + * Field _identity. + */ + private org.exolab.castor.xml.XMLFieldDescriptor _identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ViewportDescriptor() { + super(); + _nsURI = "www.jalview.org"; + _xmlName = "Viewport"; + _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 + + //-- _conservationSelected + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_conservationSelected", "conservationSelected", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasConservationSelected()) { return null; } + return (target.getConservationSelected() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteConservationSelected(); + return; + } + target.setConservationSelected( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _conservationSelected + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _pidSelected + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_pidSelected", "pidSelected", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasPidSelected()) { return null; } + return (target.getPidSelected() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deletePidSelected(); + return; + } + target.setPidSelected( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _pidSelected + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _bgColour + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_bgColour", "bgColour", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getBgColour(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.setBgColour( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _bgColour + 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); + //-- _consThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_consThreshold", "consThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasConsThreshold()) { return null; } + return new java.lang.Integer(target.getConsThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteConsThreshold(); + return; + } + target.setConsThreshold( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _consThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _pidThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_pidThreshold", "pidThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasPidThreshold()) { return null; } + return new java.lang.Integer(target.getPidThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deletePidThreshold(); + return; + } + target.setPidThreshold( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _pidThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _title + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_title", "title", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getTitle(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.setTitle( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _title + 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); + //-- _showFullId + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showFullId", "showFullId", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasShowFullId()) { return null; } + return (target.getShowFullId() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowFullId(); + return; + } + target.setShowFullId( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _showFullId + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _rightAlignIds + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_rightAlignIds", "rightAlignIds", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasRightAlignIds()) { return null; } + return (target.getRightAlignIds() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteRightAlignIds(); + return; + } + target.setRightAlignIds( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _rightAlignIds + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showText + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showText", "showText", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasShowText()) { return null; } + return (target.getShowText() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowText(); + return; + } + target.setShowText( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _showText + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showColourText + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showColourText", "showColourText", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasShowColourText()) { return null; } + return (target.getShowColourText() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowColourText(); + return; + } + target.setShowColourText( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _showColourText + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showBoxes + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showBoxes", "showBoxes", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasShowBoxes()) { return null; } + return (target.getShowBoxes() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowBoxes(); + return; + } + target.setShowBoxes( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _showBoxes + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _wrapAlignment + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_wrapAlignment", "wrapAlignment", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasWrapAlignment()) { return null; } + return (target.getWrapAlignment() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteWrapAlignment(); + return; + } + target.setWrapAlignment( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _wrapAlignment + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _renderGaps + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_renderGaps", "renderGaps", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasRenderGaps()) { return null; } + return (target.getRenderGaps() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteRenderGaps(); + return; + } + target.setRenderGaps( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _renderGaps + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showSequenceFeatures + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showSequenceFeatures", "showSequenceFeatures", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasShowSequenceFeatures()) { return null; } + return (target.getShowSequenceFeatures() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowSequenceFeatures(); + return; + } + target.setShowSequenceFeatures( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _showSequenceFeatures + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _showAnnotation + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showAnnotation", "showAnnotation", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasShowAnnotation()) { return null; } + return (target.getShowAnnotation() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteShowAnnotation(); + return; + } + target.setShowAnnotation( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _showAnnotation + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _xpos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasXpos()) { return null; } + return new java.lang.Integer(target.getXpos()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteXpos(); + return; + } + target.setXpos( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _xpos + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _ypos + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasYpos()) { return null; } + return new java.lang.Integer(target.getYpos()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteYpos(); + return; + } + target.setYpos( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _ypos + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _width + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasWidth()) { return null; } + return new java.lang.Integer(target.getWidth()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteWidth(); + return; + } + target.setWidth( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _width + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _height + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasHeight()) { return null; } + return new java.lang.Integer(target.getHeight()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteHeight(); + return; + } + target.setHeight( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _height + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _startRes + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startRes", "startRes", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasStartRes()) { return null; } + return new java.lang.Integer(target.getStartRes()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteStartRes(); + return; + } + target.setStartRes( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _startRes + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _startSeq + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startSeq", "startSeq", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasStartSeq()) { return null; } + return new java.lang.Integer(target.getStartSeq()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteStartSeq(); + return; + } + target.setStartSeq( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _startSeq + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _fontName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getFontName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.setFontName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _fontName + 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); + //-- _fontSize + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasFontSize()) { return null; } + return new java.lang.Integer(target.getFontSize()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteFontSize(); + return; + } + target.setFontSize( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _fontSize + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _fontStyle + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasFontStyle()) { return null; } + return new java.lang.Integer(target.getFontStyle()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteFontStyle(); + return; + } + target.setFontStyle( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _fontStyle + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _viewName + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewName", "viewName", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getViewName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.setViewName( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _viewName + 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); + //-- _sequenceSetId + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequenceSetId", "sequenceSetId", org.exolab.castor.xml.NodeType.Attribute); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getSequenceSetId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.setSequenceSetId( (java.lang.String) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _sequenceSetId + 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); + //-- _gatheredViews + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_gatheredViews", "gatheredViews", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasGatheredViews()) { return null; } + return (target.getGatheredViews() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteGatheredViews(); + return; + } + target.setGatheredViews( ((java.lang.Boolean) value).booleanValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _gatheredViews + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + org.exolab.castor.xml.validators.BooleanValidator typeValidator; + typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _textCol1 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol1", "textCol1", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasTextCol1()) { return null; } + return new java.lang.Integer(target.getTextCol1()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol1(); + return; + } + target.setTextCol1( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _textCol1 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _textCol2 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol2", "textCol2", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasTextCol2()) { return null; } + return new java.lang.Integer(target.getTextCol2()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol2(); + return; + } + target.setTextCol2( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _textCol2 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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); + //-- _textColThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textColThreshold", "textColThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if (!target.hasTextColThreshold()) { return null; } + return new java.lang.Integer(target.getTextColThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextColThreshold(); + return; + } + target.setTextColThreshold( ((java.lang.Integer) value).intValue()); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _textColThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- 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 + + //-- _annotationColours + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.AnnotationColours.class, "_annotationColours", "AnnotationColours", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getAnnotationColours(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.setAnnotationColours( (jalview.schemabinding.version2.AnnotationColours) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.AnnotationColours(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _annotationColours + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _hiddenColumnsList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.HiddenColumns.class, "_hiddenColumnsList", "hiddenColumns", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + return target.getHiddenColumns(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + target.addHiddenColumns( (jalview.schemabinding.version2.HiddenColumns) value); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { + try { + Viewport target = (Viewport) object; + target.removeAllHiddenColumns(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.HiddenColumns(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _hiddenColumnsList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } + + + //-----------/ + //- 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 _identity; + } + + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.Viewport.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/utils/castor-1.1-codegen-anttask.jar b/utils/castor-1.1-codegen-anttask.jar new file mode 100644 index 0000000..16287b5 Binary files /dev/null and b/utils/castor-1.1-codegen-anttask.jar differ diff --git a/utils/castor-1.1-codegen.jar b/utils/castor-1.1-codegen.jar new file mode 100644 index 0000000..d8fbb88 Binary files /dev/null and b/utils/castor-1.1-codegen.jar differ