this.pdbentry = pdbentry;
this.sequence = seq;
- ssm = StructureSelectionManager.getStructureSelectionManager(ap.av.applet);
+ ssm = StructureSelectionManager
+ .getStructureSelectionManager(ap.av.applet);
try
{
public void releaseReferences(Object svl)
{
// TODO Auto-generated method stub
-
+
}
}
public String chain;
/**
- * this is a temporary value - designed to store the position in sequence that this atom corresponds to after aligning the chain to a SequenceI object. Do not rely on its value being correct when visualizing sequence colourings on the structure - use the StructureSelectionManager's mapping instead.
+ * this is a temporary value - designed to store the position in sequence that
+ * this atom corresponds to after aligning the chain to a SequenceI object. Do
+ * not rely on its value being correct when visualizing sequence colourings on
+ * the structure - use the StructureSelectionManager's mapping instead.
*/
public int alignmentMapping = -1;
public int atomIndex;
public float occupancy = 0;
-
+
public float tfactor = 0;
+
// need these if we ever want to export Atom data
// public boolean tfacset=true,occset=true;
public boolean isSelected = false;
this.z = (float) (new Float(str.substring(47, 55).trim()).floatValue());
// optional entries - see JAL-730
String tm = str.substring(54, 60).trim();
- if (tm.length()>0) {
+ if (tm.length() > 0)
+ {
occupancy = (float) (new Float(tm)).floatValue();
- } else {
+ }
+ else
+ {
occupancy = 1f; // default occupancy
// see note above: occset=false;
}
tm = str.substring(60, 66).trim();
- if (tm.length()>0)
+ if (tm.length() > 0)
{
tfactor = (float) (new Float(tm).floatValue());
- } else {
+ }
+ else
+ {
tfactor = 1f;
- //see note above: tfacset=false;
+ // see note above: tfacset=false;
}
}
public void releaseReferences(Object svl)
{
// TODO Auto-generated method stub
-
+
}
}
/**
* Annotate the residues with their corresponding positions in s1 using the
- * alignment in as
- * NOTE: This clears all atom.alignmentMapping values on the structure.
+ * alignment in as NOTE: This clears all atom.alignmentMapping values on the
+ * structure.
+ *
* @param as
* @param s1
*/
int pdbpos = as.getSeq2Start() - 2;
int alignpos = s1.getStart() + as.getSeq1Start() - 3;
// first clear out any old alignmentMapping values:
- for (Atom atom: (Vector<Atom>) atoms) {
- atom.alignmentMapping=-1;
+ for (Atom atom : (Vector<Atom>) atoms)
+ {
+ atom.alignmentMapping = -1;
}
// and now trace the alignment onto the atom set.
for (int i = 0; i < as.astr1.length(); i++)
{
int count = 0;
Object symbol;
- boolean deoxyn=false;
+ boolean deoxyn = false;
boolean nucleotide = false;
StringBuffer seq = new StringBuffer();
Vector resFeatures = new Vector();
if ((symbol = ResidueProperties.getAA3Hash().get(tmpat.resName)) == null)
{
String nucname = tmpat.resName.trim();
- // use the aaIndex rather than call 'toLower' - which would take a bit more time.
- deoxyn=nucname.length()==2 && ResidueProperties.aaIndex[nucname.charAt(0)]==ResidueProperties.aaIndex['D'];
+ // use the aaIndex rather than call 'toLower' - which would take a bit
+ // more time.
+ deoxyn = nucname.length() == 2
+ && ResidueProperties.aaIndex[nucname.charAt(0)] == ResidueProperties.aaIndex['D'];
if (tmpat.name.equalsIgnoreCase("CA")
- || ResidueProperties.nucleotideIndex[nucname.charAt((deoxyn ? 1 : 0))] == -1)
+ || ResidueProperties.nucleotideIndex[nucname
+ .charAt((deoxyn ? 1 : 0))] == -1)
{
seq.append("X");
// System.err.println("PDBReader:Null aa3Hash for " +
// TODO set the filename sensibly - try using data source name.
id = safeName(getDataName());
- chains = new Vector();
+ chains = new Vector();
- PDBChain tmpchain;
- String line=null;
- boolean modelFlag = false;
- boolean terFlag = false;
- String lastID = "";
+ PDBChain tmpchain;
+ String line = null;
+ boolean modelFlag = false;
+ boolean terFlag = false;
+ String lastID = "";
- int index = 0;
- String atomnam = null;
- try
- {
+ int index = 0;
+ String atomnam = null;
+ try
+ {
while ((line = nextLine()) != null)
{
if (line.indexOf("HEADER") == 0)
{
System.out.println("OUT OF MEMORY LOADING PDB FILE");
throw new IOException("Out of memory loading PDB File");
- }
- catch (NumberFormatException ex)
+ } catch (NumberFormatException ex)
{
- if (line!=null) {
+ if (line != null)
+ {
System.err.println("Couldn't read number from line:");
System.err.println(line);
}
* returns a new Hashtable[] of size maxSeqLength, if Hashtable not supplied.
* This class is used extensively in calculating alignment colourschemes that
* depend on the amount of conservation in each alignment column.
- *
+ *
* @author $author$
* @version $Revision$
*/
public static final String PROFILE = "P";
- public static final Hashtable[] calculate(List<SequenceI> list, int start,
- int end)
+ public static final Hashtable[] calculate(List<SequenceI> list,
+ int start, int end)
{
return calculate(list, start, end, false);
}
- public static final Hashtable[] calculate(List<SequenceI> sequences, int start,
- int end, boolean profile)
+ public static final Hashtable[] calculate(List<SequenceI> sequences,
+ int start, int end, boolean profile)
{
SequenceI[] seqs = new SequenceI[sequences.size()];
int width = 0;
- synchronized (sequences) {
- for (int i = 0; i < sequences.size(); i++)
+ synchronized (sequences)
{
- seqs[i] = sequences.get(i);
- if (seqs[i].getLength() > width)
+ for (int i = 0; i < sequences.size(); i++)
{
- width = seqs[i].getLength();
+ seqs[i] = sequences.get(i);
+ if (seqs[i].getLength() > width)
+ {
+ width = seqs[i].getLength();
+ }
}
- }
- Hashtable[] reply = new Hashtable[width];
+ Hashtable[] reply = new Hashtable[width];
- if (end >= width)
- {
- end = width;
- }
+ if (end >= width)
+ {
+ end = width;
+ }
- calculate(seqs, start, end, reply, profile);
- return reply;
- }
+ calculate(seqs, start, end, reply, profile);
+ return reply;
+ }
}
public static final void calculate(SequenceI[] sequences, int start,
for (j = 0; j < jSize; j++)
{
- if (sequences[j]==null)
+ if (sequences[j] == null)
{
- System.err.println("WARNING: Consensus skipping null sequence - possible race condition.");
+ System.err
+ .println("WARNING: Consensus skipping null sequence - possible race condition.");
continue;
}
seq = sequences[j].getSequence();
/**
* Compute all or part of the annotation row from the given consensus
* hashtable
- *
+ *
* @param consensus
* - pre-allocated annotation row
* @param hconsensus
for (int i = iStart; i < width; i++)
{
Hashtable hci;
- if (i >= hconsensus.length || ((hci=hconsensus[i])==null))
+ if (i >= hconsensus.length || ((hci = hconsensus[i]) == null))
{
// happens if sequences calculated over were shorter than alignment
// width
{
fv = (Float) hci.get(AAFrequency.PID_GAPS);
}
- if (fv==null)
+ if (fv == null)
{
consensus.annotations[i] = null;
// data has changed below us .. give up and
{
for (int c = 0; c < alphabet.length; c++)
{
- tval = profile[0][alphabet[c]]
- * 100f
- / profile[1][ignoreGapsInConsensusCalculation ? 1
- : 0];
+ tval = profile[0][alphabet[c]] * 100f
+ / profile[1][ignoreGapsInConsensusCalculation ? 1 : 0];
mouseOver += ((c == 0) ? "" : "; ") + alphabet[c] + " "
+ ((int) tval) + "%";
}
{
tval = profile[0][((char[]) ca[c])[0]]
* 100f
- / profile[1][ignoreGapsInConsensusCalculation ? 1
- : 0];
+ / profile[1][ignoreGapsInConsensusCalculation ? 1 : 0];
mouseOver += ((p == 0) ? "" : "; ") + ((char[]) ca[c])[0]
+ " " + ((int) tval) + "%";
p++;
/**
* get the sorted profile for the given position of the consensus
- *
+ *
* @param hconsensus
* @return
*/
;
jalview.util.QuickSort.sort(vl, ca);
rtnval[0] = 2;
- rtnval[1]=0;
+ rtnval[1] = 0;
for (int c = ca.length - 1; profile[0][((char[]) ca[c])[0]] > 0; c--)
{
if (((char[]) ca[c])[0] != '-')
rtnval[rtnval[0]++] = ((char[]) ca[c])[0];
rtnval[rtnval[0]] = (int) (profile[0][((char[]) ca[c])[0]] * 100f / profile[1][ignoreGapsInConsensusCalculation ? 1
: 0]);
- rtnval[1]+=rtnval[rtnval[0]++];
+ rtnval[1] += rtnval[rtnval[0]++];
}
}
return rtnval;
/**
* compute the PID vector used by the redundancy filter.
- * @param originalSequences - sequences in alignment that are to filtered
- * @param omitHidden - null or strings to be analysed (typically, visible portion of each sequence in alignment)
- * @param start - first column in window for calculation
- * @param end - last column in window for calculation
- * @param ungapped - if true then use ungapped sequence to compute PID
- * @return vector containing maximum PID for i-th sequence and any sequences longer than that seuqence
+ *
+ * @param originalSequences
+ * - sequences in alignment that are to filtered
+ * @param omitHidden
+ * - null or strings to be analysed (typically, visible portion of
+ * each sequence in alignment)
+ * @param start
+ * - first column in window for calculation
+ * @param end
+ * - last column in window for calculation
+ * @param ungapped
+ * - if true then use ungapped sequence to compute PID
+ * @return vector containing maximum PID for i-th sequence and any sequences
+ * longer than that seuqence
*/
- public static float[] computeRedundancyMatrix(SequenceI[] originalSequences,
- String[] omitHidden, int start, int end, boolean ungapped)
+ public static float[] computeRedundancyMatrix(
+ SequenceI[] originalSequences, String[] omitHidden, int start,
+ int end, boolean ungapped)
{
- int height=originalSequences.length;
+ int height = originalSequences.length;
float[] redundancy = new float[height];
- int[] lngth=new int[height];
+ int[] lngth = new int[height];
for (int i = 0; i < height; i++)
{
redundancy[i] = 0f;
- lngth[i]=-1;
+ lngth[i] = -1;
}
-
// long start = System.currentTimeMillis();
float pid;
String seqi, seqj;
for (int i = 0; i < height; i++)
{
-
+
for (int j = 0; j < i; j++)
{
if (i == j)
seqi = omitHidden[i];
seqj = omitHidden[j];
}
- if (lngth[i]==-1)
+ if (lngth[i] == -1)
{
- String ug=AlignSeq.extractGaps(Comparison.GapChars, seqi);
- lngth[i]=ug.length();
+ String ug = AlignSeq.extractGaps(Comparison.GapChars, seqi);
+ lngth[i] = ug.length();
if (ungapped)
{
- seqi=ug;
+ seqi = ug;
}
}
- if (lngth[j]==-1)
+ if (lngth[j] == -1)
{
- String ug=AlignSeq.extractGaps(Comparison.GapChars, seqj);
- lngth[j]=ug.length();
+ String ug = AlignSeq.extractGaps(Comparison.GapChars, seqj);
+ lngth[j] = ug.length();
if (ungapped)
{
- seqj=ug;
+ seqj = ug;
}
}
pid = Comparison.PID(seqi, seqj);
- // use real sequence length rather than string length
- if (lngth[j]<lngth[i])
+ // use real sequence length rather than string length
+ if (lngth[j] < lngth[i])
{
redundancy[j] = Math.max(pid, redundancy[j]);
}
/**
* Sort by Percentage Identity w.r.t. s
- *
+ *
* @param align
* AlignmentI
* @param s
/**
* Sort by Percentage Identity w.r.t. s
- *
+ *
* @param align
* AlignmentI
* @param s
/**
* Reverse the order of the sort
- *
+ *
* @param align
* DOCUMENT ME!
* @param seqs
/**
* Sets the Alignment object with the given sequences
- *
+ *
* @param align
* Alignment object to be updated
* @param tmp
/**
* Sets the Alignment object with the given sequences
- *
+ *
* @param align
* DOCUMENT ME!
* @param seqs
/**
* Sorts by ID. Numbers are sorted before letters.
- *
+ *
* @param align
* The alignment object to sort
*/
/**
* Sorts by sequence length
- *
+ *
* @param align
* The alignment object to sort
*/
* Sorts the alignment by size of group. <br>
* Maintains the order of sequences in each group by order in given alignment
* object.
- *
+ *
* @param align
* sorts the given alignment object by group
*/
/**
* Converts Vector to array. java 1.18 does not have Vector.toArray()
- *
+ *
* @param tmp
* Vector of SequenceI objects
- *
+ *
* @return array of Sequence[]
*/
private static SequenceI[] vectorToArray(Vector tmp)
/**
* Select sequences in order from tmp that is present in mask, and any
* remaining seqeunces in mask not in tmp
- *
+ *
* @param tmp
* thread safe collection of sequences
* @param mask
* thread safe collection of sequences
- *
+ *
* @return intersect(tmp,mask)+intersect(complement(tmp),mask)
*/
private static SequenceI[] vectorSubsetToArray(List<SequenceI> tmp,
/**
* Sorts by a given AlignmentOrder object
- *
+ *
* @param align
* Alignment to order
* @param order
/**
* DOCUMENT ME!
- *
+ *
* @param align
* alignment to order
* @param tree
* tree which has
- *
+ *
* @return DOCUMENT ME!
*/
private static Vector getOrderByTree(AlignmentI align, NJTree tree)
/**
* Sorts the alignment by a given tree
- *
+ *
* @param align
* alignment to order
* @param tree
/**
* DOCUMENT ME!
- *
+ *
* @param align
* DOCUMENT ME!
* @param seqs
/**
* DOCUMENT ME!
- *
+ *
* @param node
* DOCUMENT ME!
* @param tmp
* DOCUMENT ME!
* @param seqset
* DOCUMENT ME!
- *
+ *
* @return DOCUMENT ME!
*/
private static Vector _sortByTree(SequenceNode node, Vector tmp,
/**
* Sort sequence in order of increasing score attribute for annotation with a
* particular scoreLabel. Or reverse if same label was used previously
- *
+ *
* @param scoreLabel
* exact label for sequence associated AlignmentAnnotation scores to
* use for sorting.
/**
* sort the alignment using the features on each sequence found between start
* and stop with the given featureLabel (and optional group qualifier)
- *
+ *
* @param featureLabel
* (may not be null)
* @param groupLabel
int s, sSize = sequences.size();
SequenceI[] sarray = new SequenceI[sSize];
this.sequences = sarray;
- try {
- for (s = 0; s < sSize; s++)
+ try
{
- sarray[s] = (SequenceI) sequences.get(s);
- if (sarray[s].getLength() > maxLength)
+ for (s = 0; s < sSize; s++)
{
- maxLength = sarray[s].getLength();
+ sarray[s] = (SequenceI) sequences.get(s);
+ if (sarray[s].getLength() > maxLength)
+ {
+ maxLength = sarray[s].getLength();
+ }
}
- }
} catch (ArrayIndexOutOfBoundsException ex)
{
- // bail - another thread has modified the sequence array, so the current calculation is probably invalid.
- this.sequences=new SequenceI[0];
- maxLength=0;
+ // bail - another thread has modified the sequence array, so the current
+ // calculation is probably invalid.
+ this.sequences = new SequenceI[0];
+ maxLength = 0;
}
}
}
}
- if (total.length>0) {
+ if (total.length > 0)
+ {
total[i - start] = resultHash;
}
}
/**
* construct and call the calculation methods on a new Conservation object
- * @param name - name of conservation
- * @param consHash - hash table of properties for each amino acid (normally ResidueProperties.propHash)
- * @param threshold - minimum number of conserved residues needed to indicate conservation (typically 3)
+ *
+ * @param name
+ * - name of conservation
+ * @param consHash
+ * - hash table of properties for each amino acid (normally
+ * ResidueProperties.propHash)
+ * @param threshold
+ * - minimum number of conserved residues needed to indicate
+ * conservation (typically 3)
* @param seqs
- * @param start first column in calculation window
- * @param end last column in calculation window
- * @param posOrNeg positive (true) or negative (false) conservation
- * @param consPercGaps percentage of gaps tolerated in column
- * @param calcQuality flag indicating if alignment quality should be calculated
+ * @param start
+ * first column in calculation window
+ * @param end
+ * last column in calculation window
+ * @param posOrNeg
+ * positive (true) or negative (false) conservation
+ * @param consPercGaps
+ * percentage of gaps tolerated in column
+ * @param calcQuality
+ * flag indicating if alignment quality should be calculated
* @return Conservation object ready for use in visualization
*/
public static Conservation calculateConservation(String name,
- Hashtable consHash, int threshold, List<SequenceI> seqs, int start, int end, boolean posOrNeg, int consPercGaps, boolean calcQuality)
+ Hashtable consHash, int threshold, List<SequenceI> seqs,
+ int start, int end, boolean posOrNeg, int consPercGaps,
+ boolean calcQuality)
{
- Conservation cons = new Conservation(name, consHash, threshold, seqs, start,end);
+ Conservation cons = new Conservation(name, consHash, threshold, seqs,
+ start, end);
return calculateConservation(cons, posOrNeg, consPercGaps, calcQuality);
}
+
/**
- * @param b positive (true) or negative (false) conservation
- * @param consPercGaps percentage of gaps tolerated in column
- * @param calcQuality flag indicating if alignment quality should be calculated
- * @return Conservation object ready for use in visualization
- */
- public static Conservation calculateConservation(Conservation cons, boolean b, int consPercGaps, boolean calcQuality)
- {
- cons.calculate();
- cons.verdict(b, consPercGaps);
+ * @param b
+ * positive (true) or negative (false) conservation
+ * @param consPercGaps
+ * percentage of gaps tolerated in column
+ * @param calcQuality
+ * flag indicating if alignment quality should be calculated
+ * @return Conservation object ready for use in visualization
+ */
+ public static Conservation calculateConservation(Conservation cons,
+ boolean b, int consPercGaps, boolean calcQuality)
+ {
+ cons.calculate();
+ cons.verdict(b, consPercGaps);
if (calcQuality)
{
/**\r
* Functions for cross-referencing sequence databases. user must first specify\r
* if cross-referencing from protein or dna (set dna==true)\r
- *\r
+ * \r
* @author JimP\r
- *\r
+ * \r
*/\r
public class CrossRef\r
{\r
/**\r
* get the DNA or protein references for a protein or dna sequence\r
- *\r
+ * \r
* @param dna\r
* @param rfs\r
* @return\r
/**\r
* Indirect references are references from other sequences from the dataset to\r
* any of the direct DBRefEntrys on the given sequences.\r
- *\r
+ * \r
* @param dna\r
* true if seqs are DNA seqs\r
* @param seqs\r
}\r
\r
/**\r
- *\r
+ * \r
* @param dna\r
* @param seqs\r
* @return\r
}\r
\r
/**\r
- *\r
+ * \r
* @param seqs\r
* @param dna\r
* @param source\r
* find references to lrfs in the cross-reference set of each sequence in\r
* dataset (that is not equal to sequenceI) Identifies matching DBRefEntry\r
* based on source and accession string only - Map and Version are nulled.\r
- *\r
+ * \r
* @param sequenceI\r
* @param lrfs\r
* @param dataset\r
/**\r
* search a given sequence dataset for references matching cross-references to\r
* the given sequence\r
- *\r
+ * \r
* @param sequenceI\r
* @param xrf\r
* @param dataset\r
* TODO: generalise to different protein classifications Search dataset for\r
* DBRefEntrys matching the given one (xrf) and add the associated sequence to\r
* rseq.\r
- *\r
+ * \r
* @param sequenceI\r
* @param xrf\r
* @param dataset\r
return false;\r
}\r
List<SequenceI> ds;\r
- synchronized (ds=dataset.getSequences())\r
+ synchronized (ds = dataset.getSequences())\r
{\r
- for (SequenceI nxt:ds)\r
- if (nxt != null)\r
- {\r
- if (nxt.getDatasetSequence() != null)\r
- {\r
- System.err\r
- .println("Implementation warning: getProducts passed a dataset alignment without dataset sequences in it!");\r
- }\r
- if (nxt != sequenceI && nxt != sequenceI.getDatasetSequence())\r
+ for (SequenceI nxt : ds)\r
+ if (nxt != null)\r
{\r
- // check if this is the correct sequence type\r
+ if (nxt.getDatasetSequence() != null)\r
+ {\r
+ System.err\r
+ .println("Implementation warning: getProducts passed a dataset alignment without dataset sequences in it!");\r
+ }\r
+ if (nxt != sequenceI && nxt != sequenceI.getDatasetSequence())\r
{\r
- typer[0] = nxt;\r
- boolean isDna = jalview.util.Comparison.isNucleotide(typer);\r
- if ((direct && isDna == dna) || (!direct && isDna != dna))\r
+ // check if this is the correct sequence type\r
{\r
- // skip this sequence because it is same molecule type\r
- continue;\r
+ typer[0] = nxt;\r
+ boolean isDna = jalview.util.Comparison.isNucleotide(typer);\r
+ if ((direct && isDna == dna) || (!direct && isDna != dna))\r
+ {\r
+ // skip this sequence because it is same molecule type\r
+ continue;\r
+ }\r
}\r
- }\r
\r
- // look for direct or indirect references in common\r
- DBRefEntry[] poss = nxt.getDBRef(), cands = null;\r
- if (direct)\r
- {\r
- cands = jalview.util.DBRefUtils.searchRefs(poss, xrf);\r
- }\r
- else\r
- {\r
- poss = CrossRef.findXDbRefs(dna, poss); //\r
- cands = jalview.util.DBRefUtils.searchRefs(poss, xrf);\r
- }\r
- if (cands != null)\r
- {\r
- if (!rseqs.contains(nxt))\r
+ // look for direct or indirect references in common\r
+ DBRefEntry[] poss = nxt.getDBRef(), cands = null;\r
+ if (direct)\r
+ {\r
+ cands = jalview.util.DBRefUtils.searchRefs(poss, xrf);\r
+ }\r
+ else\r
{\r
- rseqs.addElement(nxt);\r
- boolean foundmap = cf != null; // don't search if we aren't given\r
- // a codon map object\r
- for (int r = 0; foundmap && r < cands.length; r++)\r
+ poss = CrossRef.findXDbRefs(dna, poss); //\r
+ cands = jalview.util.DBRefUtils.searchRefs(poss, xrf);\r
+ }\r
+ if (cands != null)\r
+ {\r
+ if (!rseqs.contains(nxt))\r
{\r
- if (cands[r].hasMap())\r
+ rseqs.addElement(nxt);\r
+ boolean foundmap = cf != null; // don't search if we aren't\r
+ // given\r
+ // a codon map object\r
+ for (int r = 0; foundmap && r < cands.length; r++)\r
{\r
- if (cands[r].getMap().getTo() != null\r
- && cands[r].getMap().getMap().getFromRatio() != cands[r]\r
- .getMap().getMap().getToRatio())\r
+ if (cands[r].hasMap())\r
{\r
- foundmap = true;\r
- // get sense of map correct for adding to product alignment.\r
- if (dna)\r
- {\r
- // map is from dna seq to a protein product\r
- cf.addMap(sequenceI, nxt, cands[r].getMap().getMap());\r
- }\r
- else\r
+ if (cands[r].getMap().getTo() != null\r
+ && cands[r].getMap().getMap().getFromRatio() != cands[r]\r
+ .getMap().getMap().getToRatio())\r
{\r
- // map should be from protein seq to its coding dna\r
- cf.addMap(nxt, sequenceI, cands[r].getMap().getMap()\r
- .getInverse());\r
+ foundmap = true;\r
+ // get sense of map correct for adding to product\r
+ // alignment.\r
+ if (dna)\r
+ {\r
+ // map is from dna seq to a protein product\r
+ cf.addMap(sequenceI, nxt, cands[r].getMap()\r
+ .getMap());\r
+ }\r
+ else\r
+ {\r
+ // map should be from protein seq to its coding dna\r
+ cf.addMap(nxt, sequenceI, cands[r].getMap()\r
+ .getMap().getInverse());\r
+ }\r
}\r
}\r
}\r
+ // TODO: add mapping between sequences if necessary\r
+ found = true;\r
}\r
- // TODO: add mapping between sequences if necessary\r
- found = true;\r
}\r
- }\r
\r
+ }\r
}\r
- }\r
}\r
return found;\r
}\r
/**\r
* precalculate different products that can be found for seqs in dataset and\r
* return them.\r
- *\r
+ * \r
* @param dna\r
* @param seqs\r
* @param dataset\r
boolean found = false;
int end = alignment.getHeight();
-
// /////////////////////////////////////////////
if (selection != null)
while (!found && (seqIndex < end))
{
seq = (Sequence) alignment.getSequenceAt(seqIndex);
-
+
if ((selection != null && selection.getSize() > 0)
&& !selection.getSequences(null).contains(seq))
{
{
searchResults.addResult(seq, res, res);
hasResults = true;
- //resIndex=seq.getLength();
+ // resIndex=seq.getLength();
// seqIndex++;
- if (!findAll) {
+ if (!findAll)
+ {
found = true;
break;
}
Hashtable pgroup = new Hashtable();
if (list != null)
{
- for (SequenceGroup sg:list)
+ for (SequenceGroup sg : list)
{
- for (SequenceI sq :sg.getSequences(null))
+ for (SequenceI sq : sg.getSequences(null))
{
pgroup.put(sq.toString(), sg);
}
{
jalview.io.NewickFile fout = new jalview.io.NewickFile(getTopNode());
- return fout.print(isHasBootstrap(),
- isHasDistances(), isHasRootDistance()); // output all data available for tree
+ return fout.print(isHasBootstrap(), isHasDistances(),
+ isHasRootDistance()); // output all data available for tree
}
/**
}
}
}
+
/**
- * rename any nodes according to their associated sequence.
- * This will modify the tree's metadata! (ie the original NewickFile or newly generated BinaryTree's label data)
+ * rename any nodes according to their associated sequence. This will modify
+ * the tree's metadata! (ie the original NewickFile or newly generated
+ * BinaryTree's label data)
*/
- public void renameAssociatedNodes() {
- applyToNodes(new NodeTransformI() {
+ public void renameAssociatedNodes()
+ {
+ applyToNodes(new NodeTransformI()
+ {
@Override
public void transform(BinaryNode node)
{
Object el = node.element();
- if (el!=null && el instanceof SequenceI)
+ if (el != null && el instanceof SequenceI)
{
- node.setName(((SequenceI)el).getName());
+ node.setName(((SequenceI) el).getName());
}
}
});
}
+
/**
* DOCUMENT ME!
*/
*/
public void run()
{
- details.append("PCA Calculation Mode is "+(jvCalcMode ? "Jalview variant" : "Original SeqSpace")+"\n");
+ details.append("PCA Calculation Mode is "
+ + (jvCalcMode ? "Jalview variant" : "Original SeqSpace") + "\n");
Matrix mt = m.transpose();
details.append(" --- OrigT * Orig ---- \n");
public class Rna
{
- static Hashtable<Integer, Integer> pairHash = new Hashtable();
+ static Hashtable<Integer, Integer> pairHash = new Hashtable();
+
/**
* Based off of RALEE code ralee-get-base-pairs. Keeps track of open bracket
* positions in "stack" vector. When a close bracket is reached, pair this
* @return Array of SequenceFeature; type = RNA helix, begin is open base
* pair, end is close base pair
*/
- public static SequenceFeature[] GetBasePairs(CharSequence line) throws WUSSParseException
+ public static SequenceFeature[] GetBasePairs(CharSequence line)
+ throws WUSSParseException
{
Stack stack = new Stack();
Vector pairs = new Vector();
}
Object temp = stack.pop();
pairs.addElement(temp);
- pairs.addElement(i);
+ pairs.addElement(i);
}
i++;
{
int begin = Integer.parseInt(pairs.elementAt(p).toString());
int end = Integer.parseInt(pairs.elementAt(p + 1).toString());
-
- outPairs[p / 2] = new SequenceFeature("RNA helix", "", "", begin,
+
+ outPairs[p / 2] = new SequenceFeature("RNA helix", "", "", begin,
end, "");
- //pairHash.put(begin, end);
+ // pairHash.put(begin, end);
}
return outPairs;
}
-
-
+
/**
* Function to get the end position corresponding to a given start position
- * @param indice - start position of a base pair
+ *
+ * @param indice
+ * - start position of a base pair
* @return - end position of a base pair
*/
- /*makes no sense at the moment :(
- public int findEnd(int indice){
- //TODO: Probably extend this to find the start to a given end?
- //could be done by putting everything twice to the hash
- ArrayList<Integer> pair = new ArrayList<Integer>();
- return pairHash.get(indice);
- }*/
-
+ /*
+ * makes no sense at the moment :( public int findEnd(int indice){ //TODO:
+ * Probably extend this to find the start to a given end? //could be done by
+ * putting everything twice to the hash ArrayList<Integer> pair = new
+ * ArrayList<Integer>(); return pairHash.get(indice); }
+ */
/**
* Figures out which helix each position belongs to and stores the helix
}
}
}
-
names = new Hashtable();
for (int i = 0; i < seqs.length; i++)
{
- // TODO: deal with ID collisions - SequenceI should be appended to list associated with this key.
+ // TODO: deal with ID collisions - SequenceI should be appended to list
+ // associated with this key.
names.put(new SeqIdName(seqs[i].getDisplayId(true)), seqs[i]);
// add in any interesting identifiers
if (seqs[i].getDBRef() != null)
*/
private SequenceI pickbestMatch(SeqIdName candName, Vector matches)
{
- SequenceI[] st= pickbestMatches(candName, matches);
- return st==null || st.length==0 ? null : st[0];
+ SequenceI[] st = pickbestMatches(candName, matches);
+ return st == null || st.length == 0 ? null : st[0];
}
+
/**
* returns the closest SequenceI in matches to SeqIdName and returns all the
* matches to the names hash.
* SeqIdName
* @param matches
* Vector of SequenceI objects
- * @return Object[] { SequenceI closest SequenceI to SeqIdName, SequenceI[] ties }
+ * @return Object[] { SequenceI closest SequenceI to SeqIdName, SequenceI[]
+ * ties }
*/
private SequenceI[] pickbestMatches(SeqIdName candName, Vector matches)
{
- ArrayList best=new ArrayList();
+ ArrayList best = new ArrayList();
SequenceI match = null;
if (candName == null || matches == null || matches.size() == 0)
{
SequenceI cand = (SequenceI) matches.elementAt(0);
matches.remove(0);
names.put(new SeqIdName(cand.getName()), cand);
- int q,w,candlen = cand.getName().length();
+ int q, w, candlen = cand.getName().length();
// keep the one with an id 'closer' to the given seqnam string
- if ((q=Math.abs(matchlen - namlen)) > (w=Math.abs(candlen - namlen))
+ if ((q = Math.abs(matchlen - namlen)) > (w = Math.abs(candlen
+ - namlen))
&& candlen > matchlen)
{
best.clear();
matchlen = candlen;
best.add(match);
}
- if (q==w && candlen==matchlen)
+ if (q == w && candlen == matchlen)
{
// record any ties
best.add(cand);
}
}
- if (best.size()==0) { return null; };
+ if (best.size() == 0)
+ {
+ return null;
+ }
+ ;
return (SequenceI[]) best.toArray(new SequenceI[0]);
}
}
/**
- * Find all matches for a given sequence name.
- * @param seqnam string to query Matcher with.
+ * Find all matches for a given sequence name.
+ *
+ * @param seqnam
+ * string to query Matcher with.
*/
public SequenceI[] findAllIdMatches(String seqnam)
{
}
return pickbestMatch(nam, matches);
}
+
/**
* core findIdMatch search method for finding all equivalent matches
*
{
matches.addElement(names.remove(nam));
}
- SequenceI[] r=pickbestMatches(nam, matches);
+ SequenceI[] r = pickbestMatches(nam, matches);
return r;
}
-
private class SeqIdName
{
String id;
* arbritrarily extended sequence id's (like portions of an aligned set of
* repeats from one sequence)
*/
- private String WORD_SEP = "~. |#\\/<>!\""+((char)0x00A4)+"$%^*)}[@',?_";
+ private String WORD_SEP = "~. |#\\/<>!\"" + ((char) 0x00A4)
+ + "$%^*)}[@',?_";
/**
* matches if one ID properly contains another at a whitespace boundary.
*/
public boolean equals(SeqIdName s)
{
- // TODO: JAL-732 patch for cases when name includes a list of IDs, and the match contains one ID flanked
+ // TODO: JAL-732 patch for cases when name includes a list of IDs, and the
+ // match contains one ID flanked
if (id.length() > s.id.length())
{
return id.startsWith(s.id) ? (WORD_SEP.indexOf(id.charAt(s.id
* returns a new Hashtable[] of size maxSeqLength, if Hashtable not supplied.
* This class is used extensively in calculating alignment colourschemes that
* depend on the amount of conservation in each alignment column.
- *
+ *
* @author $author$
* @version $Revision$
*/
/**
* Returns the 3' position of a base pair
- *
+ *
* @param pairs
* Secondary structure annotation
* @param indice
/**
* Method to calculate a 'base pair consensus row', very similar to nucleotide
* consensus but takes into account a given structure
- *
+ *
* @param sequences
* @param start
* @param end
else
{
bpEnd = findPair(rna, i);
- if (bpEnd>-1)
- {
- for (j = 0; j < jSize; j++) // foreach row
+ if (bpEnd > -1)
{
- if (sequences[j] == null)
- {
- System.err
- .println("WARNING: Consensus skipping null sequence - possible race condition.");
- continue;
- }
- c = sequences[j].getCharAt(i);
+ for (j = 0; j < jSize; j++) // foreach row
{
-
- // standard representation for gaps in sequence and structure
- if (c == '.' || c == ' ')
+ if (sequences[j] == null)
{
- c = '-';
- }
-
- if (c == '-')
- {
- values['-']++;
+ System.err
+ .println("WARNING: Consensus skipping null sequence - possible race condition.");
continue;
}
- cEnd = sequences[j].getCharAt(bpEnd);
- if (checkBpType(c, cEnd))
+ c = sequences[j].getCharAt(i);
{
- values['(']++; // H means it's a helix (structured)
- }
- pairs[c][cEnd]++;
- maxResidue = "(";
+ // standard representation for gaps in sequence and structure
+ if (c == '.' || c == ' ')
+ {
+ c = '-';
+ }
+
+ if (c == '-')
+ {
+ values['-']++;
+ continue;
+ }
+ cEnd = sequences[j].getCharAt(bpEnd);
+ if (checkBpType(c, cEnd))
+ {
+ values['(']++; // H means it's a helix (structured)
+ }
+ pairs[c][cEnd]++;
+
+ maxResidue = "(";
+ }
}
}
- }
// nonGap++;
}
// UPDATE this for new values
/**
* Method to check if a base-pair is a canonical or a wobble bp
- *
+ *
* @param up
* 5' base
* @param down
/**
* Compute all or part of the annotation row from the given consensus
* hashtable
- *
+ *
* @param consensus
* - pre-allocated annotation row
* @param hconsensus
for (int i = iStart; i < width; i++)
{
Hashtable hci;
- if (i >= hconsensus.length || ((hci=hconsensus[i])==null))
+ if (i >= hconsensus.length || ((hci = hconsensus[i]) == null))
{
// happens if sequences calculated over were shorter than alignment
// width
Float fv;
if (ignoreGapsInConsensusCalculation)
{
- fv =(Float) hci.get(StructureFrequency.PID_NOGAPS);
+ fv = (Float) hci.get(StructureFrequency.PID_NOGAPS);
}
else
{
fv = (Float) hci.get(StructureFrequency.PID_GAPS);
}
- if (fv==null)
+ if (fv == null)
{
consensus.annotations[i] = null;
// data has changed below us .. give up and
continue;
}
value = fv.floatValue();
- String maxRes = hci.get(StructureFrequency.MAXRESIDUE)
- .toString();
- String mouseOver = hci.get(StructureFrequency.MAXRESIDUE)
- + " ";
+ String maxRes = hci.get(StructureFrequency.MAXRESIDUE).toString();
+ String mouseOver = hci.get(StructureFrequency.MAXRESIDUE) + " ";
if (maxRes.length() > 1)
{
mouseOver = "[" + maxRes + "] ";
maxRes = "+";
}
- int[][] profile = (int[][]) hci
- .get(StructureFrequency.PROFILE);
- int[][] pairs = (int[][]) hci
- .get(StructureFrequency.PAIRPROFILE);
+ int[][] profile = (int[][]) hci.get(StructureFrequency.PROFILE);
+ int[][] pairs = (int[][]) hci.get(StructureFrequency.PAIRPROFILE);
if (pairs != null && includeAllConsSymbols) // Just responsible for the
// tooltip
{
mouseOver = "";
- /* TODO It's not sure what is the purpose of the alphabet and wheter it is useful for structure?
- *
+ /*
+ * TODO It's not sure what is the purpose of the alphabet and wheter it
+ * is useful for structure?
+ *
* if (alphabet != null) { for (int c = 0; c < alphabet.length; c++) {
* tval = ((float) profile[0][alphabet[c]]) 100f / (float)
* profile[1][ignoreGapsInConsensusCalculation ? 1 : 0]; mouseOver +=
/**
* get the sorted base-pair profile for the given position of the consensus
- *
+ *
* @param hconsensus
* @return profile of the given column
*/
rtnval[rtnval[0]++] = ((int[]) ca[c])[1];
rtnval[rtnval[0]] = (int) (vl[c] * 100f / profile[1][ignoreGapsInConsensusCalculation ? 1
: 0]);
- rtnval[1]+=rtnval[rtnval[0]++];
+ rtnval[1] += rtnval[rtnval[0]++];
}
}
package jalview.analysis;
-public class WUSSParseException extends Exception {
+public class WUSSParseException extends Exception
+{
private long problemPos;
+
public WUSSParseException(long problemPos)
{
this("Invalid WUSS Notation", problemPos);
}
+
public WUSSParseException(String message, long problemPos)
{
- super(message+" at or near position "+problemPos);
- this.problemPos=problemPos;
+ super(message + " at or near position " + problemPos);
+ this.problemPos = problemPos;
}
+
public long getProblemPos()
{
return problemPos;
}
-
+
}
\ No newline at end of file
public interface AlignCalcManagerI
{
-
/**
* tell manager that a worker is initialised and has started to run
+ *
* @param worker
*/
void notifyStart(AlignCalcWorkerI worker);
/**
* check if a calculation of this type is already active
+ *
* @param worker
* @return
*/
/**
* tell manager that worker is now processing data
+ *
* @param worker
*/
boolean notifyWorking(AlignCalcWorkerI worker);
-
/**
- * notify manager that the worker has completed, and results may be ready to collect
+ * notify manager that the worker has completed, and results may be ready to
+ * collect
+ *
* @param worker
*/
void workerComplete(AlignCalcWorkerI worker);
/**
- * indicate that a worker like this cannot run on the platform and shouldn't be started again
+ * indicate that a worker like this cannot run on the platform and shouldn't
+ * be started again
+ *
* @param worker
*/
void workerCannotRun(AlignCalcWorkerI worker);
/**
* indicate that a worker like this may be run on the platform.
- * @param worker of class to be removed from the execution blacklist
+ *
+ * @param worker
+ * of class to be removed from the execution blacklist
*/
void workerMayRun(AlignCalcWorkerI worker);
+
/**
* launch a new worker
+ *
* @param worker
*/
void startWorker(AlignCalcWorkerI worker);
/**
- *
+ *
* @param worker
* @return
*/
/**
* if any worker thread is operational, return true!
+ *
* @return
*/
boolean isWorking();
-
/**
* register a restartable worker
+ *
* @param worker
*/
void registerWorker(AlignCalcWorkerI worker);
void restartWorkers();
/**
- *
+ *
* @param alignmentAnnotation
- * @return true if a currently registered and working worker indicates its involvement with the given alignmentAnnotation
+ * @return true if a currently registered and working worker indicates its
+ * involvement with the given alignmentAnnotation
*/
boolean workingInvolvedWith(AlignmentAnnotation alignmentAnnotation);
/**
- * kick any known instances of the given worker class to update their annotation
+ * kick any known instances of the given worker class to update their
+ * annotation
+ *
* @param workerClass
*/
void updateAnnotationFor(Class workerClass);
/**
* return any registered workers of the given class
+ *
* @param workerClass
* @return null or one or more workers of the given class
*/
- List<AlignCalcWorkerI> getRegisteredWorkersOfClass(
- Class workerClass);
+ List<AlignCalcWorkerI> getRegisteredWorkersOfClass(Class workerClass);
/**
* start any workers of the given class
+ *
* @param workerClass
- * @return false if no workers of given class were registered
- * (note - blacklisted classes cannot be restarted, so this method will return true for blacklisted workers)
+ * @return false if no workers of given class were registered (note -
+ * blacklisted classes cannot be restarted, so this method will return
+ * true for blacklisted workers)
*/
boolean startRegisteredWorkersOfClass(Class workerClass);
/**
* work out if there is an instance of a worker that is *waiting* to start
* calculating
- *
+ *
* @param workingClass
* @return true if workingClass is already waiting to calculate. false if it
* is calculating, or not queued.
boolean isPending(AlignCalcWorkerI workingClass);
/**
- * deregister and otherwise remove any registered and working instances of the given worker type
+ * deregister and otherwise remove any registered and working instances of the
+ * given worker type
+ *
* @param typeToRemove
*/
void removeRegisteredWorkersOfClass(Class typeToRemove);
/**
* @author jimp
- *
+ *
*/
public interface AlignViewportI
{
/**
* calculate the height for visible annotation, revalidating bounds where
* necessary ABSTRACT GUI METHOD
- *
+ *
* @return total height of annotation
*/
public int calcPanelHeight();
AlignmentAnnotation getAlignmentQualityAnnot();
AlignmentAnnotation getAlignmentConservationAnnotation();
+
/**
* get the container for alignment consensus annotation
+ *
* @return
*/
AlignmentAnnotation getAlignmentConsensusAnnotation();
/**
* Test to see if viewport is still open and active
- * @return true indicates that all references to viewport should be dropped
+ *
+ * @return true indicates that all references to viewport should be dropped
*/
boolean isClosed();
+
/**
* get the associated calculation thread manager for the view
+ *
* @return
*/
AlignCalcManagerI getCalcManager();
-
+
/**
* get the percentage gaps allowed in a conservation calculation
*
/**
* set the consensus result object for the viewport
+ *
* @param hconsensus
*/
void setSequenceConsensusHash(Hashtable[] hconsensus);
/**
*
- * @return the alignment annotatino row for the structure consensus calculation
+ * @return the alignment annotatino row for the structure consensus
+ * calculation
*/
AlignmentAnnotation getAlignmentStrucConsensusAnnotation();
/**
* set the Rna structure consensus result object for the viewport
- * @param hStrucConsensus
+ *
+ * @param hStrucConsensus
*/
void setRnaStructureConsensusHash(Hashtable[] hStrucConsensus);
/**
* set global colourscheme
+ *
* @param rhc
*/
void setGlobalColourScheme(ColourSchemeI rhc);
Map<SequenceI, SequenceCollectionI> hiddenRepSequences);
/**
- * hides or shows dynamic annotation rows based on groups and group and alignment associated auto-annotation state flags
- * apply the current group/autoannotation settings to the alignment view.
- * Usually you should call the AlignmentViewPanel.adjustAnnotationHeight() method afterwards to ensure the annotation panel bounds are set correctly.
- * @param applyGlobalSettings - apply to all autoannotation rows or just the ones associated with the current visible region
- * @param preserveNewGroupSettings - don't apply global settings to groups which don't already have group associated annotation
+ * hides or shows dynamic annotation rows based on groups and group and
+ * alignment associated auto-annotation state flags apply the current
+ * group/autoannotation settings to the alignment view. Usually you should
+ * call the AlignmentViewPanel.adjustAnnotationHeight() method afterwards to
+ * ensure the annotation panel bounds are set correctly.
+ *
+ * @param applyGlobalSettings
+ * - apply to all autoannotation rows or just the ones associated
+ * with the current visible region
+ * @param preserveNewGroupSettings
+ * - don't apply global settings to groups which don't already have
+ * group associated annotation
*/
void updateGroupAnnotationSettings(boolean applyGlobalSettings,
boolean preserveNewGroupSettings);
/**
* abstract interface implemented by alignment panels holding an alignment view
+ *
* @author JimP
- *
+ *
*/
public interface AlignmentViewPanel extends OOMHandlerI
{
AlignmentI getAlignment();
+
StructureSelectionManager getStructureSelectionManager();
+
/**
* repaint the alignment view after a datamodel update.
- * @param updateOverview - if true, the overview panel will also be updated and repainted
+ *
+ * @param updateOverview
+ * - if true, the overview panel will also be updated and repainted
*/
-
+
void paintAlignment(boolean updateOverview);
+
/**
- * automatically adjust annotation panel height for new annotation
- * whilst ensuring the alignment is still visible.
+ * automatically adjust annotation panel height for new annotation whilst
+ * ensuring the alignment is still visible.
*/
void adjustAnnotationHeight();
}
import java.util.Vector;
/**
- * interface implemented by RotatatableCanvas GUI elements (such as point clouds and simple structure views)
+ * interface implemented by RotatatableCanvas GUI elements (such as point clouds
+ * and simple structure views)
+ *
* @author jimp
- *
+ *
*/
public interface RotatableCanvasI
{
package jalview.api;
/**
- * Handles singleton generation/finalisation for a StructureSelectionManager instance in the current context.
+ * Handles singleton generation/finalisation for a StructureSelectionManager
+ * instance in the current context.
*/
public interface StructureSelectionManagerProvider
{
-
+
}
MenuItem sequenceFeature = new MenuItem("Create Sequence Feature");
MenuItem editSequence = new MenuItem("Edit Sequence");
-
+
MenuItem sequenceDetails = new MenuItem("Sequence Details ...");
MenuItem selSeqDetails = new MenuItem("Sequence Details ...");
-
+
Sequence seq;
MenuItem revealAll = new MenuItem();
MenuItem revealSeq = new MenuItem();
+
/**
* index of sequence to be revealed
*/
- int revealSeq_index=-1;
+ int revealSeq_index = -1;
+
Menu menu1 = new Menu();
public APopupMenu(AlignmentPanel apanel, final Sequence seq, Vector links)
if (sg != null && sg.getSize() > 0)
{
- editGroupName.setLabel("Name: "+sg.getName());
+ editGroupName.setLabel("Name: " + sg.getName());
showText.setState(sg.getDisplayText());
showColourText.setState(sg.getColourText());
showBoxes.setState(sg.getDisplayBoxes());
final String target = urlLink.getTarget(); // link.substring(0,
// link.indexOf("|"));
final String label = urlLink.getLabel();
- if (seq!=null && urlLink.isDynamic())
+ if (seq != null && urlLink.isDynamic())
{
// collect matching db-refs
{
remove(revealAll);
remove(revealSeq);
- } else {
+ }
+ else
+ {
final int index = ap.av.getAlignment().findIndex(seq);
if (ap.av.adjustForHiddenSeqs(index)
- ap.av.adjustForHiddenSeqs(index - 1) > 1)
{
- revealSeq_index=index;
- } else {
+ revealSeq_index = index;
+ }
+ else
+ {
remove(revealSeq);
}
}
EditCommand.REPLACE, dialog.getName().replace(' ',
ap.av.getGapCharacter()),
sg.getSequencesAsArray(ap.av.getHiddenRepSequences()),
- sg.getStartRes(), sg.getEndRes() + 1, ap.av.getAlignment());
+ sg.getStartRes(), sg.getEndRes() + 1,
+ ap.av.getAlignment());
ap.alignFrame.addHistoryItem(editCommand);
Vector regions = new Vector();
if (sg != null)
{
- int[][] startEnd = ap.av.getVisibleRegionBoundaries(sg.getStartRes(),
- sg.getEndRes() + 1);
+ int[][] startEnd = ap.av.getVisibleRegionBoundaries(
+ sg.getStartRes(), sg.getEndRes() + 1);
String description;
int caseChange;
}
ChangeCaseCommand caseCommand = new ChangeCaseCommand(description,
- sg.getSequencesAsArray(ap.av.getHiddenRepSequences()), startEnd,
- caseChange);
+ sg.getSequencesAsArray(ap.av.getHiddenRepSequences()),
+ startEnd, caseChange);
ap.alignFrame.addHistoryItem(caseCommand);
}
-
void outputText(ActionEvent e)
{
CutAndPasteTransfer cap = new CutAndPasteTransfer(true, ap.alignFrame);
frame.add(cap);
jalview.bin.JalviewLite.addFrame(frame,
"Selection output - " + e.getActionCommand(), 600, 500);
- // JBPNote: getSelectionAsNewSequence behaviour has changed - this method now returns a full copy of sequence data
+ // JBPNote: getSelectionAsNewSequence behaviour has changed - this method
+ // now returns a full copy of sequence data
// TODO consider using getSequenceSelection instead here
cap.setText(new jalview.io.AppletFormatAdapter().formatSequences(
ap.av.showJVSuffix));
}
+
protected void showSequenceSelectionDetails()
{
createSequenceDetailsReport(ap.av.getSequenceSelection());
protected void showSequenceDetails()
{
- createSequenceDetailsReport(new SequenceI[]{seq});
+ createSequenceDetailsReport(new SequenceI[]
+ { seq });
}
+
public void createSequenceDetailsReport(SequenceI[] sequences)
{
CutAndPasteTransfer cap = new CutAndPasteTransfer(false, ap.alignFrame);
-
+
StringBuffer contents = new StringBuffer();
- for (SequenceI seq:sequences)
+ for (SequenceI seq : sequences)
{
- contents.append("<p><h2>Annotation for "+seq.getDisplayId(true)+"</h2></p><p>");
- new SequenceAnnotationReport(null)
- .createSequenceAnnotationReport(
- contents,
- seq,
- true,
- true,false,
- (ap.seqPanel.seqCanvas.fr != null) ? ap.seqPanel.seqCanvas.fr.minmax
- : null);
- contents.append("</p>");
+ contents.append("<p><h2>Annotation for " + seq.getDisplayId(true)
+ + "</h2></p><p>");
+ new SequenceAnnotationReport(null)
+ .createSequenceAnnotationReport(
+ contents,
+ seq,
+ true,
+ true,
+ false,
+ (ap.seqPanel.seqCanvas.fr != null) ? ap.seqPanel.seqCanvas.fr.minmax
+ : null);
+ contents.append("</p>");
}
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame,
- "Sequence Details for " + (sequences.length==1 ? sequences[0].getDisplayId(true) : "Selection")
- , 600, 500);
+ jalview.bin.JalviewLite.addFrame(frame, "Sequence Details for "
+ + (sequences.length == 1 ? sequences[0].getDisplayId(true)
+ : "Selection"), 600, 500);
cap.setText("<html>" + contents.toString() + "</html>");
}
cap.setPDBImport(seq);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, "Paste PDB file for sequence "+seq.getName(), 400, 300);
+ jalview.bin.JalviewLite.addFrame(frame,
+ "Paste PDB file for sequence " + seq.getName(), 400, 300);
}
}
editMenu.add(toggleCase);
seqMenu.add(sequenceName);
// seqMenu.add(sequenceDetails);
-
+
if (!ap.av.applet.useXtrnalSviewer)
{
seqMenu.add(pdb);
protected void clustalColour_actionPerformed()
{
SequenceGroup sg = getGroup();
- sg.cs = new ClustalxColourScheme(
- sg,ap.av.getHiddenRepSequences());
+ sg.cs = new ClustalxColourScheme(sg, ap.av.getHiddenRepSequences());
refresh();
}
if (abovePIDColour.getState())
{
- sg.cs.setConsensus(AAFrequency.calculate(
- sg.getSequences(ap.av.getHiddenRepSequences()), 0,
- ap.av.getAlignment().getWidth()));
+ sg.cs.setConsensus(AAFrequency.calculate(sg.getSequences(ap.av
+ .getHiddenRepSequences()), 0, ap.av.getAlignment().getWidth()));
int threshold = SliderPanel.setPIDSliderSource(ap, sg.cs, getGroup()
.getName());
{
SequenceGroup sg = getGroup();
sg.cs = new PIDColourScheme();
- sg.cs.setConsensus(AAFrequency.calculate(
- sg.getSequences(ap.av.getHiddenRepSequences()), 0,
- ap.av.getAlignment().getWidth()));
+ sg.cs.setConsensus(AAFrequency.calculate(sg.getSequences(ap.av
+ .getHiddenRepSequences()), 0, ap.av.getAlignment().getWidth()));
refresh();
}
sg.cs = new Blosum62ColourScheme();
- sg.cs.setConsensus(AAFrequency.calculate(
- sg.getSequences(ap.av.getHiddenRepSequences()), 0,
- ap.av.getAlignment().getWidth()));
+ sg.cs.setConsensus(AAFrequency.calculate(sg.getSequences(ap.av
+ .getHiddenRepSequences()), 0, ap.av.getAlignment().getWidth()));
refresh();
}
{
sg.cs.setConservation(Conservation.calculateConservation("Group",
- ResidueProperties.propHash, 3,
- sg.getSequences(ap.av.getHiddenRepSequences()), 0,
- ap.av.getAlignment().getWidth(),
- false, ap.av.getConsPercGaps(),false));
+ ResidueProperties.propHash, 3, sg.getSequences(ap.av
+ .getHiddenRepSequences()), 0, ap.av.getAlignment()
+ .getWidth(), false, ap.av.getConsPercGaps(), false));
SliderPanel.setConservationSlider(ap, sg.cs, sg.getName());
SliderPanel.showConservationSlider();
}
import java.util.StringTokenizer;\r
import java.util.Vector;\r
\r
-public class AlignFrame extends EmbmenuFrame implements ActionListener, ItemListener, KeyListener\r
+public class AlignFrame extends EmbmenuFrame implements ActionListener,\r
+ ItemListener, KeyListener\r
{\r
public AlignmentPanel alignPanel;\r
\r
\r
String jalviewServletURL;\r
\r
-\r
- public AlignFrame(AlignmentI al, jalview.bin.JalviewLite applet, String title, boolean embedded)\r
+ public AlignFrame(AlignmentI al, jalview.bin.JalviewLite applet,\r
+ String title, boolean embedded)\r
{\r
if (applet != null)\r
{\r
{\r
RNAHelixColour.setEnabled(true);\r
}\r
- else {\r
+ else\r
+ {\r
RNAHelixColour.setEnabled(false);\r
}\r
- } else {\r
+ }\r
+ else\r
+ {\r
RNAHelixColour.setEnabled(false);\r
purinePyrimidineColour.setEnabled(false);\r
}\r
\r
/**\r
* Load a features file onto the alignment\r
- *\r
- * @param file file URL, content, or other resolvable path\r
- * @param type is protocol for accessing data referred to by file\r
+ * \r
+ * @param file\r
+ * file URL, content, or other resolvable path\r
+ * @param type\r
+ * is protocol for accessing data referred to by file\r
*/\r
\r
public boolean parseFeaturesFile(String file, String type)\r
\r
/**\r
* Load a features file onto the alignment\r
- *\r
- * @param file file URL, content, or other resolvable path\r
- * @param type is protocol for accessing data referred to by file\r
- * @param autoenabledisplay when true, display features flag will be automatically enabled if features are loaded\r
+ * \r
+ * @param file\r
+ * file URL, content, or other resolvable path\r
+ * @param type\r
+ * is protocol for accessing data referred to by file\r
+ * @param autoenabledisplay\r
+ * when true, display features flag will be automatically enabled if\r
+ * features are loaded\r
* @return true if data parsed as a features file\r
*/\r
- public boolean parseFeaturesFile(String file, String type, boolean autoenabledisplay)\r
+ public boolean parseFeaturesFile(String file, String type,\r
+ boolean autoenabledisplay)\r
{\r
- // TODO: test if importing a features file onto an alignment which already has features with links overwrites the original links.\r
+ // TODO: test if importing a features file onto an alignment which already\r
+ // has features with links overwrites the original links.\r
\r
Hashtable featureLinks = new Hashtable();\r
boolean featuresFile = false;\r
try\r
{\r
featuresFile = new jalview.io.FeaturesFile(file, type)\r
- .parse(viewport.getAlignment(),\r
- alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featureColours,\r
- featureLinks, true, viewport.applet.getDefaultParameter("relaxedidmatch", false));\r
+ .parse(viewport.getAlignment(), alignPanel.seqPanel.seqCanvas\r
+ .getFeatureRenderer().featureColours, featureLinks,\r
+ true, viewport.applet.getDefaultParameter(\r
+ "relaxedidmatch", false));\r
} catch (Exception ex)\r
{\r
ex.printStackTrace();\r
\r
/**\r
* called by key handler and the hide all/show all menu items\r
- *\r
+ * \r
* @param toggleSeqs\r
* @param toggleCols\r
*/\r
// Hide everything by the current selection - this is a hack - we do the\r
// invert and then hide\r
// first check that there will be visible columns after the invert.\r
- if ((viewport.getColumnSelection() != null && viewport.getColumnSelection().getSelected() != null && viewport.getColumnSelection()\r
- .getSelected().size() > 0)\r
+ if ((viewport.getColumnSelection() != null\r
+ && viewport.getColumnSelection().getSelected() != null && viewport\r
+ .getColumnSelection().getSelected().size() > 0)\r
|| (sg != null && sg.getSize() > 0 && sg.getStartRes() <= sg\r
.getEndRes()))\r
{\r
hide = true;\r
viewport.hideAllSelectedSeqs();\r
}\r
- else if (!(toggleCols && viewport.getColumnSelection().getSelected().size() > 0))\r
+ else if (!(toggleCols && viewport.getColumnSelection().getSelected()\r
+ .size() > 0))\r
{\r
viewport.showAllHiddenSeqs();\r
}\r
else if (source == clustalColour)\r
{\r
abovePIDThreshold.setState(false);\r
- changeColour(new ClustalxColourScheme(viewport.getAlignment(),null));\r
+ changeColour(new ClustalxColourScheme(viewport.getAlignment(), null));\r
}\r
else if (source == zappoColour)\r
{\r
{\r
changeColour(new Blosum62ColourScheme());\r
}\r
- else if (source == tcoffeeColour) {\r
- changeColour(new TCoffeeColourScheme(alignPanel.getAlignment()));\r
+ else if (source == tcoffeeColour)\r
+ {\r
+ changeColour(new TCoffeeColourScheme(alignPanel.getAlignment()));\r
}\r
else if (source == annotationColour)\r
{\r
{\r
String annotation = new AnnotationFile().printAnnotations(\r
viewport.showAnnotation ? viewport.getAlignment()\r
- .getAlignmentAnnotation() : null, viewport.getAlignment()\r
- .getGroups(),\r
- ((Alignment) viewport.getAlignment()).alignmentProperties);\r
+ .getAlignmentAnnotation() : null, viewport\r
+ .getAlignment().getGroups(), ((Alignment) viewport\r
+ .getAlignment()).alignmentProperties);\r
\r
if (displayTextbox)\r
{\r
\r
private Hashtable getDisplayedFeatureCols()\r
{\r
- if (alignPanel.getFeatureRenderer() != null && viewport.featuresDisplayed!=null)\r
+ if (alignPanel.getFeatureRenderer() != null\r
+ && viewport.featuresDisplayed != null)\r
{\r
FeatureRenderer fr = alignPanel.getFeatureRenderer();\r
Hashtable fcols = new Hashtable();\r
String features;\r
if (format.equalsIgnoreCase("Jalview"))\r
{\r
- features = new FeaturesFile().printJalviewFormat(\r
- viewport.getAlignment().getSequencesArray(),\r
+ features = new FeaturesFile().printJalviewFormat(viewport\r
+ .getAlignment().getSequencesArray(),\r
getDisplayedFeatureCols());\r
}\r
else\r
{\r
- features = new FeaturesFile().printGFFFormat(\r
- viewport.getAlignment().getSequencesArray(),\r
- getDisplayedFeatureCols());\r
+ features = new FeaturesFile().printGFFFormat(viewport.getAlignment()\r
+ .getSequencesArray(), getDisplayedFeatureCols());\r
}\r
\r
if (displayTextbox)\r
{\r
- boolean frimport=false;\r
- if (features==null || features.equals("No Features Visible"))\r
+ boolean frimport = false;\r
+ if (features == null || features.equals("No Features Visible"))\r
{\r
features = "# No features visible - paste some and import them here.";\r
- frimport=true;\r
+ frimport = true;\r
}\r
\r
CutAndPasteTransfer cap = new CutAndPasteTransfer(frimport, this);\r
frame.add(cap);\r
jalview.bin.JalviewLite.addFrame(frame, "Features", 600, 500);\r
cap.setText(features);\r
- } else {\r
- if (features==null)\r
+ }\r
+ else\r
+ {\r
+ if (features == null)\r
features = "";\r
}\r
\r
public void closeMenuItem_actionPerformed()\r
{\r
PaintRefresher.RemoveComponent(alignPanel);\r
- if (alignPanel.seqPanel!=null && alignPanel.seqPanel.seqCanvas!=null)\r
+ if (alignPanel.seqPanel != null\r
+ && alignPanel.seqPanel.seqCanvas != null)\r
{\r
PaintRefresher.RemoveComponent(alignPanel.seqPanel.seqCanvas);\r
}\r
- if (alignPanel.idPanel!=null && alignPanel.idPanel.idCanvas!=null) {\r
+ if (alignPanel.idPanel != null && alignPanel.idPanel.idCanvas != null)\r
+ {\r
PaintRefresher.RemoveComponent(alignPanel.idPanel.idCanvas);\r
}\r
\r
if (PaintRefresher.components.size() == 0 && viewport.applet == null)\r
{\r
System.exit(0);\r
- } else {\r
+ }\r
+ else\r
+ {\r
}\r
viewport = null;\r
alignPanel = null;\r
}\r
\r
/**\r
- * TODO: JAL-1104\r
- * DOCUMENT ME!\r
- *\r
+ * TODO: JAL-1104 DOCUMENT ME!\r
+ * \r
* @param e\r
* DOCUMENT ME!\r
*/\r
\r
AlignViewport originalSource = getOriginatingSource(command);\r
// JBPNote Test\r
- if (originalSource!=viewport) {\r
- System.err.println("Warning: Viewport object mismatch whilst undoing");\r
+ if (originalSource != viewport)\r
+ {\r
+ System.err\r
+ .println("Warning: Viewport object mismatch whilst undoing");\r
}\r
- originalSource.updateHiddenColumns(); // originalSource.hasHiddenColumns = viewport.getColumnSelection().getHiddenColumns() != null;\r
+ originalSource.updateHiddenColumns(); // originalSource.hasHiddenColumns =\r
+ // viewport.getColumnSelection().getHiddenColumns()\r
+ // != null;\r
updateEditMenuBar();\r
- originalSource.firePropertyChange("alignment", null,\r
- originalSource.getAlignment().getSequences());\r
+ originalSource.firePropertyChange("alignment", null, originalSource\r
+ .getAlignment().getSequences());\r
}\r
\r
/**\r
- * TODO: JAL-1104\r
- * DOCUMENT ME!\r
- *\r
+ * TODO: JAL-1104 DOCUMENT ME!\r
+ * \r
* @param e\r
* DOCUMENT ME!\r
*/\r
\r
AlignViewport originalSource = getOriginatingSource(command);\r
// JBPNote Test\r
- if (originalSource!=viewport) {\r
- System.err.println("Warning: Viewport object mismatch whilst re-doing");\r
+ if (originalSource != viewport)\r
+ {\r
+ System.err\r
+ .println("Warning: Viewport object mismatch whilst re-doing");\r
}\r
- originalSource.updateHiddenColumns(); //sethasHiddenColumns(); = viewport.getColumnSelection().getHiddenColumns() != null;\r
+ originalSource.updateHiddenColumns(); // sethasHiddenColumns(); =\r
+ // viewport.getColumnSelection().getHiddenColumns()\r
+ // != null;\r
\r
updateEditMenuBar();\r
- originalSource.firePropertyChange("alignment", null,\r
- originalSource.getAlignment().getSequences());\r
+ originalSource.firePropertyChange("alignment", null, originalSource\r
+ .getAlignment().getSequences());\r
}\r
\r
AlignViewport getOriginatingSource(CommandI command)\r
{\r
return;\r
}\r
- viewport.getAlignment().moveSelectedSequencesByOne(sg, up ? null : viewport.getHiddenRepSequences(), up);\r
+ viewport.getAlignment().moveSelectedSequencesByOne(sg,\r
+ up ? null : viewport.getHiddenRepSequences(), up);\r
alignPanel.paintAlignment(true);\r
}\r
\r
synchronized void slideSequences(boolean right, int size)\r
{\r
- List<SequenceI>sg = new Vector<SequenceI>();\r
+ List<SequenceI> sg = new Vector<SequenceI>();\r
if (viewport.cursorMode)\r
{\r
- sg.add(viewport.getAlignment()\r
- .getSequenceAt(alignPanel.seqPanel.seqCanvas.cursorY));\r
+ sg.add(viewport.getAlignment().getSequenceAt(\r
+ alignPanel.seqPanel.seqCanvas.cursorY));\r
}\r
else if (viewport.getSelectionGroup() != null\r
- && viewport.getSelectionGroup().getSize() != viewport.getAlignment()\r
- .getHeight())\r
+ && viewport.getSelectionGroup().getSize() != viewport\r
+ .getAlignment().getHeight())\r
{\r
sg = viewport.getSelectionGroup().getSequences(\r
viewport.getHiddenRepSequences());\r
\r
SequenceI[] seqs1 = sg.toArray(new SequenceI[sg.size()]);\r
\r
- SequenceI[] seqs2 = invertGroup.toArray(new SequenceI[invertGroup.size()]);\r
+ SequenceI[] seqs2 = invertGroup.toArray(new SequenceI[invertGroup\r
+ .size()]);\r
for (int i = 0; i < invertGroup.size(); i++)\r
seqs2[i] = invertGroup.elementAt(i);\r
\r
\r
// !newAlignment\r
addHistoryItem(new EditCommand("Add sequences", EditCommand.PASTE,\r
- seqs, 0, viewport.getAlignment().getWidth(), viewport.getAlignment()));\r
+ seqs, 0, viewport.getAlignment().getWidth(),\r
+ viewport.getAlignment()));\r
\r
viewport.setEndSeq(viewport.getAlignment().getHeight());\r
viewport.getAlignment().getWidth();\r
- viewport.firePropertyChange("alignment", null,\r
- viewport.getAlignment().getSequences());\r
+ viewport.firePropertyChange("alignment", null, viewport.getAlignment()\r
+ .getSequences());\r
\r
}\r
\r
\r
/**\r
* group consensus toggled\r
- *\r
+ * \r
*/\r
protected void showGroupConsensus_actionPerformed()\r
{\r
\r
/*\r
* (non-Javadoc)\r
- *\r
+ * \r
* @see\r
* jalview.jbgui.GAlignFrame#showConsensusHistogram_actionPerformed(java.awt\r
* .event.ActionEvent)\r
viewport.setShowConsensusHistogram(showConsensusHistogram.getState());\r
alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());\r
}\r
+\r
/*\r
* (non-Javadoc)\r
- *\r
+ * \r
* @see\r
* jalview.jbgui.GAlignFrame#showConsensusProfile_actionPerformed(java.awt\r
* .event.ActionEvent)\r
viewport.setShowSequenceLogo(showSequenceLogo.getState());\r
alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());\r
}\r
+\r
protected void normSequenceLogo_actionPerformed()\r
{\r
showSequenceLogo.setState(true);\r
SequenceGroup[] gps = jalview.analysis.Grouping.makeGroupsFrom(\r
viewport.getSequenceSelection(),\r
viewport.getAlignmentView(true).getSequenceStrings(\r
- viewport.getGapCharacter()),\r
- viewport.getAlignment().getGroups());\r
+ viewport.getGapCharacter()), viewport.getAlignment()\r
+ .getGroups());\r
viewport.getAlignment().deleteAllGroups();\r
viewport.sequenceColours = null;\r
viewport.setSelectionGroup(null);\r
(int) (Math.random() * 255), (int) (Math.random() * 255));\r
col = col.brighter();\r
for (SequenceI sq : gps[g].getSequences(null))\r
- viewport.setSequenceColour(\r
- sq, col)\r
- ;\r
+ viewport.setSequenceColour(sq, col);\r
}\r
PaintRefresher.Refresh(this, viewport.getSequenceSetId());\r
alignPanel.updateAnnotation();\r
\r
addHistoryItem(trimRegion);\r
\r
-\r
-\r
- for (SequenceGroup sg:viewport.getAlignment().getGroups())\r
+ for (SequenceGroup sg : viewport.getAlignment().getGroups())\r
{\r
if ((trimLeft && !sg.adjustForRemoveLeft(column))\r
|| (!trimLeft && !sg.adjustForRemoveRight(column)))\r
}\r
\r
RemoveGapColCommand removeGapCols = new RemoveGapColCommand(\r
- "Remove Gapped Columns", seqs, start, end, viewport.getAlignment());\r
+ "Remove Gapped Columns", seqs, start, end,\r
+ viewport.getAlignment());\r
\r
addHistoryItem(removeGapCols);\r
\r
\r
/**\r
* create a new view derived from the current view\r
- *\r
+ * \r
* @param viewtitle\r
* @return frame for the new view\r
*/\r
{\r
if (!viewport.getAlignment().getAlignmentAnnotation()[i].autoCalculated)\r
{\r
- newal.addAnnotation(viewport.getAlignment().getAlignmentAnnotation()[i]);\r
+ newal.addAnnotation(viewport.getAlignment()\r
+ .getAlignmentAnnotation()[i]);\r
}\r
}\r
}\r
}\r
\r
/**\r
- *\r
+ * \r
* @return list of feature groups on the view\r
*/\r
public String[] getFeatureGroups()\r
\r
/**\r
* get sequence feature groups that are hidden or shown\r
- *\r
+ * \r
* @param visible\r
* true is visible\r
* @return list\r
\r
/**\r
* Change the display state for the given feature groups\r
- *\r
+ * \r
* @param groups\r
* list of group strings\r
* @param state\r
overview.getPreferredSize().height + 50);\r
\r
frame.pack();\r
- final AlignmentPanel ap=alignPanel;\r
+ final AlignmentPanel ap = alignPanel;\r
frame.addWindowListener(new WindowAdapter()\r
{\r
@Override\r
public void windowClosing(WindowEvent e)\r
{\r
- if (ap!=null) {\r
+ if (ap != null)\r
+ {\r
ap.setOverviewPanel(null);\r
}\r
};\r
}\r
viewport.setGlobalColourScheme(cs);\r
\r
-\r
if (alignPanel.getOverviewPanel() != null)\r
{\r
alignPanel.getOverviewPanel().updateOverviewImage();\r
}\r
\r
jalview.structure.StructureSelectionManager\r
- .getStructureSelectionManager(viewport.applet).sequenceColoursChanged(\r
- alignPanel);\r
+ .getStructureSelectionManager(viewport.applet)\r
+ .sequenceColoursChanged(alignPanel);\r
\r
alignPanel.paintAlignment(true);\r
}\r
{\r
SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray();\r
AlignmentSorter.sortByID(viewport.getAlignment());\r
- addHistoryItem(new OrderCommand("ID Sort", oldOrder, viewport.getAlignment()));\r
+ addHistoryItem(new OrderCommand("ID Sort", oldOrder,\r
+ viewport.getAlignment()));\r
alignPanel.paintAlignment(true);\r
}\r
\r
\r
if ((viewport.getSelectionGroup() != null && viewport\r
.getSelectionGroup().getSize() > 1)\r
- || (viewport.getAlignment()\r
- .getHeight() > 1))\r
+ || (viewport.getAlignment().getHeight() > 1))\r
{\r
final TreePanel tp = new TreePanel(alignPanel, type, pwType);\r
\r
\r
/**\r
* sort the alignment using the given treePanel\r
- *\r
+ * \r
* @param treePanel\r
* tree used to sort view\r
* @param title\r
/**\r
* Do any automatic reordering of the alignment and add the necessary bits to\r
* the menu structure for the new tree\r
- *\r
+ * \r
* @param treePanel\r
* @param title\r
*/\r
};\r
});\r
}\r
+\r
public boolean sortBy(AlignmentOrder alorder, String undoname)\r
{\r
- SequenceI[] oldOrder = viewport.getAlignment()\r
- .getSequencesArray();\r
+ SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray();\r
if (viewport.applet.debug)\r
{\r
- System.err.println("Sorting "+alorder.getOrder().size()+" in alignment '"+getTitle()+"'");\r
+ System.err.println("Sorting " + alorder.getOrder().size()\r
+ + " in alignment '" + getTitle() + "'");\r
}\r
AlignmentSorter.sortBy(viewport.getAlignment(), alorder);\r
- if (undoname!=null)\r
+ if (undoname != null)\r
{\r
- addHistoryItem(new OrderCommand(undoname, oldOrder, viewport.getAlignment()));\r
+ addHistoryItem(new OrderCommand(undoname, oldOrder,\r
+ viewport.getAlignment()));\r
}\r
alignPanel.paintAlignment(true);\r
return true;\r
MenuItem buriedColour = new MenuItem();\r
\r
MenuItem purinePyrimidineColour = new MenuItem();\r
+\r
MenuItem RNAHelixColour = new MenuItem();\r
\r
MenuItem userDefinedColour = new MenuItem();\r
CheckboxMenuItem centreColumnLabelFlag = new CheckboxMenuItem();\r
\r
CheckboxMenuItem followMouseOverFlag = new CheckboxMenuItem();\r
- Menu autoAnnMenu=new Menu();\r
- CheckboxMenuItem showSequenceLogo= new CheckboxMenuItem();\r
+\r
+ Menu autoAnnMenu = new Menu();\r
+\r
+ CheckboxMenuItem showSequenceLogo = new CheckboxMenuItem();\r
+\r
CheckboxMenuItem applyAutoAnnotationSettings = new CheckboxMenuItem();\r
+\r
CheckboxMenuItem showConsensusHistogram = new CheckboxMenuItem();\r
+\r
CheckboxMenuItem showGroupConsensus = new CheckboxMenuItem();\r
+\r
CheckboxMenuItem showGroupConservation = new CheckboxMenuItem();\r
+\r
CheckboxMenuItem normSequenceLogo = new CheckboxMenuItem();\r
\r
private void jbInit() throws Exception\r
BLOSUM62Colour.setLabel("BLOSUM62 Score");\r
BLOSUM62Colour.addActionListener(this);\r
tcoffeeColour.setLabel("T-Coffee Scores");\r
- tcoffeeColour.setEnabled(false); // it will enabled only if a score file is provided\r
+ tcoffeeColour.setEnabled(false); // it will enabled only if a score file is\r
+ // provided\r
tcoffeeColour.addActionListener(this);\r
- avDistanceTreeBlosumMenuItem .setLabel("Average Distance Using BLOSUM62");\r
+ avDistanceTreeBlosumMenuItem\r
+ .setLabel("Average Distance Using BLOSUM62");\r
avDistanceTreeBlosumMenuItem.addActionListener(this);\r
njTreeBlosumMenuItem.setLabel("Neighbour Joining Using BLOSUM62");\r
njTreeBlosumMenuItem.addActionListener(this);\r
showConsensusHistogram.addItemListener(this);\r
showSequenceLogo.addItemListener(this);\r
normSequenceLogo.addItemListener(this);\r
- \r
+\r
applyAutoAnnotationSettings.addItemListener(this);\r
formatMenu.setLabel("Format");\r
selectMenu.setLabel("Select");\r
* Attach the alignFrame panels after embedding menus, if necessary. This used\r
* to be called setEmbedded, but is now creates the dropdown menus in a\r
* platform independent manner to avoid OSX/Mac menu appendage daftness.\r
- *\r
+ * \r
* @param reallyEmbedded\r
* true to attach the view to the applet area on the page rather than\r
* in a new window\r
@Override\r
public void focusLost(FocusEvent e)\r
{\r
- if (me.viewport.applet.currentAlignFrame==me) {\r
- me.viewport.applet.currentAlignFrame = null;\r
- }}\r
+ if (me.viewport.applet.currentAlignFrame == me)\r
+ {\r
+ me.viewport.applet.currentAlignFrame = null;\r
+ }\r
+ }\r
\r
@Override\r
public void focusGained(FocusEvent e)\r
* structures in the original jmol window. Note This method doesn't work\r
* without an additional javascript library to exchange messages between the\r
* distinct applets. See http://issues.jalview.org/browse/JAL-621\r
- *\r
+ * \r
* @param viewer\r
* JmolViewer instance\r
* @param sequenceIds\r
// TODO: search for a jmv that involves viewer\r
if (jmv == null)\r
{ // create a new viewer/jalview binding.\r
- jmv = new ExtJmol(viewer, alignPanel, new SequenceI[][] {seqs});\r
+ jmv = new ExtJmol(viewer, alignPanel, new SequenceI[][]\r
+ { seqs });\r
}\r
return jmv;\r
\r
}\r
+\r
/**\r
* bind a pdb file to a sequence in the current view\r
- *\r
+ * \r
* @param sequenceId\r
* - sequenceId within the dataset.\r
* @param pdbEntryString\r
if (applet.useXtrnalSviewer)\r
{\r
// register the association(s) and quit, don't create any windows.\r
- if (StructureSelectionManager.getStructureSelectionManager(applet).setMapping(seqs, chains, pdb.getFile(), protocol)==null) {\r
- System.err.println("Failed to map "+pdb.getFile()+" ("+protocol+") to any sequences");\r
+ if (StructureSelectionManager.getStructureSelectionManager(applet)\r
+ .setMapping(seqs, chains, pdb.getFile(), protocol) == null)\r
+ {\r
+ System.err.println("Failed to map " + pdb.getFile() + " ("\r
+ + protocol + ") to any sequences");\r
}\r
return;\r
}\r
}\r
\r
/**\r
- * modify the current selection, providing the user has not made a selection already.\r
- * @param sel - sequences from this alignment\r
- * @param csel - columns to be selected on the alignment\r
+ * modify the current selection, providing the user has not made a selection\r
+ * already.\r
+ * \r
+ * @param sel\r
+ * - sequences from this alignment\r
+ * @param csel\r
+ * - columns to be selected on the alignment\r
*/\r
public void select(SequenceGroup sel, ColumnSelection csel)\r
{\r
{\r
alignPanel.seqPanel.scrollTo(row, column);\r
}\r
+\r
public void scrollToRow(int row)\r
{\r
alignPanel.seqPanel.scrollToRow(row);\r
}\r
+\r
public void scrollToColumn(int column)\r
{\r
alignPanel.seqPanel.scrollToColumn(column);\r
}\r
+\r
/**\r
* @return the alignments unique ID.\r
*/\r
- public String getSequenceSetId() {\r
+ public String getSequenceSetId()\r
+ {\r
return viewport.getSequenceSetId();\r
}\r
\r
-\r
/**\r
* Load the (T-Coffee) score file from the specified url\r
- *\r
- * @param source File/URL/T-COFFEE score file contents\r
+ * \r
+ * @param source\r
+ * File/URL/T-COFFEE score file contents\r
* @throws IOException\r
* @return true if alignment was annotated with data from source\r
*/\r
- public boolean loadScoreFile( String source ) throws IOException {\r
-\r
- TCoffeeScoreFile file = new TCoffeeScoreFile(source, AppletFormatAdapter.checkProtocol(source));\r
- if( !file.isValid()) {\r
- // TODO: raise dialog for gui\r
- System.err.println("Problems parsing T-Coffee scores: "+file.getWarningMessage());\r
- System.err.println("Origin was:\n"+source);\r
- return false;\r
- }\r
-\r
- /*\r
- * check that the score matrix matches the alignment dimensions\r
- */\r
- AlignmentI aln;\r
- if( (aln=viewport.getAlignment()) != null && (aln.getHeight() != file.getHeight() || aln.getWidth() != file.getWidth()) ) {\r
- // TODO: raise a dialog box here rather than bomb out.\r
- System.err.println("The scores matrix does not match the alignment dimensions");\r
-\r
- }\r
-\r
- // TODO add parameter to indicate if matching should be done\r
- if (file.annotateAlignment(alignPanel.getAlignment(), false))\r
- {\r
- alignPanel.fontChanged();\r
- tcoffeeColour.setEnabled(true);\r
- // switch to this color\r
- changeColour(new TCoffeeColourScheme(alignPanel.getAlignment()));\r
- return true;\r
- } else {\r
- System.err.println("Problems resolving T-Coffee scores:");\r
- if (file.getWarningMessage()!=null) {\r
- System.err.println(file.getWarningMessage());\r
- }\r
- }\r
- return false;\r
- }\r
+ public boolean loadScoreFile(String source) throws IOException\r
+ {\r
\r
+ TCoffeeScoreFile file = new TCoffeeScoreFile(source,\r
+ AppletFormatAdapter.checkProtocol(source));\r
+ if (!file.isValid())\r
+ {\r
+ // TODO: raise dialog for gui\r
+ System.err.println("Problems parsing T-Coffee scores: "\r
+ + file.getWarningMessage());\r
+ System.err.println("Origin was:\n" + source);\r
+ return false;\r
+ }\r
+\r
+ /*\r
+ * check that the score matrix matches the alignment dimensions\r
+ */\r
+ AlignmentI aln;\r
+ if ((aln = viewport.getAlignment()) != null\r
+ && (aln.getHeight() != file.getHeight() || aln.getWidth() != file\r
+ .getWidth()))\r
+ {\r
+ // TODO: raise a dialog box here rather than bomb out.\r
+ System.err\r
+ .println("The scores matrix does not match the alignment dimensions");\r
+\r
+ }\r
+\r
+ // TODO add parameter to indicate if matching should be done\r
+ if (file.annotateAlignment(alignPanel.getAlignment(), false))\r
+ {\r
+ alignPanel.fontChanged();\r
+ tcoffeeColour.setEnabled(true);\r
+ // switch to this color\r
+ changeColour(new TCoffeeColourScheme(alignPanel.getAlignment()));\r
+ return true;\r
+ }\r
+ else\r
+ {\r
+ System.err.println("Problems resolving T-Coffee scores:");\r
+ if (file.getWarningMessage() != null)\r
+ {\r
+ System.err.println(file.getWarningMessage());\r
+ }\r
+ }\r
+ return false;\r
+ }\r
\r
}\r
import jalview.workers.ConservationThread;
import jalview.workers.ConsensusThread;
-public class AlignViewport extends AlignmentViewport implements AlignViewportI, SelectionSource, VamsasSource
+public class AlignViewport extends AlignmentViewport implements
+ AlignViewportI, SelectionSource, VamsasSource
{
int startRes;
boolean upperCasebold = false;
-
int charHeight;
int charWidth;
// currently visible, in the correct order or rendering
public Hashtable featuresDisplayed;
-
boolean showHiddenMarkers = true;
public jalview.bin.JalviewLite applet;
Stack historyList = new Stack();
Stack redoList = new Stack();
-
- public void finalize() {
- applet=null;
- quality=null;
- alignment=null;
- colSel=null;
+
+ public void finalize()
+ {
+ applet = null;
+ quality = null;
+ alignment = null;
+ colSel = null;
}
public AlignViewport(AlignmentI al, JalviewLite applet)
{
showJVSuffix = applet.getDefaultParameter("showFullId", showJVSuffix);
- showAnnotation = applet.getDefaultParameter("showAnnotation", showAnnotation);
-
- showConservation = applet.getDefaultParameter("showConservation", showConservation);
-
+ showAnnotation = applet.getDefaultParameter("showAnnotation",
+ showAnnotation);
+
+ showConservation = applet.getDefaultParameter("showConservation",
+ showConservation);
+
showQuality = applet.getDefaultParameter("showQuality", showQuality);
- showConsensus = applet.getDefaultParameter("showConsensus", showConsensus);
+ showConsensus = applet.getDefaultParameter("showConsensus",
+ showConsensus);
- showUnconserved = applet.getDefaultParameter("showUnconserved", showUnconserved);
+ showUnconserved = applet.getDefaultParameter("showUnconserved",
+ showUnconserved);
String param = applet.getParameter("upperCase");
if (param != null)
}
sortByTree = applet.getDefaultParameter("sortByTree", sortByTree);
- followHighlight = applet.getDefaultParameter("automaticScrolling",followHighlight);
+ followHighlight = applet.getDefaultParameter("automaticScrolling",
+ followHighlight);
followSelection = followHighlight;
- showSequenceLogo = applet.getDefaultParameter("showSequenceLogo", showSequenceLogo);
+ showSequenceLogo = applet.getDefaultParameter("showSequenceLogo",
+ showSequenceLogo);
+
+ normaliseSequenceLogo = applet.getDefaultParameter(
+ "normaliseSequenceLogo", applet.getDefaultParameter(
+ "normaliseLogo", normaliseSequenceLogo));
+
+ showGroupConsensus = applet.getDefaultParameter("showGroupConsensus",
+ showGroupConsensus);
- normaliseSequenceLogo = applet.getDefaultParameter("normaliseSequenceLogo", applet.getDefaultParameter("normaliseLogo", normaliseSequenceLogo));
+ showGroupConservation = applet.getDefaultParameter(
+ "showGroupConservation", showGroupConservation);
+
+ showConsensusHistogram = applet.getDefaultParameter(
+ "showConsensusHistogram", showConsensusHistogram);
- showGroupConsensus = applet.getDefaultParameter("showGroupConsensus", showGroupConsensus);
-
- showGroupConservation = applet.getDefaultParameter("showGroupConservation", showGroupConservation);
-
- showConsensusHistogram = applet.getDefaultParameter("showConsensusHistogram", showConsensusHistogram);
-
}
if (applet != null)
return showSequenceFeatures;
}
-
/**
* get the consensus sequence as displayed under the PID consensus annotation
* row.
}
}
-
-
-
-
public boolean getShowHiddenMarkers()
{
return showHiddenMarkers;
public void updateSequenceIdColours()
{
-
- for (SequenceGroup sg:alignment.getGroups())
+
+ for (SequenceGroup sg : alignment.getGroups())
{
if (sg.idColour != null)
{
- for (SequenceI s:sg.getSequences(getHiddenRepSequences()))
+ for (SequenceI s : sg.getSequences(getHiddenRepSequences()))
{
this.setSequenceColour(s, sg.idColour);
}
{
return followSelection;
}
+
public void sendSelection()
{
jalview.structure.StructureSelectionManager
new ColumnSelection(getColumnSelection()), this);
}
-
-
-
/**
* synthesize a column selection if none exists so it covers the given
* selection group. if wholewidth is false, no column selection is made if the
{
return hasHiddenColumns;
}
-
+
public boolean isNormaliseSequenceLogo()
{
return normaliseSequenceLogo;
/**
*
- * @return true if alignment characters should be displayed
+ * @return true if alignment characters should be displayed
*/
public boolean isValidCharWidth()
{
import jalview.datamodel.*;
import jalview.structure.StructureSelectionManager;
-public class AlignmentPanel extends Panel implements AdjustmentListener, AlignmentViewPanel
+public class AlignmentPanel extends Panel implements AdjustmentListener,
+ AlignmentViewPanel
{
public AlignViewport av;
// this value is set false when selection area being dragged
boolean fastPaint = true;
-
- public void finalize() {
- alignFrame=null;
- av=null;
- seqPanel=null;
- seqPanelHolder=null;
- sequenceHolderPanel=null;
- scalePanel=null;
- scalePanelHolder=null;
- annotationPanel=null;
- annotationPanelHolder=null;
- annotationSpaceFillerHolder=null;
+
+ public void finalize()
+ {
+ alignFrame = null;
+ av = null;
+ seqPanel = null;
+ seqPanelHolder = null;
+ sequenceHolderPanel = null;
+ scalePanel = null;
+ scalePanelHolder = null;
+ annotationPanel = null;
+ annotationPanelHolder = null;
+ annotationSpaceFillerHolder = null;
}
+
public AlignmentPanel(AlignFrame af, final AlignViewport av)
{
try
public void componentResized(ComponentEvent evt)
{
setScrollValues(av.getStartRes(), av.getStartSeq());
- if (getSize().height>0 && annotationPanelHolder.getSize().height>0) {
+ if (getSize().height > 0
+ && annotationPanelHolder.getSize().height > 0)
+ {
validateAnnotationDimensions(false);
}
repaint();
}
-
+
});
Dimension d = calculateIdWidth();
Dimension d = calculateIdWidth();
d.setSize(d.width + 4, seqPanel.seqCanvas.getSize().height);
alabels.setSize(d.width + 4, ap);
-
+
idPanel.idCanvas.setSize(d);
hscrollFillerPanel.setSize(d);
-
+
validateAnnotationDimensions(false);
annotationPanel.repaint();
validate();
{
idPanel.idCanvas.setSize(w, h);
idPanelHolder.setSize(w, idPanelHolder.getSize().height);
- annotationSpaceFillerHolder.setSize(w,annotationSpaceFillerHolder.getSize().height);
+ annotationSpaceFillerHolder.setSize(w,
+ annotationSpaceFillerHolder.getSize().height);
alabels.setSize(w, alabels.getSize().height);
validate();
}
public boolean scrollToPosition(SearchResults results,
boolean redrawOverview)
{
-
+
// do we need to scroll the panel?
if (results != null && results.getSize() > 0)
{
- AlignmentI alignment=av.getAlignment();
+ AlignmentI alignment = av.getAlignment();
int seqIndex = alignment.findIndex(results);
if (seqIndex == -1)
{
return false;
}
SequenceI seq = alignment.getSequenceAt(seqIndex);
- int[] r = results.getResults(seq, 0,alignment.getWidth());
+ int[] r = results.getResults(seq, 0, alignment.getWidth());
if (r == null)
{
- if (av.applet.debug) {// DEBUG
- System.out.println("DEBUG: scroll didn't happen - results not within alignment : "+seq.getStart()+","+seq.getEnd());
+ if (av.applet.debug)
+ {// DEBUG
+ System.out
+ .println("DEBUG: scroll didn't happen - results not within alignment : "
+ + seq.getStart() + "," + seq.getEnd());
}
return false;
}
- if (av.applet.debug) {
+ if (av.applet.debug)
+ {
// DEBUG
- /*System.out.println("DEBUG: scroll: start=" + r[0]
- + " av.getStartRes()=" + av.getStartRes() + " end=" + r[1]
- + " seq.end=" + seq.getEnd() + " av.getEndRes()="
- + av.getEndRes() + " hextent=" + hextent);
+ /*
+ * System.out.println("DEBUG: scroll: start=" + r[0] +
+ * " av.getStartRes()=" + av.getStartRes() + " end=" + r[1] +
+ * " seq.end=" + seq.getEnd() + " av.getEndRes()=" + av.getEndRes() +
+ * " hextent=" + hextent);
*/
}
int start = r[0];
}
return true;
}
- public boolean scrollTo(int ostart, int end, int seqIndex, boolean scrollToNearest, boolean redrawOverview)
+
+ public boolean scrollTo(int ostart, int end, int seqIndex,
+ boolean scrollToNearest, boolean redrawOverview)
{
- int startv, endv, starts, ends, width;
+ int startv, endv, starts, ends, width;
- int start=-1;
+ int start = -1;
if (av.hasHiddenColumns())
{
start = av.getColumnSelection().findColumnPosition(ostart);
}
if (!av.wrapAlignment)
{
- /*
- int spos=av.getStartRes(),sqpos=av.getStartSeq();
- if ((startv = av.getStartRes()) >= start)
- {
- spos=start-1;
-// seqIn
-// setScrollValues(start - 1, seqIndex);
- }
- else if ((endv = av.getEndRes()) <= end)
- {
-// setScrollValues(spos=startv + 1 + end - endv, seqIndex);
- spos=startv + 1 + end - endv;
- }
- else if ((starts = av.getStartSeq()) > seqIndex)
- {
- setScrollValues(av.getStartRes(), seqIndex);
- }
- else if ((ends = av.getEndSeq()) <= seqIndex)
+ /*
+ * int spos=av.getStartRes(),sqpos=av.getStartSeq(); if ((startv =
+ * av.getStartRes()) >= start) { spos=start-1; // seqIn //
+ * setScrollValues(start - 1, seqIndex); } else if ((endv =
+ * av.getEndRes()) <= end) { // setScrollValues(spos=startv + 1 + end -
+ * endv, seqIndex); spos=startv + 1 + end - endv; } else if ((starts =
+ * av.getStartSeq()) > seqIndex) { setScrollValues(av.getStartRes(),
+ * seqIndex); } else if ((ends = av.getEndSeq()) <= seqIndex) {
+ * setScrollValues(av.getStartRes(), starts + seqIndex - ends + 1); }
+ *
+ * /*
+ */
+ if ((av.getStartRes() > end)
+ || (av.getEndRes() < start)
+ || ((av.getStartSeq() > seqIndex) || (av.getEndSeq() < seqIndex)))
+ {
+ if (start > av.getAlignment().getWidth() - hextent)
+ {
+ start = av.getAlignment().getWidth() - hextent;
+ if (start < 0)
{
- setScrollValues(av.getStartRes(), starts + seqIndex - ends + 1);
+ start = 0;
}
- /* */
- if ((av.getStartRes() > end)
- || (av.getEndRes() < start)
- || ((av.getStartSeq() > seqIndex) || (av.getEndSeq() < seqIndex)))
+ }
+ if (seqIndex > av.getAlignment().getHeight() - vextent)
{
- if (start > av.getAlignment().getWidth() - hextent)
- {
- start = av.getAlignment().getWidth() - hextent;
- if (start < 0)
- {
- start = 0;
- }
-
- }
- if (seqIndex > av.getAlignment().getHeight() - vextent)
+ seqIndex = av.getAlignment().getHeight() - vextent;
+ if (seqIndex < 0)
{
- seqIndex = av.getAlignment().getHeight() - vextent;
- if (seqIndex < 0)
- {
- seqIndex = 0;
- }
+ seqIndex = 0;
}
- // System.out.println("trying to scroll to: "+start+" "+seqIndex);
- setScrollValues(start, seqIndex);
- }/**/
- }
- else
- {
- scrollToWrappedVisible(start);
- }
+ }
+ // System.out.println("trying to scroll to: "+start+" "+seqIndex);
+ setScrollValues(start, seqIndex);
+ }/**/
+ }
+ else
+ {
+ scrollToWrappedVisible(start);
+ }
if (redrawOverview && overviewPanel != null)
{
overviewPanel.setBoxPosition();
validate();
repaint();
}
-
+
/**
* automatically adjust annotation panel height for new annotation whilst
* ensuring the alignment is still visible.
validate();
paintAlignment(true);
}
+
/**
* calculate the annotation dimensions and refresh slider values accordingly.
- * need to do repaints/notifys afterwards.
+ * need to do repaints/notifys afterwards.
*/
- protected void validateAnnotationDimensions(boolean adjustPanelHeight) {
- boolean modified=false;
+ protected void validateAnnotationDimensions(boolean adjustPanelHeight)
+ {
+ boolean modified = false;
int height = av.calcPanelHeight();
- int minsize=0;
+ int minsize = 0;
if (hscroll.isVisible())
{
- height += (minsize=hscroll.getPreferredSize().height);
+ height += (minsize = hscroll.getPreferredSize().height);
}
- if (apvscroll.isVisible()) {
- minsize+=apvscroll.getPreferredSize().height;
+ if (apvscroll.isVisible())
+ {
+ minsize += apvscroll.getPreferredSize().height;
}
int mheight = height;
- Dimension d=sequenceHolderPanel.getSize(),e=idPanel.getSize();
- int seqandannot=d.height-scalePanelHolder.getSize().height;
+ Dimension d = sequenceHolderPanel.getSize(), e = idPanel.getSize();
+ int seqandannot = d.height - scalePanelHolder.getSize().height;
// sets initial preferred height
- if ((height+40) > seqandannot / 2)
+ if ((height + 40) > seqandannot / 2)
{
height = seqandannot / 2;
}
if (!adjustPanelHeight)
{
// maintain same window layout whilst updating sliders
- height=annotationPanelHolder.getSize().height;
+ height = annotationPanelHolder.getSize().height;
}
-
- if (seqandannot-height<5)
+
+ if (seqandannot - height < 5)
{
height = seqandannot;
}
- annotationPanel.setSize(new Dimension(d.width,height));
- alabels.setSize(new Dimension(e.width,height));
+ annotationPanel.setSize(new Dimension(d.width, height));
+ alabels.setSize(new Dimension(e.width, height));
annotationSpaceFillerHolder.setSize(new Dimension(e.width, height));
annotationPanelHolder.setSize(new Dimension(d.width, height));
- seqPanelHolder.setSize(d.width,seqandannot-height);
- seqPanel.seqCanvas.setSize(d.width, seqPanel.seqCanvas.getSize().height);
- int s=apvscroll.getValue();
- if (s>mheight-height)
+ seqPanelHolder.setSize(d.width, seqandannot - height);
+ seqPanel.seqCanvas
+ .setSize(d.width, seqPanel.seqCanvas.getSize().height);
+ int s = apvscroll.getValue();
+ if (s > mheight - height)
{
s = 0;
}
annotationPanel.setScrollOffset(apvscroll.getValue());
alabels.setScrollOffset(apvscroll.getValue());
}
-
+
public void setWrapAlignment(boolean wrap)
{
av.startSeq = 0;
{
width = av.getColumnSelection().findColumnPosition(width);
}
- if (x<0) { x = 0; };
+ if (x < 0)
+ {
+ x = 0;
+ }
+ ;
hextent = seqPanel.seqCanvas.getSize().width / av.charWidth;
vextent = seqPanel.seqCanvas.getSize().height / av.charHeight;
-
+
if (hextent > width)
{
hextent = width;
if ((hextent + x) > width)
{
- System.err.println("hextent was "+hextent+" and x was "+x);
+ System.err.println("hextent was " + hextent + " and x was " + x);
x = width - hextent;
}
if (x < 0)
{
- System.err.println("x was "+x);
+ System.err.println("x was " + x);
x = 0;
}
}
sendViewPosition();
-
}
public void adjustmentValueChanged(AdjustmentEvent evt)
sendViewPosition();
}
+
private void sendViewPosition()
{
- StructureSelectionManager.getStructureSelectionManager(av.applet).sendViewPosition(this, av.startRes, av.endRes, av.startSeq, av.endSeq);
+ StructureSelectionManager.getStructureSelectionManager(av.applet)
+ .sendViewPosition(this, av.startRes, av.endRes, av.startSeq,
+ av.endSeq);
}
public void paintAlignment(boolean updateOverview)
if (updateOverview)
{
jalview.structure.StructureSelectionManager
- .getStructureSelectionManager(av.applet).sequenceColoursChanged(this);
+ .getStructureSelectionManager(av.applet)
+ .sequenceColoursChanged(this);
if (overviewPanel != null)
{
invalidate();
Dimension d = idPanel.idCanvas.getSize();
idPanel.idCanvas.setSize(d.width, seqPanel.seqCanvas.getSize().height);
-
+
if (av.getWrapAlignment())
{
int maxwidth = av.getAlignment().getWidth();
// idPanelHolder.setPreferredSize(new Dimension(70, 10));
this.setLayout(borderLayout7);
- //sequenceHolderPanel.setPreferredSize(new Dimension(150, 150));
+ // sequenceHolderPanel.setPreferredSize(new Dimension(150, 150));
sequenceHolderPanel.setLayout(borderLayout3);
seqPanelHolder.setLayout(borderLayout1);
scalePanelHolder.setBackground(Color.white);
{
updateAnnotation(applyGlobalSettings, false);
}
- public void updateAnnotation(boolean applyGlobalSettings, boolean preserveNewGroupSettings)
+
+ public void updateAnnotation(boolean applyGlobalSettings,
+ boolean preserveNewGroupSettings)
{
- av.updateGroupAnnotationSettings(applyGlobalSettings, preserveNewGroupSettings);
+ av.updateGroupAnnotationSettings(applyGlobalSettings,
+ preserveNewGroupSettings);
adjustAnnotationHeight();
}
{
return av.getAlignment();
}
+
@Override
public StructureSelectionManager getStructureSelectionManager()
{
- return StructureSelectionManager.getStructureSelectionManager(av.applet);
+ return StructureSelectionManager
+ .getStructureSelectionManager(av.applet);
}
+
@Override
public void raiseOOMWarning(String string, OutOfMemoryError error)
{
// TODO: JAL-960
- System.err.println("Out of memory whilst '"+string+"'");
+ System.err.println("Out of memory whilst '" + string + "'");
error.printStackTrace();
}
if (av.getAlignment().getGroups() != null)
{
oldgroupColours = new Hashtable();
- for (SequenceGroup sg: ap.av.getAlignment().getGroups())
+ for (SequenceGroup sg : ap.av.getAlignment().getGroups())
{
if (sg.cs != null)
{
}
setDefaultMinMax();
-
+
if (oldcs instanceof AnnotationColourGradient)
{
AnnotationColourGradient acg = (AnnotationColourGradient) oldcs;
currentColours.setState(acg.predefinedColours);
- if (!acg.predefinedColours) {
+ if (!acg.predefinedColours)
+ {
minColour.setBackground(acg.getMinColour());
maxColour.setBackground(acg.getMaxColour());
}
{
AnnotationColourGradient acg = (AnnotationColourGradient) oldcs;
annotations.select(acg.getAnnotation());
- switch (acg.getAboveThreshold()) {
+ switch (acg.getAboveThreshold())
+ {
case AnnotationColourGradient.NO_THRESHOLD:
- threshold.select("No Threshold");
+ threshold.select("No Threshold");
break;
case AnnotationColourGradient.ABOVE_THRESHOLD:
- threshold.select("Above Threshold");
+ threshold.select("Above Threshold");
break;
case AnnotationColourGradient.BELOW_THRESHOLD:
threshold.select("Below Threshold");
break;
- default:
- throw new Error("Implementation error: don't know about threshold setting for current AnnotationColourGradient.");
+ default:
+ throw new Error(
+ "Implementation error: don't know about threshold setting for current AnnotationColourGradient.");
}
thresholdIsMin.setState(acg.thresholdIsMinMax);
- thresholdValue.setText(""+acg.getAnnotationThreshold());
+ thresholdValue.setText("" + acg.getAnnotationThreshold());
}
adjusting = false;
private void setDefaultMinMax()
{
- minColour.setBackground(av.applet.getDefaultColourParameter("ANNOTATIONCOLOUR_MIN",Color.orange));
- maxColour.setBackground(av.applet.getDefaultColourParameter("ANNOTATIONCOLOUR_MAX",Color.red));
+ minColour.setBackground(av.applet.getDefaultColourParameter(
+ "ANNOTATIONCOLOUR_MIN", Color.orange));
+ maxColour.setBackground(av.applet.getDefaultColourParameter(
+ "ANNOTATIONCOLOUR_MAX", Color.red));
}
+
public AnnotationColourChooser()
{
try
defColours.setLabel("Defaults");
defColours.addActionListener(this);
-
+
annotations.addItemListener(this);
thresholdValue.addActionListener(this);
slider.setBackground(Color.white);
- slider.setPreferredSize(new Dimension(193,21));
+ slider.setPreferredSize(new Dimension(193, 21));
slider.setEnabled(false);
- thresholdValue.setPreferredSize(new Dimension(79,22));
+ thresholdValue.setPreferredSize(new Dimension(79, 22));
thresholdValue.setEnabled(false);
thresholdValue.setColumns(5);
currentColours.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
thresholdIsMin.setLabel("Threshold is min/max");
this.setLayout(borderLayout1);
-
+
jPanel1.setBackground(Color.white);
-
+
jPanel2.setLayout(new FlowLayout());
jPanel2.setBackground(Color.white);
threshold.addItemListener(this);
jPanel4.setLayout(new BorderLayout());
jPanel4.setBackground(Color.white);
-
jPanel1.add(ok);
jPanel1.add(cancel);
-
+
jPanel2.add(annotations);
jPanel2.add(currentColours);
jPanel2.add(minColour);
jPanel2.add(maxColour);
-
-
+
jPanel4.add(thresholdIsMin, BorderLayout.WEST);
jPanel4.add(slider, BorderLayout.CENTER);
jPanel4.add(thresholdValue, BorderLayout.EAST);
-
+
Panel jPanel34 = new Panel();
jPanel34.setLayout(new BorderLayout());
jPanel34.setBackground(Color.white);
jPanel34.add(jPanel2, BorderLayout.NORTH);
jPanel34.add(threshold, BorderLayout.WEST);
jPanel3.add(defColours);
- jPanel34.add(jPanel3, BorderLayout.EAST);
+ jPanel34.add(jPanel3, BorderLayout.EAST);
jPanel34.add(jPanel4, BorderLayout.SOUTH);
-
+
this.add(jPanel34, java.awt.BorderLayout.CENTER);
this.add(jPanel1, java.awt.BorderLayout.SOUTH);
-
+
}
Choice annotations = new Choice();
Button ok = new Button();
Button cancel = new Button();
-
+
Button defColours = new Button();
Panel jPanel1 = new Panel();
}
else if (evt.getSource() == defColours)
{
- defColour_actionPerformed();
+ defColour_actionPerformed();
}
else if (evt.getSource() == ok)
{
new UserDefinedColours(this, "Max Colour", maxColour.getBackground());
}
}
+
public void defColour_actionPerformed()
{
setDefaultMinMax();
maxColour.repaint();
changeColour();
}
+
void changeColour()
{
// Check if combobox is still adjusting
if (av.getAlignment().getGroups() != null)
{
- for (SequenceGroup sg:ap.av.getAlignment().getGroups())
+ for (SequenceGroup sg : ap.av.getAlignment().getGroups())
{
-
+
if (sg.cs == null)
{
continue;
av.setGlobalColourScheme(oldcs);
if (av.getAlignment().getGroups() != null)
{
- for (SequenceGroup sg:ap.av.getAlignment().getGroups())
+ for (SequenceGroup sg : ap.av.getAlignment().getGroups())
{
Object cs = oldgroupColours.get(sg);
if (cs instanceof ColourSchemeI)
int getSelectedRow(int y)
{
int row = -2;
- AlignmentAnnotation[] aa = ap.av.getAlignment().getAlignmentAnnotation();
+ AlignmentAnnotation[] aa = ap.av.getAlignment()
+ .getAlignmentAnnotation();
if (aa == null)
{
if (row > -1)
{
- ParseHtmlBodyAndLinks phb = new ParseHtmlBodyAndLinks(av.getAlignment().getAlignmentAnnotation()[row].getDescription(true), true, "\n");
+ ParseHtmlBodyAndLinks phb = new ParseHtmlBodyAndLinks(
+ av.getAlignment().getAlignmentAnnotation()[row]
+ .getDescription(true),
+ true, "\n");
if (tooltip == null)
{
tooltip = new Tooltip(phb.getNonHtmlContent(), this);
int end = getSelectedRow(evt.getY() + scrollOffset);
- if (start>-1 && start != end)
+ if (start > -1 && start != end)
{
// Swap these annotations
AlignmentAnnotation startAA = ap.av.getAlignment()
{
return;
}
- dragCancelled=false;
+ dragCancelled = false;
// todo: move below to mouseClicked ?
selectedRow = getSelectedRow(evt.getY() + scrollOffset);
- AlignmentAnnotation[] aa = ap.av.getAlignment().getAlignmentAnnotation();
+ AlignmentAnnotation[] aa = ap.av.getAlignment()
+ .getAlignmentAnnotation();
// DETECT RIGHT MOUSE BUTTON IN AWT
if ((evt.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
// ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
}
});
-
+
popup.add(cprofl);
final CheckboxMenuItem cprofn = new CheckboxMenuItem(
- "Normalise Group Logo", aa[selectedRow].groupRef.isNormaliseSequenceLogo());
+ "Normalise Group Logo",
+ aa[selectedRow].groupRef.isNormaliseSequenceLogo());
cprofn.addItemListener(new ItemListener()
{
public void itemStateChanged(ItemEvent e)
// can be
// updated.
av.setShowConsensusHistogram(chist.getState());
- ap.alignFrame.showConsensusHistogram.setState(chist.getState()); // TODO: implement ap.updateGUI()/alignFrame.updateGUI for applet
+ ap.alignFrame.showConsensusHistogram.setState(chist
+ .getState()); // TODO: implement
+ // ap.updateGUI()/alignFrame.updateGUI
+ // for applet
ap.repaint();
// ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
}
// can be
// updated.
av.setShowSequenceLogo(cprof.getState());
- ap.alignFrame.showSequenceLogo.setState(cprof.getState()); // TODO: implement ap.updateGUI()/alignFrame.updateGUI for applet
+ ap.alignFrame.showSequenceLogo.setState(cprof.getState()); // TODO:
+ // implement
+ // ap.updateGUI()/alignFrame.updateGUI
+ // for
+ // applet
ap.repaint();
// ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
}
// can be
// updated.
av.setShowSequenceLogo(true);
- ap.alignFrame.normSequenceLogo.setState(cprofn.getState()); // TODO: implement ap.updateGUI()/alignFrame.updateGUI for applet
+ ap.alignFrame.normSequenceLogo.setState(cprofn.getState()); // TODO:
+ // implement
+ // ap.updateGUI()/alignFrame.updateGUI
+ // for
+ // applet
av.setNormaliseSequenceLogo(cprofn.getState());
ap.repaint();
// ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
{
int w = getSize().width;
int h = getSize().height;
- if (image == null || w != image.getWidth(this) || h!=image.getHeight(this) )
+ if (image == null || w != image.getWidth(this)
+ || h != image.getHeight(this))
{
image = createImage(w, ap.annotationPanel.getSize().height);
}
import jalview.renderer.AnnotationRenderer;
import jalview.renderer.AwtRenderPanelI;
-public class AnnotationPanel extends Panel implements AwtRenderPanelI, AdjustmentListener,
- ActionListener, MouseListener, MouseMotionListener
+public class AnnotationPanel extends Panel implements AwtRenderPanelI,
+ AdjustmentListener, ActionListener, MouseListener,
+ MouseMotionListener
{
AlignViewport av;
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
}
String label = "";
- if (av.getColumnSelection() != null && av.getColumnSelection().size() > 0
+ if (av.getColumnSelection() != null
+ && av.getColumnSelection().size() > 0
&& anot[av.getColumnSelection().getMin()] != null)
label = anot[av.getColumnSelection().getMin()].displayCharacter;
item = new MenuItem(STEM);
item.addActionListener(this);
pop.add(item);
- } else {
+ }
+ else
+ {
item = new MenuItem(HELIX);
item.addActionListener(this);
pop.add(item);
}
return height;
}
+
/**
- * calculate the height for visible annotation, revalidating bounds where necessary
- * ABSTRACT GUI METHOD
+ * calculate the height for visible annotation, revalidating bounds where
+ * necessary ABSTRACT GUI METHOD
+ *
* @return total height of annotation
*/
Dimension d = getSize();
imgWidth = d.width;
// (av.endRes - av.startRes + 1) * av.charWidth;
- if (imgWidth<1 || d.height<1)
+ if (imgWidth < 1 || d.height < 1)
{
return;
}
- if (image == null || imgWidth != image.getWidth(this) || d.height != image.getHeight(this))
+ if (image == null || imgWidth != image.getWidth(this)
+ || d.height != image.getHeight(this))
{
image = createImage(imgWidth, d.height);
gg = image.getGraphics();
public void fastPaint(int horizontal)
{
- if (horizontal == 0 || av.getAlignment().getAlignmentAnnotation() == null
+ if (horizontal == 0
+ || av.getAlignment().getAlignmentAnnotation() == null
|| av.getAlignment().getAlignmentAnnotation().length < 1)
{
repaint();
/**
* DOCUMENT ME!
- *
+ *
* @param g
* DOCUMENT ME!
* @param startRes
CheckboxMenuItem seqColour = new CheckboxMenuItem("By Sequence", true);
CheckboxMenuItem jmolColour = new CheckboxMenuItem("Using Jmol", false);
-
+
MenuItem chain = new MenuItem("By Chain");
MenuItem charge = new MenuItem("Charge & Cysteine");
MenuItem turn = new MenuItem("Turn Propensity");
MenuItem buried = new MenuItem("Buried Index");
-
+
MenuItem purinepyrimidine = new MenuItem("Purine/Pyrimidine");
MenuItem user = new MenuItem("User Defined Colours");
RenderPanel renderPanel;
AlignmentPanel ap;
+
ArrayList _aps = new ArrayList();
String fileLoadingError;
AlignmentPanel ap, String protocol)
{
this.ap = ap;
- jmb = new AppletJmolBinding(this, ap.getStructureSelectionManager(), new PDBEntry[]
- { pdbentry }, new SequenceI[][]
- { seq }, new String[][]
- { chains }, protocol);
+ jmb = new AppletJmolBinding(this, ap.getStructureSelectionManager(),
+ new PDBEntry[]
+ { pdbentry }, new SequenceI[][]
+ { seq }, new String[][]
+ { chains }, protocol);
jmb.setColourBySequence(true);
if (pdbentry.getId() == null || pdbentry.getId().length() < 1)
{
}
String alreadyMapped = StructureSelectionManager
- .getStructureSelectionManager(ap.av.applet).alreadyMappedToFile(
- pdbentry.getId());
+ .getStructureSelectionManager(ap.av.applet)
+ .alreadyMappedToFile(pdbentry.getId());
MCview.PDBfile reader = null;
if (alreadyMapped != null)
{
- reader = StructureSelectionManager.getStructureSelectionManager(ap.av.applet)
- .setMapping(seq, chains, pdbentry.getFile(), protocol);
+ reader = StructureSelectionManager.getStructureSelectionManager(
+ ap.av.applet).setMapping(seq, chains, pdbentry.getFile(),
+ protocol);
// PROMPT USER HERE TO ADD TO NEW OR EXISTING VIEW?
// FOR NOW, LETS JUST OPEN A NEW WINDOW
}
buried.addActionListener(this);
purinepyrimidine.addActionListener(this);
user.addActionListener(this);
-
+
jmolHelp.addActionListener(this);
coloursMenu.add(seqColour);
{
for (int s = 0; s < jmb.pdbentry.length; s++)
{
- sb.append(jmb.printMapping(
- jmb.pdbentry[s].getFile()));
+ sb.append(jmb.printMapping(jmb.pdbentry[s].getFile()));
sb.append("\n");
}
cap.setText(sb.toString());
setEnabled(buried);
jmb.setJalviewColourScheme(new BuriedColourScheme());
}
- else if(evt.getSource() == purinepyrimidine)
+ else if (evt.getSource() == purinepyrimidine)
{
- jmb.setJalviewColourScheme(new PurinePyrimidineColourScheme());
+ jmb.setJalviewColourScheme(new PurinePyrimidineColourScheme());
}
else if (evt.getSource() == user)
{
}
/**
- * tick or untick the seqColour menu entry or jmoColour entry depending upon if it was selected
- * or not.
+ * tick or untick the seqColour menu entry or jmoColour entry depending upon
+ * if it was selected or not.
*
* @param itm
*/
{
setEnabled(jmolColour);
jmb.setColourBySequence(false);
- } else
- if (evt.getSource() == seqColour)
+ }
+ else if (evt.getSource() == seqColour)
{
setEnabled(seqColour);
jmb.colourBySequence(ap.av.getShowSequenceFeatures(), ap);
public AlignmentPanel getAlignmentPanelFor(AlignmentI alignment)
{
- for (int i=0;i<_aps.size();i++)
+ for (int i = 0; i < _aps.size(); i++)
{
- if (((AlignmentPanel)_aps.get(i)).av.getAlignment()==alignment)
+ if (((AlignmentPanel) _aps.get(i)).av.getAlignment() == alignment)
{
- return ((AlignmentPanel)_aps.get(i));
+ return ((AlignmentPanel) _aps.get(i));
}
}
return ap;
*/
private AppletJmol appletJmolBinding;
- public AppletJmolBinding(AppletJmol appletJmol, StructureSelectionManager sSm, PDBEntry[] pdbentry,
+ public AppletJmolBinding(AppletJmol appletJmol,
+ StructureSelectionManager sSm, PDBEntry[] pdbentry,
SequenceI[][] seq, String[][] chains, String protocol)
{
super(sSm, pdbentry, seq, chains, protocol);
appletJmolBinding = appletJmol;
}
- public jalview.api.FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment)
+ public jalview.api.FeatureRenderer getFeatureRenderer(
+ AlignmentViewPanel alignment)
{
- AlignmentPanel ap = (AlignmentPanel)alignment;
+ AlignmentPanel ap = (AlignmentPanel) alignment;
if (appletJmolBinding.ap.av.showSequenceFeatures)
{
if (appletJmolBinding.fr == null)
return appletJmolBinding.fr;
}
- public jalview.api.SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment)
+ public jalview.api.SequenceRenderer getSequenceRenderer(
+ AlignmentViewPanel alignment)
{
- return new SequenceRenderer(((AlignmentPanel)alignment).av);
+ return new SequenceRenderer(((AlignmentPanel) alignment).av);
}
public void sendConsoleEcho(String strEcho)
{
jmolpopup = new JmolPopup();
- jmolpopup.initialize(viewer, translateLocale, menuName,
- asPopup);
+ jmolpopup.initialize(viewer, translateLocale, menuName, asPopup);
}
public void notifyScriptTermination(String strStatus, int msWalltime)
protected JmolAppConsoleInterface createJmolConsole(JmolViewer viewer2,
Container consolePanel, String buttonsToShow)
{
- //return new org.jmol.console.AppletConsole(viewer2, consolePanel);
- JmolAppConsoleInterface appc = new org.jmol.console.AppletConsole().getAppConsole(viewer2);
+ // return new org.jmol.console.AppletConsole(viewer2, consolePanel);
+ JmolAppConsoleInterface appc = new org.jmol.console.AppletConsole()
+ .getAppConsole(viewer2);
return appc;
}
public void releaseReferences(Object svl)
{
}
+
@Override
public void resizeInnerPanel(String data)
{
// TODO Auto-generated method stub
-
+
}
}
} catch (Exception ex)
{
- // TODO: JAL-1102 - should have a warning message in dialog, not simply overwrite the broken input data with the exception
+ // TODO: JAL-1102 - should have a warning message in dialog, not simply
+ // overwrite the broken input data with the exception
textarea.setText("Could not parse Newick file!\n" + ex);
return;
}
else
{
// file valid but didn't get added to alignment for some reason
- alignFrame.statusBar.setText("Failed to add T-Coffee scores: "+(tcf.getWarningMessage()!=null ? tcf.getWarningMessage():""));
+ alignFrame.statusBar.setText("Failed to add T-Coffee scores: "
+ + (tcf.getWarningMessage() != null ? tcf
+ .getWarningMessage() : ""));
}
}
else
if (!alignFrame.parseFeaturesFile(textarea.getText(),
jalview.io.AppletFormatAdapter.PASTE))
{
- alignFrame.statusBar.setText("Couldn't parse pasted text as a valid annotation, feature, GFF, or T-Coffee score file.");
+ alignFrame.statusBar
+ .setText("Couldn't parse pasted text as a valid annotation, feature, GFF, or T-Coffee score file.");
}
}
}
PDBEntry[] pdbentry, SequenceI[][] seq, String[][] chains,
String protocol)
{
- super(alframe.alignPanel.getStructureSelectionManager(), pdbentry, seq, chains, protocol);
+ super(alframe.alignPanel.getStructureSelectionManager(), pdbentry, seq,
+ chains, protocol);
}
public ExtJmol(JmolViewer viewer, AlignmentPanel alignPanel,
public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment)
{
- AlignmentPanel ap = (AlignmentPanel)alignment;
+ AlignmentPanel ap = (AlignmentPanel) alignment;
if (ap.av.showSequenceFeatures)
{
return ap.getFeatureRenderer();
public SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment)
{
- return ((AlignmentPanel)alignment).getSequenceRenderer();
+ return ((AlignmentPanel) alignment).getSequenceRenderer();
}
public void notifyScriptTermination(String strStatus, int msWalltime)
public void releaseReferences(Object svl)
{
// TODO Auto-generated method stub
-
+
}
}
featureGroups = fr.featureGroups;
featureColours = fr.featureColours;
transparency = fr.transparency;
- if (av!=null && fr.av!=null && fr.av!=av)
+ if (av != null && fr.av != null && fr.av != av)
{
- if (fr.av.featuresDisplayed!=null)
+ if (fr.av.featuresDisplayed != null)
{
- if (av.featuresDisplayed==null)
+ if (av.featuresDisplayed == null)
{
av.featuresDisplayed = new Hashtable();
- } else {
+ }
+ else
+ {
av.featuresDisplayed.clear();
}
- Enumeration en=fr.av.featuresDisplayed.keys();
+ Enumeration en = fr.av.featuresDisplayed.keys();
while (en.hasMoreElements())
{
av.featuresDisplayed.put(en.nextElement(), Boolean.TRUE);
av.featuresDisplayed = new Hashtable();
Vector allfeatures = new Vector();
minmax = new Hashtable();
- AlignmentI alignment=av.getAlignment();
+ AlignmentI alignment = av.getAlignment();
for (int i = 0; i < alignment.getHeight(); i++)
{
SequenceFeature[] features = alignment.getSequenceAt(i)
}
}
- ArrayList<String> hiddenGroups=new ArrayList<String>();
+ ArrayList<String> hiddenGroups = new ArrayList<String>();
+
/**
* analyse alignment for groups and hash tables (used to be embedded in
* FeatureSettings.setTableData)
{
featureGroups = new Hashtable();
}
- hiddenGroups =new ArrayList<String>();
+ hiddenGroups = new ArrayList<String>();
hiddenGroups.addAll(featureGroups.keySet());
ArrayList allFeatures = new ArrayList();
ArrayList allGroups = new ArrayList();
SequenceFeature[] tmpfeatures;
String group;
- AlignmentI alignment=av.getAlignment();
+ AlignmentI alignment = av.getAlignment();
for (int i = 0; i < alignment.getHeight(); i++)
{
if (alignment.getSequenceAt(i).getSequenceFeatures() == null)
Vector allFeatures = new Vector();
SequenceFeature[] tmpfeatures;
String group;
- AlignmentI alignment=av.getAlignment();
+ AlignmentI alignment = av.getAlignment();
for (int i = 0; i < alignment.getHeight(); i++)
{
if (alignment.getSequenceAt(i).getSequenceFeatures() == null)
rdrw = true;
groupPanel.removeAll();
}
- // TODO: JAL-964 - smoothly incorporate new group entries if panel already displayed and new groups present
+ // TODO: JAL-964 - smoothly incorporate new group entries if panel already
+ // displayed and new groups present
Enumeration gps = fr.featureGroups.keys();
while (gps.hasMoreElements())
{
SequenceFeature[] tmpfeatures;
String group = null, type;
Vector visibleChecks = new Vector();
- AlignmentI alignment=av.getAlignment();
+ AlignmentI alignment = av.getAlignment();
for (int i = 0; i < alignment.getHeight(); i++)
{
if (alignment.getSequenceAt(i).getSequenceFeatures() == null)
ap.alignFrame.statusBar.setText("Finished searching.");
resIndex = -1;
seqIndex = 0;
- } else {
+ }
+ else
+ {
if (findAll)
{
String message = (idMatch.size() > 0) ? "" + idMatch.size()
frame.setVisible(false);
}
- private Font lastSelected=null;
- private int lastSelStyle=0;
- private int lastSelSize=0;
+ private Font lastSelected = null;
+
+ private int lastSelStyle = 0;
+
+ private int lastSelSize = 0;
+
/**
* DOCUMENT ME!
*/
void changeFont()
{
- if (lastSelected==null)
+ if (lastSelected == null)
{
// initialise with original font
- lastSelected=oldFont;
- lastSelSize=oldFont.getSize();
- lastSelStyle=oldFont.getStyle();
+ lastSelected = oldFont;
+ lastSelSize = oldFont.getSize();
+ lastSelStyle = oldFont.getStyle();
}
-
+
Font newFont = new Font(fontName.getSelectedItem().toString(),
fontStyle.getSelectedIndex(), Integer.parseInt(fontSize
.getSelectedItem().toString()));
FontMetrics fm = getGraphics().getFontMetrics(newFont);
- double mw=fm.getStringBounds("M", getGraphics())
- .getWidth(),iw=fm.getStringBounds("I", getGraphics())
- .getWidth();
- if (mw<1 || iw < 1) {
- // TODO: JAL-1100
+ double mw = fm.getStringBounds("M", getGraphics()).getWidth(), iw = fm
+ .getStringBounds("I", getGraphics()).getWidth();
+ if (mw < 1 || iw < 1)
+ {
+ // TODO: JAL-1100
fontName.select(lastSelected.getName());
fontStyle.select(lastSelStyle);
- fontSize.select(""+lastSelSize);
- JVDialog d = new JVDialog(this.frame, "Invalid Font", true, 350,200);
- Panel mp=new Panel();
+ fontSize.select("" + lastSelSize);
+ JVDialog d = new JVDialog(this.frame, "Invalid Font", true, 350, 200);
+ Panel mp = new Panel();
d.cancel.setVisible(false);
mp.setLayout(new FlowLayout());
- mp.add(new Label("Font doesn't have letters defined\nso cannot be used\nwith alignment data."));
+ mp.add(new Label(
+ "Font doesn't have letters defined\nso cannot be used\nwith alignment data."));
d.setMainPanel(mp);
d.setVisible(true);
return;
ap.fontChanged();
}
// remember last selected
- lastSelected=newFont;
+ lastSelected = newFont;
}
protected void fontName_actionPerformed()
// DEFAULT LINK IS FIRST IN THE LINK LIST
int seq = alignPanel.seqPanel.findSeq(e);
SequenceI sq = av.getAlignment().getSequenceAt(seq);
- if (sq==null)
+ if (sq == null)
{
return;
}
if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
{
Sequence sq = (Sequence) av.getAlignment().getSequenceAt(seq);
-
+
// build a new links menu based on the current links + any non-positional
// features
Vector nlinks = new Vector();
{
nlinks.addElement(links.elementAt(l));
}
- SequenceFeature sf[] = sq==null ? null:sq.getSequenceFeatures();
+ SequenceFeature sf[] = sq == null ? null : sq.getSequenceFeatures();
for (int sl = 0; sf != null && sl < sf.length; sl++)
{
if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0)
for (int i = start; i <= end; i++)
{
av.getSelectionGroup().addSequence(
- av.getAlignment().getSequenceAt(i), i==end);
+ av.getAlignment().getSequenceAt(i), i == end);
}
}
if (av.hasHiddenRows())
{
- row = av.getAlignment().getHiddenSequences().findIndexWithoutHiddenSeqs(
- row);
+ row = av.getAlignment().getHiddenSequences()
+ .findIndexWithoutHiddenSeqs(row);
}
ap.setScrollValues(col, row);
int row, col, sameRow = 0, sameCol = 0;
jalview.datamodel.SequenceI seq;
boolean hiddenRow = false;
- AlignmentI alignment=av.getAlignment();
+ AlignmentI alignment = av.getAlignment();
for (row = 0; row <= sequencesHeight; row++)
{
if ((int) (row * sampleRow) == lastrow)
sameRow = 1;
}
- if (av.getAlignmentConservationAnnotation()!= null)
+ if (av.getAlignmentConservationAnnotation() != null)
{
for (col = 0; col < width; col++)
{
lastcol = (int) (col * sampleCol);
{
mg.translate(col, sequencesHeight);
- ap.annotationPanel.renderer.drawGraph(mg, av.getAlignmentConservationAnnotation(),av.getAlignmentConservationAnnotation().annotations,
+ ap.annotationPanel.renderer.drawGraph(mg,
+ av.getAlignmentConservationAnnotation(),
+ av.getAlignmentConservationAnnotation().annotations,
(int) (sampleCol) + 1, graphHeight,
(int) (col * sampleCol), (int) (col * sampleCol) + 1);
mg.translate(-col, -sequencesHeight);
{
int fullsizeWidth = av.getAlignment().getWidth() * av.getCharWidth();
int fullsizeHeight = (av.getAlignment().getHeight() + av.getAlignment()
- .getHiddenSequences().getSize()) * av.getCharHeight();
+ .getHiddenSequences().getSize())
+ * av.getCharHeight();
int startRes = av.getStartRes();
int endRes = av.getEndRes();
if (av.hasHiddenRows())
{
- startSeq = av.getAlignment().getHiddenSequences().adjustForHiddenSeqs(
- startSeq);
+ startSeq = av.getAlignment().getHiddenSequences()
+ .adjustForHiddenSeqs(startSeq);
endSeq = av.getAlignment().getHiddenSequences()
.adjustForHiddenSeqs(endSeq);
}
this.av = av;
- boolean selected=av.getSelectionGroup()!=null && av.getSelectionGroup().getSize()>0;
- AlignmentView seqstrings = av
- .getAlignmentView(selected);
+ boolean selected = av.getSelectionGroup() != null
+ && av.getSelectionGroup().getSize() > 0;
+ AlignmentView seqstrings = av.getAlignmentView(selected);
boolean nucleotide = av.getAlignment().isNucleotide();
SequenceI[] seqs;
if (!selected)
{
return;
}
-
+
int dim1 = top - xCombobox.getSelectedIndex();
int dim2 = top - yCombobox.getSelectedIndex();
int dim3 = top - zCombobox.getSelectedIndex();
/**
* DOCUMENT ME!
- *
+ *
* @author $author$
* @version $Revision$
*/
/**
* DOCUMENT ME!
- *
+ *
* @param comp
* DOCUMENT ME!
* @param al
{
if (i < comp.getHeight())
{
- // TODO: the following does not trigger any recalculation of height/etc, or maintain the dataset
+ // TODO: the following does not trigger any recalculation of
+ // height/etc, or maintain the dataset
List<SequenceI> alsq;
- synchronized (alsq=comp.getSequences()) {
+ synchronized (alsq = comp.getSequences())
+ {
alsq.add(i, a1[i]);
}
}
}
}
AlignmentPanel[] result = new AlignmentPanel[tmp.size()];
- for (int ix=0;ix<result.length;ix++) {
+ for (int ix = 0; ix < result.length; ix++)
+ {
result[ix] = (AlignmentPanel) tmp.elementAt(ix);
}
}
else
{
- seqs = ap.av.getSelectionGroup().getSequencesInOrder(ap.av.getAlignment());
+ seqs = ap.av.getSelectionGroup().getSequencesInOrder(
+ ap.av.getAlignment());
}
float scores[][] = new float[seqs.length][seqs.length];
height = originalSequences.length;
- redundancy = AlignSeq.computeRedundancyMatrix(originalSequences, omitHidden, start, end, false);
+ redundancy = AlignSeq.computeRedundancyMatrix(originalSequences,
+ omitHidden, start, end, false);
label.setText("Enter the redundancy threshold");
slider.setVisible(true);
applyButton.setEnabled(true);
EditCommand cut = new EditCommand("Remove Redundancy",
EditCommand.CUT, deleted, 0, width, ap.av.getAlignment());
- AlignmentI alignment=ap.av.getAlignment();
+ AlignmentI alignment = ap.av.getAlignment();
for (int i = 0; i < del.size(); i++)
{
alignment.deleteSequence(deleted[i]);
ap.alignFrame.addHistoryItem(cut);
PaintRefresher.Refresh(this, ap.av.getSequenceSetId(), true, true);
-// ap.av.firePropertyChange("alignment", null, ap.av.getAlignment()
-// .getSequences());
+ // ap.av.firePropertyChange("alignment", null, ap.av.getAlignment()
+ // .getSequences());
}
}
if (found != null)
{
- // TODO: applet PCA is not associatable with multi-panels - only parent view
+ // TODO: applet PCA is not associatable with multi-panels - only parent
+ // view
if (av.getSelectionGroup() != null)
{
av.getSelectionGroup().addOrRemove(found, true);
{
av.hideColumns(res, res);
if (av.getSelectionGroup() != null
- && av.getSelectionGroup().getSize() == av.getAlignment()
- .getHeight())
+ && av.getSelectionGroup().getSize() == av
+ .getAlignment().getHeight())
{
av.setSelectionGroup(null);
}
String mask = "0";
int maxWidth = 0;
int tmp;
- AlignmentI alignment=av.getAlignment();
+ AlignmentI alignment = av.getAlignment();
for (int i = 0; i < alignment.getHeight(); i++)
{
tmp = alignment.getSequenceAt(i).getEnd();
{
if ((bottom == -1)
&& (i >= alHeight || !group.getSequences(null)
- .contains(av.getAlignment().getSequenceAt(i + 1))))
+ .contains(
+ av.getAlignment().getSequenceAt(i + 1))))
{
bottom = sy + av.charHeight;
}
break;
}
- group = (SequenceGroup) av.getAlignment().getGroups().get(
- groupIndex);
+ group = (SequenceGroup) av.getAlignment().getGroups()
+ .get(groupIndex);
} while (groupIndex < av.getAlignment().getGroups().size());
}
{
seqCanvas.cursorX += dx;
seqCanvas.cursorY += dy;
- if (av.hasHiddenColumns() && !av.getColumnSelection().isVisible(seqCanvas.cursorX))
+ if (av.hasHiddenColumns()
+ && !av.getColumnSelection().isVisible(seqCanvas.cursorX))
{
int original = seqCanvas.cursorX - dx;
int maxWidth = av.getAlignment().getWidth();
SequenceI sequence = av.getAlignment().getSequenceAt(findSeq(evt));
if (evt.getClickCount() > 1)
{
- if (av.getSelectionGroup()!=null && av.getSelectionGroup().getSize() == 1
+ if (av.getSelectionGroup() != null
+ && av.getSelectionGroup().getSize() == 1
&& av.getSelectionGroup().getEndRes()
- av.getSelectionGroup().getStartRes() < 2)
{
y -= hgap;
- seq = Math.min((y % cHeight) / av.getCharHeight(),
- av.getAlignment().getHeight() - 1);
+ seq = Math.min((y % cHeight) / av.getCharHeight(), av.getAlignment()
+ .getHeight() - 1);
if (seq < 0)
{
seq = -1;
}
else
{
- seq = Math.min((y / av.getCharHeight()) + av.getStartSeq(),
- av.getAlignment().getHeight() - 1);
+ seq = Math.min((y / av.getCharHeight()) + av.getStartSeq(), av
+ .getAlignment().getHeight() - 1);
if (seq < 0)
{
seq = -1;
if (groupEditing)
{
- SequenceI[] groupSeqs = sg.getSequences(av.getHiddenRepSequences()).toArray(new SequenceI[0]);
+ SequenceI[] groupSeqs = sg.getSequences(av.getHiddenRepSequences())
+ .toArray(new SequenceI[0]);
// drag to right
if (insertGap)
{
blank = true;
- for (SequenceI gs:groupSeqs)
+ for (SequenceI gs : groupSeqs)
{
for (int j = 0; j < startres - lastres; j++)
{
- if (!jalview.util.Comparison.isGap(gs
- .getCharAt(fixedRight - j)))
+ if (!jalview.util.Comparison.isGap(gs.getCharAt(fixedRight
+ - j)))
{
blank = false;
break;
{
if (sg.getSize() == av.getAlignment().getHeight())
{
- if ((av.hasHiddenColumns() && startres < av.getColumnSelection()
- .getHiddenBoundaryRight(startres)))
+ if ((av.hasHiddenColumns() && startres < av
+ .getColumnSelection().getHiddenBoundaryRight(startres)))
{
endEditing();
return;
int alWidth = av.getAlignment().getWidth();
if (av.hasHiddenRows())
{
- int hwidth = av.getAlignment().getHiddenSequences().getWidth();
+ int hwidth = av.getAlignment().getHiddenSequences()
+ .getWidth();
if (hwidth > alWidth)
{
alWidth = hwidth;
// / Are we able to delete?
// ie are all columns blank?
- for (SequenceI gs:groupSeqs)
+ for (SequenceI gs : groupSeqs)
{
for (int j = startres; j < lastres; j++)
{
editCommand.appendEdit(EditCommand.DELETE_GAP, seq, blankColumn, 1,
av.getAlignment(), true);
- editCommand.appendEdit(EditCommand.INSERT_GAP, seq, j, 1, av.getAlignment(),
- true);
+ editCommand.appendEdit(EditCommand.INSERT_GAP, seq, j, 1,
+ av.getAlignment(), true);
}
void deleteChar(int j, SequenceI[] seq, int fixedColumn)
{
- editCommand.appendEdit(EditCommand.DELETE_GAP, seq, j, 1, av.getAlignment(),
- true);
+ editCommand.appendEdit(EditCommand.DELETE_GAP, seq, j, 1,
+ av.getAlignment(), true);
editCommand.appendEdit(EditCommand.INSERT_GAP, seq, fixedColumn, 1,
av.getAlignment(), true);
// state
if (stretchGroup.cs != null)
{
- stretchGroup.cs.alignmentChanged(stretchGroup,av.getHiddenRepSequences());
-
+ stretchGroup.cs.alignmentChanged(stretchGroup,
+ av.getHiddenRepSequences());
+
if (stretchGroup.cs.conservationApplied())
{
SliderPanel.setConservationSlider(ap, stretchGroup.cs,
dragDirection = -1;
}
- while ((y != oldSeq) && (oldSeq > -1) && (y < av.getAlignment().getHeight()))
+ while ((y != oldSeq) && (oldSeq > -1)
+ && (y < av.getAlignment().getHeight()))
{
// This routine ensures we don't skip any sequences, as the
// selection is quite slow.
if (av.getSelectionGroup() == null || !av.isSelectionGroupChanged(true))
{
SequenceGroup sgroup = null;
- if (seqsel != null && seqsel.getSize()>0)
+ if (seqsel != null && seqsel.getSize() > 0)
{
if (av.getAlignment() == null)
{
}
repaint = av.isSelectionGroupChanged(true);
}
- if (copycolsel && (av.getColumnSelection() == null || !av.isColSelChanged(true)))
+ if (copycolsel
+ && (av.getColumnSelection() == null || !av
+ .isColSelChanged(true)))
{
// the current selection is unset or from a previous message
// so import the new colsel.
}
repaint |= av.isColSelChanged(true);
}
- if (copycolsel && av.hasHiddenColumns()
- && (av.getColumnSelection() == null || av.getColumnSelection().getHiddenColumns() == null))
+ if (copycolsel
+ && av.hasHiddenColumns()
+ && (av.getColumnSelection() == null || av.getColumnSelection()
+ .getHiddenColumns() == null))
{
System.err.println("Bad things");
}
/**
* scroll to the given row/column - or nearest visible location
+ *
* @param row
* @param column
*/
public void scrollTo(int row, int column)
{
-
- row = row<0 ? ap.av.startSeq : row;
- column = column<0 ? ap.av.startRes : column;
+
+ row = row < 0 ? ap.av.startSeq : row;
+ column = column < 0 ? ap.av.startRes : column;
ap.scrollTo(column, column, row, true, true);
}
+
/**
* scroll to the given row - or nearest visible location
+ *
* @param row
*/
public void scrollToRow(int row)
{
-
- row = row<0 ? ap.av.startSeq : row;
+
+ row = row < 0 ? ap.av.startSeq : row;
ap.scrollTo(ap.av.startRes, ap.av.startRes, row, true, true);
}
+
/**
* scroll to the given column - or nearest visible location
+ *
* @param column
*/
public void scrollToColumn(int column)
{
-
- column = column<0 ? ap.av.startRes : column;
- ap.scrollTo( column, column, ap.av.startSeq, true, true);
+
+ column = column < 0 ? ap.av.startRes : column;
+ ap.scrollTo(column, column, ap.av.startSeq, true, true);
}
}
{
// cheat - use this if we have a consensus for each group: s =
// getDisplayChar(currentSequenceGroup.getConsensus(), i, s, '.');
- s = getDisplayChar(av.getAlignmentConsensusAnnotation(), i, s, '.');
+ s = getDisplayChar(av.getAlignmentConsensusAnnotation(), i, s,
+ '.');
}
}
else
}
if (av.getShowUnconserved())
{
- s = getDisplayChar(av.getAlignmentConsensusAnnotation(), i, s, '.');
+ s = getDisplayChar(av.getAlignmentConsensusAnnotation(), i, s,
+ '.');
}
}
toChange = cs;
}
- do
+ do
{
if (allGroups != null)
{
toChange.setThreshold(i, ap.av.getIgnoreGapsConsensus());
}
- } while (allGroups!=null && allGroups.hasNext());
+ } while (allGroups != null && allGroups.hasNext());
ap.seqPanel.seqCanvas.repaint();
SequenceNode highlightNode;
AlignmentPanel ap;
+
public TreeCanvas(AlignmentPanel ap, ScrollPane scroller)
{
this.ap = ap;
// Colour selected leaves differently
SequenceGroup selected = av.getSelectionGroup();
if (selected != null
- && selected.getSequences(null).contains(
- node.element()))
+ && selected.getSequences(null).contains(node.element()))
{
g.setColor(Color.gray);
// for
// scrollbar
- float wscale = (width - labelLength - offx * 2)
- / tree.getMaxHeight();
+ float wscale = (width - labelLength - offx * 2) / tree.getMaxHeight();
SequenceNode top = tree.getTopNode();
g.setColor(Color.gray);
}
- int x = (int) (threshold
- * (getSize().width - labelLength - 2 * offx) + offx);
+ int x = (int) (threshold * (getSize().width - labelLength - 2 * offx) + offx);
g.drawLine(x, 0, x, getSize().height);
}
}
else
{
- cs = ColourSchemeProperty.getColour(sg, ColourSchemeProperty.getColourName(av
- .getGlobalColourScheme()));
+ cs = ColourSchemeProperty.getColour(sg, ColourSchemeProperty
+ .getColourName(av.getGlobalColourScheme()));
}
// cs is null if shading is an annotationColourGradient
- if (cs!=null)
+ if (cs != null)
{
cs.setThreshold(av.getGlobalColourScheme().getThreshold(),
av.getIgnoreGapsConsensus());
}
}
- // TODO: cs used to be initialized with a sequence collection and recalcConservation called automatically
+ // TODO: cs used to be initialized with a sequence collection and
+ // recalcConservation called automatically
// instead we set it manually - recalc called after updateAnnotation
- sg.cs=cs;
+ sg.cs = cs;
sg.setName("JTreeGroup:" + sg.hashCode());
sg.setIdColour(col);
TreeCanvas treeCanvas;
NJTree tree;
+
AlignmentPanel ap;
AlignViewport av;
{
return tree;
}
-
- public void finalize() throws Throwable {
- ap=null;
- av=null;
+
+ public void finalize() throws Throwable
+ {
+ ap = null;
+ av = null;
super.finalize();
}
{
int start, end;
SequenceI[] seqs;
- boolean selview=(av
- .getSelectionGroup() != null) && (av
- .getSelectionGroup().getSize()>1);
+ boolean selview = (av.getSelectionGroup() != null)
+ && (av.getSelectionGroup().getSize() > 1);
AlignmentView seqStrings = av.getAlignmentView(selview);
if (!selview)
{
{
start = av.getSelectionGroup().getStartRes();
end = av.getSelectionGroup().getEndRes() + 1;
- seqs = av.getSelectionGroup().getSequencesInOrder(av.getAlignment());
+ seqs = av.getSelectionGroup().getSequencesInOrder(
+ av.getAlignment());
}
tree = new NJTree(seqs, seqStrings, type, pwtype, start, end);
* </li>
* <li>SHOW_WSDISCOVERY_ERRORS (true) Controls if the web service URL discovery
* warning dialog box is displayed.</li>
- * <li>ANNOTATIONCOLOUR_MIN (orange) Shade used for minimum value of annotation when shading by annotation</li>
- * <li>ANNOTATIONCOLOUR_MAX (red) Shade used for maximum value of annotation when shading by annotation</li>
- * <li>www.jalview.org (http://www.jalview.org) a property enabling all HTTP requests to be redirected to a mirror of http://www.jalview.org</li>
+ * <li>ANNOTATIONCOLOUR_MIN (orange) Shade used for minimum value of annotation
+ * when shading by annotation</li>
+ * <li>ANNOTATIONCOLOUR_MAX (red) Shade used for maximum value of annotation
+ * when shading by annotation</li>
+ * <li>www.jalview.org (http://www.jalview.org) a property enabling all HTTP
+ * requests to be redirected to a mirror of http://www.jalview.org</li>
*
- * <li>FIGURE_AUTOIDWIDTH (false) Expand the left hand column of an exported alignment figure to accommodate even the longest sequence ID or annotation label.</li>
- * <li>FIGURE_FIXEDIDWIDTH Specifies the width to use for the left-hand column when exporting an alignment as a figure (setting FIGURE_AUTOIDWIDTH to true will override this).</li>
+ * <li>FIGURE_AUTOIDWIDTH (false) Expand the left hand column of an exported
+ * alignment figure to accommodate even the longest sequence ID or annotation
+ * label.</li>
+ * <li>FIGURE_FIXEDIDWIDTH Specifies the width to use for the left-hand column
+ * when exporting an alignment as a figure (setting FIGURE_AUTOIDWIDTH to true
+ * will override this).</li>
* <li></li>
*
* </ul>
* Deprecated settings:
* <ul>
- * * <li>DISCOVERY_START - Boolean - controls if discovery services are queried on
+ * *
+ * <li>DISCOVERY_START - Boolean - controls if discovery services are queried on
* startup (JWS1 services only)</li>
- * <li>DISCOVERY_URLS - comma separated list of Discovery Service endpoints. (JWS1 services only)</li>
- * <li>SHOW_JWS1_SERVICES (true) enable or disable the original Jalview 2 services in the desktop GUI</li>
- * <li>ENABLE_RSBS_EDITOR (false for 2.7 release) enable or disable RSBS editing panel in web service preferences</li>
+ * <li>DISCOVERY_URLS - comma separated list of Discovery Service endpoints.
+ * (JWS1 services only)</li>
+ * <li>SHOW_JWS1_SERVICES (true) enable or disable the original Jalview 2
+ * services in the desktop GUI</li>
+ * <li>ENABLE_RSBS_EDITOR (false for 2.7 release) enable or disable RSBS editing
+ * panel in web service preferences</li>
* </ul>
+ *
* @author $author$
* @version $Revision$
*/
/** Default file is ~/.jalview_properties */
static String propertiesFile;
- private static boolean propsAreReadOnly=false;
+ private static boolean propsAreReadOnly = false;
public static void initLogger()
{
{
propertiesFile = System.getProperty("user.home") + File.separatorChar
+ ".jalview_properties";
- } else {
+ }
+ else
+ {
// don't corrupt the file we've been given.
propsAreReadOnly = true;
}
if (getDefault("USE_PROXY", false))
{
- String proxyServer=getDefault("PROXY_SERVER", ""), proxyPort=getDefault("PROXY_PORT", "8080");
-
- System.out.println("Using proxyServer: "
- + proxyServer + " proxyPort: "
- + proxyPort );
-
+ String proxyServer = getDefault("PROXY_SERVER", ""), proxyPort = getDefault(
+ "PROXY_PORT", "8080");
+
+ System.out.println("Using proxyServer: " + proxyServer
+ + " proxyPort: " + proxyPort);
+
System.setProperty("http.proxyHost", proxyServer);
System.setProperty("http.proxyPort", proxyPort);
}
// LOAD THE AUTHORS FROM THE authors.props file
try
{
- String authorDetails = "jar:".concat(Cache.class.getProtectionDomain()
- .getCodeSource().getLocation().toString()
- .concat("!/authors.props"));
+ String authorDetails = "jar:".concat(Cache.class
+ .getProtectionDomain().getCodeSource().getLocation()
+ .toString().concat("!/authors.props"));
java.net.URL localJarFileURL = new java.net.URL(authorDetails);
{
System.setProperty("sun.net.client.defaultConnectTimeout",
"5000");
- java.net.URL url = new java.net.URL(
- Cache.getDefault("www.jalview.org", "http://www.jalview.org")+"/webstart/jalview.jnlp");
+ java.net.URL url = new java.net.URL(Cache.getDefault(
+ "www.jalview.org", "http://www.jalview.org")
+ + "/webstart/jalview.jnlp");
BufferedReader in = new BufferedReader(new InputStreamReader(
url.openStream()));
String line = null;
/**
* get the user's default colour if available
+ *
* @param property
* @param defcolour
* @return
public static Color getDefaultColour(String property, Color defcolour)
{
String colprop = getProperty(property);
- if (colprop==null) {
+ if (colprop == null)
+ {
return defcolour;
}
- Color col = jalview.schemes.ColourSchemeProperty.getAWTColorFromName(colprop);
- if (col==null)
+ Color col = jalview.schemes.ColourSchemeProperty
+ .getAWTColorFromName(colprop);
+ if (col == null)
{
- try {
+ try
+ {
col = new jalview.schemes.UserColourScheme(colprop).findColour('A');
} catch (Exception ex)
{
- log.warn("Couldn't parse '"+colprop+"' as a colour for "+property);
- col=null;
+ log.warn("Couldn't parse '" + colprop + "' as a colour for "
+ + property);
+ col = null;
}
}
- return (col==null) ? defcolour: col;
+ return (col == null) ? defcolour : col;
}
/**
* store a colour as a Jalview user default property
+ *
* @param property
- * @param colour
+ * @param colour
*/
public static void setColourProperty(String property, Color colour)
{
- setProperty(property, jalview.util.Format
- .getHexString(colour));
+ setProperty(property, jalview.util.Format.getHexString(colour));
}
- public static final DateFormat date_format = SimpleDateFormat.getDateTimeInstance();
+ public static final DateFormat date_format = SimpleDateFormat
+ .getDateTimeInstance();
/**
* store a date in a jalview property
+ *
* @param string
* @param time
*/
{
setProperty(property, date_format.format(time));
}
+
/**
* read a date stored in a jalview property
+ *
* @param property
* @return valid date as stored by setDateProperty, or null
*
public static Date getDateProperty(String property)
{
String val = getProperty(property);
- if (val!=null)
+ if (val != null)
{
- try {
+ try
+ {
return date_format.parse(val);
} catch (Exception ex)
{
- System.err.println("Invalid or corrupt date in property '"+property+"' : value was '"+val+"'");
+ System.err.println("Invalid or corrupt date in property '"
+ + property + "' : value was '" + val + "'");
}
}
return null;
}
/**
- * get and parse a property as an integer. send any parsing problems to System.err
+ * get and parse a property as an integer. send any parsing problems to
+ * System.err
+ *
* @param property
* @return null or Integer
*/
public static Integer getIntegerProperty(String property)
{
- String val=getProperty(property);
- if (val!=null && (val=val.trim()).length()>0)
+ String val = getProperty(property);
+ if (val != null && (val = val.trim()).length() > 0)
{
- try {
+ try
+ {
return Integer.valueOf(val);
} catch (NumberFormatException x)
{
- System.err.println("Invalid integer in property '"+property+"' (value was '"+val+"')");
+ System.err.println("Invalid integer in property '" + property
+ + "' (value was '" + val + "')");
}
}
return null;
}
- private static DasSourceRegistryI sourceRegistry=null;
+ private static DasSourceRegistryI sourceRegistry = null;
+
/**
* initialise and ..
+ *
* @return instance of the das source registry
*/
public static DasSourceRegistryI getDasSourceRegistry()
{
- if (sourceRegistry==null)
+ if (sourceRegistry == null)
{
sourceRegistry = new DasSourceRegistry();
}
boolean seqlimits = suffix.equalsIgnoreCase("true");\r
if (alf.viewport.getSelectionGroup() != null)\r
{\r
- // JBPNote: getSelectionAsNewSequence behaviour has changed - this method now returns a full copy of sequence data\r
+ // JBPNote: getSelectionAsNewSequence behaviour has changed - this\r
+ // method now returns a full copy of sequence data\r
// TODO consider using getSequenceSelection instead here\r
String reply = new AppletFormatAdapter().formatSequences(format,\r
new Alignment(alf.viewport.getSelectionAsNewSequence()),\r
* jalview.bin.JalviewLiteJsApi#loadAnnotationFrom(jalview.appletgui.AlignFrame\r
* , java.lang.String)\r
*/\r
- public boolean loadFeaturesFrom(AlignFrame alf, String features, boolean autoenabledisplay)\r
+ public boolean loadFeaturesFrom(AlignFrame alf, String features,\r
+ boolean autoenabledisplay)\r
{\r
- return alf.parseFeaturesFile(features, AppletFormatAdapter.PASTE, autoenabledisplay);\r
+ return alf.parseFeaturesFile(features, AppletFormatAdapter.PASTE,\r
+ autoenabledisplay);\r
}\r
\r
-\r
/*\r
* (non-Javadoc)\r
* \r
\r
if (protocol == jalview.io.AppletFormatAdapter.PASTE)\r
{\r
- newAlignFrame.setTitle("Sequences from " + applet.getDocumentBase());\r
+ newAlignFrame.setTitle("Sequences from "\r
+ + applet.getDocumentBase());\r
}\r
\r
newAlignFrame.statusBar.setText("Successfully loaded file " + file);\r
}\r
}\r
\r
-\r
/*\r
* Try to load T-Coffee score file\r
*/\r
String sScoreFile = applet.getParameter("scoreFile");\r
- if( sScoreFile != null && !"".equals(sScoreFile) ) {\r
- try {\r
- if (debug) {\r
- System.err.println("Attempting to load T-COFFEE score file from the scoreFile parameter");\r
- }\r
- if (!newAlignFrame.loadScoreFile(sScoreFile)) {\r
- System.err.println("Failed to parse T-COFFEE parameter as a valid score file ('"+sScoreFile+"')");\r
- }\r
- }catch( Exception e ) {\r
- System.err.printf("Cannot read score file: '%s'. Cause: %s \n", sScoreFile, e.getMessage());\r
+ if (sScoreFile != null && !"".equals(sScoreFile))\r
+ {\r
+ try\r
+ {\r
+ if (debug)\r
+ {\r
+ System.err\r
+ .println("Attempting to load T-COFFEE score file from the scoreFile parameter");\r
+ }\r
+ if (!newAlignFrame.loadScoreFile(sScoreFile))\r
+ {\r
+ System.err\r
+ .println("Failed to parse T-COFFEE parameter as a valid score file ('"\r
+ + sScoreFile + "')");\r
}\r
+ } catch (Exception e)\r
+ {\r
+ System.err.printf("Cannot read score file: '%s'. Cause: %s \n",\r
+ sScoreFile, e.getMessage());\r
+ }\r
}\r
- \r
\r
// ///////////////////////////\r
// modify display of features\r
- // we do this before any features have been loaded, ensuring any hidden groups are hidden when features first displayed\r
+ // we do this before any features have been loaded, ensuring any hidden\r
+ // groups are hidden when features first displayed\r
//\r
// hide specific groups\r
- // \r
+ //\r
String param = applet.getParameter("hidefeaturegroups");\r
if (param != null)\r
{\r
- newAlignFrame.setFeatureGroupState(separatorListToArray(param), false); \r
-// applet.setFeatureGroupStateOn(newAlignFrame, param, false);\r
+ newAlignFrame.setFeatureGroupState(separatorListToArray(param),\r
+ false);\r
+ // applet.setFeatureGroupStateOn(newAlignFrame, param, false);\r
}\r
// show specific groups\r
param = applet.getParameter("showfeaturegroups");\r
if (param != null)\r
{\r
- newAlignFrame.setFeatureGroupState(separatorListToArray(param), true); \r
-// applet.setFeatureGroupStateOn(newAlignFrame, param, true);\r
+ newAlignFrame.setFeatureGroupState(separatorListToArray(param),\r
+ true);\r
+ // applet.setFeatureGroupStateOn(newAlignFrame, param, true);\r
}\r
// and now load features\r
param = applet.getParameter("features");\r
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Alignment implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _annotation.
- */
- private jalview.binding.Annotation _annotation;
-
- /**
- * Field _sequenceSet.
- */
- private jalview.binding.SequenceSet _sequenceSet;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Alignment() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'annotation'.
- *
- * @return the value of field 'Annotation'.
- */
- public jalview.binding.Annotation getAnnotation(
- ) {
- return this._annotation;
- }
-
- /**
- * Returns the value of field 'sequenceSet'.
- *
- * @return the value of field 'SequenceSet'.
- */
- public jalview.binding.SequenceSet getSequenceSet(
- ) {
- return this._sequenceSet;
- }
-
- /**
- * 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 'annotation'.
- *
- * @param annotation the value of field 'annotation'.
- */
- public void setAnnotation(
- final jalview.binding.Annotation annotation) {
- this._annotation = annotation;
- }
-
- /**
- * Sets the value of field 'sequenceSet'.
- *
- * @param sequenceSet the value of field 'sequenceSet'.
- */
- public void setSequenceSet(
- final jalview.binding.SequenceSet sequenceSet) {
- this._sequenceSet = sequenceSet;
- }
-
- /**
- * 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.binding.Alignment
- */
- public static jalview.binding.Alignment unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.Alignment) Unmarshaller.unmarshal(jalview.binding.Alignment.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);
+public class Alignment implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _annotation.
+ */
+ private jalview.binding.Annotation _annotation;
+
+ /**
+ * Field _sequenceSet.
+ */
+ private jalview.binding.SequenceSet _sequenceSet;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Alignment()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'annotation'.
+ *
+ * @return the value of field 'Annotation'.
+ */
+ public jalview.binding.Annotation getAnnotation()
+ {
+ return this._annotation;
+ }
+
+ /**
+ * Returns the value of field 'sequenceSet'.
+ *
+ * @return the value of field 'SequenceSet'.
+ */
+ public jalview.binding.SequenceSet getSequenceSet()
+ {
+ return this._sequenceSet;
+ }
+
+ /**
+ * 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 'annotation'.
+ *
+ * @param annotation
+ * the value of field 'annotation'.
+ */
+ public void setAnnotation(final jalview.binding.Annotation annotation)
+ {
+ this._annotation = annotation;
+ }
+
+ /**
+ * Sets the value of field 'sequenceSet'.
+ *
+ * @param sequenceSet
+ * the value of field 'sequenceSet'.
+ */
+ public void setSequenceSet(final jalview.binding.SequenceSet sequenceSet)
+ {
+ this._sequenceSet = sequenceSet;
+ }
+
+ /**
+ * 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.binding.Alignment
+ */
+ public static jalview.binding.Alignment unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.Alignment) Unmarshaller.unmarshal(
+ jalview.binding.Alignment.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Annotation implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _graph.
- */
- private boolean _graph;
-
- /**
- * keeps track of state for field: _graph
- */
- private boolean _has_graph;
-
- /**
- * Field _graphType.
- */
- private int _graphType;
-
- /**
- * keeps track of state for field: _graphType
- */
- private boolean _has_graphType;
-
- /**
- * Field _annotationElementList.
- */
- private java.util.Vector _annotationElementList;
-
- /**
- * Field _label.
- */
- private java.lang.String _label;
-
- /**
- * Field _description.
- */
- private java.lang.String _description;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Annotation() {
- super();
- this._annotationElementList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vAnnotationElement
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAnnotationElement(
- final jalview.binding.AnnotationElement vAnnotationElement)
- throws java.lang.IndexOutOfBoundsException {
- this._annotationElementList.addElement(vAnnotationElement);
- }
-
- /**
- *
- *
- * @param index
- * @param vAnnotationElement
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAnnotationElement(
- final int index,
- final jalview.binding.AnnotationElement vAnnotationElement)
- throws java.lang.IndexOutOfBoundsException {
- this._annotationElementList.add(index, vAnnotationElement);
- }
-
- /**
- */
- public void deleteGraph(
- ) {
- this._has_graph= false;
- }
-
- /**
- */
- public void deleteGraphType(
- ) {
- this._has_graphType= false;
- }
-
- /**
- * Method enumerateAnnotationElement.
- *
- * @return an Enumeration over all
- * jalview.binding.AnnotationElement elements
- */
- public java.util.Enumeration enumerateAnnotationElement(
- ) {
- return this._annotationElementList.elements();
- }
-
- /**
- * Method getAnnotationElement.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.AnnotationElement
- * at the given index
- */
- public jalview.binding.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.binding.AnnotationElement) _annotationElementList.get(index);
- }
-
- /**
- * Method getAnnotationElement.Returns the contents of the
- * collection in an Array. <p>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 <i>know</i> that the Array returned is of
- * exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.AnnotationElement[] getAnnotationElement(
- ) {
- jalview.binding.AnnotationElement[] array = new jalview.binding.AnnotationElement[0];
- return (jalview.binding.AnnotationElement[]) this._annotationElementList.toArray(array);
- }
-
- /**
- * Method getAnnotationElementCount.
- *
- * @return the size of this collection
- */
- public int getAnnotationElementCount(
- ) {
- return this._annotationElementList.size();
- }
-
- /**
- * Returns the value of field 'description'.
- *
- * @return the value of field 'Description'.
- */
- public java.lang.String getDescription(
- ) {
- return this._description;
- }
-
- /**
- * Returns the value of field 'graph'.
- *
- * @return the value of field 'Graph'.
- */
- public boolean getGraph(
- ) {
- return this._graph;
+public class Annotation implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _graph.
+ */
+ private boolean _graph;
+
+ /**
+ * keeps track of state for field: _graph
+ */
+ private boolean _has_graph;
+
+ /**
+ * Field _graphType.
+ */
+ private int _graphType;
+
+ /**
+ * keeps track of state for field: _graphType
+ */
+ private boolean _has_graphType;
+
+ /**
+ * Field _annotationElementList.
+ */
+ private java.util.Vector _annotationElementList;
+
+ /**
+ * Field _label.
+ */
+ private java.lang.String _label;
+
+ /**
+ * Field _description.
+ */
+ private java.lang.String _description;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Annotation()
+ {
+ super();
+ this._annotationElementList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vAnnotationElement
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAnnotationElement(
+ final jalview.binding.AnnotationElement vAnnotationElement)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._annotationElementList.addElement(vAnnotationElement);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotationElement
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAnnotationElement(final int index,
+ final jalview.binding.AnnotationElement vAnnotationElement)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._annotationElementList.add(index, vAnnotationElement);
+ }
+
+ /**
+ */
+ public void deleteGraph()
+ {
+ this._has_graph = false;
+ }
+
+ /**
+ */
+ public void deleteGraphType()
+ {
+ this._has_graphType = false;
+ }
+
+ /**
+ * Method enumerateAnnotationElement.
+ *
+ * @return an Enumeration over all jalview.binding.AnnotationElement elements
+ */
+ public java.util.Enumeration enumerateAnnotationElement()
+ {
+ return this._annotationElementList.elements();
+ }
+
+ /**
+ * Method getAnnotationElement.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.AnnotationElement at the given
+ * index
+ */
+ public jalview.binding.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) + "]");
}
- /**
- * Returns the value of field 'graphType'.
- *
- * @return the value of field 'GraphType'.
- */
- public int getGraphType(
- ) {
- return this._graphType;
- }
-
- /**
- * Returns the value of field 'label'.
- *
- * @return the value of field 'Label'.
- */
- public java.lang.String getLabel(
- ) {
- return this._label;
- }
-
- /**
- * Method hasGraph.
- *
- * @return true if at least one Graph has been added
- */
- public boolean hasGraph(
- ) {
- return this._has_graph;
- }
-
- /**
- * Method hasGraphType.
- *
- * @return true if at least one GraphType has been added
- */
- public boolean hasGraphType(
- ) {
- return this._has_graphType;
- }
-
- /**
- * Returns the value of field 'graph'.
- *
- * @return the value of field 'Graph'.
- */
- public boolean isGraph(
- ) {
- return this._graph;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllAnnotationElement(
- ) {
- this._annotationElementList.clear();
- }
-
- /**
- * Method removeAnnotationElement.
- *
- * @param vAnnotationElement
- * @return true if the object was removed from the collection.
- */
- public boolean removeAnnotationElement(
- final jalview.binding.AnnotationElement vAnnotationElement) {
- boolean removed = _annotationElementList.remove(vAnnotationElement);
- return removed;
- }
-
- /**
- * Method removeAnnotationElementAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.AnnotationElement removeAnnotationElementAt(
- final int index) {
- java.lang.Object obj = this._annotationElementList.remove(index);
- return (jalview.binding.AnnotationElement) obj;
- }
-
- /**
- *
- *
- * @param index
- * @param vAnnotationElement
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setAnnotationElement(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._annotationElementList.set(index, vAnnotationElement);
- }
-
- /**
- *
- *
- * @param vAnnotationElementArray
- */
- public void setAnnotationElement(
- final jalview.binding.AnnotationElement[] vAnnotationElementArray) {
- //-- copy array
- _annotationElementList.clear();
-
- for (int i = 0; i < vAnnotationElementArray.length; i++) {
- this._annotationElementList.add(vAnnotationElementArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'description'.
- *
- * @param description the value of field 'description'.
- */
- public void setDescription(
- final java.lang.String description) {
- this._description = description;
+ return (jalview.binding.AnnotationElement) _annotationElementList
+ .get(index);
+ }
+
+ /**
+ * Method getAnnotationElement.Returns the contents of the collection in an
+ * Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.AnnotationElement[] getAnnotationElement()
+ {
+ jalview.binding.AnnotationElement[] array = new jalview.binding.AnnotationElement[0];
+ return (jalview.binding.AnnotationElement[]) this._annotationElementList
+ .toArray(array);
+ }
+
+ /**
+ * Method getAnnotationElementCount.
+ *
+ * @return the size of this collection
+ */
+ public int getAnnotationElementCount()
+ {
+ return this._annotationElementList.size();
+ }
+
+ /**
+ * Returns the value of field 'description'.
+ *
+ * @return the value of field 'Description'.
+ */
+ public java.lang.String getDescription()
+ {
+ return this._description;
+ }
+
+ /**
+ * Returns the value of field 'graph'.
+ *
+ * @return the value of field 'Graph'.
+ */
+ public boolean getGraph()
+ {
+ return this._graph;
+ }
+
+ /**
+ * Returns the value of field 'graphType'.
+ *
+ * @return the value of field 'GraphType'.
+ */
+ public int getGraphType()
+ {
+ return this._graphType;
+ }
+
+ /**
+ * Returns the value of field 'label'.
+ *
+ * @return the value of field 'Label'.
+ */
+ public java.lang.String getLabel()
+ {
+ return this._label;
+ }
+
+ /**
+ * Method hasGraph.
+ *
+ * @return true if at least one Graph has been added
+ */
+ public boolean hasGraph()
+ {
+ return this._has_graph;
+ }
+
+ /**
+ * Method hasGraphType.
+ *
+ * @return true if at least one GraphType has been added
+ */
+ public boolean hasGraphType()
+ {
+ return this._has_graphType;
+ }
+
+ /**
+ * Returns the value of field 'graph'.
+ *
+ * @return the value of field 'Graph'.
+ */
+ public boolean isGraph()
+ {
+ return this._graph;
+ }
+
+ /**
+ * 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;
}
-
- /**
- * Sets the value of field 'graph'.
- *
- * @param graph the value of field 'graph'.
- */
- public void setGraph(
- final boolean graph) {
- this._graph = graph;
- this._has_graph = true;
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ */
+ public void removeAllAnnotationElement()
+ {
+ this._annotationElementList.clear();
+ }
+
+ /**
+ * Method removeAnnotationElement.
+ *
+ * @param vAnnotationElement
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAnnotationElement(
+ final jalview.binding.AnnotationElement vAnnotationElement)
+ {
+ boolean removed = _annotationElementList.remove(vAnnotationElement);
+ return removed;
+ }
+
+ /**
+ * Method removeAnnotationElementAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.AnnotationElement removeAnnotationElementAt(
+ final int index)
+ {
+ java.lang.Object obj = this._annotationElementList.remove(index);
+ return (jalview.binding.AnnotationElement) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotationElement
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setAnnotationElement(final int index,
+ final jalview.binding.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) + "]");
}
- /**
- * Sets the value of field 'graphType'.
- *
- * @param graphType the value of field 'graphType'.
- */
- public void setGraphType(
- final int graphType) {
- this._graphType = graphType;
- this._has_graphType = true;
- }
-
- /**
- * Sets the value of field 'label'.
- *
- * @param label the value of field 'label'.
- */
- public void setLabel(
- final java.lang.String label) {
- this._label = label;
- }
-
- /**
- * 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.binding.Annotation
- */
- public static jalview.binding.Annotation unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.Annotation) Unmarshaller.unmarshal(jalview.binding.Annotation.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);
+ this._annotationElementList.set(index, vAnnotationElement);
+ }
+
+ /**
+ *
+ *
+ * @param vAnnotationElementArray
+ */
+ public void setAnnotationElement(
+ final jalview.binding.AnnotationElement[] vAnnotationElementArray)
+ {
+ // -- copy array
+ _annotationElementList.clear();
+
+ for (int i = 0; i < vAnnotationElementArray.length; i++)
+ {
+ this._annotationElementList.add(vAnnotationElementArray[i]);
}
+ }
+
+ /**
+ * Sets the value of field 'description'.
+ *
+ * @param description
+ * the value of field 'description'.
+ */
+ public void setDescription(final java.lang.String description)
+ {
+ this._description = description;
+ }
+
+ /**
+ * Sets the value of field 'graph'.
+ *
+ * @param graph
+ * the value of field 'graph'.
+ */
+ public void setGraph(final boolean graph)
+ {
+ this._graph = graph;
+ this._has_graph = true;
+ }
+
+ /**
+ * Sets the value of field 'graphType'.
+ *
+ * @param graphType
+ * the value of field 'graphType'.
+ */
+ public void setGraphType(final int graphType)
+ {
+ this._graphType = graphType;
+ this._has_graphType = true;
+ }
+
+ /**
+ * Sets the value of field 'label'.
+ *
+ * @param label
+ * the value of field 'label'.
+ */
+ public void setLabel(final java.lang.String label)
+ {
+ this._label = label;
+ }
+
+ /**
+ * 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.binding.Annotation
+ */
+ public static jalview.binding.Annotation unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.Annotation) Unmarshaller.unmarshal(
+ jalview.binding.Annotation.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class AnnotationElement implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _position.
- */
- private int _position;
-
- /**
- * keeps track of state for field: _position
- */
- private boolean _has_position;
-
- /**
- * Field _displayCharacter.
- */
- private java.lang.String _displayCharacter;
-
- /**
- * Field _description.
- */
- private java.lang.String _description;
-
- /**
- * Field _secondaryStructure.
- */
- private java.lang.String _secondaryStructure;
-
- /**
- * Field _value.
- */
- private float _value;
-
- /**
- * keeps track of state for field: _value
- */
- private boolean _has_value;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public AnnotationElement() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deletePosition(
- ) {
- this._has_position= false;
- }
-
- /**
- */
- public void deleteValue(
- ) {
- this._has_value= false;
- }
-
- /**
- * Returns the value of field 'description'.
- *
- * @return the value of field 'Description'.
- */
- public java.lang.String getDescription(
- ) {
- return this._description;
- }
-
- /**
- * Returns the value of field 'displayCharacter'.
- *
- * @return the value of field 'DisplayCharacter'.
- */
- public java.lang.String getDisplayCharacter(
- ) {
- return this._displayCharacter;
- }
-
- /**
- * Returns the value of field 'position'.
- *
- * @return the value of field 'Position'.
- */
- public int getPosition(
- ) {
- return this._position;
- }
-
- /**
- * Returns the value of field 'secondaryStructure'.
- *
- * @return the value of field 'SecondaryStructure'.
- */
- public java.lang.String getSecondaryStructure(
- ) {
- return this._secondaryStructure;
- }
-
- /**
- * Returns the value of field 'value'.
- *
- * @return the value of field 'Value'.
- */
- public float getValue(
- ) {
- return this._value;
- }
-
- /**
- * Method hasPosition.
- *
- * @return true if at least one Position has been added
- */
- public boolean hasPosition(
- ) {
- return this._has_position;
- }
-
- /**
- * Method hasValue.
- *
- * @return true if at least one Value has been added
- */
- public boolean hasValue(
- ) {
- return this._has_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 class AnnotationElement implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _position.
+ */
+ private int _position;
+
+ /**
+ * keeps track of state for field: _position
+ */
+ private boolean _has_position;
+
+ /**
+ * Field _displayCharacter.
+ */
+ private java.lang.String _displayCharacter;
+
+ /**
+ * Field _description.
+ */
+ private java.lang.String _description;
+
+ /**
+ * Field _secondaryStructure.
+ */
+ private java.lang.String _secondaryStructure;
+
+ /**
+ * Field _value.
+ */
+ private float _value;
+
+ /**
+ * keeps track of state for field: _value
+ */
+ private boolean _has_value;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public AnnotationElement()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
*/
- 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 'description'.
- *
- * @param description the value of field 'description'.
- */
- public void setDescription(
- final java.lang.String description) {
- this._description = description;
- }
-
- /**
- * Sets the value of field 'displayCharacter'.
- *
- * @param displayCharacter the value of field 'displayCharacter'
- */
- public void setDisplayCharacter(
- final java.lang.String displayCharacter) {
- this._displayCharacter = displayCharacter;
- }
-
- /**
- * Sets the value of field 'position'.
- *
- * @param position the value of field 'position'.
- */
- public void setPosition(
- final int position) {
- this._position = position;
- this._has_position = true;
- }
-
- /**
- * Sets the value of field 'secondaryStructure'.
- *
- * @param secondaryStructure the value of field
- * 'secondaryStructure'.
- */
- public void setSecondaryStructure(
- final java.lang.String secondaryStructure) {
- this._secondaryStructure = secondaryStructure;
- }
-
- /**
- * Sets the value of field 'value'.
- *
- * @param value the value of field 'value'.
- */
- public void setValue(
- final float value) {
- this._value = value;
- this._has_value = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.binding.AnnotationElement
- */
- public static jalview.binding.AnnotationElement unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.AnnotationElement) Unmarshaller.unmarshal(jalview.binding.AnnotationElement.class, reader);
- }
+ public void deletePosition()
+ {
+ this._has_position = false;
+ }
- /**
- *
- *
- * @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);
+ public void deleteValue()
+ {
+ this._has_value = false;
+ }
+
+ /**
+ * Returns the value of field 'description'.
+ *
+ * @return the value of field 'Description'.
+ */
+ public java.lang.String getDescription()
+ {
+ return this._description;
+ }
+
+ /**
+ * Returns the value of field 'displayCharacter'.
+ *
+ * @return the value of field 'DisplayCharacter'.
+ */
+ public java.lang.String getDisplayCharacter()
+ {
+ return this._displayCharacter;
+ }
+
+ /**
+ * Returns the value of field 'position'.
+ *
+ * @return the value of field 'Position'.
+ */
+ public int getPosition()
+ {
+ return this._position;
+ }
+
+ /**
+ * Returns the value of field 'secondaryStructure'.
+ *
+ * @return the value of field 'SecondaryStructure'.
+ */
+ public java.lang.String getSecondaryStructure()
+ {
+ return this._secondaryStructure;
+ }
+
+ /**
+ * Returns the value of field 'value'.
+ *
+ * @return the value of field 'Value'.
+ */
+ public float getValue()
+ {
+ return this._value;
+ }
+
+ /**
+ * Method hasPosition.
+ *
+ * @return true if at least one Position has been added
+ */
+ public boolean hasPosition()
+ {
+ return this._has_position;
+ }
+
+ /**
+ * Method hasValue.
+ *
+ * @return true if at least one Value has been added
+ */
+ public boolean hasValue()
+ {
+ return this._has_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 'description'.
+ *
+ * @param description
+ * the value of field 'description'.
+ */
+ public void setDescription(final java.lang.String description)
+ {
+ this._description = description;
+ }
+
+ /**
+ * Sets the value of field 'displayCharacter'.
+ *
+ * @param displayCharacter
+ * the value of field 'displayCharacter'
+ */
+ public void setDisplayCharacter(final java.lang.String displayCharacter)
+ {
+ this._displayCharacter = displayCharacter;
+ }
+
+ /**
+ * Sets the value of field 'position'.
+ *
+ * @param position
+ * the value of field 'position'.
+ */
+ public void setPosition(final int position)
+ {
+ this._position = position;
+ this._has_position = true;
+ }
+
+ /**
+ * Sets the value of field 'secondaryStructure'.
+ *
+ * @param secondaryStructure
+ * the value of field 'secondaryStructure'.
+ */
+ public void setSecondaryStructure(
+ final java.lang.String secondaryStructure)
+ {
+ this._secondaryStructure = secondaryStructure;
+ }
+
+ /**
+ * Sets the value of field 'value'.
+ *
+ * @param value
+ * the value of field 'value'.
+ */
+ public void setValue(final float value)
+ {
+ this._value = value;
+ this._has_value = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.binding.AnnotationElement
+ */
+ public static jalview.binding.AnnotationElement unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.AnnotationElement) Unmarshaller.unmarshal(
+ jalview.binding.AnnotationElement.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Colour implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
- /**
- * Field _RGB.
- */
- private java.lang.String _RGB;
-
- /**
- * Field _minRGB.
- */
- private java.lang.String _minRGB;
-
- /**
- * loosely specified enumeration: NONE,ABOVE, or BELOW
- */
- private java.lang.String _threshType;
-
- /**
- * Field _threshold.
- */
- private float _threshold;
-
- /**
- * keeps track of state for field: _threshold
- */
- private boolean _has_threshold;
-
- /**
- * Field _max.
- */
- private float _max;
-
- /**
- * keeps track of state for field: _max
- */
- private boolean _has_max;
-
- /**
- * Field _min.
- */
- private float _min;
-
- /**
- * keeps track of state for field: _min
- */
- private boolean _has_min;
-
- /**
- * Field _colourByLabel.
- */
- private boolean _colourByLabel;
-
- /**
- * keeps track of state for field: _colourByLabel
- */
- private boolean _has_colourByLabel;
-
- /**
- * Field _autoScale.
- */
- private boolean _autoScale;
-
- /**
- * keeps track of state for field: _autoScale
- */
- private boolean _has_autoScale;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Colour() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteAutoScale(
- ) {
- this._has_autoScale= false;
- }
-
- /**
- */
- public void deleteColourByLabel(
- ) {
- this._has_colourByLabel= false;
- }
-
- /**
- */
- public void deleteMax(
- ) {
- this._has_max= false;
- }
-
- /**
- */
- public void deleteMin(
- ) {
- this._has_min= false;
- }
-
- /**
- */
- public void deleteThreshold(
- ) {
- this._has_threshold= false;
- }
-
- /**
- * Returns the value of field 'autoScale'.
- *
- * @return the value of field 'AutoScale'.
- */
- public boolean getAutoScale(
- ) {
- return this._autoScale;
- }
-
- /**
- * Returns the value of field 'colourByLabel'.
- *
- * @return the value of field 'ColourByLabel'.
- */
- public boolean getColourByLabel(
- ) {
- return this._colourByLabel;
- }
-
- /**
- * Returns the value of field 'max'.
- *
- * @return the value of field 'Max'.
- */
- public float getMax(
- ) {
- return this._max;
- }
-
- /**
- * Returns the value of field 'min'.
- *
- * @return the value of field 'Min'.
- */
- public float getMin(
- ) {
- return this._min;
- }
-
- /**
- * Returns the value of field 'minRGB'.
- *
- * @return the value of field 'MinRGB'.
- */
- public java.lang.String getMinRGB(
- ) {
- return this._minRGB;
- }
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName(
- ) {
- return this._name;
- }
-
- /**
- * Returns the value of field 'RGB'.
- *
- * @return the value of field 'RGB'.
- */
- public java.lang.String getRGB(
- ) {
- return this._RGB;
- }
-
- /**
- * Returns the value of field 'threshType'. The field
- * 'threshType' has the following description: loosely
- * specified enumeration: NONE,ABOVE, or BELOW
- *
- * @return the value of field 'ThreshType'.
- */
- public java.lang.String getThreshType(
- ) {
- return this._threshType;
- }
-
- /**
- * Returns the value of field 'threshold'.
- *
- * @return the value of field 'Threshold'.
- */
- public float getThreshold(
- ) {
- return this._threshold;
- }
-
- /**
- * Method hasAutoScale.
- *
- * @return true if at least one AutoScale has been added
- */
- public boolean hasAutoScale(
- ) {
- return this._has_autoScale;
- }
-
- /**
- * Method hasColourByLabel.
- *
- * @return true if at least one ColourByLabel has been added
- */
- public boolean hasColourByLabel(
- ) {
- return this._has_colourByLabel;
- }
-
- /**
- * Method hasMax.
- *
- * @return true if at least one Max has been added
- */
- public boolean hasMax(
- ) {
- return this._has_max;
- }
-
- /**
- * Method hasMin.
- *
- * @return true if at least one Min has been added
- */
- public boolean hasMin(
- ) {
- return this._has_min;
- }
-
- /**
- * Method hasThreshold.
- *
- * @return true if at least one Threshold has been added
- */
- public boolean hasThreshold(
- ) {
- return this._has_threshold;
- }
-
- /**
- * Returns the value of field 'autoScale'.
- *
- * @return the value of field 'AutoScale'.
- */
- public boolean isAutoScale(
- ) {
- return this._autoScale;
- }
-
- /**
- * Returns the value of field 'colourByLabel'.
- *
- * @return the value of field 'ColourByLabel'.
- */
- public boolean isColourByLabel(
- ) {
- return this._colourByLabel;
- }
-
- /**
- * 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 'autoScale'.
- *
- * @param autoScale the value of field 'autoScale'.
- */
- public void setAutoScale(
- final boolean autoScale) {
- this._autoScale = autoScale;
- this._has_autoScale = true;
- }
-
- /**
- * Sets the value of field 'colourByLabel'.
- *
- * @param colourByLabel the value of field 'colourByLabel'.
- */
- public void setColourByLabel(
- final boolean colourByLabel) {
- this._colourByLabel = colourByLabel;
- this._has_colourByLabel = true;
- }
-
- /**
- * Sets the value of field 'max'.
- *
- * @param max the value of field 'max'.
- */
- public void setMax(
- final float max) {
- this._max = max;
- this._has_max = true;
- }
-
- /**
- * Sets the value of field 'min'.
- *
- * @param min the value of field 'min'.
- */
- public void setMin(
- final float min) {
- this._min = min;
- this._has_min = true;
- }
-
- /**
- * Sets the value of field 'minRGB'.
- *
- * @param minRGB the value of field 'minRGB'.
- */
- public void setMinRGB(
- final java.lang.String minRGB) {
- this._minRGB = minRGB;
- }
-
- /**
- * Sets the value of field 'name'.
- *
- * @param name the value of field 'name'.
- */
- public void setName(
- final java.lang.String name) {
- this._name = name;
- }
-
- /**
- * Sets the value of field 'RGB'.
- *
- * @param RGB the value of field 'RGB'.
- */
- public void setRGB(
- final java.lang.String RGB) {
- this._RGB = RGB;
- }
-
- /**
- * Sets the value of field 'threshType'. The field 'threshType'
- * has the following description: loosely specified
- * enumeration: NONE,ABOVE, or BELOW
- *
- * @param threshType the value of field 'threshType'.
- */
- public void setThreshType(
- final java.lang.String threshType) {
- this._threshType = threshType;
- }
-
- /**
- * Sets the value of field 'threshold'.
- *
- * @param threshold the value of field 'threshold'.
- */
- public void setThreshold(
- final float threshold) {
- this._threshold = threshold;
- this._has_threshold = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.binding.Colour
- */
- public static jalview.binding.Colour unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.Colour) Unmarshaller.unmarshal(jalview.binding.Colour.class, reader);
- }
-
- /**
- *
- *
- * @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);
- }
+public class Colour implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _RGB.
+ */
+ private java.lang.String _RGB;
+
+ /**
+ * Field _minRGB.
+ */
+ private java.lang.String _minRGB;
+
+ /**
+ * loosely specified enumeration: NONE,ABOVE, or BELOW
+ */
+ private java.lang.String _threshType;
+
+ /**
+ * Field _threshold.
+ */
+ private float _threshold;
+
+ /**
+ * keeps track of state for field: _threshold
+ */
+ private boolean _has_threshold;
+
+ /**
+ * Field _max.
+ */
+ private float _max;
+
+ /**
+ * keeps track of state for field: _max
+ */
+ private boolean _has_max;
+
+ /**
+ * Field _min.
+ */
+ private float _min;
+
+ /**
+ * keeps track of state for field: _min
+ */
+ private boolean _has_min;
+
+ /**
+ * Field _colourByLabel.
+ */
+ private boolean _colourByLabel;
+
+ /**
+ * keeps track of state for field: _colourByLabel
+ */
+ private boolean _has_colourByLabel;
+
+ /**
+ * Field _autoScale.
+ */
+ private boolean _autoScale;
+
+ /**
+ * keeps track of state for field: _autoScale
+ */
+ private boolean _has_autoScale;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Colour()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ */
+ public void deleteAutoScale()
+ {
+ this._has_autoScale = false;
+ }
+
+ /**
+ */
+ public void deleteColourByLabel()
+ {
+ this._has_colourByLabel = false;
+ }
+
+ /**
+ */
+ public void deleteMax()
+ {
+ this._has_max = false;
+ }
+
+ /**
+ */
+ public void deleteMin()
+ {
+ this._has_min = false;
+ }
+
+ /**
+ */
+ public void deleteThreshold()
+ {
+ this._has_threshold = false;
+ }
+
+ /**
+ * Returns the value of field 'autoScale'.
+ *
+ * @return the value of field 'AutoScale'.
+ */
+ public boolean getAutoScale()
+ {
+ return this._autoScale;
+ }
+
+ /**
+ * Returns the value of field 'colourByLabel'.
+ *
+ * @return the value of field 'ColourByLabel'.
+ */
+ public boolean getColourByLabel()
+ {
+ return this._colourByLabel;
+ }
+
+ /**
+ * Returns the value of field 'max'.
+ *
+ * @return the value of field 'Max'.
+ */
+ public float getMax()
+ {
+ return this._max;
+ }
+
+ /**
+ * Returns the value of field 'min'.
+ *
+ * @return the value of field 'Min'.
+ */
+ public float getMin()
+ {
+ return this._min;
+ }
+
+ /**
+ * Returns the value of field 'minRGB'.
+ *
+ * @return the value of field 'MinRGB'.
+ */
+ public java.lang.String getMinRGB()
+ {
+ return this._minRGB;
+ }
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName()
+ {
+ return this._name;
+ }
+
+ /**
+ * Returns the value of field 'RGB'.
+ *
+ * @return the value of field 'RGB'.
+ */
+ public java.lang.String getRGB()
+ {
+ return this._RGB;
+ }
+
+ /**
+ * Returns the value of field 'threshType'. The field 'threshType' has the
+ * following description: loosely specified enumeration: NONE,ABOVE, or BELOW
+ *
+ * @return the value of field 'ThreshType'.
+ */
+ public java.lang.String getThreshType()
+ {
+ return this._threshType;
+ }
+
+ /**
+ * Returns the value of field 'threshold'.
+ *
+ * @return the value of field 'Threshold'.
+ */
+ public float getThreshold()
+ {
+ return this._threshold;
+ }
+
+ /**
+ * Method hasAutoScale.
+ *
+ * @return true if at least one AutoScale has been added
+ */
+ public boolean hasAutoScale()
+ {
+ return this._has_autoScale;
+ }
+
+ /**
+ * Method hasColourByLabel.
+ *
+ * @return true if at least one ColourByLabel has been added
+ */
+ public boolean hasColourByLabel()
+ {
+ return this._has_colourByLabel;
+ }
+
+ /**
+ * Method hasMax.
+ *
+ * @return true if at least one Max has been added
+ */
+ public boolean hasMax()
+ {
+ return this._has_max;
+ }
+
+ /**
+ * Method hasMin.
+ *
+ * @return true if at least one Min has been added
+ */
+ public boolean hasMin()
+ {
+ return this._has_min;
+ }
+
+ /**
+ * Method hasThreshold.
+ *
+ * @return true if at least one Threshold has been added
+ */
+ public boolean hasThreshold()
+ {
+ return this._has_threshold;
+ }
+
+ /**
+ * Returns the value of field 'autoScale'.
+ *
+ * @return the value of field 'AutoScale'.
+ */
+ public boolean isAutoScale()
+ {
+ return this._autoScale;
+ }
+
+ /**
+ * Returns the value of field 'colourByLabel'.
+ *
+ * @return the value of field 'ColourByLabel'.
+ */
+ public boolean isColourByLabel()
+ {
+ return this._colourByLabel;
+ }
+
+ /**
+ * 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 'autoScale'.
+ *
+ * @param autoScale
+ * the value of field 'autoScale'.
+ */
+ public void setAutoScale(final boolean autoScale)
+ {
+ this._autoScale = autoScale;
+ this._has_autoScale = true;
+ }
+
+ /**
+ * Sets the value of field 'colourByLabel'.
+ *
+ * @param colourByLabel
+ * the value of field 'colourByLabel'.
+ */
+ public void setColourByLabel(final boolean colourByLabel)
+ {
+ this._colourByLabel = colourByLabel;
+ this._has_colourByLabel = true;
+ }
+
+ /**
+ * Sets the value of field 'max'.
+ *
+ * @param max
+ * the value of field 'max'.
+ */
+ public void setMax(final float max)
+ {
+ this._max = max;
+ this._has_max = true;
+ }
+
+ /**
+ * Sets the value of field 'min'.
+ *
+ * @param min
+ * the value of field 'min'.
+ */
+ public void setMin(final float min)
+ {
+ this._min = min;
+ this._has_min = true;
+ }
+
+ /**
+ * Sets the value of field 'minRGB'.
+ *
+ * @param minRGB
+ * the value of field 'minRGB'.
+ */
+ public void setMinRGB(final java.lang.String minRGB)
+ {
+ this._minRGB = minRGB;
+ }
+
+ /**
+ * Sets the value of field 'name'.
+ *
+ * @param name
+ * the value of field 'name'.
+ */
+ public void setName(final java.lang.String name)
+ {
+ this._name = name;
+ }
+
+ /**
+ * Sets the value of field 'RGB'.
+ *
+ * @param RGB
+ * the value of field 'RGB'.
+ */
+ public void setRGB(final java.lang.String RGB)
+ {
+ this._RGB = RGB;
+ }
+
+ /**
+ * Sets the value of field 'threshType'. The field 'threshType' has the
+ * following description: loosely specified enumeration: NONE,ABOVE, or BELOW
+ *
+ * @param threshType
+ * the value of field 'threshType'.
+ */
+ public void setThreshType(final java.lang.String threshType)
+ {
+ this._threshType = threshType;
+ }
+
+ /**
+ * Sets the value of field 'threshold'.
+ *
+ * @param threshold
+ * the value of field 'threshold'.
+ */
+ public void setThreshold(final float threshold)
+ {
+ this._threshold = threshold;
+ this._has_threshold = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.binding.Colour
+ */
+ public static jalview.binding.Colour unmarshal(final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.Colour) Unmarshaller.unmarshal(
+ jalview.binding.Colour.class, reader);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Feature implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _begin.
- */
- private int _begin;
-
- /**
- * keeps track of state for field: _begin
- */
- private boolean _has_begin;
-
- /**
- * Field _end.
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
- /**
- * Field _type.
- */
- private java.lang.String _type;
-
- /**
- * Field _description.
- */
- private java.lang.String _description;
-
- /**
- * Field _status.
- */
- private java.lang.String _status;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Feature() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteBegin(
- ) {
- this._has_begin= false;
- }
-
- /**
- */
- public void deleteEnd(
- ) {
- this._has_end= false;
- }
-
- /**
- * Returns the value of field 'begin'.
- *
- * @return the value of field 'Begin'.
- */
- public int getBegin(
- ) {
- return this._begin;
- }
-
- /**
- * Returns the value of field 'description'.
- *
- * @return the value of field 'Description'.
- */
- public java.lang.String getDescription(
- ) {
- return this._description;
- }
-
- /**
- * Returns the value of field 'end'.
- *
- * @return the value of field 'End'.
- */
- public int getEnd(
- ) {
- return this._end;
- }
-
- /**
- * Returns the value of field 'status'.
- *
- * @return the value of field 'Status'.
- */
- public java.lang.String getStatus(
- ) {
- return this._status;
- }
-
- /**
- * Returns the value of field 'type'.
- *
- * @return the value of field 'Type'.
- */
- public java.lang.String getType(
- ) {
- return this._type;
- }
-
- /**
- * Method hasBegin.
- *
- * @return true if at least one Begin has been added
- */
- public boolean hasBegin(
- ) {
- return this._has_begin;
- }
-
- /**
- * Method hasEnd.
- *
- * @return true if at least one End has been added
- */
- public boolean hasEnd(
- ) {
- return this._has_end;
- }
-
- /**
- * 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 class Feature implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _begin.
+ */
+ private int _begin;
+
+ /**
+ * keeps track of state for field: _begin
+ */
+ private boolean _has_begin;
+
+ /**
+ * Field _end.
+ */
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
+
+ /**
+ * Field _type.
+ */
+ private java.lang.String _type;
+
+ /**
+ * Field _description.
+ */
+ private java.lang.String _description;
+
+ /**
+ * Field _status.
+ */
+ private java.lang.String _status;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Feature()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
*/
- 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 'begin'.
- *
- * @param begin the value of field 'begin'.
- */
- public void setBegin(
- final int begin) {
- this._begin = begin;
- this._has_begin = true;
- }
-
- /**
- * Sets the value of field 'description'.
- *
- * @param description the value of field 'description'.
- */
- public void setDescription(
- final java.lang.String description) {
- this._description = description;
- }
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end the value of field 'end'.
- */
- public void setEnd(
- final int end) {
- this._end = end;
- this._has_end = true;
- }
-
- /**
- * Sets the value of field 'status'.
- *
- * @param status the value of field 'status'.
- */
- public void setStatus(
- final java.lang.String status) {
- this._status = status;
- }
-
- /**
- * Sets the value of field 'type'.
- *
- * @param type the value of field 'type'.
- */
- public void setType(
- final java.lang.String type) {
- this._type = type;
- }
-
- /**
- * 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.binding.Feature
- */
- public static jalview.binding.Feature unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.Feature) Unmarshaller.unmarshal(jalview.binding.Feature.class, reader);
- }
+ public void deleteBegin()
+ {
+ this._has_begin = false;
+ }
- /**
- *
- *
- * @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);
+ public void deleteEnd()
+ {
+ this._has_end = false;
+ }
+
+ /**
+ * Returns the value of field 'begin'.
+ *
+ * @return the value of field 'Begin'.
+ */
+ public int getBegin()
+ {
+ return this._begin;
+ }
+
+ /**
+ * Returns the value of field 'description'.
+ *
+ * @return the value of field 'Description'.
+ */
+ public java.lang.String getDescription()
+ {
+ return this._description;
+ }
+
+ /**
+ * Returns the value of field 'end'.
+ *
+ * @return the value of field 'End'.
+ */
+ public int getEnd()
+ {
+ return this._end;
+ }
+
+ /**
+ * Returns the value of field 'status'.
+ *
+ * @return the value of field 'Status'.
+ */
+ public java.lang.String getStatus()
+ {
+ return this._status;
+ }
+
+ /**
+ * Returns the value of field 'type'.
+ *
+ * @return the value of field 'Type'.
+ */
+ public java.lang.String getType()
+ {
+ return this._type;
+ }
+
+ /**
+ * Method hasBegin.
+ *
+ * @return true if at least one Begin has been added
+ */
+ public boolean hasBegin()
+ {
+ return this._has_begin;
+ }
+
+ /**
+ * Method hasEnd.
+ *
+ * @return true if at least one End has been added
+ */
+ public boolean hasEnd()
+ {
+ return this._has_end;
+ }
+
+ /**
+ * 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 'begin'.
+ *
+ * @param begin
+ * the value of field 'begin'.
+ */
+ public void setBegin(final int begin)
+ {
+ this._begin = begin;
+ this._has_begin = true;
+ }
+
+ /**
+ * Sets the value of field 'description'.
+ *
+ * @param description
+ * the value of field 'description'.
+ */
+ public void setDescription(final java.lang.String description)
+ {
+ this._description = description;
+ }
+
+ /**
+ * Sets the value of field 'end'.
+ *
+ * @param end
+ * the value of field 'end'.
+ */
+ public void setEnd(final int end)
+ {
+ this._end = end;
+ this._has_end = true;
+ }
+
+ /**
+ * Sets the value of field 'status'.
+ *
+ * @param status
+ * the value of field 'status'.
+ */
+ public void setStatus(final java.lang.String status)
+ {
+ this._status = status;
+ }
+
+ /**
+ * Sets the value of field 'type'.
+ *
+ * @param type
+ * the value of field 'type'.
+ */
+ public void setType(final java.lang.String type)
+ {
+ this._type = type;
+ }
+
+ /**
+ * 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.binding.Feature
+ */
+ public static jalview.binding.Feature unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.Feature) Unmarshaller.unmarshal(
+ jalview.binding.Feature.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class FeatureSettings implements java.io.Serializable {
+public class FeatureSettings implements java.io.Serializable
+{
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
+ /**
+ * Field _settingList.
+ */
+ private java.util.Vector _settingList;
- /**
- * Field _settingList.
- */
- private java.util.Vector _settingList;
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+ public FeatureSettings()
+ {
+ super();
+ this._settingList = new java.util.Vector();
+ }
- //----------------/
- //- Constructors -/
- //----------------/
+ // -----------/
+ // - Methods -/
+ // -----------/
- public FeatureSettings() {
- super();
- this._settingList = new java.util.Vector();
- }
+ /**
+ *
+ *
+ * @param vSetting
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSetting(final jalview.binding.Setting vSetting)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._settingList.addElement(vSetting);
+ }
+ /**
+ *
+ *
+ * @param index
+ * @param vSetting
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSetting(final int index,
+ final jalview.binding.Setting vSetting)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._settingList.add(index, vSetting);
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ /**
+ * Method enumerateSetting.
+ *
+ * @return an Enumeration over all jalview.binding.Setting elements
+ */
+ public java.util.Enumeration enumerateSetting()
+ {
+ return this._settingList.elements();
+ }
- /**
- *
- *
- * @param vSetting
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSetting(
- final jalview.binding.Setting vSetting)
- throws java.lang.IndexOutOfBoundsException {
- this._settingList.addElement(vSetting);
+ /**
+ * Method getSetting.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Setting at the given index
+ */
+ public jalview.binding.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) + "]");
}
- /**
- *
- *
- * @param index
- * @param vSetting
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSetting(
- final int index,
- final jalview.binding.Setting vSetting)
- throws java.lang.IndexOutOfBoundsException {
- this._settingList.add(index, vSetting);
- }
+ return (jalview.binding.Setting) _settingList.get(index);
+ }
- /**
- * Method enumerateSetting.
- *
- * @return an Enumeration over all jalview.binding.Setting
- * elements
- */
- public java.util.Enumeration enumerateSetting(
- ) {
- return this._settingList.elements();
- }
+ /**
+ * Method getSetting.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Setting[] getSetting()
+ {
+ jalview.binding.Setting[] array = new jalview.binding.Setting[0];
+ return (jalview.binding.Setting[]) this._settingList.toArray(array);
+ }
- /**
- * Method getSetting.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.Setting at the
- * given index
- */
- public jalview.binding.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.binding.Setting) _settingList.get(index);
- }
+ /**
+ * Method getSettingCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSettingCount()
+ {
+ return this._settingList.size();
+ }
- /**
- * Method getSetting.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Setting[] getSetting(
- ) {
- jalview.binding.Setting[] array = new jalview.binding.Setting[0];
- return (jalview.binding.Setting[]) this._settingList.toArray(array);
+ /**
+ * 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;
+ }
- /**
- * Method getSettingCount.
- *
- * @return the size of this collection
- */
- public int getSettingCount(
- ) {
- return this._settingList.size();
- }
+ /**
+ *
+ *
+ * @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);
+ }
- /**
- * 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 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);
+ }
- /**
- *
- *
- * @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);
- }
+ public void removeAllSetting()
+ {
+ this._settingList.clear();
+ }
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
+ /**
+ * Method removeSetting.
+ *
+ * @param vSetting
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSetting(final jalview.binding.Setting vSetting)
+ {
+ boolean removed = _settingList.remove(vSetting);
+ return removed;
+ }
- /**
- */
- public void removeAllSetting(
- ) {
- this._settingList.clear();
- }
+ /**
+ * Method removeSettingAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Setting removeSettingAt(final int index)
+ {
+ java.lang.Object obj = this._settingList.remove(index);
+ return (jalview.binding.Setting) obj;
+ }
- /**
- * Method removeSetting.
- *
- * @param vSetting
- * @return true if the object was removed from the collection.
- */
- public boolean removeSetting(
- final jalview.binding.Setting vSetting) {
- boolean removed = _settingList.remove(vSetting);
- return removed;
+ /**
+ *
+ *
+ * @param index
+ * @param vSetting
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setSetting(final int index,
+ final jalview.binding.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) + "]");
}
- /**
- * Method removeSettingAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Setting removeSettingAt(
- final int index) {
- java.lang.Object obj = this._settingList.remove(index);
- return (jalview.binding.Setting) obj;
- }
+ this._settingList.set(index, vSetting);
+ }
- /**
- *
- *
- * @param index
- * @param vSetting
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setSetting(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._settingList.set(index, vSetting);
- }
+ /**
+ *
+ *
+ * @param vSettingArray
+ */
+ public void setSetting(final jalview.binding.Setting[] vSettingArray)
+ {
+ // -- copy array
+ _settingList.clear();
- /**
- *
- *
- * @param vSettingArray
- */
- public void setSetting(
- final jalview.binding.Setting[] vSettingArray) {
- //-- copy array
- _settingList.clear();
-
- for (int i = 0; i < vSettingArray.length; i++) {
- this._settingList.add(vSettingArray[i]);
- }
+ for (int i = 0; i < vSettingArray.length; i++)
+ {
+ this._settingList.add(vSettingArray[i]);
}
+ }
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.binding.FeatureSettings
- */
- public static jalview.binding.FeatureSettings unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.FeatureSettings) Unmarshaller.unmarshal(jalview.binding.FeatureSettings.class, reader);
- }
+ /**
+ * 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.binding.FeatureSettings
+ */
+ public static jalview.binding.FeatureSettings unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.FeatureSettings) Unmarshaller.unmarshal(
+ jalview.binding.FeatureSettings.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Features extends Feature
-implements java.io.Serializable
+public class Features extends Feature implements java.io.Serializable
{
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Features() {
- super();
- }
-
+ public Features()
+ {
+ super();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * 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;
+ /**
+ * 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 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);
- }
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
- /**
- * Method 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.binding.Feature
- */
- public static jalview.binding.Feature unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.Feature) Unmarshaller.unmarshal(jalview.binding.Features.class, reader);
- }
+ /**
+ * 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.binding.Feature
+ */
+ public static jalview.binding.Feature unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.Feature) Unmarshaller.unmarshal(
+ jalview.binding.Features.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class JGroup implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _start.
- */
- private int _start;
-
- /**
- * keeps track of state for field: _start
- */
- private boolean _has_start;
-
- /**
- * Field _end.
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
- /**
- * Field _colour.
- */
- private java.lang.String _colour;
-
- /**
- * Field _consThreshold.
- */
- private int _consThreshold;
-
- /**
- * keeps track of state for field: _consThreshold
- */
- private boolean _has_consThreshold;
-
- /**
- * Field _pidThreshold.
- */
- private int _pidThreshold;
-
- /**
- * keeps track of state for field: _pidThreshold
- */
- private boolean _has_pidThreshold;
-
- /**
- * Field _outlineColour.
- */
- private int _outlineColour;
-
- /**
- * keeps track of state for field: _outlineColour
- */
- private boolean _has_outlineColour;
-
- /**
- * Field _displayBoxes.
- */
- private boolean _displayBoxes;
-
- /**
- * keeps track of state for field: _displayBoxes
- */
- private boolean _has_displayBoxes;
-
- /**
- * Field _displayText.
- */
- private boolean _displayText;
-
- /**
- * keeps track of state for field: _displayText
- */
- private boolean _has_displayText;
-
- /**
- * Field _colourText.
- */
- private boolean _colourText;
-
- /**
- * keeps track of state for field: _colourText
- */
- private boolean _has_colourText;
-
- /**
- * Field _seqList.
- */
- private java.util.Vector _seqList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public JGroup() {
- super();
- this._seqList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vSeq
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSeq(
- final int vSeq)
- throws java.lang.IndexOutOfBoundsException {
- this._seqList.addElement(new java.lang.Integer(vSeq));
- }
-
- /**
- *
- *
- * @param index
- * @param vSeq
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSeq(
- final int index,
- final int vSeq)
- throws java.lang.IndexOutOfBoundsException {
- this._seqList.add(index, new java.lang.Integer(vSeq));
- }
-
- /**
- */
- public void deleteColourText(
- ) {
- this._has_colourText= false;
- }
-
- /**
- */
- public void deleteConsThreshold(
- ) {
- this._has_consThreshold= false;
- }
-
- /**
- */
- public void deleteDisplayBoxes(
- ) {
- this._has_displayBoxes= false;
- }
-
- /**
- */
- public void deleteDisplayText(
- ) {
- this._has_displayText= false;
- }
-
- /**
- */
- public void deleteEnd(
- ) {
- this._has_end= false;
- }
-
- /**
- */
- public void deleteOutlineColour(
- ) {
- this._has_outlineColour= false;
- }
-
- /**
- */
- public void deletePidThreshold(
- ) {
- this._has_pidThreshold= false;
- }
-
- /**
- */
- public void deleteStart(
- ) {
- this._has_start= false;
- }
-
- /**
- * Method enumerateSeq.
- *
- * @return an Enumeration over all int elements
- */
- public java.util.Enumeration enumerateSeq(
- ) {
- return this._seqList.elements();
- }
-
- /**
- * Returns the value of field 'colour'.
- *
- * @return the value of field 'Colour'.
- */
- public java.lang.String getColour(
- ) {
- return this._colour;
- }
-
- /**
- * Returns the value of field 'colourText'.
- *
- * @return the value of field 'ColourText'.
- */
- public boolean getColourText(
- ) {
- return this._colourText;
- }
-
- /**
- * Returns the value of field 'consThreshold'.
- *
- * @return the value of field 'ConsThreshold'.
- */
- public int getConsThreshold(
- ) {
- return this._consThreshold;
- }
-
- /**
- * Returns the value of field 'displayBoxes'.
- *
- * @return the value of field 'DisplayBoxes'.
- */
- public boolean getDisplayBoxes(
- ) {
- return this._displayBoxes;
- }
-
- /**
- * Returns the value of field 'displayText'.
- *
- * @return the value of field 'DisplayText'.
- */
- public boolean getDisplayText(
- ) {
- return this._displayText;
- }
-
- /**
- * Returns the value of field 'end'.
- *
- * @return the value of field 'End'.
- */
- public int getEnd(
- ) {
- return this._end;
- }
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName(
- ) {
- return this._name;
- }
-
- /**
- * Returns the value of field 'outlineColour'.
- *
- * @return the value of field 'OutlineColour'.
- */
- public int getOutlineColour(
- ) {
- return this._outlineColour;
- }
-
- /**
- * Returns the value of field 'pidThreshold'.
- *
- * @return the value of field 'PidThreshold'.
- */
- public int getPidThreshold(
- ) {
- return this._pidThreshold;
- }
-
- /**
- * Method getSeq.
- *
- * @param index
- * @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.get(index)).intValue();
- }
-
- /**
- * Method getSeq.Returns the contents of the collection in an
- * Array.
- *
- * @return this collection as an Array
- */
- 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++) {
- array[index] = ((java.lang.Integer) iter.next()).intValue();
- }
- return array;
- }
-
- /**
- * Method getSeqCount.
- *
- * @return the size of this collection
- */
- public int getSeqCount(
- ) {
- return this._seqList.size();
- }
-
- /**
- * Returns the value of field 'start'.
- *
- * @return the value of field 'Start'.
- */
- public int getStart(
- ) {
- return this._start;
- }
-
- /**
- * Method hasColourText.
- *
- * @return true if at least one ColourText has been added
- */
- public boolean hasColourText(
- ) {
- return this._has_colourText;
- }
-
- /**
- * Method hasConsThreshold.
- *
- * @return true if at least one ConsThreshold has been added
- */
- public boolean hasConsThreshold(
- ) {
- return this._has_consThreshold;
- }
-
- /**
- * Method hasDisplayBoxes.
- *
- * @return true if at least one DisplayBoxes has been added
- */
- public boolean hasDisplayBoxes(
- ) {
- return this._has_displayBoxes;
- }
-
- /**
- * Method hasDisplayText.
- *
- * @return true if at least one DisplayText has been added
- */
- public boolean hasDisplayText(
- ) {
- return this._has_displayText;
- }
-
- /**
- * Method hasEnd.
- *
- * @return true if at least one End has been added
- */
- public boolean hasEnd(
- ) {
- return this._has_end;
- }
-
- /**
- * Method hasOutlineColour.
- *
- * @return true if at least one OutlineColour has been added
- */
- public boolean hasOutlineColour(
- ) {
- return this._has_outlineColour;
- }
-
- /**
- * Method hasPidThreshold.
- *
- * @return true if at least one PidThreshold has been added
- */
- public boolean hasPidThreshold(
- ) {
- return this._has_pidThreshold;
- }
-
- /**
- * Method hasStart.
- *
- * @return true if at least one Start has been added
- */
- public boolean hasStart(
- ) {
- return this._has_start;
- }
-
- /**
- * Returns the value of field 'colourText'.
- *
- * @return the value of field 'ColourText'.
- */
- public boolean isColourText(
- ) {
- return this._colourText;
- }
-
- /**
- * 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 true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllSeq(
- ) {
- this._seqList.clear();
- }
-
- /**
- * 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 the element removed from the collection
- */
- 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(
- final java.lang.String colour) {
- this._colour = colour;
- }
-
- /**
- * Sets the value of field 'colourText'.
- *
- * @param colourText the value of field 'colourText'.
- */
- public void setColourText(
- final boolean colourText) {
- this._colourText = colourText;
- this._has_colourText = true;
- }
-
- /**
- * Sets the value of field 'consThreshold'.
- *
- * @param consThreshold the value of field 'consThreshold'.
- */
- public void setConsThreshold(
- final int consThreshold) {
- this._consThreshold = consThreshold;
- this._has_consThreshold = true;
- }
-
- /**
- * Sets the value of field 'displayBoxes'.
- *
- * @param displayBoxes the value of field 'displayBoxes'.
- */
- public void setDisplayBoxes(
- final boolean displayBoxes) {
- this._displayBoxes = displayBoxes;
- this._has_displayBoxes = true;
- }
-
- /**
- * Sets the value of field 'displayText'.
- *
- * @param displayText the value of field 'displayText'.
- */
- public void setDisplayText(
- final boolean displayText) {
- this._displayText = displayText;
- this._has_displayText = true;
- }
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end the value of field 'end'.
- */
- public void setEnd(
- final int end) {
- this._end = end;
- this._has_end = true;
- }
-
- /**
- * Sets the value of field 'name'.
- *
- * @param name the value of field 'name'.
- */
- public void setName(
- final java.lang.String name) {
- this._name = name;
- }
-
- /**
- * Sets the value of field 'outlineColour'.
- *
- * @param outlineColour the value of field 'outlineColour'.
- */
- public void setOutlineColour(
- final int outlineColour) {
- this._outlineColour = outlineColour;
- this._has_outlineColour = true;
- }
-
- /**
- * Sets the value of field 'pidThreshold'.
- *
- * @param pidThreshold the value of field 'pidThreshold'.
- */
- public void setPidThreshold(
- final int pidThreshold) {
- this._pidThreshold = pidThreshold;
- this._has_pidThreshold = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vSeq
- * @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) + "]");
- }
-
- this._seqList.set(index, new java.lang.Integer(vSeq));
- }
-
- /**
- *
- *
- * @param vSeqArray
- */
- public void setSeq(
- final int[] vSeqArray) {
- //-- copy array
- _seqList.clear();
-
- for (int i = 0; i < vSeqArray.length; i++) {
- this._seqList.add(new java.lang.Integer(vSeqArray[i]));
- }
- }
-
- /**
- * Sets the value of field 'start'.
- *
- * @param start the value of field 'start'.
- */
- public void setStart(
- final int start) {
- this._start = start;
- this._has_start = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.binding.JGroup
- */
- public static jalview.binding.JGroup unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.JGroup) Unmarshaller.unmarshal(jalview.binding.JGroup.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);
- }
+public class JGroup implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _start.
+ */
+ private int _start;
+
+ /**
+ * keeps track of state for field: _start
+ */
+ private boolean _has_start;
+
+ /**
+ * Field _end.
+ */
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _colour.
+ */
+ private java.lang.String _colour;
+
+ /**
+ * Field _consThreshold.
+ */
+ private int _consThreshold;
+
+ /**
+ * keeps track of state for field: _consThreshold
+ */
+ private boolean _has_consThreshold;
+
+ /**
+ * Field _pidThreshold.
+ */
+ private int _pidThreshold;
+
+ /**
+ * keeps track of state for field: _pidThreshold
+ */
+ private boolean _has_pidThreshold;
+
+ /**
+ * Field _outlineColour.
+ */
+ private int _outlineColour;
+
+ /**
+ * keeps track of state for field: _outlineColour
+ */
+ private boolean _has_outlineColour;
+
+ /**
+ * Field _displayBoxes.
+ */
+ private boolean _displayBoxes;
+
+ /**
+ * keeps track of state for field: _displayBoxes
+ */
+ private boolean _has_displayBoxes;
+
+ /**
+ * Field _displayText.
+ */
+ private boolean _displayText;
+
+ /**
+ * keeps track of state for field: _displayText
+ */
+ private boolean _has_displayText;
+
+ /**
+ * Field _colourText.
+ */
+ private boolean _colourText;
+
+ /**
+ * keeps track of state for field: _colourText
+ */
+ private boolean _has_colourText;
+
+ /**
+ * Field _seqList.
+ */
+ private java.util.Vector _seqList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public JGroup()
+ {
+ super();
+ this._seqList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vSeq
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSeq(final int vSeq)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._seqList.addElement(new java.lang.Integer(vSeq));
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSeq
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSeq(final int index, final int vSeq)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._seqList.add(index, new java.lang.Integer(vSeq));
+ }
+
+ /**
+ */
+ public void deleteColourText()
+ {
+ this._has_colourText = false;
+ }
+
+ /**
+ */
+ public void deleteConsThreshold()
+ {
+ this._has_consThreshold = false;
+ }
+
+ /**
+ */
+ public void deleteDisplayBoxes()
+ {
+ this._has_displayBoxes = false;
+ }
+
+ /**
+ */
+ public void deleteDisplayText()
+ {
+ this._has_displayText = false;
+ }
+
+ /**
+ */
+ public void deleteEnd()
+ {
+ this._has_end = false;
+ }
+
+ /**
+ */
+ public void deleteOutlineColour()
+ {
+ this._has_outlineColour = false;
+ }
+
+ /**
+ */
+ public void deletePidThreshold()
+ {
+ this._has_pidThreshold = false;
+ }
+
+ /**
+ */
+ public void deleteStart()
+ {
+ this._has_start = false;
+ }
+
+ /**
+ * Method enumerateSeq.
+ *
+ * @return an Enumeration over all int elements
+ */
+ public java.util.Enumeration enumerateSeq()
+ {
+ return this._seqList.elements();
+ }
+
+ /**
+ * Returns the value of field 'colour'.
+ *
+ * @return the value of field 'Colour'.
+ */
+ public java.lang.String getColour()
+ {
+ return this._colour;
+ }
+
+ /**
+ * Returns the value of field 'colourText'.
+ *
+ * @return the value of field 'ColourText'.
+ */
+ public boolean getColourText()
+ {
+ return this._colourText;
+ }
+
+ /**
+ * Returns the value of field 'consThreshold'.
+ *
+ * @return the value of field 'ConsThreshold'.
+ */
+ public int getConsThreshold()
+ {
+ return this._consThreshold;
+ }
+
+ /**
+ * Returns the value of field 'displayBoxes'.
+ *
+ * @return the value of field 'DisplayBoxes'.
+ */
+ public boolean getDisplayBoxes()
+ {
+ return this._displayBoxes;
+ }
+
+ /**
+ * Returns the value of field 'displayText'.
+ *
+ * @return the value of field 'DisplayText'.
+ */
+ public boolean getDisplayText()
+ {
+ return this._displayText;
+ }
+
+ /**
+ * Returns the value of field 'end'.
+ *
+ * @return the value of field 'End'.
+ */
+ public int getEnd()
+ {
+ return this._end;
+ }
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName()
+ {
+ return this._name;
+ }
+
+ /**
+ * Returns the value of field 'outlineColour'.
+ *
+ * @return the value of field 'OutlineColour'.
+ */
+ public int getOutlineColour()
+ {
+ return this._outlineColour;
+ }
+
+ /**
+ * Returns the value of field 'pidThreshold'.
+ *
+ * @return the value of field 'PidThreshold'.
+ */
+ public int getPidThreshold()
+ {
+ return this._pidThreshold;
+ }
+
+ /**
+ * Method getSeq.
+ *
+ * @param index
+ * @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.get(index)).intValue();
+ }
+
+ /**
+ * Method getSeq.Returns the contents of the collection in an Array.
+ *
+ * @return this collection as an Array
+ */
+ 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++)
+ {
+ array[index] = ((java.lang.Integer) iter.next()).intValue();
+ }
+ return array;
+ }
+
+ /**
+ * Method getSeqCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSeqCount()
+ {
+ return this._seqList.size();
+ }
+
+ /**
+ * Returns the value of field 'start'.
+ *
+ * @return the value of field 'Start'.
+ */
+ public int getStart()
+ {
+ return this._start;
+ }
+
+ /**
+ * Method hasColourText.
+ *
+ * @return true if at least one ColourText has been added
+ */
+ public boolean hasColourText()
+ {
+ return this._has_colourText;
+ }
+
+ /**
+ * Method hasConsThreshold.
+ *
+ * @return true if at least one ConsThreshold has been added
+ */
+ public boolean hasConsThreshold()
+ {
+ return this._has_consThreshold;
+ }
+
+ /**
+ * Method hasDisplayBoxes.
+ *
+ * @return true if at least one DisplayBoxes has been added
+ */
+ public boolean hasDisplayBoxes()
+ {
+ return this._has_displayBoxes;
+ }
+
+ /**
+ * Method hasDisplayText.
+ *
+ * @return true if at least one DisplayText has been added
+ */
+ public boolean hasDisplayText()
+ {
+ return this._has_displayText;
+ }
+
+ /**
+ * Method hasEnd.
+ *
+ * @return true if at least one End has been added
+ */
+ public boolean hasEnd()
+ {
+ return this._has_end;
+ }
+
+ /**
+ * Method hasOutlineColour.
+ *
+ * @return true if at least one OutlineColour has been added
+ */
+ public boolean hasOutlineColour()
+ {
+ return this._has_outlineColour;
+ }
+
+ /**
+ * Method hasPidThreshold.
+ *
+ * @return true if at least one PidThreshold has been added
+ */
+ public boolean hasPidThreshold()
+ {
+ return this._has_pidThreshold;
+ }
+
+ /**
+ * Method hasStart.
+ *
+ * @return true if at least one Start has been added
+ */
+ public boolean hasStart()
+ {
+ return this._has_start;
+ }
+
+ /**
+ * Returns the value of field 'colourText'.
+ *
+ * @return the value of field 'ColourText'.
+ */
+ public boolean isColourText()
+ {
+ return this._colourText;
+ }
+
+ /**
+ * 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 true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ */
+ public void removeAllSeq()
+ {
+ this._seqList.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ 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(final java.lang.String colour)
+ {
+ this._colour = colour;
+ }
+
+ /**
+ * Sets the value of field 'colourText'.
+ *
+ * @param colourText
+ * the value of field 'colourText'.
+ */
+ public void setColourText(final boolean colourText)
+ {
+ this._colourText = colourText;
+ this._has_colourText = true;
+ }
+
+ /**
+ * Sets the value of field 'consThreshold'.
+ *
+ * @param consThreshold
+ * the value of field 'consThreshold'.
+ */
+ public void setConsThreshold(final int consThreshold)
+ {
+ this._consThreshold = consThreshold;
+ this._has_consThreshold = true;
+ }
+
+ /**
+ * Sets the value of field 'displayBoxes'.
+ *
+ * @param displayBoxes
+ * the value of field 'displayBoxes'.
+ */
+ public void setDisplayBoxes(final boolean displayBoxes)
+ {
+ this._displayBoxes = displayBoxes;
+ this._has_displayBoxes = true;
+ }
+
+ /**
+ * Sets the value of field 'displayText'.
+ *
+ * @param displayText
+ * the value of field 'displayText'.
+ */
+ public void setDisplayText(final boolean displayText)
+ {
+ this._displayText = displayText;
+ this._has_displayText = true;
+ }
+
+ /**
+ * Sets the value of field 'end'.
+ *
+ * @param end
+ * the value of field 'end'.
+ */
+ public void setEnd(final int end)
+ {
+ this._end = end;
+ this._has_end = true;
+ }
+
+ /**
+ * Sets the value of field 'name'.
+ *
+ * @param name
+ * the value of field 'name'.
+ */
+ public void setName(final java.lang.String name)
+ {
+ this._name = name;
+ }
+
+ /**
+ * Sets the value of field 'outlineColour'.
+ *
+ * @param outlineColour
+ * the value of field 'outlineColour'.
+ */
+ public void setOutlineColour(final int outlineColour)
+ {
+ this._outlineColour = outlineColour;
+ this._has_outlineColour = true;
+ }
+
+ /**
+ * Sets the value of field 'pidThreshold'.
+ *
+ * @param pidThreshold
+ * the value of field 'pidThreshold'.
+ */
+ public void setPidThreshold(final int pidThreshold)
+ {
+ this._pidThreshold = pidThreshold;
+ this._has_pidThreshold = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSeq
+ * @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) + "]");
+ }
+
+ this._seqList.set(index, new java.lang.Integer(vSeq));
+ }
+
+ /**
+ *
+ *
+ * @param vSeqArray
+ */
+ public void setSeq(final int[] vSeqArray)
+ {
+ // -- copy array
+ _seqList.clear();
+
+ for (int i = 0; i < vSeqArray.length; i++)
+ {
+ this._seqList.add(new java.lang.Integer(vSeqArray[i]));
+ }
+ }
+
+ /**
+ * Sets the value of field 'start'.
+ *
+ * @param start
+ * the value of field 'start'.
+ */
+ public void setStart(final int start)
+ {
+ this._start = start;
+ this._has_start = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.binding.JGroup
+ */
+ public static jalview.binding.JGroup unmarshal(final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.JGroup) Unmarshaller.unmarshal(
+ jalview.binding.JGroup.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class JSeq implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _colour.
- */
- private int _colour;
-
- /**
- * keeps track of state for field: _colour
- */
- private boolean _has_colour;
-
- /**
- * Field _start.
- */
- private int _start;
-
- /**
- * keeps track of state for field: _start
- */
- private boolean _has_start;
-
- /**
- * Field _end.
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
- /**
- * Field _id.
- */
- private int _id;
-
- /**
- * keeps track of state for field: _id
- */
- private boolean _has_id;
-
- /**
- * Field _featuresList.
- */
- private java.util.Vector _featuresList;
-
- /**
- * Field _pdbidsList.
- */
- private java.util.Vector _pdbidsList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public JSeq() {
- super();
- this._featuresList = new java.util.Vector();
- this._pdbidsList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vFeatures
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addFeatures(
- final jalview.binding.Features vFeatures)
- throws java.lang.IndexOutOfBoundsException {
- this._featuresList.addElement(vFeatures);
- }
-
- /**
- *
- *
- * @param index
- * @param vFeatures
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addFeatures(
- final int index,
- final jalview.binding.Features vFeatures)
- throws java.lang.IndexOutOfBoundsException {
- this._featuresList.add(index, vFeatures);
- }
-
- /**
- *
- *
- * @param vPdbids
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addPdbids(
- final jalview.binding.Pdbids vPdbids)
- throws java.lang.IndexOutOfBoundsException {
- this._pdbidsList.addElement(vPdbids);
- }
-
- /**
- *
- *
- * @param index
- * @param vPdbids
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addPdbids(
- final int index,
- final jalview.binding.Pdbids vPdbids)
- throws java.lang.IndexOutOfBoundsException {
- this._pdbidsList.add(index, vPdbids);
- }
-
- /**
- */
- public void deleteColour(
- ) {
- this._has_colour= false;
- }
-
- /**
- */
- public void deleteEnd(
- ) {
- this._has_end= false;
- }
-
- /**
- */
- public void deleteId(
- ) {
- this._has_id= false;
- }
-
- /**
- */
- public void deleteStart(
- ) {
- this._has_start= false;
- }
-
- /**
- * Method enumerateFeatures.
- *
- * @return an Enumeration over all jalview.binding.Features
- * elements
- */
- public java.util.Enumeration enumerateFeatures(
- ) {
- return this._featuresList.elements();
- }
-
- /**
- * Method enumeratePdbids.
- *
- * @return an Enumeration over all jalview.binding.Pdbids
- * elements
- */
- public java.util.Enumeration enumeratePdbids(
- ) {
- return this._pdbidsList.elements();
- }
-
- /**
- * Returns the value of field 'colour'.
- *
- * @return the value of field 'Colour'.
- */
- public int getColour(
- ) {
- return this._colour;
- }
-
- /**
- * Returns the value of field 'end'.
- *
- * @return the value of field 'End'.
- */
- public int getEnd(
- ) {
- return this._end;
- }
-
- /**
- * Method getFeatures.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.Features at the
- * given index
- */
- public jalview.binding.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.binding.Features) _featuresList.get(index);
- }
-
- /**
- * Method getFeatures.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Features[] getFeatures(
- ) {
- jalview.binding.Features[] array = new jalview.binding.Features[0];
- return (jalview.binding.Features[]) this._featuresList.toArray(array);
- }
-
- /**
- * Method getFeaturesCount.
- *
- * @return the size of this collection
- */
- public int getFeaturesCount(
- ) {
- return this._featuresList.size();
- }
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public int getId(
- ) {
- return this._id;
- }
-
- /**
- * Method getPdbids.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.Pdbids at the given
- * index
- */
- public jalview.binding.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.binding.Pdbids) _pdbidsList.get(index);
- }
-
- /**
- * Method getPdbids.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Pdbids[] getPdbids(
- ) {
- jalview.binding.Pdbids[] array = new jalview.binding.Pdbids[0];
- return (jalview.binding.Pdbids[]) this._pdbidsList.toArray(array);
- }
-
- /**
- * Method getPdbidsCount.
- *
- * @return the size of this collection
- */
- public int getPdbidsCount(
- ) {
- return this._pdbidsList.size();
- }
-
- /**
- * Returns the value of field 'start'.
- *
- * @return the value of field 'Start'.
- */
- public int getStart(
- ) {
- return this._start;
- }
-
- /**
- * Method hasColour.
- *
- * @return true if at least one Colour has been added
- */
- public boolean hasColour(
- ) {
- return this._has_colour;
- }
-
- /**
- * Method hasEnd.
- *
- * @return true if at least one End has been added
- */
- public boolean hasEnd(
- ) {
- return this._has_end;
- }
-
- /**
- * Method hasId.
- *
- * @return true if at least one Id has been added
- */
- public boolean hasId(
- ) {
- return this._has_id;
- }
-
- /**
- * Method hasStart.
- *
- * @return true if at least one Start has been added
- */
- public boolean hasStart(
- ) {
- return this._has_start;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllFeatures(
- ) {
- this._featuresList.clear();
- }
-
- /**
- */
- public void removeAllPdbids(
- ) {
- this._pdbidsList.clear();
- }
-
- /**
- * Method removeFeatures.
- *
- * @param vFeatures
- * @return true if the object was removed from the collection.
- */
- public boolean removeFeatures(
- final jalview.binding.Features vFeatures) {
- boolean removed = _featuresList.remove(vFeatures);
- return removed;
- }
-
- /**
- * Method removeFeaturesAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Features removeFeaturesAt(
- final int index) {
- java.lang.Object obj = this._featuresList.remove(index);
- return (jalview.binding.Features) obj;
- }
-
- /**
- * Method removePdbids.
- *
- * @param vPdbids
- * @return true if the object was removed from the collection.
- */
- public boolean removePdbids(
- final jalview.binding.Pdbids vPdbids) {
- boolean removed = _pdbidsList.remove(vPdbids);
- return removed;
- }
-
- /**
- * Method removePdbidsAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Pdbids removePdbidsAt(
- final int index) {
- java.lang.Object obj = this._pdbidsList.remove(index);
- return (jalview.binding.Pdbids) obj;
- }
-
- /**
- * Sets the value of field 'colour'.
- *
- * @param colour the value of field 'colour'.
- */
- public void setColour(
- final int colour) {
- this._colour = colour;
- this._has_colour = true;
- }
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end the value of field 'end'.
- */
- public void setEnd(
- final int end) {
- this._end = end;
- this._has_end = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vFeatures
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setFeatures(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._featuresList.set(index, vFeatures);
- }
-
- /**
- *
- *
- * @param vFeaturesArray
- */
- public void setFeatures(
- final jalview.binding.Features[] vFeaturesArray) {
- //-- copy array
- _featuresList.clear();
-
- for (int i = 0; i < vFeaturesArray.length; i++) {
- this._featuresList.add(vFeaturesArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'id'.
- *
- * @param id the value of field 'id'.
- */
- public void setId(
- final int id) {
- this._id = id;
- this._has_id = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vPdbids
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setPdbids(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._pdbidsList.set(index, vPdbids);
- }
-
- /**
- *
- *
- * @param vPdbidsArray
- */
- public void setPdbids(
- final jalview.binding.Pdbids[] vPdbidsArray) {
- //-- copy array
- _pdbidsList.clear();
-
- for (int i = 0; i < vPdbidsArray.length; i++) {
- this._pdbidsList.add(vPdbidsArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'start'.
- *
- * @param start the value of field 'start'.
- */
- public void setStart(
- final int start) {
- this._start = start;
- this._has_start = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.binding.JSeq
- */
- public static jalview.binding.JSeq unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.JSeq) Unmarshaller.unmarshal(jalview.binding.JSeq.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);
- }
+public class JSeq implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _colour.
+ */
+ private int _colour;
+
+ /**
+ * keeps track of state for field: _colour
+ */
+ private boolean _has_colour;
+
+ /**
+ * Field _start.
+ */
+ private int _start;
+
+ /**
+ * keeps track of state for field: _start
+ */
+ private boolean _has_start;
+
+ /**
+ * Field _end.
+ */
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
+
+ /**
+ * Field _id.
+ */
+ private int _id;
+
+ /**
+ * keeps track of state for field: _id
+ */
+ private boolean _has_id;
+
+ /**
+ * Field _featuresList.
+ */
+ private java.util.Vector _featuresList;
+
+ /**
+ * Field _pdbidsList.
+ */
+ private java.util.Vector _pdbidsList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public JSeq()
+ {
+ super();
+ this._featuresList = new java.util.Vector();
+ this._pdbidsList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vFeatures
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addFeatures(final jalview.binding.Features vFeatures)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._featuresList.addElement(vFeatures);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vFeatures
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addFeatures(final int index,
+ final jalview.binding.Features vFeatures)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._featuresList.add(index, vFeatures);
+ }
+
+ /**
+ *
+ *
+ * @param vPdbids
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addPdbids(final jalview.binding.Pdbids vPdbids)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._pdbidsList.addElement(vPdbids);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vPdbids
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addPdbids(final int index,
+ final jalview.binding.Pdbids vPdbids)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._pdbidsList.add(index, vPdbids);
+ }
+
+ /**
+ */
+ public void deleteColour()
+ {
+ this._has_colour = false;
+ }
+
+ /**
+ */
+ public void deleteEnd()
+ {
+ this._has_end = false;
+ }
+
+ /**
+ */
+ public void deleteId()
+ {
+ this._has_id = false;
+ }
+
+ /**
+ */
+ public void deleteStart()
+ {
+ this._has_start = false;
+ }
+
+ /**
+ * Method enumerateFeatures.
+ *
+ * @return an Enumeration over all jalview.binding.Features elements
+ */
+ public java.util.Enumeration enumerateFeatures()
+ {
+ return this._featuresList.elements();
+ }
+
+ /**
+ * Method enumeratePdbids.
+ *
+ * @return an Enumeration over all jalview.binding.Pdbids elements
+ */
+ public java.util.Enumeration enumeratePdbids()
+ {
+ return this._pdbidsList.elements();
+ }
+
+ /**
+ * Returns the value of field 'colour'.
+ *
+ * @return the value of field 'Colour'.
+ */
+ public int getColour()
+ {
+ return this._colour;
+ }
+
+ /**
+ * Returns the value of field 'end'.
+ *
+ * @return the value of field 'End'.
+ */
+ public int getEnd()
+ {
+ return this._end;
+ }
+
+ /**
+ * Method getFeatures.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Features at the given index
+ */
+ public jalview.binding.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.binding.Features) _featuresList.get(index);
+ }
+
+ /**
+ * Method getFeatures.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Features[] getFeatures()
+ {
+ jalview.binding.Features[] array = new jalview.binding.Features[0];
+ return (jalview.binding.Features[]) this._featuresList.toArray(array);
+ }
+
+ /**
+ * Method getFeaturesCount.
+ *
+ * @return the size of this collection
+ */
+ public int getFeaturesCount()
+ {
+ return this._featuresList.size();
+ }
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public int getId()
+ {
+ return this._id;
+ }
+
+ /**
+ * Method getPdbids.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Pdbids at the given index
+ */
+ public jalview.binding.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.binding.Pdbids) _pdbidsList.get(index);
+ }
+
+ /**
+ * Method getPdbids.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Pdbids[] getPdbids()
+ {
+ jalview.binding.Pdbids[] array = new jalview.binding.Pdbids[0];
+ return (jalview.binding.Pdbids[]) this._pdbidsList.toArray(array);
+ }
+
+ /**
+ * Method getPdbidsCount.
+ *
+ * @return the size of this collection
+ */
+ public int getPdbidsCount()
+ {
+ return this._pdbidsList.size();
+ }
+
+ /**
+ * Returns the value of field 'start'.
+ *
+ * @return the value of field 'Start'.
+ */
+ public int getStart()
+ {
+ return this._start;
+ }
+
+ /**
+ * Method hasColour.
+ *
+ * @return true if at least one Colour has been added
+ */
+ public boolean hasColour()
+ {
+ return this._has_colour;
+ }
+
+ /**
+ * Method hasEnd.
+ *
+ * @return true if at least one End has been added
+ */
+ public boolean hasEnd()
+ {
+ return this._has_end;
+ }
+
+ /**
+ * Method hasId.
+ *
+ * @return true if at least one Id has been added
+ */
+ public boolean hasId()
+ {
+ return this._has_id;
+ }
+
+ /**
+ * Method hasStart.
+ *
+ * @return true if at least one Start has been added
+ */
+ public boolean hasStart()
+ {
+ return this._has_start;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ */
+ public void removeAllFeatures()
+ {
+ this._featuresList.clear();
+ }
+
+ /**
+ */
+ public void removeAllPdbids()
+ {
+ this._pdbidsList.clear();
+ }
+
+ /**
+ * Method removeFeatures.
+ *
+ * @param vFeatures
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeFeatures(final jalview.binding.Features vFeatures)
+ {
+ boolean removed = _featuresList.remove(vFeatures);
+ return removed;
+ }
+
+ /**
+ * Method removeFeaturesAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Features removeFeaturesAt(final int index)
+ {
+ java.lang.Object obj = this._featuresList.remove(index);
+ return (jalview.binding.Features) obj;
+ }
+
+ /**
+ * Method removePdbids.
+ *
+ * @param vPdbids
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removePdbids(final jalview.binding.Pdbids vPdbids)
+ {
+ boolean removed = _pdbidsList.remove(vPdbids);
+ return removed;
+ }
+
+ /**
+ * Method removePdbidsAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Pdbids removePdbidsAt(final int index)
+ {
+ java.lang.Object obj = this._pdbidsList.remove(index);
+ return (jalview.binding.Pdbids) obj;
+ }
+
+ /**
+ * Sets the value of field 'colour'.
+ *
+ * @param colour
+ * the value of field 'colour'.
+ */
+ public void setColour(final int colour)
+ {
+ this._colour = colour;
+ this._has_colour = true;
+ }
+
+ /**
+ * Sets the value of field 'end'.
+ *
+ * @param end
+ * the value of field 'end'.
+ */
+ public void setEnd(final int end)
+ {
+ this._end = end;
+ this._has_end = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vFeatures
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setFeatures(final int index,
+ final jalview.binding.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) + "]");
+ }
+
+ this._featuresList.set(index, vFeatures);
+ }
+
+ /**
+ *
+ *
+ * @param vFeaturesArray
+ */
+ public void setFeatures(final jalview.binding.Features[] vFeaturesArray)
+ {
+ // -- copy array
+ _featuresList.clear();
+
+ for (int i = 0; i < vFeaturesArray.length; i++)
+ {
+ this._featuresList.add(vFeaturesArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'id'.
+ *
+ * @param id
+ * the value of field 'id'.
+ */
+ public void setId(final int id)
+ {
+ this._id = id;
+ this._has_id = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vPdbids
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setPdbids(final int index,
+ final jalview.binding.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) + "]");
+ }
+
+ this._pdbidsList.set(index, vPdbids);
+ }
+
+ /**
+ *
+ *
+ * @param vPdbidsArray
+ */
+ public void setPdbids(final jalview.binding.Pdbids[] vPdbidsArray)
+ {
+ // -- copy array
+ _pdbidsList.clear();
+
+ for (int i = 0; i < vPdbidsArray.length; i++)
+ {
+ this._pdbidsList.add(vPdbidsArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'start'.
+ *
+ * @param start
+ * the value of field 'start'.
+ */
+ public void setStart(final int start)
+ {
+ this._start = start;
+ this._has_start = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.binding.JSeq
+ */
+ public static jalview.binding.JSeq unmarshal(final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.JSeq) Unmarshaller.unmarshal(
+ jalview.binding.JSeq.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class JalviewModel implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _creationDate.
- */
- private java.util.Date _creationDate;
-
- /**
- * Field _version.
- */
- private java.lang.String _version;
-
- /**
- * Field _vamsasModel.
- */
- private jalview.binding.VamsasModel _vamsasModel;
-
- /**
- * Field _jalviewModelSequence.
- */
- private jalview.binding.JalviewModelSequence _jalviewModelSequence;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public JalviewModel() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'creationDate'.
- *
- * @return the value of field 'CreationDate'.
- */
- public java.util.Date getCreationDate(
- ) {
- return this._creationDate;
- }
-
- /**
- * Returns the value of field 'jalviewModelSequence'.
- *
- * @return the value of field 'JalviewModelSequence'.
- */
- public jalview.binding.JalviewModelSequence getJalviewModelSequence(
- ) {
- return this._jalviewModelSequence;
- }
-
- /**
- * Returns the value of field 'vamsasModel'.
- *
- * @return the value of field 'VamsasModel'.
- */
- public jalview.binding.VamsasModel getVamsasModel(
- ) {
- return this._vamsasModel;
- }
-
- /**
- * Returns the value of field 'version'.
- *
- * @return the value of field 'Version'.
- */
- public java.lang.String getVersion(
- ) {
- return this._version;
- }
-
- /**
- * 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 'creationDate'.
- *
- * @param creationDate the value of field 'creationDate'.
- */
- public void setCreationDate(
- final java.util.Date creationDate) {
- this._creationDate = creationDate;
- }
-
- /**
- * Sets the value of field 'jalviewModelSequence'.
- *
- * @param jalviewModelSequence the value of field
- * 'jalviewModelSequence'.
- */
- public void setJalviewModelSequence(
- final jalview.binding.JalviewModelSequence jalviewModelSequence) {
- this._jalviewModelSequence = jalviewModelSequence;
- }
-
- /**
- * Sets the value of field 'vamsasModel'.
- *
- * @param vamsasModel the value of field 'vamsasModel'.
- */
- public void setVamsasModel(
- final jalview.binding.VamsasModel vamsasModel) {
- this._vamsasModel = vamsasModel;
- }
-
- /**
- * Sets the value of field 'version'.
- *
- * @param version the value of field 'version'.
- */
- public void setVersion(
- final java.lang.String version) {
- this._version = version;
- }
-
- /**
- * 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.binding.JalviewModel
- */
- public static jalview.binding.JalviewModel unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.JalviewModel) Unmarshaller.unmarshal(jalview.binding.JalviewModel.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);
+public class JalviewModel implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _creationDate.
+ */
+ private java.util.Date _creationDate;
+
+ /**
+ * Field _version.
+ */
+ private java.lang.String _version;
+
+ /**
+ * Field _vamsasModel.
+ */
+ private jalview.binding.VamsasModel _vamsasModel;
+
+ /**
+ * Field _jalviewModelSequence.
+ */
+ private jalview.binding.JalviewModelSequence _jalviewModelSequence;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public JalviewModel()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'creationDate'.
+ *
+ * @return the value of field 'CreationDate'.
+ */
+ public java.util.Date getCreationDate()
+ {
+ return this._creationDate;
+ }
+
+ /**
+ * Returns the value of field 'jalviewModelSequence'.
+ *
+ * @return the value of field 'JalviewModelSequence'.
+ */
+ public jalview.binding.JalviewModelSequence getJalviewModelSequence()
+ {
+ return this._jalviewModelSequence;
+ }
+
+ /**
+ * Returns the value of field 'vamsasModel'.
+ *
+ * @return the value of field 'VamsasModel'.
+ */
+ public jalview.binding.VamsasModel getVamsasModel()
+ {
+ return this._vamsasModel;
+ }
+
+ /**
+ * Returns the value of field 'version'.
+ *
+ * @return the value of field 'Version'.
+ */
+ public java.lang.String getVersion()
+ {
+ return this._version;
+ }
+
+ /**
+ * 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 'creationDate'.
+ *
+ * @param creationDate
+ * the value of field 'creationDate'.
+ */
+ public void setCreationDate(final java.util.Date creationDate)
+ {
+ this._creationDate = creationDate;
+ }
+
+ /**
+ * Sets the value of field 'jalviewModelSequence'.
+ *
+ * @param jalviewModelSequence
+ * the value of field 'jalviewModelSequence'.
+ */
+ public void setJalviewModelSequence(
+ final jalview.binding.JalviewModelSequence jalviewModelSequence)
+ {
+ this._jalviewModelSequence = jalviewModelSequence;
+ }
+
+ /**
+ * Sets the value of field 'vamsasModel'.
+ *
+ * @param vamsasModel
+ * the value of field 'vamsasModel'.
+ */
+ public void setVamsasModel(final jalview.binding.VamsasModel vamsasModel)
+ {
+ this._vamsasModel = vamsasModel;
+ }
+
+ /**
+ * Sets the value of field 'version'.
+ *
+ * @param version
+ * the value of field 'version'.
+ */
+ public void setVersion(final java.lang.String version)
+ {
+ this._version = version;
+ }
+
+ /**
+ * 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.binding.JalviewModel
+ */
+ public static jalview.binding.JalviewModel unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.JalviewModel) Unmarshaller.unmarshal(
+ jalview.binding.JalviewModel.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class JalviewModelSequence implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _JSeqList.
- */
- private java.util.Vector _JSeqList;
-
- /**
- * Field _JGroupList.
- */
- private java.util.Vector _JGroupList;
-
- /**
- * Field _viewportList.
- */
- private java.util.Vector _viewportList;
-
- /**
- * Field _userColoursList.
- */
- private java.util.Vector _userColoursList;
-
- /**
- * Field _treeList.
- */
- private java.util.Vector _treeList;
-
- /**
- * Field _featureSettings.
- */
- private jalview.binding.FeatureSettings _featureSettings;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public JalviewModelSequence() {
- super();
- 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();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vJGroup
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addJGroup(
- final jalview.binding.JGroup vJGroup)
- throws java.lang.IndexOutOfBoundsException {
- this._JGroupList.addElement(vJGroup);
- }
-
- /**
- *
- *
- * @param index
- * @param vJGroup
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addJGroup(
- final int index,
- final jalview.binding.JGroup vJGroup)
- throws java.lang.IndexOutOfBoundsException {
- this._JGroupList.add(index, vJGroup);
- }
-
- /**
- *
- *
- * @param vJSeq
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addJSeq(
- final jalview.binding.JSeq vJSeq)
- throws java.lang.IndexOutOfBoundsException {
- this._JSeqList.addElement(vJSeq);
- }
-
- /**
- *
- *
- * @param index
- * @param vJSeq
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addJSeq(
- final int index,
- final jalview.binding.JSeq vJSeq)
- throws java.lang.IndexOutOfBoundsException {
- this._JSeqList.add(index, vJSeq);
- }
-
- /**
- *
- *
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addTree(
- final jalview.binding.Tree vTree)
- throws java.lang.IndexOutOfBoundsException {
- this._treeList.addElement(vTree);
- }
-
- /**
- *
- *
- * @param index
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addTree(
- final int index,
- final jalview.binding.Tree vTree)
- throws java.lang.IndexOutOfBoundsException {
- this._treeList.add(index, vTree);
- }
-
- /**
- *
- *
- * @param vUserColours
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addUserColours(
- final jalview.binding.UserColours vUserColours)
- throws java.lang.IndexOutOfBoundsException {
- this._userColoursList.addElement(vUserColours);
- }
-
- /**
- *
- *
- * @param index
- * @param vUserColours
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addUserColours(
- final int index,
- final jalview.binding.UserColours vUserColours)
- throws java.lang.IndexOutOfBoundsException {
- this._userColoursList.add(index, vUserColours);
- }
-
- /**
- *
- *
- * @param vViewport
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addViewport(
- final jalview.binding.Viewport vViewport)
- throws java.lang.IndexOutOfBoundsException {
- this._viewportList.addElement(vViewport);
- }
-
- /**
- *
- *
- * @param index
- * @param vViewport
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addViewport(
- final int index,
- final jalview.binding.Viewport vViewport)
- throws java.lang.IndexOutOfBoundsException {
- this._viewportList.add(index, vViewport);
- }
-
- /**
- * Method enumerateJGroup.
- *
- * @return an Enumeration over all jalview.binding.JGroup
- * elements
- */
- public java.util.Enumeration enumerateJGroup(
- ) {
- return this._JGroupList.elements();
- }
-
- /**
- * Method enumerateJSeq.
- *
- * @return an Enumeration over all jalview.binding.JSeq elements
- */
- public java.util.Enumeration enumerateJSeq(
- ) {
- return this._JSeqList.elements();
- }
-
- /**
- * Method enumerateTree.
- *
- * @return an Enumeration over all jalview.binding.Tree elements
- */
- public java.util.Enumeration enumerateTree(
- ) {
- return this._treeList.elements();
- }
-
- /**
- * Method enumerateUserColours.
- *
- * @return an Enumeration over all jalview.binding.UserColours
- * elements
- */
- public java.util.Enumeration enumerateUserColours(
- ) {
- return this._userColoursList.elements();
- }
-
- /**
- * Method enumerateViewport.
- *
- * @return an Enumeration over all jalview.binding.Viewport
- * elements
- */
- public java.util.Enumeration enumerateViewport(
- ) {
- return this._viewportList.elements();
- }
-
- /**
- * Returns the value of field 'featureSettings'.
- *
- * @return the value of field 'FeatureSettings'.
- */
- public jalview.binding.FeatureSettings getFeatureSettings(
- ) {
- return this._featureSettings;
- }
-
- /**
- * Method getJGroup.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.JGroup at the given
- * index
- */
- public jalview.binding.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.binding.JGroup) _JGroupList.get(index);
- }
-
- /**
- * Method getJGroup.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.JGroup[] getJGroup(
- ) {
- jalview.binding.JGroup[] array = new jalview.binding.JGroup[0];
- return (jalview.binding.JGroup[]) this._JGroupList.toArray(array);
- }
-
- /**
- * Method getJGroupCount.
- *
- * @return the size of this collection
- */
- public int getJGroupCount(
- ) {
- return this._JGroupList.size();
- }
-
- /**
- * Method getJSeq.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.JSeq at the given
- * index
- */
- public jalview.binding.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.binding.JSeq) _JSeqList.get(index);
- }
-
- /**
- * Method getJSeq.Returns the contents of the collection in an
- * Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.JSeq[] getJSeq(
- ) {
- jalview.binding.JSeq[] array = new jalview.binding.JSeq[0];
- return (jalview.binding.JSeq[]) this._JSeqList.toArray(array);
- }
-
- /**
- * Method getJSeqCount.
- *
- * @return the size of this collection
- */
- public int getJSeqCount(
- ) {
- return this._JSeqList.size();
- }
-
- /**
- * Method getTree.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.Tree at the given
- * index
- */
- public jalview.binding.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.binding.Tree) _treeList.get(index);
- }
-
- /**
- * Method getTree.Returns the contents of the collection in an
- * Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Tree[] getTree(
- ) {
- jalview.binding.Tree[] array = new jalview.binding.Tree[0];
- return (jalview.binding.Tree[]) this._treeList.toArray(array);
- }
-
- /**
- * Method getTreeCount.
- *
- * @return the size of this collection
- */
- public int getTreeCount(
- ) {
- return this._treeList.size();
- }
-
- /**
- * Method getUserColours.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.UserColours at the
- * given index
- */
- public jalview.binding.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.binding.UserColours) _userColoursList.get(index);
- }
-
- /**
- * Method getUserColours.Returns the contents of the collection
- * in an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.UserColours[] getUserColours(
- ) {
- jalview.binding.UserColours[] array = new jalview.binding.UserColours[0];
- return (jalview.binding.UserColours[]) this._userColoursList.toArray(array);
- }
-
- /**
- * Method getUserColoursCount.
- *
- * @return the size of this collection
- */
- public int getUserColoursCount(
- ) {
- return this._userColoursList.size();
- }
-
- /**
- * Method getViewport.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.Viewport at the
- * given index
- */
- public jalview.binding.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.binding.Viewport) _viewportList.get(index);
- }
-
- /**
- * Method getViewport.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Viewport[] getViewport(
- ) {
- jalview.binding.Viewport[] array = new jalview.binding.Viewport[0];
- return (jalview.binding.Viewport[]) this._viewportList.toArray(array);
- }
-
- /**
- * Method getViewportCount.
- *
- * @return the size of this collection
- */
- public int getViewportCount(
- ) {
- return this._viewportList.size();
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllJGroup(
- ) {
- this._JGroupList.clear();
- }
-
- /**
- */
- public void removeAllJSeq(
- ) {
- this._JSeqList.clear();
- }
-
- /**
- */
- public void removeAllTree(
- ) {
- this._treeList.clear();
- }
-
- /**
- */
- public void removeAllUserColours(
- ) {
- this._userColoursList.clear();
- }
-
- /**
- */
- public void removeAllViewport(
- ) {
- this._viewportList.clear();
- }
-
- /**
- * Method removeJGroup.
- *
- * @param vJGroup
- * @return true if the object was removed from the collection.
- */
- public boolean removeJGroup(
- final jalview.binding.JGroup vJGroup) {
- boolean removed = _JGroupList.remove(vJGroup);
- return removed;
- }
-
- /**
- * Method removeJGroupAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.JGroup removeJGroupAt(
- final int index) {
- java.lang.Object obj = this._JGroupList.remove(index);
- return (jalview.binding.JGroup) obj;
- }
-
- /**
- * Method removeJSeq.
- *
- * @param vJSeq
- * @return true if the object was removed from the collection.
- */
- public boolean removeJSeq(
- final jalview.binding.JSeq vJSeq) {
- boolean removed = _JSeqList.remove(vJSeq);
- return removed;
- }
-
- /**
- * Method removeJSeqAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.JSeq removeJSeqAt(
- final int index) {
- java.lang.Object obj = this._JSeqList.remove(index);
- return (jalview.binding.JSeq) obj;
- }
-
- /**
- * Method removeTree.
- *
- * @param vTree
- * @return true if the object was removed from the collection.
- */
- public boolean removeTree(
- final jalview.binding.Tree vTree) {
- boolean removed = _treeList.remove(vTree);
- return removed;
- }
-
- /**
- * Method removeTreeAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Tree removeTreeAt(
- final int index) {
- java.lang.Object obj = this._treeList.remove(index);
- return (jalview.binding.Tree) obj;
- }
-
- /**
- * Method removeUserColours.
- *
- * @param vUserColours
- * @return true if the object was removed from the collection.
- */
- public boolean removeUserColours(
- final jalview.binding.UserColours vUserColours) {
- boolean removed = _userColoursList.remove(vUserColours);
- return removed;
- }
-
- /**
- * Method removeUserColoursAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.UserColours removeUserColoursAt(
- final int index) {
- java.lang.Object obj = this._userColoursList.remove(index);
- return (jalview.binding.UserColours) obj;
- }
-
- /**
- * Method removeViewport.
- *
- * @param vViewport
- * @return true if the object was removed from the collection.
- */
- public boolean removeViewport(
- final jalview.binding.Viewport vViewport) {
- boolean removed = _viewportList.remove(vViewport);
- return removed;
- }
-
- /**
- * Method removeViewportAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Viewport removeViewportAt(
- final int index) {
- java.lang.Object obj = this._viewportList.remove(index);
- return (jalview.binding.Viewport) obj;
- }
-
- /**
- * Sets the value of field 'featureSettings'.
- *
- * @param featureSettings the value of field 'featureSettings'.
- */
- public void setFeatureSettings(
- final jalview.binding.FeatureSettings featureSettings) {
- this._featureSettings = featureSettings;
- }
-
- /**
- *
- *
- * @param index
- * @param vJGroup
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setJGroup(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._JGroupList.set(index, vJGroup);
- }
-
- /**
- *
- *
- * @param vJGroupArray
- */
- public void setJGroup(
- final jalview.binding.JGroup[] vJGroupArray) {
- //-- copy array
- _JGroupList.clear();
-
- for (int i = 0; i < vJGroupArray.length; i++) {
- this._JGroupList.add(vJGroupArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vJSeq
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setJSeq(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._JSeqList.set(index, vJSeq);
- }
-
- /**
- *
- *
- * @param vJSeqArray
- */
- public void setJSeq(
- final jalview.binding.JSeq[] vJSeqArray) {
- //-- copy array
- _JSeqList.clear();
-
- for (int i = 0; i < vJSeqArray.length; i++) {
- this._JSeqList.add(vJSeqArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setTree(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._treeList.set(index, vTree);
- }
-
- /**
- *
- *
- * @param vTreeArray
- */
- public void setTree(
- final jalview.binding.Tree[] vTreeArray) {
- //-- copy array
- _treeList.clear();
-
- for (int i = 0; i < vTreeArray.length; i++) {
- this._treeList.add(vTreeArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vUserColours
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setUserColours(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._userColoursList.set(index, vUserColours);
- }
-
- /**
- *
- *
- * @param vUserColoursArray
- */
- public void setUserColours(
- final jalview.binding.UserColours[] vUserColoursArray) {
- //-- copy array
- _userColoursList.clear();
-
- for (int i = 0; i < vUserColoursArray.length; i++) {
- this._userColoursList.add(vUserColoursArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vViewport
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setViewport(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._viewportList.set(index, vViewport);
- }
-
- /**
- *
- *
- * @param vViewportArray
- */
- public void setViewport(
- final jalview.binding.Viewport[] vViewportArray) {
- //-- copy array
- _viewportList.clear();
-
- for (int i = 0; i < vViewportArray.length; i++) {
- this._viewportList.add(vViewportArray[i]);
- }
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.binding.JalviewModelSequence
- */
- public static jalview.binding.JalviewModelSequence unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.JalviewModelSequence) Unmarshaller.unmarshal(jalview.binding.JalviewModelSequence.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);
- }
+public class JalviewModelSequence implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _JSeqList.
+ */
+ private java.util.Vector _JSeqList;
+
+ /**
+ * Field _JGroupList.
+ */
+ private java.util.Vector _JGroupList;
+
+ /**
+ * Field _viewportList.
+ */
+ private java.util.Vector _viewportList;
+
+ /**
+ * Field _userColoursList.
+ */
+ private java.util.Vector _userColoursList;
+
+ /**
+ * Field _treeList.
+ */
+ private java.util.Vector _treeList;
+
+ /**
+ * Field _featureSettings.
+ */
+ private jalview.binding.FeatureSettings _featureSettings;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public JalviewModelSequence()
+ {
+ super();
+ 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();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vJGroup
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addJGroup(final jalview.binding.JGroup vJGroup)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._JGroupList.addElement(vJGroup);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vJGroup
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addJGroup(final int index,
+ final jalview.binding.JGroup vJGroup)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._JGroupList.add(index, vJGroup);
+ }
+
+ /**
+ *
+ *
+ * @param vJSeq
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addJSeq(final jalview.binding.JSeq vJSeq)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._JSeqList.addElement(vJSeq);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vJSeq
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addJSeq(final int index, final jalview.binding.JSeq vJSeq)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._JSeqList.add(index, vJSeq);
+ }
+
+ /**
+ *
+ *
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addTree(final jalview.binding.Tree vTree)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._treeList.addElement(vTree);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addTree(final int index, final jalview.binding.Tree vTree)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._treeList.add(index, vTree);
+ }
+
+ /**
+ *
+ *
+ * @param vUserColours
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addUserColours(final jalview.binding.UserColours vUserColours)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._userColoursList.addElement(vUserColours);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vUserColours
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addUserColours(final int index,
+ final jalview.binding.UserColours vUserColours)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._userColoursList.add(index, vUserColours);
+ }
+
+ /**
+ *
+ *
+ * @param vViewport
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addViewport(final jalview.binding.Viewport vViewport)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._viewportList.addElement(vViewport);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vViewport
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addViewport(final int index,
+ final jalview.binding.Viewport vViewport)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._viewportList.add(index, vViewport);
+ }
+
+ /**
+ * Method enumerateJGroup.
+ *
+ * @return an Enumeration over all jalview.binding.JGroup elements
+ */
+ public java.util.Enumeration enumerateJGroup()
+ {
+ return this._JGroupList.elements();
+ }
+
+ /**
+ * Method enumerateJSeq.
+ *
+ * @return an Enumeration over all jalview.binding.JSeq elements
+ */
+ public java.util.Enumeration enumerateJSeq()
+ {
+ return this._JSeqList.elements();
+ }
+
+ /**
+ * Method enumerateTree.
+ *
+ * @return an Enumeration over all jalview.binding.Tree elements
+ */
+ public java.util.Enumeration enumerateTree()
+ {
+ return this._treeList.elements();
+ }
+
+ /**
+ * Method enumerateUserColours.
+ *
+ * @return an Enumeration over all jalview.binding.UserColours elements
+ */
+ public java.util.Enumeration enumerateUserColours()
+ {
+ return this._userColoursList.elements();
+ }
+
+ /**
+ * Method enumerateViewport.
+ *
+ * @return an Enumeration over all jalview.binding.Viewport elements
+ */
+ public java.util.Enumeration enumerateViewport()
+ {
+ return this._viewportList.elements();
+ }
+
+ /**
+ * Returns the value of field 'featureSettings'.
+ *
+ * @return the value of field 'FeatureSettings'.
+ */
+ public jalview.binding.FeatureSettings getFeatureSettings()
+ {
+ return this._featureSettings;
+ }
+
+ /**
+ * Method getJGroup.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.JGroup at the given index
+ */
+ public jalview.binding.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.binding.JGroup) _JGroupList.get(index);
+ }
+
+ /**
+ * Method getJGroup.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.JGroup[] getJGroup()
+ {
+ jalview.binding.JGroup[] array = new jalview.binding.JGroup[0];
+ return (jalview.binding.JGroup[]) this._JGroupList.toArray(array);
+ }
+
+ /**
+ * Method getJGroupCount.
+ *
+ * @return the size of this collection
+ */
+ public int getJGroupCount()
+ {
+ return this._JGroupList.size();
+ }
+
+ /**
+ * Method getJSeq.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.JSeq at the given index
+ */
+ public jalview.binding.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.binding.JSeq) _JSeqList.get(index);
+ }
+
+ /**
+ * Method getJSeq.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.JSeq[] getJSeq()
+ {
+ jalview.binding.JSeq[] array = new jalview.binding.JSeq[0];
+ return (jalview.binding.JSeq[]) this._JSeqList.toArray(array);
+ }
+
+ /**
+ * Method getJSeqCount.
+ *
+ * @return the size of this collection
+ */
+ public int getJSeqCount()
+ {
+ return this._JSeqList.size();
+ }
+
+ /**
+ * Method getTree.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Tree at the given index
+ */
+ public jalview.binding.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.binding.Tree) _treeList.get(index);
+ }
+
+ /**
+ * Method getTree.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Tree[] getTree()
+ {
+ jalview.binding.Tree[] array = new jalview.binding.Tree[0];
+ return (jalview.binding.Tree[]) this._treeList.toArray(array);
+ }
+
+ /**
+ * Method getTreeCount.
+ *
+ * @return the size of this collection
+ */
+ public int getTreeCount()
+ {
+ return this._treeList.size();
+ }
+
+ /**
+ * Method getUserColours.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.UserColours at the given index
+ */
+ public jalview.binding.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.binding.UserColours) _userColoursList.get(index);
+ }
+
+ /**
+ * Method getUserColours.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.UserColours[] getUserColours()
+ {
+ jalview.binding.UserColours[] array = new jalview.binding.UserColours[0];
+ return (jalview.binding.UserColours[]) this._userColoursList
+ .toArray(array);
+ }
+
+ /**
+ * Method getUserColoursCount.
+ *
+ * @return the size of this collection
+ */
+ public int getUserColoursCount()
+ {
+ return this._userColoursList.size();
+ }
+
+ /**
+ * Method getViewport.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Viewport at the given index
+ */
+ public jalview.binding.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.binding.Viewport) _viewportList.get(index);
+ }
+
+ /**
+ * Method getViewport.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Viewport[] getViewport()
+ {
+ jalview.binding.Viewport[] array = new jalview.binding.Viewport[0];
+ return (jalview.binding.Viewport[]) this._viewportList.toArray(array);
+ }
+
+ /**
+ * Method getViewportCount.
+ *
+ * @return the size of this collection
+ */
+ public int getViewportCount()
+ {
+ return this._viewportList.size();
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ */
+ public void removeAllJGroup()
+ {
+ this._JGroupList.clear();
+ }
+
+ /**
+ */
+ public void removeAllJSeq()
+ {
+ this._JSeqList.clear();
+ }
+
+ /**
+ */
+ public void removeAllTree()
+ {
+ this._treeList.clear();
+ }
+
+ /**
+ */
+ public void removeAllUserColours()
+ {
+ this._userColoursList.clear();
+ }
+
+ /**
+ */
+ public void removeAllViewport()
+ {
+ this._viewportList.clear();
+ }
+
+ /**
+ * Method removeJGroup.
+ *
+ * @param vJGroup
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeJGroup(final jalview.binding.JGroup vJGroup)
+ {
+ boolean removed = _JGroupList.remove(vJGroup);
+ return removed;
+ }
+
+ /**
+ * Method removeJGroupAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.JGroup removeJGroupAt(final int index)
+ {
+ java.lang.Object obj = this._JGroupList.remove(index);
+ return (jalview.binding.JGroup) obj;
+ }
+
+ /**
+ * Method removeJSeq.
+ *
+ * @param vJSeq
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeJSeq(final jalview.binding.JSeq vJSeq)
+ {
+ boolean removed = _JSeqList.remove(vJSeq);
+ return removed;
+ }
+
+ /**
+ * Method removeJSeqAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.JSeq removeJSeqAt(final int index)
+ {
+ java.lang.Object obj = this._JSeqList.remove(index);
+ return (jalview.binding.JSeq) obj;
+ }
+
+ /**
+ * Method removeTree.
+ *
+ * @param vTree
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeTree(final jalview.binding.Tree vTree)
+ {
+ boolean removed = _treeList.remove(vTree);
+ return removed;
+ }
+
+ /**
+ * Method removeTreeAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Tree removeTreeAt(final int index)
+ {
+ java.lang.Object obj = this._treeList.remove(index);
+ return (jalview.binding.Tree) obj;
+ }
+
+ /**
+ * Method removeUserColours.
+ *
+ * @param vUserColours
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeUserColours(
+ final jalview.binding.UserColours vUserColours)
+ {
+ boolean removed = _userColoursList.remove(vUserColours);
+ return removed;
+ }
+
+ /**
+ * Method removeUserColoursAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.UserColours removeUserColoursAt(final int index)
+ {
+ java.lang.Object obj = this._userColoursList.remove(index);
+ return (jalview.binding.UserColours) obj;
+ }
+
+ /**
+ * Method removeViewport.
+ *
+ * @param vViewport
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeViewport(final jalview.binding.Viewport vViewport)
+ {
+ boolean removed = _viewportList.remove(vViewport);
+ return removed;
+ }
+
+ /**
+ * Method removeViewportAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Viewport removeViewportAt(final int index)
+ {
+ java.lang.Object obj = this._viewportList.remove(index);
+ return (jalview.binding.Viewport) obj;
+ }
+
+ /**
+ * Sets the value of field 'featureSettings'.
+ *
+ * @param featureSettings
+ * the value of field 'featureSettings'.
+ */
+ public void setFeatureSettings(
+ final jalview.binding.FeatureSettings featureSettings)
+ {
+ this._featureSettings = featureSettings;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vJGroup
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setJGroup(final int index,
+ final jalview.binding.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) + "]");
+ }
+
+ this._JGroupList.set(index, vJGroup);
+ }
+
+ /**
+ *
+ *
+ * @param vJGroupArray
+ */
+ public void setJGroup(final jalview.binding.JGroup[] vJGroupArray)
+ {
+ // -- copy array
+ _JGroupList.clear();
+
+ for (int i = 0; i < vJGroupArray.length; i++)
+ {
+ this._JGroupList.add(vJGroupArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vJSeq
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setJSeq(final int index, final jalview.binding.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) + "]");
+ }
+
+ this._JSeqList.set(index, vJSeq);
+ }
+
+ /**
+ *
+ *
+ * @param vJSeqArray
+ */
+ public void setJSeq(final jalview.binding.JSeq[] vJSeqArray)
+ {
+ // -- copy array
+ _JSeqList.clear();
+
+ for (int i = 0; i < vJSeqArray.length; i++)
+ {
+ this._JSeqList.add(vJSeqArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setTree(final int index, final jalview.binding.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) + "]");
+ }
+
+ this._treeList.set(index, vTree);
+ }
+
+ /**
+ *
+ *
+ * @param vTreeArray
+ */
+ public void setTree(final jalview.binding.Tree[] vTreeArray)
+ {
+ // -- copy array
+ _treeList.clear();
+
+ for (int i = 0; i < vTreeArray.length; i++)
+ {
+ this._treeList.add(vTreeArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vUserColours
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setUserColours(final int index,
+ final jalview.binding.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) + "]");
+ }
+
+ this._userColoursList.set(index, vUserColours);
+ }
+
+ /**
+ *
+ *
+ * @param vUserColoursArray
+ */
+ public void setUserColours(
+ final jalview.binding.UserColours[] vUserColoursArray)
+ {
+ // -- copy array
+ _userColoursList.clear();
+
+ for (int i = 0; i < vUserColoursArray.length; i++)
+ {
+ this._userColoursList.add(vUserColoursArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vViewport
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setViewport(final int index,
+ final jalview.binding.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) + "]");
+ }
+
+ this._viewportList.set(index, vViewport);
+ }
+
+ /**
+ *
+ *
+ * @param vViewportArray
+ */
+ public void setViewport(final jalview.binding.Viewport[] vViewportArray)
+ {
+ // -- copy array
+ _viewportList.clear();
+
+ for (int i = 0; i < vViewportArray.length; i++)
+ {
+ this._viewportList.add(vViewportArray[i]);
+ }
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.binding.JalviewModelSequence
+ */
+ public static jalview.binding.JalviewModelSequence unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.JalviewModelSequence) Unmarshaller.unmarshal(
+ jalview.binding.JalviewModelSequence.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class JalviewUserColours implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _schemeName.
- */
- private java.lang.String _schemeName;
-
- /**
- * Jalview colour scheme document version.
- *
- */
- private java.lang.String _version;
-
- /**
- * Field _colourList.
- */
- private java.util.Vector _colourList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public JalviewUserColours() {
- super();
- this._colourList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vColour
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addColour(
- final Colour vColour)
- throws java.lang.IndexOutOfBoundsException {
- this._colourList.addElement(vColour);
- }
-
- /**
- *
- *
- * @param index
- * @param vColour
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addColour(
- final int index,
- final Colour vColour)
- throws java.lang.IndexOutOfBoundsException {
- this._colourList.add(index, vColour);
- }
-
- /**
- * Method enumerateColour.
- *
- * @return an Enumeration over all Colour elements
- */
- public java.util.Enumeration enumerateColour(
- ) {
- return this._colourList.elements();
- }
-
- /**
- * Method getColour.
- *
- * @param index
- * @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 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 (Colour) _colourList.get(index);
- }
-
- /**
- * Method getColour.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public Colour[] getColour(
- ) {
- Colour[] array = new Colour[0];
- return (Colour[]) this._colourList.toArray(array);
- }
-
- /**
- * Method getColourCount.
- *
- * @return the size of this collection
- */
- public int getColourCount(
- ) {
- return this._colourList.size();
- }
-
- /**
- * Returns the value of field 'schemeName'.
- *
- * @return the value of field 'SchemeName'.
- */
- public java.lang.String getSchemeName(
- ) {
- return this._schemeName;
- }
-
- /**
- * Returns the value of field 'version'. The field 'version'
- * has the following description: Jalview colour scheme
- * document version.
- *
- *
- * @return the value of field 'Version'.
- */
- public java.lang.String getVersion(
- ) {
- return this._version;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllColour(
- ) {
- this._colourList.clear();
- }
-
- /**
- * 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;
+public class JalviewUserColours implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _schemeName.
+ */
+ private java.lang.String _schemeName;
+
+ /**
+ * Jalview colour scheme document version.
+ *
+ */
+ private java.lang.String _version;
+
+ /**
+ * Field _colourList.
+ */
+ private java.util.Vector _colourList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public JalviewUserColours()
+ {
+ super();
+ this._colourList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vColour
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addColour(final Colour vColour)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._colourList.addElement(vColour);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vColour
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addColour(final int index, final Colour vColour)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._colourList.add(index, vColour);
+ }
+
+ /**
+ * Method enumerateColour.
+ *
+ * @return an Enumeration over all Colour elements
+ */
+ public java.util.Enumeration enumerateColour()
+ {
+ return this._colourList.elements();
+ }
+
+ /**
+ * Method getColour.
+ *
+ * @param index
+ * @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 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) + "]");
}
- /**
- * Method removeColourAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public Colour removeColourAt(
- final int index) {
- java.lang.Object obj = this._colourList.remove(index);
- return (Colour) obj;
+ return (Colour) _colourList.get(index);
+ }
+
+ /**
+ * Method getColour.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public Colour[] getColour()
+ {
+ Colour[] array = new Colour[0];
+ return (Colour[]) this._colourList.toArray(array);
+ }
+
+ /**
+ * Method getColourCount.
+ *
+ * @return the size of this collection
+ */
+ public int getColourCount()
+ {
+ return this._colourList.size();
+ }
+
+ /**
+ * Returns the value of field 'schemeName'.
+ *
+ * @return the value of field 'SchemeName'.
+ */
+ public java.lang.String getSchemeName()
+ {
+ return this._schemeName;
+ }
+
+ /**
+ * Returns the value of field 'version'. The field 'version' has the following
+ * description: Jalview colour scheme document version.
+ *
+ *
+ * @return the value of field 'Version'.
+ */
+ public java.lang.String getVersion()
+ {
+ return this._version;
+ }
+
+ /**
+ * 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;
}
-
- /**
- *
- *
- * @param index
- * @param vColour
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
*/
- public void 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) + "]");
- }
-
- this._colourList.set(index, vColour);
+ public void removeAllColour()
+ {
+ this._colourList.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public Colour removeColourAt(final int index)
+ {
+ java.lang.Object obj = this._colourList.remove(index);
+ return (Colour) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vColour
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ 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) + "]");
}
- /**
- *
- *
- * @param vColourArray
- */
- public void setColour(
- final Colour[] vColourArray) {
- //-- copy array
- _colourList.clear();
-
- for (int i = 0; i < vColourArray.length; i++) {
- this._colourList.add(vColourArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'schemeName'.
- *
- * @param schemeName the value of field 'schemeName'.
- */
- public void setSchemeName(
- final java.lang.String schemeName) {
- this._schemeName = schemeName;
- }
-
- /**
- * Sets the value of field 'version'. The field 'version' has
- * the following description: Jalview colour scheme document
- * version.
- *
- *
- * @param version the value of field 'version'.
- */
- public void setVersion(
- final java.lang.String version) {
- this._version = version;
- }
-
- /**
- * 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.binding.JalviewUserColours
- */
- public static jalview.binding.JalviewUserColours unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(jalview.binding.JalviewUserColours.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);
+ this._colourList.set(index, vColour);
+ }
+
+ /**
+ *
+ *
+ * @param vColourArray
+ */
+ public void setColour(final Colour[] vColourArray)
+ {
+ // -- copy array
+ _colourList.clear();
+
+ for (int i = 0; i < vColourArray.length; i++)
+ {
+ this._colourList.add(vColourArray[i]);
}
+ }
+
+ /**
+ * Sets the value of field 'schemeName'.
+ *
+ * @param schemeName
+ * the value of field 'schemeName'.
+ */
+ public void setSchemeName(final java.lang.String schemeName)
+ {
+ this._schemeName = schemeName;
+ }
+
+ /**
+ * Sets the value of field 'version'. The field 'version' has the following
+ * description: Jalview colour scheme document version.
+ *
+ *
+ * @param version
+ * the value of field 'version'.
+ */
+ public void setVersion(final java.lang.String version)
+ {
+ this._version = version;
+ }
+
+ /**
+ * 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.binding.JalviewUserColours
+ */
+ public static jalview.binding.JalviewUserColours unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(
+ jalview.binding.JalviewUserColours.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Pdbentry implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _id.
- */
- private java.lang.String _id;
-
- /**
- * Field _type.
- */
- private java.lang.String _type;
-
- /**
- * Field _items.
- */
- private java.util.Vector _items;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Pdbentry() {
- super();
- this._items = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vPdbentryItem
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addPdbentryItem(
- final jalview.binding.PdbentryItem vPdbentryItem)
- throws java.lang.IndexOutOfBoundsException {
- this._items.addElement(vPdbentryItem);
- }
-
- /**
- *
- *
- * @param index
- * @param vPdbentryItem
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addPdbentryItem(
- final int index,
- final jalview.binding.PdbentryItem vPdbentryItem)
- throws java.lang.IndexOutOfBoundsException {
- this._items.add(index, vPdbentryItem);
- }
-
- /**
- * Method enumeratePdbentryItem.
- *
- * @return an Enumeration over all jalview.binding.PdbentryItem
- * elements
- */
- public java.util.Enumeration enumeratePdbentryItem(
- ) {
- return this._items.elements();
- }
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId(
- ) {
- return this._id;
- }
-
- /**
- * Method getPdbentryItem.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.PdbentryItem at the
- * given index
- */
- public jalview.binding.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.binding.PdbentryItem) _items.get(index);
- }
-
- /**
- * Method getPdbentryItem.Returns the contents of the
- * collection in an Array. <p>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 <i>know</i> that the Array returned is of
- * exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.PdbentryItem[] getPdbentryItem(
- ) {
- jalview.binding.PdbentryItem[] array = new jalview.binding.PdbentryItem[0];
- return (jalview.binding.PdbentryItem[]) this._items.toArray(array);
- }
-
- /**
- * Method getPdbentryItemCount.
- *
- * @return the size of this collection
- */
- public int getPdbentryItemCount(
- ) {
- return this._items.size();
- }
-
- /**
- * Returns the value of field 'type'.
- *
- * @return the value of field 'Type'.
- */
- public java.lang.String getType(
- ) {
- return this._type;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllPdbentryItem(
- ) {
- this._items.clear();
- }
-
- /**
- * Method removePdbentryItem.
- *
- * @param vPdbentryItem
- * @return true if the object was removed from the collection.
- */
- public boolean removePdbentryItem(
- final jalview.binding.PdbentryItem vPdbentryItem) {
- boolean removed = _items.remove(vPdbentryItem);
- return removed;
+public class Pdbentry implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _id.
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _type.
+ */
+ private java.lang.String _type;
+
+ /**
+ * Field _items.
+ */
+ private java.util.Vector _items;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Pdbentry()
+ {
+ super();
+ this._items = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vPdbentryItem
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addPdbentryItem(
+ final jalview.binding.PdbentryItem vPdbentryItem)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._items.addElement(vPdbentryItem);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vPdbentryItem
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addPdbentryItem(final int index,
+ final jalview.binding.PdbentryItem vPdbentryItem)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._items.add(index, vPdbentryItem);
+ }
+
+ /**
+ * Method enumeratePdbentryItem.
+ *
+ * @return an Enumeration over all jalview.binding.PdbentryItem elements
+ */
+ public java.util.Enumeration enumeratePdbentryItem()
+ {
+ return this._items.elements();
+ }
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId()
+ {
+ return this._id;
+ }
+
+ /**
+ * Method getPdbentryItem.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.PdbentryItem at the given index
+ */
+ public jalview.binding.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)
+ + "]");
}
- /**
- * Method removePdbentryItemAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.PdbentryItem removePdbentryItemAt(
- final int index) {
- java.lang.Object obj = this._items.remove(index);
- return (jalview.binding.PdbentryItem) obj;
+ return (jalview.binding.PdbentryItem) _items.get(index);
+ }
+
+ /**
+ * Method getPdbentryItem.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.PdbentryItem[] getPdbentryItem()
+ {
+ jalview.binding.PdbentryItem[] array = new jalview.binding.PdbentryItem[0];
+ return (jalview.binding.PdbentryItem[]) this._items.toArray(array);
+ }
+
+ /**
+ * Method getPdbentryItemCount.
+ *
+ * @return the size of this collection
+ */
+ public int getPdbentryItemCount()
+ {
+ return this._items.size();
+ }
+
+ /**
+ * Returns the value of field 'type'.
+ *
+ * @return the value of field 'Type'.
+ */
+ public java.lang.String getType()
+ {
+ return this._type;
+ }
+
+ /**
+ * 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;
}
-
- /**
- * Sets the value of field 'id'.
- *
- * @param id the value of field 'id'.
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
*/
- public void setId(
- final java.lang.String id) {
- this._id = id;
+ public void removeAllPdbentryItem()
+ {
+ this._items.clear();
+ }
+
+ /**
+ * Method removePdbentryItem.
+ *
+ * @param vPdbentryItem
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removePdbentryItem(
+ final jalview.binding.PdbentryItem vPdbentryItem)
+ {
+ boolean removed = _items.remove(vPdbentryItem);
+ return removed;
+ }
+
+ /**
+ * Method removePdbentryItemAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.PdbentryItem removePdbentryItemAt(final int index)
+ {
+ java.lang.Object obj = this._items.remove(index);
+ return (jalview.binding.PdbentryItem) obj;
+ }
+
+ /**
+ * Sets the value of field 'id'.
+ *
+ * @param id
+ * the value of field 'id'.
+ */
+ public void setId(final java.lang.String id)
+ {
+ this._id = id;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vPdbentryItem
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setPdbentryItem(final int index,
+ final jalview.binding.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)
+ + "]");
}
- /**
- *
- *
- * @param index
- * @param vPdbentryItem
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setPdbentryItem(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._items.set(index, vPdbentryItem);
- }
-
- /**
- *
- *
- * @param vPdbentryItemArray
- */
- public void setPdbentryItem(
- final jalview.binding.PdbentryItem[] vPdbentryItemArray) {
- //-- copy array
- _items.clear();
-
- for (int i = 0; i < vPdbentryItemArray.length; i++) {
- this._items.add(vPdbentryItemArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'type'.
- *
- * @param type the value of field 'type'.
- */
- public void setType(
- final java.lang.String type) {
- this._type = type;
- }
-
- /**
- * 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.binding.Pdbentry
- */
- public static jalview.binding.Pdbentry unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.Pdbentry) Unmarshaller.unmarshal(jalview.binding.Pdbentry.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);
+ this._items.set(index, vPdbentryItem);
+ }
+
+ /**
+ *
+ *
+ * @param vPdbentryItemArray
+ */
+ public void setPdbentryItem(
+ final jalview.binding.PdbentryItem[] vPdbentryItemArray)
+ {
+ // -- copy array
+ _items.clear();
+
+ for (int i = 0; i < vPdbentryItemArray.length; i++)
+ {
+ this._items.add(vPdbentryItemArray[i]);
}
+ }
+
+ /**
+ * Sets the value of field 'type'.
+ *
+ * @param type
+ * the value of field 'type'.
+ */
+ public void setType(final java.lang.String type)
+ {
+ this._type = type;
+ }
+
+ /**
+ * 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.binding.Pdbentry
+ */
+ public static jalview.binding.Pdbentry unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.Pdbentry) Unmarshaller.unmarshal(
+ jalview.binding.Pdbentry.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);
+ }
}
*
* @version $Revision$ $Date$
*/
-public class PdbentryItem implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _propertyList.
- */
- private java.util.Vector _propertyList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public PdbentryItem() {
- super();
- this._propertyList = new java.util.Vector();
+public class PdbentryItem implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _propertyList.
+ */
+ private java.util.Vector _propertyList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public PdbentryItem()
+ {
+ super();
+ this._propertyList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addProperty(final jalview.binding.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._propertyList.addElement(vProperty);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addProperty(final int index,
+ final jalview.binding.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._propertyList.add(index, vProperty);
+ }
+
+ /**
+ * Method enumerateProperty.
+ *
+ * @return an Enumeration over all jalview.binding.Property elements
+ */
+ public java.util.Enumeration enumerateProperty()
+ {
+ return this._propertyList.elements();
+ }
+
+ /**
+ * Method getProperty.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Property at the given index
+ */
+ public jalview.binding.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) + "]");
}
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vProperty
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
+ return (jalview.binding.Property) _propertyList.get(index);
+ }
+
+ /**
+ * Method getProperty.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Property[] getProperty()
+ {
+ jalview.binding.Property[] array = new jalview.binding.Property[0];
+ return (jalview.binding.Property[]) this._propertyList.toArray(array);
+ }
+
+ /**
+ * Method getPropertyCount.
+ *
+ * @return the size of this collection
+ */
+ public int getPropertyCount()
+ {
+ return this._propertyList.size();
+ }
+
+ /**
*/
- public void addProperty(
- final jalview.binding.Property vProperty)
- throws java.lang.IndexOutOfBoundsException {
- this._propertyList.addElement(vProperty);
+ public void removeAllProperty()
+ {
+ this._propertyList.clear();
+ }
+
+ /**
+ * Method removeProperty.
+ *
+ * @param vProperty
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeProperty(final jalview.binding.Property vProperty)
+ {
+ boolean removed = _propertyList.remove(vProperty);
+ return removed;
+ }
+
+ /**
+ * Method removePropertyAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Property removePropertyAt(final int index)
+ {
+ java.lang.Object obj = this._propertyList.remove(index);
+ return (jalview.binding.Property) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setProperty(final int index,
+ final jalview.binding.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) + "]");
}
- /**
- *
- *
- * @param index
- * @param vProperty
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addProperty(
- final int index,
- final jalview.binding.Property vProperty)
- throws java.lang.IndexOutOfBoundsException {
- this._propertyList.add(index, vProperty);
- }
-
- /**
- * Method enumerateProperty.
- *
- * @return an Enumeration over all jalview.binding.Property
- * elements
- */
- public java.util.Enumeration enumerateProperty(
- ) {
- return this._propertyList.elements();
- }
-
- /**
- * Method getProperty.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.Property at the
- * given index
- */
- public jalview.binding.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.binding.Property) _propertyList.get(index);
- }
-
- /**
- * Method getProperty.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Property[] getProperty(
- ) {
- jalview.binding.Property[] array = new jalview.binding.Property[0];
- return (jalview.binding.Property[]) this._propertyList.toArray(array);
- }
-
- /**
- * Method getPropertyCount.
- *
- * @return the size of this collection
- */
- public int getPropertyCount(
- ) {
- return this._propertyList.size();
- }
-
- /**
- */
- public void removeAllProperty(
- ) {
- this._propertyList.clear();
- }
-
- /**
- * Method removeProperty.
- *
- * @param vProperty
- * @return true if the object was removed from the collection.
- */
- public boolean removeProperty(
- final jalview.binding.Property vProperty) {
- boolean removed = _propertyList.remove(vProperty);
- return removed;
- }
-
- /**
- * Method removePropertyAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Property removePropertyAt(
- final int index) {
- java.lang.Object obj = this._propertyList.remove(index);
- return (jalview.binding.Property) obj;
- }
-
- /**
- *
- *
- * @param index
- * @param vProperty
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setProperty(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._propertyList.set(index, vProperty);
- }
-
- /**
- *
- *
- * @param vPropertyArray
- */
- public void setProperty(
- final jalview.binding.Property[] vPropertyArray) {
- //-- copy array
- _propertyList.clear();
-
- for (int i = 0; i < vPropertyArray.length; i++) {
- this._propertyList.add(vPropertyArray[i]);
- }
+ this._propertyList.set(index, vProperty);
+ }
+
+ /**
+ *
+ *
+ * @param vPropertyArray
+ */
+ public void setProperty(final jalview.binding.Property[] vPropertyArray)
+ {
+ // -- copy array
+ _propertyList.clear();
+
+ for (int i = 0; i < vPropertyArray.length; i++)
+ {
+ this._propertyList.add(vPropertyArray[i]);
}
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Pdbids extends Pdbentry
-implements java.io.Serializable
+public class Pdbids extends Pdbentry implements java.io.Serializable
{
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Pdbids() {
- super();
- }
-
+ public Pdbids()
+ {
+ super();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * 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;
+ /**
+ * 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 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);
- }
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
- /**
- * Method 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.binding.Pdbentry
- */
- public static jalview.binding.Pdbentry unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.Pdbentry) Unmarshaller.unmarshal(jalview.binding.Pdbids.class, reader);
- }
+ /**
+ * 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.binding.Pdbentry
+ */
+ public static jalview.binding.Pdbentry unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.Pdbentry) Unmarshaller.unmarshal(
+ jalview.binding.Pdbids.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Property implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
- /**
- * Field _value.
- */
- private java.lang.String _value;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Property() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName(
- ) {
- return this._name;
- }
-
- /**
- * 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 'name'.
- *
- * @param name the value of field 'name'.
- */
- public void setName(
- final java.lang.String name) {
- this._name = name;
- }
-
- /**
- * 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.binding.Property
- */
- public static jalview.binding.Property unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.Property) Unmarshaller.unmarshal(jalview.binding.Property.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);
+public class Property implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _value.
+ */
+ private java.lang.String _value;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Property()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName()
+ {
+ return this._name;
+ }
+
+ /**
+ * 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 'name'.
+ *
+ * @param name
+ * the value of field 'name'.
+ */
+ public void setName(final java.lang.String name)
+ {
+ this._name = name;
+ }
+
+ /**
+ * 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.binding.Property
+ */
+ public static jalview.binding.Property unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.Property) Unmarshaller.unmarshal(
+ jalview.binding.Property.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Sequence extends SequenceType
-implements java.io.Serializable
+public class Sequence extends SequenceType implements java.io.Serializable
{
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Sequence() {
- super();
- }
-
+ public Sequence()
+ {
+ super();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * 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;
+ /**
+ * 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 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);
- }
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
- /**
- * Method 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.binding.SequenceType
- */
- public static jalview.binding.SequenceType unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.SequenceType) Unmarshaller.unmarshal(jalview.binding.Sequence.class, reader);
- }
+ /**
+ * 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.binding.SequenceType
+ */
+ public static jalview.binding.SequenceType unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.SequenceType) Unmarshaller.unmarshal(
+ jalview.binding.Sequence.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class SequenceSet implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _gapChar.
- */
- private java.lang.String _gapChar;
-
- /**
- * Field _aligned.
- */
- private boolean _aligned;
-
- /**
- * keeps track of state for field: _aligned
- */
- private boolean _has_aligned;
-
- /**
- * Field _sequenceList.
- */
- private java.util.Vector _sequenceList;
-
- /**
- * Field _annotationList.
- */
- private java.util.Vector _annotationList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public SequenceSet() {
- super();
- this._sequenceList = new java.util.Vector();
- this._annotationList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vAnnotation
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAnnotation(
- final jalview.binding.Annotation vAnnotation)
- throws java.lang.IndexOutOfBoundsException {
- this._annotationList.addElement(vAnnotation);
- }
-
- /**
- *
- *
- * @param index
- * @param vAnnotation
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAnnotation(
- final int index,
- final jalview.binding.Annotation vAnnotation)
- throws java.lang.IndexOutOfBoundsException {
- this._annotationList.add(index, vAnnotation);
- }
-
- /**
- *
- *
- * @param vSequence
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSequence(
- final jalview.binding.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException {
- this._sequenceList.addElement(vSequence);
- }
-
- /**
- *
- *
- * @param index
- * @param vSequence
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSequence(
- final int index,
- final jalview.binding.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException {
- this._sequenceList.add(index, vSequence);
- }
-
- /**
- */
- public void deleteAligned(
- ) {
- this._has_aligned= false;
- }
-
- /**
- * Method enumerateAnnotation.
- *
- * @return an Enumeration over all jalview.binding.Annotation
- * elements
- */
- public java.util.Enumeration enumerateAnnotation(
- ) {
- return this._annotationList.elements();
- }
-
- /**
- * Method enumerateSequence.
- *
- * @return an Enumeration over all jalview.binding.Sequence
- * elements
- */
- public java.util.Enumeration enumerateSequence(
- ) {
- return this._sequenceList.elements();
- }
-
- /**
- * Returns the value of field 'aligned'.
- *
- * @return the value of field 'Aligned'.
- */
- public boolean getAligned(
- ) {
- return this._aligned;
- }
-
- /**
- * Method getAnnotation.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.Annotation at the
- * given index
- */
- public jalview.binding.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.binding.Annotation) _annotationList.get(index);
- }
-
- /**
- * Method getAnnotation.Returns the contents of the collection
- * in an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Annotation[] getAnnotation(
- ) {
- jalview.binding.Annotation[] array = new jalview.binding.Annotation[0];
- return (jalview.binding.Annotation[]) this._annotationList.toArray(array);
- }
-
- /**
- * Method getAnnotationCount.
- *
- * @return the size of this collection
- */
- public int getAnnotationCount(
- ) {
- return this._annotationList.size();
- }
-
- /**
- * Returns the value of field 'gapChar'.
- *
- * @return the value of field 'GapChar'.
- */
- public java.lang.String getGapChar(
- ) {
- return this._gapChar;
- }
-
- /**
- * Method getSequence.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.binding.Sequence at the
- * given index
- */
- public jalview.binding.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.binding.Sequence) _sequenceList.get(index);
- }
-
- /**
- * Method getSequence.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.binding.Sequence[] getSequence(
- ) {
- jalview.binding.Sequence[] array = new jalview.binding.Sequence[0];
- return (jalview.binding.Sequence[]) this._sequenceList.toArray(array);
- }
-
- /**
- * Method getSequenceCount.
- *
- * @return the size of this collection
- */
- public int getSequenceCount(
- ) {
- return this._sequenceList.size();
- }
-
- /**
- * Method hasAligned.
- *
- * @return true if at least one Aligned has been added
- */
- public boolean hasAligned(
- ) {
- return this._has_aligned;
- }
-
- /**
- * Returns the value of field 'aligned'.
- *
- * @return the value of field 'Aligned'.
- */
- public boolean isAligned(
- ) {
- return this._aligned;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllAnnotation(
- ) {
- this._annotationList.clear();
- }
-
- /**
- */
- public void removeAllSequence(
- ) {
- this._sequenceList.clear();
- }
-
- /**
- * Method removeAnnotation.
- *
- * @param vAnnotation
- * @return true if the object was removed from the collection.
- */
- public boolean removeAnnotation(
- final jalview.binding.Annotation vAnnotation) {
- boolean removed = _annotationList.remove(vAnnotation);
- return removed;
- }
-
- /**
- * Method removeAnnotationAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Annotation removeAnnotationAt(
- final int index) {
- java.lang.Object obj = this._annotationList.remove(index);
- return (jalview.binding.Annotation) obj;
- }
-
- /**
- * Method removeSequence.
- *
- * @param vSequence
- * @return true if the object was removed from the collection.
- */
- public boolean removeSequence(
- final jalview.binding.Sequence vSequence) {
- boolean removed = _sequenceList.remove(vSequence);
- return removed;
- }
-
- /**
- * Method removeSequenceAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.binding.Sequence removeSequenceAt(
- final int index) {
- java.lang.Object obj = this._sequenceList.remove(index);
- return (jalview.binding.Sequence) obj;
- }
-
- /**
- * Sets the value of field 'aligned'.
- *
- * @param aligned the value of field 'aligned'.
- */
- public void setAligned(
- final boolean aligned) {
- this._aligned = aligned;
- this._has_aligned = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vAnnotation
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setAnnotation(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._annotationList.set(index, vAnnotation);
- }
-
- /**
- *
- *
- * @param vAnnotationArray
- */
- public void setAnnotation(
- final jalview.binding.Annotation[] vAnnotationArray) {
- //-- copy array
- _annotationList.clear();
-
- for (int i = 0; i < vAnnotationArray.length; i++) {
- this._annotationList.add(vAnnotationArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'gapChar'.
- *
- * @param gapChar the value of field 'gapChar'.
- */
- public void setGapChar(
- final java.lang.String gapChar) {
- this._gapChar = gapChar;
- }
-
- /**
- *
- *
- * @param index
- * @param vSequence
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setSequence(
- final int index,
- final jalview.binding.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) + "]");
- }
-
- this._sequenceList.set(index, vSequence);
- }
-
- /**
- *
- *
- * @param vSequenceArray
- */
- public void setSequence(
- final jalview.binding.Sequence[] vSequenceArray) {
- //-- copy array
- _sequenceList.clear();
-
- for (int i = 0; i < vSequenceArray.length; i++) {
- this._sequenceList.add(vSequenceArray[i]);
- }
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.binding.SequenceSet
- */
- public static jalview.binding.SequenceSet unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.SequenceSet) Unmarshaller.unmarshal(jalview.binding.SequenceSet.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);
- }
+public class SequenceSet implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _gapChar.
+ */
+ private java.lang.String _gapChar;
+
+ /**
+ * Field _aligned.
+ */
+ private boolean _aligned;
+
+ /**
+ * keeps track of state for field: _aligned
+ */
+ private boolean _has_aligned;
+
+ /**
+ * Field _sequenceList.
+ */
+ private java.util.Vector _sequenceList;
+
+ /**
+ * Field _annotationList.
+ */
+ private java.util.Vector _annotationList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public SequenceSet()
+ {
+ super();
+ this._sequenceList = new java.util.Vector();
+ this._annotationList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vAnnotation
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAnnotation(final jalview.binding.Annotation vAnnotation)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._annotationList.addElement(vAnnotation);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotation
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAnnotation(final int index,
+ final jalview.binding.Annotation vAnnotation)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._annotationList.add(index, vAnnotation);
+ }
+
+ /**
+ *
+ *
+ * @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSequence(final jalview.binding.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._sequenceList.addElement(vSequence);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSequence(final int index,
+ final jalview.binding.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._sequenceList.add(index, vSequence);
+ }
+
+ /**
+ */
+ public void deleteAligned()
+ {
+ this._has_aligned = false;
+ }
+
+ /**
+ * Method enumerateAnnotation.
+ *
+ * @return an Enumeration over all jalview.binding.Annotation elements
+ */
+ public java.util.Enumeration enumerateAnnotation()
+ {
+ return this._annotationList.elements();
+ }
+
+ /**
+ * Method enumerateSequence.
+ *
+ * @return an Enumeration over all jalview.binding.Sequence elements
+ */
+ public java.util.Enumeration enumerateSequence()
+ {
+ return this._sequenceList.elements();
+ }
+
+ /**
+ * Returns the value of field 'aligned'.
+ *
+ * @return the value of field 'Aligned'.
+ */
+ public boolean getAligned()
+ {
+ return this._aligned;
+ }
+
+ /**
+ * Method getAnnotation.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Annotation at the given index
+ */
+ public jalview.binding.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.binding.Annotation) _annotationList.get(index);
+ }
+
+ /**
+ * Method getAnnotation.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Annotation[] getAnnotation()
+ {
+ jalview.binding.Annotation[] array = new jalview.binding.Annotation[0];
+ return (jalview.binding.Annotation[]) this._annotationList
+ .toArray(array);
+ }
+
+ /**
+ * Method getAnnotationCount.
+ *
+ * @return the size of this collection
+ */
+ public int getAnnotationCount()
+ {
+ return this._annotationList.size();
+ }
+
+ /**
+ * Returns the value of field 'gapChar'.
+ *
+ * @return the value of field 'GapChar'.
+ */
+ public java.lang.String getGapChar()
+ {
+ return this._gapChar;
+ }
+
+ /**
+ * Method getSequence.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Sequence at the given index
+ */
+ public jalview.binding.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.binding.Sequence) _sequenceList.get(index);
+ }
+
+ /**
+ * Method getSequence.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.binding.Sequence[] getSequence()
+ {
+ jalview.binding.Sequence[] array = new jalview.binding.Sequence[0];
+ return (jalview.binding.Sequence[]) this._sequenceList.toArray(array);
+ }
+
+ /**
+ * Method getSequenceCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSequenceCount()
+ {
+ return this._sequenceList.size();
+ }
+
+ /**
+ * Method hasAligned.
+ *
+ * @return true if at least one Aligned has been added
+ */
+ public boolean hasAligned()
+ {
+ return this._has_aligned;
+ }
+
+ /**
+ * Returns the value of field 'aligned'.
+ *
+ * @return the value of field 'Aligned'.
+ */
+ public boolean isAligned()
+ {
+ return this._aligned;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ */
+ public void removeAllAnnotation()
+ {
+ this._annotationList.clear();
+ }
+
+ /**
+ */
+ public void removeAllSequence()
+ {
+ this._sequenceList.clear();
+ }
+
+ /**
+ * Method removeAnnotation.
+ *
+ * @param vAnnotation
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAnnotation(
+ final jalview.binding.Annotation vAnnotation)
+ {
+ boolean removed = _annotationList.remove(vAnnotation);
+ return removed;
+ }
+
+ /**
+ * Method removeAnnotationAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Annotation removeAnnotationAt(final int index)
+ {
+ java.lang.Object obj = this._annotationList.remove(index);
+ return (jalview.binding.Annotation) obj;
+ }
+
+ /**
+ * Method removeSequence.
+ *
+ * @param vSequence
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSequence(final jalview.binding.Sequence vSequence)
+ {
+ boolean removed = _sequenceList.remove(vSequence);
+ return removed;
+ }
+
+ /**
+ * Method removeSequenceAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Sequence removeSequenceAt(final int index)
+ {
+ java.lang.Object obj = this._sequenceList.remove(index);
+ return (jalview.binding.Sequence) obj;
+ }
+
+ /**
+ * Sets the value of field 'aligned'.
+ *
+ * @param aligned
+ * the value of field 'aligned'.
+ */
+ public void setAligned(final boolean aligned)
+ {
+ this._aligned = aligned;
+ this._has_aligned = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotation
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setAnnotation(final int index,
+ final jalview.binding.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) + "]");
+ }
+
+ this._annotationList.set(index, vAnnotation);
+ }
+
+ /**
+ *
+ *
+ * @param vAnnotationArray
+ */
+ public void setAnnotation(
+ final jalview.binding.Annotation[] vAnnotationArray)
+ {
+ // -- copy array
+ _annotationList.clear();
+
+ for (int i = 0; i < vAnnotationArray.length; i++)
+ {
+ this._annotationList.add(vAnnotationArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'gapChar'.
+ *
+ * @param gapChar
+ * the value of field 'gapChar'.
+ */
+ public void setGapChar(final java.lang.String gapChar)
+ {
+ this._gapChar = gapChar;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setSequence(final int index,
+ final jalview.binding.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) + "]");
+ }
+
+ this._sequenceList.set(index, vSequence);
+ }
+
+ /**
+ *
+ *
+ * @param vSequenceArray
+ */
+ public void setSequence(final jalview.binding.Sequence[] vSequenceArray)
+ {
+ // -- copy array
+ _sequenceList.clear();
+
+ for (int i = 0; i < vSequenceArray.length; i++)
+ {
+ this._sequenceList.add(vSequenceArray[i]);
+ }
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.binding.SequenceSet
+ */
+ public static jalview.binding.SequenceSet unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.SequenceSet) Unmarshaller.unmarshal(
+ jalview.binding.SequenceSet.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class SequenceType implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _id.
- */
- private java.lang.String _id;
-
- /**
- * Field _sequence.
- */
- private java.lang.String _sequence;
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public SequenceType() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId(
- ) {
- return this._id;
- }
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName(
- ) {
- return this._name;
- }
-
- /**
- * Returns the value of field 'sequence'.
- *
- * @return the value of field 'Sequence'.
- */
- public java.lang.String getSequence(
- ) {
- return this._sequence;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- * Sets the value of field 'id'.
- *
- * @param id the value of field 'id'.
- */
- public void setId(
- final java.lang.String id) {
- this._id = id;
- }
-
- /**
- * Sets the value of field 'name'.
- *
- * @param name the value of field 'name'.
- */
- public void setName(
- final java.lang.String name) {
- this._name = name;
- }
-
- /**
- * Sets the value of field 'sequence'.
- *
- * @param sequence the value of field 'sequence'.
- */
- public void setSequence(
- final java.lang.String sequence) {
- this._sequence = sequence;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.binding.SequenceType
- */
- public static jalview.binding.SequenceType unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.SequenceType) Unmarshaller.unmarshal(jalview.binding.SequenceType.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);
+public class SequenceType implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _id.
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _sequence.
+ */
+ private java.lang.String _sequence;
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public SequenceType()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId()
+ {
+ return this._id;
+ }
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName()
+ {
+ return this._name;
+ }
+
+ /**
+ * Returns the value of field 'sequence'.
+ *
+ * @return the value of field 'Sequence'.
+ */
+ public java.lang.String getSequence()
+ {
+ return this._sequence;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Sets the value of field 'id'.
+ *
+ * @param id
+ * the value of field 'id'.
+ */
+ public void setId(final java.lang.String id)
+ {
+ this._id = id;
+ }
+
+ /**
+ * Sets the value of field 'name'.
+ *
+ * @param name
+ * the value of field 'name'.
+ */
+ public void setName(final java.lang.String name)
+ {
+ this._name = name;
+ }
+
+ /**
+ * Sets the value of field 'sequence'.
+ *
+ * @param sequence
+ * the value of field 'sequence'.
+ */
+ public void setSequence(final java.lang.String sequence)
+ {
+ this._sequence = sequence;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.binding.SequenceType
+ */
+ public static jalview.binding.SequenceType unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.SequenceType) Unmarshaller.unmarshal(
+ jalview.binding.SequenceType.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Setting implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _type.
- */
- private java.lang.String _type;
-
- /**
- * Field _colour.
- */
- private int _colour;
-
- /**
- * keeps track of state for field: _colour
- */
- private boolean _has_colour;
-
- /**
- * Field _display.
- */
- private boolean _display;
-
- /**
- * keeps track of state for field: _display
- */
- private boolean _has_display;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Setting() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteColour(
- ) {
- this._has_colour= false;
- }
-
- /**
- */
- public void deleteDisplay(
- ) {
- this._has_display= false;
- }
-
- /**
- * Returns the value of field 'colour'.
- *
- * @return the value of field 'Colour'.
- */
- public int getColour(
- ) {
- return this._colour;
- }
-
- /**
- * Returns the value of field 'display'.
- *
- * @return the value of field 'Display'.
- */
- public boolean getDisplay(
- ) {
- return this._display;
- }
-
- /**
- * Returns the value of field 'type'.
- *
- * @return the value of field 'Type'.
+public class Setting implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _type.
+ */
+ private java.lang.String _type;
+
+ /**
+ * Field _colour.
+ */
+ private int _colour;
+
+ /**
+ * keeps track of state for field: _colour
+ */
+ private boolean _has_colour;
+
+ /**
+ * Field _display.
+ */
+ private boolean _display;
+
+ /**
+ * keeps track of state for field: _display
+ */
+ private boolean _has_display;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Setting()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
*/
- public java.lang.String getType(
- ) {
- return this._type;
- }
-
- /**
- * Method hasColour.
- *
- * @return true if at least one Colour has been added
- */
- public boolean hasColour(
- ) {
- return this._has_colour;
- }
-
- /**
- * Method hasDisplay.
- *
- * @return true if at least one Display has been added
- */
- public boolean hasDisplay(
- ) {
- return this._has_display;
- }
-
- /**
- * Returns the value of field 'display'.
- *
- * @return the value of field 'Display'.
- */
- public boolean isDisplay(
- ) {
- return this._display;
- }
-
- /**
- * 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 'colour'.
- *
- * @param colour the value of field 'colour'.
- */
- public void setColour(
- final int colour) {
- this._colour = colour;
- this._has_colour = true;
- }
-
- /**
- * Sets the value of field 'display'.
- *
- * @param display the value of field 'display'.
- */
- public void setDisplay(
- final boolean display) {
- this._display = display;
- this._has_display = true;
- }
-
- /**
- * Sets the value of field 'type'.
- *
- * @param type the value of field 'type'.
- */
- public void setType(
- final java.lang.String type) {
- this._type = type;
- }
-
- /**
- * 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.binding.Setting
- */
- public static jalview.binding.Setting unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.Setting) Unmarshaller.unmarshal(jalview.binding.Setting.class, reader);
- }
+ public void deleteColour()
+ {
+ this._has_colour = false;
+ }
- /**
- *
- *
- * @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);
+ public void deleteDisplay()
+ {
+ this._has_display = false;
+ }
+
+ /**
+ * Returns the value of field 'colour'.
+ *
+ * @return the value of field 'Colour'.
+ */
+ public int getColour()
+ {
+ return this._colour;
+ }
+
+ /**
+ * Returns the value of field 'display'.
+ *
+ * @return the value of field 'Display'.
+ */
+ public boolean getDisplay()
+ {
+ return this._display;
+ }
+
+ /**
+ * Returns the value of field 'type'.
+ *
+ * @return the value of field 'Type'.
+ */
+ public java.lang.String getType()
+ {
+ return this._type;
+ }
+
+ /**
+ * Method hasColour.
+ *
+ * @return true if at least one Colour has been added
+ */
+ public boolean hasColour()
+ {
+ return this._has_colour;
+ }
+
+ /**
+ * Method hasDisplay.
+ *
+ * @return true if at least one Display has been added
+ */
+ public boolean hasDisplay()
+ {
+ return this._has_display;
+ }
+
+ /**
+ * Returns the value of field 'display'.
+ *
+ * @return the value of field 'Display'.
+ */
+ public boolean isDisplay()
+ {
+ return this._display;
+ }
+
+ /**
+ * 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 'colour'.
+ *
+ * @param colour
+ * the value of field 'colour'.
+ */
+ public void setColour(final int colour)
+ {
+ this._colour = colour;
+ this._has_colour = true;
+ }
+
+ /**
+ * Sets the value of field 'display'.
+ *
+ * @param display
+ * the value of field 'display'.
+ */
+ public void setDisplay(final boolean display)
+ {
+ this._display = display;
+ this._has_display = true;
+ }
+
+ /**
+ * Sets the value of field 'type'.
+ *
+ * @param type
+ * the value of field 'type'.
+ */
+ public void setType(final java.lang.String type)
+ {
+ this._type = type;
+ }
+
+ /**
+ * 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.binding.Setting
+ */
+ public static jalview.binding.Setting unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.Setting) Unmarshaller.unmarshal(
+ jalview.binding.Setting.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Tree implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _width.
- */
- private int _width;
-
- /**
- * keeps track of state for field: _width
- */
- private boolean _has_width;
-
- /**
- * Field _height.
- */
- private int _height;
-
- /**
- * keeps track of state for field: _height
- */
- private boolean _has_height;
-
- /**
- * Field _xpos.
- */
- private int _xpos;
-
- /**
- * keeps track of state for field: _xpos
- */
- private boolean _has_xpos;
-
- /**
- * Field _ypos.
- */
- private int _ypos;
-
- /**
- * keeps track of state for field: _ypos
- */
- private boolean _has_ypos;
-
- /**
- * Field _fontName.
- */
- private java.lang.String _fontName;
-
- /**
- * Field _fontSize.
- */
- private int _fontSize;
-
- /**
- * keeps track of state for field: _fontSize
- */
- private boolean _has_fontSize;
-
- /**
- * Field _fontStyle.
- */
- private int _fontStyle;
-
- /**
- * keeps track of state for field: _fontStyle
- */
- private boolean _has_fontStyle;
-
- /**
- * Field _threshold.
- */
- private float _threshold;
-
- /**
- * keeps track of state for field: _threshold
- */
- private boolean _has_threshold;
-
- /**
- * Field _showBootstrap.
- */
- private boolean _showBootstrap;
-
- /**
- * keeps track of state for field: _showBootstrap
- */
- private boolean _has_showBootstrap;
-
- /**
- * Field _showDistances.
- */
- private boolean _showDistances;
-
- /**
- * keeps track of state for field: _showDistances
- */
- private boolean _has_showDistances;
-
- /**
- * Field _markUnlinked.
- */
- private boolean _markUnlinked;
-
- /**
- * keeps track of state for field: _markUnlinked
- */
- private boolean _has_markUnlinked;
-
- /**
- * Field _fitToWindow.
- */
- private boolean _fitToWindow;
-
- /**
- * keeps track of state for field: _fitToWindow
- */
- private boolean _has_fitToWindow;
-
- /**
- * Field _currentTree.
- */
- private boolean _currentTree;
-
- /**
- * keeps track of state for field: _currentTree
- */
- private boolean _has_currentTree;
-
- /**
- * Field _title.
- */
- private java.lang.String _title;
-
- /**
- * Field _newick.
- */
- private java.lang.String _newick;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Tree() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteCurrentTree(
- ) {
- this._has_currentTree= false;
- }
-
- /**
- */
- public void deleteFitToWindow(
- ) {
- this._has_fitToWindow= false;
- }
-
- /**
- */
- public void deleteFontSize(
- ) {
- this._has_fontSize= false;
- }
-
- /**
- */
- public void deleteFontStyle(
- ) {
- this._has_fontStyle= false;
- }
-
- /**
- */
- public void deleteHeight(
- ) {
- this._has_height= false;
- }
-
- /**
- */
- public void deleteMarkUnlinked(
- ) {
- this._has_markUnlinked= false;
- }
-
- /**
- */
- public void deleteShowBootstrap(
- ) {
- this._has_showBootstrap= false;
- }
-
- /**
- */
- public void deleteShowDistances(
- ) {
- this._has_showDistances= false;
- }
-
- /**
- */
- public void deleteThreshold(
- ) {
- this._has_threshold= false;
- }
-
- /**
- */
- public void deleteWidth(
- ) {
- this._has_width= false;
- }
-
- /**
- */
- public void deleteXpos(
- ) {
- this._has_xpos= false;
- }
-
- /**
- */
- public void deleteYpos(
- ) {
- this._has_ypos= false;
- }
-
- /**
- * Returns the value of field 'currentTree'.
- *
- * @return the value of field 'CurrentTree'.
- */
- public boolean getCurrentTree(
- ) {
- return this._currentTree;
- }
-
- /**
- * Returns the value of field 'fitToWindow'.
- *
- * @return the value of field 'FitToWindow'.
- */
- public boolean getFitToWindow(
- ) {
- return this._fitToWindow;
- }
-
- /**
- * Returns the value of field 'fontName'.
- *
- * @return the value of field 'FontName'.
- */
- public java.lang.String getFontName(
- ) {
- return this._fontName;
- }
-
- /**
- * Returns the value of field 'fontSize'.
- *
- * @return the value of field 'FontSize'.
- */
- public int getFontSize(
- ) {
- return this._fontSize;
- }
-
- /**
- * Returns the value of field 'fontStyle'.
- *
- * @return the value of field 'FontStyle'.
- */
- public int getFontStyle(
- ) {
- return this._fontStyle;
- }
-
- /**
- * Returns the value of field 'height'.
- *
- * @return the value of field 'Height'.
- */
- public int getHeight(
- ) {
- return this._height;
- }
-
- /**
- * Returns the value of field 'markUnlinked'.
- *
- * @return the value of field 'MarkUnlinked'.
- */
- public boolean getMarkUnlinked(
- ) {
- return this._markUnlinked;
- }
-
- /**
- * Returns the value of field 'newick'.
- *
- * @return the value of field 'Newick'.
- */
- public java.lang.String getNewick(
- ) {
- return this._newick;
- }
-
- /**
- * Returns the value of field 'showBootstrap'.
- *
- * @return the value of field 'ShowBootstrap'.
- */
- public boolean getShowBootstrap(
- ) {
- return this._showBootstrap;
- }
-
- /**
- * Returns the value of field 'showDistances'.
- *
- * @return the value of field 'ShowDistances'.
- */
- public boolean getShowDistances(
- ) {
- return this._showDistances;
- }
-
- /**
- * Returns the value of field 'threshold'.
- *
- * @return the value of field 'Threshold'.
- */
- public float getThreshold(
- ) {
- return this._threshold;
- }
-
- /**
- * Returns the value of field 'title'.
- *
- * @return the value of field 'Title'.
- */
- public java.lang.String getTitle(
- ) {
- return this._title;
- }
-
- /**
- * Returns the value of field 'width'.
- *
- * @return the value of field 'Width'.
- */
- public int getWidth(
- ) {
- return this._width;
- }
-
- /**
- * Returns the value of field 'xpos'.
- *
- * @return the value of field 'Xpos'.
- */
- public int getXpos(
- ) {
- return this._xpos;
- }
-
- /**
- * Returns the value of field 'ypos'.
- *
- * @return the value of field 'Ypos'.
- */
- public int getYpos(
- ) {
- return this._ypos;
- }
-
- /**
- * Method hasCurrentTree.
- *
- * @return true if at least one CurrentTree has been added
- */
- public boolean hasCurrentTree(
- ) {
- return this._has_currentTree;
- }
-
- /**
- * Method hasFitToWindow.
- *
- * @return true if at least one FitToWindow has been added
- */
- public boolean hasFitToWindow(
- ) {
- return this._has_fitToWindow;
- }
-
- /**
- * Method hasFontSize.
- *
- * @return true if at least one FontSize has been added
- */
- public boolean hasFontSize(
- ) {
- return this._has_fontSize;
- }
-
- /**
- * Method hasFontStyle.
- *
- * @return true if at least one FontStyle has been added
- */
- public boolean hasFontStyle(
- ) {
- return this._has_fontStyle;
- }
-
- /**
- * Method hasHeight.
- *
- * @return true if at least one Height has been added
- */
- public boolean hasHeight(
- ) {
- return this._has_height;
- }
-
- /**
- * Method hasMarkUnlinked.
- *
- * @return true if at least one MarkUnlinked has been added
- */
- public boolean hasMarkUnlinked(
- ) {
- return this._has_markUnlinked;
- }
-
- /**
- * Method hasShowBootstrap.
- *
- * @return true if at least one ShowBootstrap has been added
- */
- public boolean hasShowBootstrap(
- ) {
- return this._has_showBootstrap;
- }
-
- /**
- * Method hasShowDistances.
- *
- * @return true if at least one ShowDistances has been added
- */
- public boolean hasShowDistances(
- ) {
- return this._has_showDistances;
- }
-
- /**
- * Method hasThreshold.
- *
- * @return true if at least one Threshold has been added
- */
- public boolean hasThreshold(
- ) {
- return this._has_threshold;
- }
-
- /**
- * Method hasWidth.
- *
- * @return true if at least one Width has been added
- */
- public boolean hasWidth(
- ) {
- return this._has_width;
- }
-
- /**
- * Method hasXpos.
- *
- * @return true if at least one Xpos has been added
- */
- public boolean hasXpos(
- ) {
- return this._has_xpos;
- }
-
- /**
- * 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 the value of field 'FitToWindow'.
- */
- public boolean isFitToWindow(
- ) {
- return this._fitToWindow;
- }
-
- /**
- * 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 the value of field 'ShowDistances'.
- */
- 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) {
- 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 'currentTree'.
- *
- * @param currentTree the value of field 'currentTree'.
- */
- public void setCurrentTree(
- final boolean currentTree) {
- this._currentTree = currentTree;
- this._has_currentTree = true;
- }
-
- /**
- * Sets the value of field 'fitToWindow'.
- *
- * @param fitToWindow the value of field 'fitToWindow'.
- */
- public void setFitToWindow(
- final boolean fitToWindow) {
- this._fitToWindow = fitToWindow;
- this._has_fitToWindow = true;
- }
-
- /**
- * Sets the value of field 'fontName'.
- *
- * @param fontName the value of field 'fontName'.
- */
- public void setFontName(
- final java.lang.String fontName) {
- this._fontName = fontName;
- }
-
- /**
- * Sets the value of field 'fontSize'.
- *
- * @param fontSize the value of field 'fontSize'.
- */
- public void setFontSize(
- final int fontSize) {
- this._fontSize = fontSize;
- this._has_fontSize = true;
- }
-
- /**
- * Sets the value of field 'fontStyle'.
- *
- * @param fontStyle the value of field 'fontStyle'.
- */
- public void setFontStyle(
- final int fontStyle) {
- this._fontStyle = fontStyle;
- this._has_fontStyle = true;
- }
-
- /**
- * Sets the value of field 'height'.
- *
- * @param height the value of field 'height'.
- */
- public void setHeight(
- final int height) {
- this._height = height;
- this._has_height = true;
- }
-
- /**
- * Sets the value of field 'markUnlinked'.
- *
- * @param markUnlinked the value of field 'markUnlinked'.
- */
- public void setMarkUnlinked(
- final boolean markUnlinked) {
- this._markUnlinked = markUnlinked;
- this._has_markUnlinked = true;
- }
-
- /**
- * Sets the value of field 'newick'.
- *
- * @param newick the value of field 'newick'.
- */
- public void setNewick(
- final java.lang.String newick) {
- this._newick = newick;
- }
-
- /**
- * Sets the value of field 'showBootstrap'.
- *
- * @param showBootstrap the value of field 'showBootstrap'.
- */
- public void setShowBootstrap(
- final boolean showBootstrap) {
- this._showBootstrap = showBootstrap;
- this._has_showBootstrap = true;
- }
-
- /**
- * Sets the value of field 'showDistances'.
- *
- * @param showDistances the value of field 'showDistances'.
- */
- public void setShowDistances(
- final boolean showDistances) {
- this._showDistances = showDistances;
- this._has_showDistances = true;
- }
-
- /**
- * Sets the value of field 'threshold'.
- *
- * @param threshold the value of field 'threshold'.
- */
- public void setThreshold(
- final float threshold) {
- this._threshold = threshold;
- this._has_threshold = true;
- }
-
- /**
- * Sets the value of field 'title'.
- *
- * @param title the value of field 'title'.
- */
- public void setTitle(
- final java.lang.String title) {
- this._title = title;
- }
-
- /**
- * Sets the value of field 'width'.
- *
- * @param width the value of field 'width'.
- */
- public void setWidth(
- final int width) {
- this._width = width;
- this._has_width = true;
- }
-
- /**
- * Sets the value of field 'xpos'.
- *
- * @param xpos the value of field 'xpos'.
- */
- public void setXpos(
- final int xpos) {
- this._xpos = xpos;
- this._has_xpos = true;
- }
-
- /**
- * Sets the value of field 'ypos'.
- *
- * @param ypos the value of field 'ypos'.
- */
- public void setYpos(
- final int ypos) {
- this._ypos = ypos;
- this._has_ypos = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.binding.Tree
- */
- public static jalview.binding.Tree unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.Tree) Unmarshaller.unmarshal(jalview.binding.Tree.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);
- }
+public class Tree implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _width.
+ */
+ private int _width;
+
+ /**
+ * keeps track of state for field: _width
+ */
+ private boolean _has_width;
+
+ /**
+ * Field _height.
+ */
+ private int _height;
+
+ /**
+ * keeps track of state for field: _height
+ */
+ private boolean _has_height;
+
+ /**
+ * Field _xpos.
+ */
+ private int _xpos;
+
+ /**
+ * keeps track of state for field: _xpos
+ */
+ private boolean _has_xpos;
+
+ /**
+ * Field _ypos.
+ */
+ private int _ypos;
+
+ /**
+ * keeps track of state for field: _ypos
+ */
+ private boolean _has_ypos;
+
+ /**
+ * Field _fontName.
+ */
+ private java.lang.String _fontName;
+
+ /**
+ * Field _fontSize.
+ */
+ private int _fontSize;
+
+ /**
+ * keeps track of state for field: _fontSize
+ */
+ private boolean _has_fontSize;
+
+ /**
+ * Field _fontStyle.
+ */
+ private int _fontStyle;
+
+ /**
+ * keeps track of state for field: _fontStyle
+ */
+ private boolean _has_fontStyle;
+
+ /**
+ * Field _threshold.
+ */
+ private float _threshold;
+
+ /**
+ * keeps track of state for field: _threshold
+ */
+ private boolean _has_threshold;
+
+ /**
+ * Field _showBootstrap.
+ */
+ private boolean _showBootstrap;
+
+ /**
+ * keeps track of state for field: _showBootstrap
+ */
+ private boolean _has_showBootstrap;
+
+ /**
+ * Field _showDistances.
+ */
+ private boolean _showDistances;
+
+ /**
+ * keeps track of state for field: _showDistances
+ */
+ private boolean _has_showDistances;
+
+ /**
+ * Field _markUnlinked.
+ */
+ private boolean _markUnlinked;
+
+ /**
+ * keeps track of state for field: _markUnlinked
+ */
+ private boolean _has_markUnlinked;
+
+ /**
+ * Field _fitToWindow.
+ */
+ private boolean _fitToWindow;
+
+ /**
+ * keeps track of state for field: _fitToWindow
+ */
+ private boolean _has_fitToWindow;
+
+ /**
+ * Field _currentTree.
+ */
+ private boolean _currentTree;
+
+ /**
+ * keeps track of state for field: _currentTree
+ */
+ private boolean _has_currentTree;
+
+ /**
+ * Field _title.
+ */
+ private java.lang.String _title;
+
+ /**
+ * Field _newick.
+ */
+ private java.lang.String _newick;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Tree()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ */
+ public void deleteCurrentTree()
+ {
+ this._has_currentTree = false;
+ }
+
+ /**
+ */
+ public void deleteFitToWindow()
+ {
+ this._has_fitToWindow = false;
+ }
+
+ /**
+ */
+ public void deleteFontSize()
+ {
+ this._has_fontSize = false;
+ }
+
+ /**
+ */
+ public void deleteFontStyle()
+ {
+ this._has_fontStyle = false;
+ }
+
+ /**
+ */
+ public void deleteHeight()
+ {
+ this._has_height = false;
+ }
+
+ /**
+ */
+ public void deleteMarkUnlinked()
+ {
+ this._has_markUnlinked = false;
+ }
+
+ /**
+ */
+ public void deleteShowBootstrap()
+ {
+ this._has_showBootstrap = false;
+ }
+
+ /**
+ */
+ public void deleteShowDistances()
+ {
+ this._has_showDistances = false;
+ }
+
+ /**
+ */
+ public void deleteThreshold()
+ {
+ this._has_threshold = false;
+ }
+
+ /**
+ */
+ public void deleteWidth()
+ {
+ this._has_width = false;
+ }
+
+ /**
+ */
+ public void deleteXpos()
+ {
+ this._has_xpos = false;
+ }
+
+ /**
+ */
+ public void deleteYpos()
+ {
+ this._has_ypos = false;
+ }
+
+ /**
+ * Returns the value of field 'currentTree'.
+ *
+ * @return the value of field 'CurrentTree'.
+ */
+ public boolean getCurrentTree()
+ {
+ return this._currentTree;
+ }
+
+ /**
+ * Returns the value of field 'fitToWindow'.
+ *
+ * @return the value of field 'FitToWindow'.
+ */
+ public boolean getFitToWindow()
+ {
+ return this._fitToWindow;
+ }
+
+ /**
+ * Returns the value of field 'fontName'.
+ *
+ * @return the value of field 'FontName'.
+ */
+ public java.lang.String getFontName()
+ {
+ return this._fontName;
+ }
+
+ /**
+ * Returns the value of field 'fontSize'.
+ *
+ * @return the value of field 'FontSize'.
+ */
+ public int getFontSize()
+ {
+ return this._fontSize;
+ }
+
+ /**
+ * Returns the value of field 'fontStyle'.
+ *
+ * @return the value of field 'FontStyle'.
+ */
+ public int getFontStyle()
+ {
+ return this._fontStyle;
+ }
+
+ /**
+ * Returns the value of field 'height'.
+ *
+ * @return the value of field 'Height'.
+ */
+ public int getHeight()
+ {
+ return this._height;
+ }
+
+ /**
+ * Returns the value of field 'markUnlinked'.
+ *
+ * @return the value of field 'MarkUnlinked'.
+ */
+ public boolean getMarkUnlinked()
+ {
+ return this._markUnlinked;
+ }
+
+ /**
+ * Returns the value of field 'newick'.
+ *
+ * @return the value of field 'Newick'.
+ */
+ public java.lang.String getNewick()
+ {
+ return this._newick;
+ }
+
+ /**
+ * Returns the value of field 'showBootstrap'.
+ *
+ * @return the value of field 'ShowBootstrap'.
+ */
+ public boolean getShowBootstrap()
+ {
+ return this._showBootstrap;
+ }
+
+ /**
+ * Returns the value of field 'showDistances'.
+ *
+ * @return the value of field 'ShowDistances'.
+ */
+ public boolean getShowDistances()
+ {
+ return this._showDistances;
+ }
+
+ /**
+ * Returns the value of field 'threshold'.
+ *
+ * @return the value of field 'Threshold'.
+ */
+ public float getThreshold()
+ {
+ return this._threshold;
+ }
+
+ /**
+ * Returns the value of field 'title'.
+ *
+ * @return the value of field 'Title'.
+ */
+ public java.lang.String getTitle()
+ {
+ return this._title;
+ }
+
+ /**
+ * Returns the value of field 'width'.
+ *
+ * @return the value of field 'Width'.
+ */
+ public int getWidth()
+ {
+ return this._width;
+ }
+
+ /**
+ * Returns the value of field 'xpos'.
+ *
+ * @return the value of field 'Xpos'.
+ */
+ public int getXpos()
+ {
+ return this._xpos;
+ }
+
+ /**
+ * Returns the value of field 'ypos'.
+ *
+ * @return the value of field 'Ypos'.
+ */
+ public int getYpos()
+ {
+ return this._ypos;
+ }
+
+ /**
+ * Method hasCurrentTree.
+ *
+ * @return true if at least one CurrentTree has been added
+ */
+ public boolean hasCurrentTree()
+ {
+ return this._has_currentTree;
+ }
+
+ /**
+ * Method hasFitToWindow.
+ *
+ * @return true if at least one FitToWindow has been added
+ */
+ public boolean hasFitToWindow()
+ {
+ return this._has_fitToWindow;
+ }
+
+ /**
+ * Method hasFontSize.
+ *
+ * @return true if at least one FontSize has been added
+ */
+ public boolean hasFontSize()
+ {
+ return this._has_fontSize;
+ }
+
+ /**
+ * Method hasFontStyle.
+ *
+ * @return true if at least one FontStyle has been added
+ */
+ public boolean hasFontStyle()
+ {
+ return this._has_fontStyle;
+ }
+
+ /**
+ * Method hasHeight.
+ *
+ * @return true if at least one Height has been added
+ */
+ public boolean hasHeight()
+ {
+ return this._has_height;
+ }
+
+ /**
+ * Method hasMarkUnlinked.
+ *
+ * @return true if at least one MarkUnlinked has been added
+ */
+ public boolean hasMarkUnlinked()
+ {
+ return this._has_markUnlinked;
+ }
+
+ /**
+ * Method hasShowBootstrap.
+ *
+ * @return true if at least one ShowBootstrap has been added
+ */
+ public boolean hasShowBootstrap()
+ {
+ return this._has_showBootstrap;
+ }
+
+ /**
+ * Method hasShowDistances.
+ *
+ * @return true if at least one ShowDistances has been added
+ */
+ public boolean hasShowDistances()
+ {
+ return this._has_showDistances;
+ }
+
+ /**
+ * Method hasThreshold.
+ *
+ * @return true if at least one Threshold has been added
+ */
+ public boolean hasThreshold()
+ {
+ return this._has_threshold;
+ }
+
+ /**
+ * Method hasWidth.
+ *
+ * @return true if at least one Width has been added
+ */
+ public boolean hasWidth()
+ {
+ return this._has_width;
+ }
+
+ /**
+ * Method hasXpos.
+ *
+ * @return true if at least one Xpos has been added
+ */
+ public boolean hasXpos()
+ {
+ return this._has_xpos;
+ }
+
+ /**
+ * 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 the value of field 'FitToWindow'.
+ */
+ public boolean isFitToWindow()
+ {
+ return this._fitToWindow;
+ }
+
+ /**
+ * 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 the value of field 'ShowDistances'.
+ */
+ 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)
+ {
+ 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 'currentTree'.
+ *
+ * @param currentTree
+ * the value of field 'currentTree'.
+ */
+ public void setCurrentTree(final boolean currentTree)
+ {
+ this._currentTree = currentTree;
+ this._has_currentTree = true;
+ }
+
+ /**
+ * Sets the value of field 'fitToWindow'.
+ *
+ * @param fitToWindow
+ * the value of field 'fitToWindow'.
+ */
+ public void setFitToWindow(final boolean fitToWindow)
+ {
+ this._fitToWindow = fitToWindow;
+ this._has_fitToWindow = true;
+ }
+
+ /**
+ * Sets the value of field 'fontName'.
+ *
+ * @param fontName
+ * the value of field 'fontName'.
+ */
+ public void setFontName(final java.lang.String fontName)
+ {
+ this._fontName = fontName;
+ }
+
+ /**
+ * Sets the value of field 'fontSize'.
+ *
+ * @param fontSize
+ * the value of field 'fontSize'.
+ */
+ public void setFontSize(final int fontSize)
+ {
+ this._fontSize = fontSize;
+ this._has_fontSize = true;
+ }
+
+ /**
+ * Sets the value of field 'fontStyle'.
+ *
+ * @param fontStyle
+ * the value of field 'fontStyle'.
+ */
+ public void setFontStyle(final int fontStyle)
+ {
+ this._fontStyle = fontStyle;
+ this._has_fontStyle = true;
+ }
+
+ /**
+ * Sets the value of field 'height'.
+ *
+ * @param height
+ * the value of field 'height'.
+ */
+ public void setHeight(final int height)
+ {
+ this._height = height;
+ this._has_height = true;
+ }
+
+ /**
+ * Sets the value of field 'markUnlinked'.
+ *
+ * @param markUnlinked
+ * the value of field 'markUnlinked'.
+ */
+ public void setMarkUnlinked(final boolean markUnlinked)
+ {
+ this._markUnlinked = markUnlinked;
+ this._has_markUnlinked = true;
+ }
+
+ /**
+ * Sets the value of field 'newick'.
+ *
+ * @param newick
+ * the value of field 'newick'.
+ */
+ public void setNewick(final java.lang.String newick)
+ {
+ this._newick = newick;
+ }
+
+ /**
+ * Sets the value of field 'showBootstrap'.
+ *
+ * @param showBootstrap
+ * the value of field 'showBootstrap'.
+ */
+ public void setShowBootstrap(final boolean showBootstrap)
+ {
+ this._showBootstrap = showBootstrap;
+ this._has_showBootstrap = true;
+ }
+
+ /**
+ * Sets the value of field 'showDistances'.
+ *
+ * @param showDistances
+ * the value of field 'showDistances'.
+ */
+ public void setShowDistances(final boolean showDistances)
+ {
+ this._showDistances = showDistances;
+ this._has_showDistances = true;
+ }
+
+ /**
+ * Sets the value of field 'threshold'.
+ *
+ * @param threshold
+ * the value of field 'threshold'.
+ */
+ public void setThreshold(final float threshold)
+ {
+ this._threshold = threshold;
+ this._has_threshold = true;
+ }
+
+ /**
+ * Sets the value of field 'title'.
+ *
+ * @param title
+ * the value of field 'title'.
+ */
+ public void setTitle(final java.lang.String title)
+ {
+ this._title = title;
+ }
+
+ /**
+ * Sets the value of field 'width'.
+ *
+ * @param width
+ * the value of field 'width'.
+ */
+ public void setWidth(final int width)
+ {
+ this._width = width;
+ this._has_width = true;
+ }
+
+ /**
+ * Sets the value of field 'xpos'.
+ *
+ * @param xpos
+ * the value of field 'xpos'.
+ */
+ public void setXpos(final int xpos)
+ {
+ this._xpos = xpos;
+ this._has_xpos = true;
+ }
+
+ /**
+ * Sets the value of field 'ypos'.
+ *
+ * @param ypos
+ * the value of field 'ypos'.
+ */
+ public void setYpos(final int ypos)
+ {
+ this._ypos = ypos;
+ this._has_ypos = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.binding.Tree
+ */
+ public static jalview.binding.Tree unmarshal(final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.Tree) Unmarshaller.unmarshal(
+ jalview.binding.Tree.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class UserColourScheme extends JalviewUserColours
-implements java.io.Serializable
+public class UserColourScheme extends JalviewUserColours implements
+ java.io.Serializable
{
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
- //----------------/
- //- Constructors -/
- //----------------/
-
- public UserColourScheme() {
- super();
- }
-
+ public UserColourScheme()
+ {
+ super();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * 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;
+ /**
+ * 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 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);
- }
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
- /**
- * Method 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.binding.JalviewUserColours
- */
- public static jalview.binding.JalviewUserColours unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(jalview.binding.UserColourScheme.class, reader);
- }
+ /**
+ * 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.binding.JalviewUserColours
+ */
+ public static jalview.binding.JalviewUserColours unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(
+ jalview.binding.UserColourScheme.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class UserColours implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _id.
- */
- private java.lang.String _id;
-
- /**
- * Field _userColourScheme.
- */
- private jalview.binding.UserColourScheme _userColourScheme;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public UserColours() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId(
- ) {
- return this._id;
- }
-
- /**
- * Returns the value of field 'userColourScheme'.
- *
- * @return the value of field 'UserColourScheme'.
- */
- public jalview.binding.UserColourScheme getUserColourScheme(
- ) {
- return this._userColourScheme;
- }
-
- /**
- * 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 'id'.
- *
- * @param id the value of field 'id'.
- */
- public void setId(
- final java.lang.String id) {
- this._id = id;
- }
-
- /**
- * Sets the value of field 'userColourScheme'.
- *
- * @param userColourScheme the value of field 'userColourScheme'
- */
- public void setUserColourScheme(
- final jalview.binding.UserColourScheme userColourScheme) {
- this._userColourScheme = userColourScheme;
- }
-
- /**
- * 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.binding.UserColours
- */
- public static jalview.binding.UserColours unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.UserColours) Unmarshaller.unmarshal(jalview.binding.UserColours.class, reader);
- }
-
- /**
- *
- *
- * @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);
+public class UserColours implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _id.
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _userColourScheme.
+ */
+ private jalview.binding.UserColourScheme _userColourScheme;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public UserColours()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId()
+ {
+ return this._id;
+ }
+
+ /**
+ * Returns the value of field 'userColourScheme'.
+ *
+ * @return the value of field 'UserColourScheme'.
+ */
+ public jalview.binding.UserColourScheme getUserColourScheme()
+ {
+ return this._userColourScheme;
+ }
+
+ /**
+ * 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 'id'.
+ *
+ * @param id
+ * the value of field 'id'.
+ */
+ public void setId(final java.lang.String id)
+ {
+ this._id = id;
+ }
+
+ /**
+ * Sets the value of field 'userColourScheme'.
+ *
+ * @param userColourScheme
+ * the value of field 'userColourScheme'
+ */
+ public void setUserColourScheme(
+ final jalview.binding.UserColourScheme userColourScheme)
+ {
+ this._userColourScheme = userColourScheme;
+ }
+
+ /**
+ * 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.binding.UserColours
+ */
+ public static jalview.binding.UserColours unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.UserColours) Unmarshaller.unmarshal(
+ jalview.binding.UserColours.class, reader);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class VAMSAS implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _alignmentList.
- */
- private java.util.Vector _alignmentList;
-
- /**
- * Field _treeList.
- */
- private java.util.Vector _treeList;
-
- /**
- * Field _sequenceSetList.
- */
- private java.util.Vector _sequenceSetList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public VAMSAS() {
- super();
- this._alignmentList = new java.util.Vector();
- this._treeList = new java.util.Vector();
- this._sequenceSetList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vAlignment
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAlignment(
- final Alignment vAlignment)
- throws java.lang.IndexOutOfBoundsException {
- this._alignmentList.addElement(vAlignment);
- }
-
- /**
- *
- *
- * @param index
- * @param vAlignment
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAlignment(
- final int index,
- final Alignment vAlignment)
- throws java.lang.IndexOutOfBoundsException {
- this._alignmentList.add(index, vAlignment);
- }
-
- /**
- *
- *
- * @param vSequenceSet
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSequenceSet(
- final SequenceSet vSequenceSet)
- throws java.lang.IndexOutOfBoundsException {
- this._sequenceSetList.addElement(vSequenceSet);
- }
-
- /**
- *
- *
- * @param index
- * @param vSequenceSet
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSequenceSet(
- final int index,
- final SequenceSet vSequenceSet)
- throws java.lang.IndexOutOfBoundsException {
- this._sequenceSetList.add(index, vSequenceSet);
- }
-
- /**
- *
- *
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addTree(
- final java.lang.String vTree)
- throws java.lang.IndexOutOfBoundsException {
- this._treeList.addElement(vTree);
- }
-
- /**
- *
- *
- * @param index
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addTree(
- final int index,
- final java.lang.String vTree)
- throws java.lang.IndexOutOfBoundsException {
- this._treeList.add(index, vTree);
- }
-
- /**
- * Method enumerateAlignment.
- *
- * @return an Enumeration over all Alignment elements
- */
- public java.util.Enumeration enumerateAlignment(
- ) {
- return this._alignmentList.elements();
- }
-
- /**
- * Method enumerateSequenceSet.
- *
- * @return an Enumeration over all SequenceSet elements
- */
- public java.util.Enumeration enumerateSequenceSet(
- ) {
- return this._sequenceSetList.elements();
- }
-
- /**
- * Method enumerateTree.
- *
- * @return an Enumeration over all java.lang.String elements
- */
- public java.util.Enumeration enumerateTree(
- ) {
- return this._treeList.elements();
- }
-
- /**
- * Method getAlignment.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the Alignment at the given index
- */
- public Alignment getAlignment(
- final int index)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._alignmentList.size()) {
- throw new IndexOutOfBoundsException("getAlignment: Index value '" + index + "' not in range [0.." + (this._alignmentList.size() - 1) + "]");
- }
-
- return (Alignment) _alignmentList.get(index);
- }
-
- /**
- * Method getAlignment.Returns the contents of the collection
- * in an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public Alignment[] getAlignment(
- ) {
- Alignment[] array = new Alignment[0];
- return (Alignment[]) this._alignmentList.toArray(array);
- }
-
- /**
- * Method getAlignmentCount.
- *
- * @return the size of this collection
- */
- public int getAlignmentCount(
- ) {
- return this._alignmentList.size();
- }
-
- /**
- * Method getSequenceSet.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the SequenceSet at the given index
- */
- public 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 (SequenceSet) _sequenceSetList.get(index);
- }
-
- /**
- * Method getSequenceSet.Returns the contents of the collection
- * in an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public SequenceSet[] getSequenceSet(
- ) {
- SequenceSet[] array = new SequenceSet[0];
- return (SequenceSet[]) this._sequenceSetList.toArray(array);
- }
-
- /**
- * Method getSequenceSetCount.
- *
- * @return the size of this collection
- */
- public int getSequenceSetCount(
- ) {
- return this._sequenceSetList.size();
- }
-
- /**
- * Method getTree.
- *
- * @param index
- * @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(
- 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 (java.lang.String) _treeList.get(index);
- }
-
- /**
- * Method getTree.Returns the contents of the collection in an
- * Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public java.lang.String[] getTree(
- ) {
- java.lang.String[] array = new java.lang.String[0];
- return (java.lang.String[]) this._treeList.toArray(array);
- }
-
- /**
- * Method getTreeCount.
- *
- * @return the size of this collection
- */
- public int getTreeCount(
- ) {
- return this._treeList.size();
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- * Method removeAlignment.
- *
- * @param vAlignment
- * @return true if the object was removed from the collection.
- */
- public boolean removeAlignment(
- final Alignment vAlignment) {
- boolean removed = _alignmentList.remove(vAlignment);
- return removed;
- }
-
- /**
- * Method removeAlignmentAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public Alignment removeAlignmentAt(
- final int index) {
- java.lang.Object obj = this._alignmentList.remove(index);
- return (Alignment) obj;
- }
-
- /**
- */
- public void removeAllAlignment(
- ) {
- this._alignmentList.clear();
- }
-
- /**
- */
- public void removeAllSequenceSet(
- ) {
- this._sequenceSetList.clear();
- }
-
- /**
- */
- public void removeAllTree(
- ) {
- this._treeList.clear();
- }
-
- /**
- * Method removeSequenceSet.
- *
- * @param vSequenceSet
- * @return true if the object was removed from the collection.
- */
- public boolean removeSequenceSet(
- final SequenceSet vSequenceSet) {
- boolean removed = _sequenceSetList.remove(vSequenceSet);
- return removed;
- }
-
- /**
- * Method removeSequenceSetAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public SequenceSet removeSequenceSetAt(
- final int index) {
- java.lang.Object obj = this._sequenceSetList.remove(index);
- return (SequenceSet) obj;
- }
-
- /**
- * 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 the element removed from the collection
- */
- public java.lang.String removeTreeAt(
- final int index) {
- java.lang.Object obj = this._treeList.remove(index);
- return (java.lang.String) obj;
- }
-
- /**
- *
- *
- * @param index
- * @param vAlignment
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setAlignment(
- final int index,
- final Alignment vAlignment)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._alignmentList.size()) {
- throw new IndexOutOfBoundsException("setAlignment: Index value '" + index + "' not in range [0.." + (this._alignmentList.size() - 1) + "]");
- }
-
- this._alignmentList.set(index, vAlignment);
- }
-
- /**
- *
- *
- * @param vAlignmentArray
- */
- public void setAlignment(
- final Alignment[] vAlignmentArray) {
- //-- copy array
- _alignmentList.clear();
-
- for (int i = 0; i < vAlignmentArray.length; i++) {
- this._alignmentList.add(vAlignmentArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vSequenceSet
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setSequenceSet(
- final int index,
- final 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) + "]");
- }
-
- this._sequenceSetList.set(index, vSequenceSet);
- }
-
- /**
- *
- *
- * @param vSequenceSetArray
- */
- public void setSequenceSet(
- final SequenceSet[] vSequenceSetArray) {
- //-- copy array
- _sequenceSetList.clear();
-
- for (int i = 0; i < vSequenceSetArray.length; i++) {
- this._sequenceSetList.add(vSequenceSetArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- 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) + "]");
- }
-
- this._treeList.set(index, vTree);
- }
-
- /**
- *
- *
- * @param vTreeArray
- */
- public void setTree(
- final java.lang.String[] vTreeArray) {
- //-- copy array
- _treeList.clear();
-
- for (int i = 0; i < vTreeArray.length; i++) {
- this._treeList.add(vTreeArray[i]);
- }
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.binding.VAMSAS
- */
- public static jalview.binding.VAMSAS unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(jalview.binding.VAMSAS.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);
- }
+public class VAMSAS implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _alignmentList.
+ */
+ private java.util.Vector _alignmentList;
+
+ /**
+ * Field _treeList.
+ */
+ private java.util.Vector _treeList;
+
+ /**
+ * Field _sequenceSetList.
+ */
+ private java.util.Vector _sequenceSetList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public VAMSAS()
+ {
+ super();
+ this._alignmentList = new java.util.Vector();
+ this._treeList = new java.util.Vector();
+ this._sequenceSetList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vAlignment
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAlignment(final Alignment vAlignment)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._alignmentList.addElement(vAlignment);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAlignment
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAlignment(final int index, final Alignment vAlignment)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._alignmentList.add(index, vAlignment);
+ }
+
+ /**
+ *
+ *
+ * @param vSequenceSet
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSequenceSet(final SequenceSet vSequenceSet)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._sequenceSetList.addElement(vSequenceSet);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequenceSet
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSequenceSet(final int index, final SequenceSet vSequenceSet)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._sequenceSetList.add(index, vSequenceSet);
+ }
+
+ /**
+ *
+ *
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addTree(final java.lang.String vTree)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._treeList.addElement(vTree);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addTree(final int index, final java.lang.String vTree)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._treeList.add(index, vTree);
+ }
+
+ /**
+ * Method enumerateAlignment.
+ *
+ * @return an Enumeration over all Alignment elements
+ */
+ public java.util.Enumeration enumerateAlignment()
+ {
+ return this._alignmentList.elements();
+ }
+
+ /**
+ * Method enumerateSequenceSet.
+ *
+ * @return an Enumeration over all SequenceSet elements
+ */
+ public java.util.Enumeration enumerateSequenceSet()
+ {
+ return this._sequenceSetList.elements();
+ }
+
+ /**
+ * Method enumerateTree.
+ *
+ * @return an Enumeration over all java.lang.String elements
+ */
+ public java.util.Enumeration enumerateTree()
+ {
+ return this._treeList.elements();
+ }
+
+ /**
+ * Method getAlignment.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the Alignment at the given index
+ */
+ public Alignment getAlignment(final int index)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._alignmentList.size())
+ {
+ throw new IndexOutOfBoundsException("getAlignment: Index value '"
+ + index + "' not in range [0.."
+ + (this._alignmentList.size() - 1) + "]");
+ }
+
+ return (Alignment) _alignmentList.get(index);
+ }
+
+ /**
+ * Method getAlignment.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public Alignment[] getAlignment()
+ {
+ Alignment[] array = new Alignment[0];
+ return (Alignment[]) this._alignmentList.toArray(array);
+ }
+
+ /**
+ * Method getAlignmentCount.
+ *
+ * @return the size of this collection
+ */
+ public int getAlignmentCount()
+ {
+ return this._alignmentList.size();
+ }
+
+ /**
+ * Method getSequenceSet.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the SequenceSet at the given index
+ */
+ public 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 (SequenceSet) _sequenceSetList.get(index);
+ }
+
+ /**
+ * Method getSequenceSet.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public SequenceSet[] getSequenceSet()
+ {
+ SequenceSet[] array = new SequenceSet[0];
+ return (SequenceSet[]) this._sequenceSetList.toArray(array);
+ }
+
+ /**
+ * Method getSequenceSetCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSequenceSetCount()
+ {
+ return this._sequenceSetList.size();
+ }
+
+ /**
+ * Method getTree.
+ *
+ * @param index
+ * @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(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 (java.lang.String) _treeList.get(index);
+ }
+
+ /**
+ * Method getTree.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public java.lang.String[] getTree()
+ {
+ java.lang.String[] array = new java.lang.String[0];
+ return (java.lang.String[]) this._treeList.toArray(array);
+ }
+
+ /**
+ * Method getTreeCount.
+ *
+ * @return the size of this collection
+ */
+ public int getTreeCount()
+ {
+ return this._treeList.size();
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Method removeAlignment.
+ *
+ * @param vAlignment
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAlignment(final Alignment vAlignment)
+ {
+ boolean removed = _alignmentList.remove(vAlignment);
+ return removed;
+ }
+
+ /**
+ * Method removeAlignmentAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public Alignment removeAlignmentAt(final int index)
+ {
+ java.lang.Object obj = this._alignmentList.remove(index);
+ return (Alignment) obj;
+ }
+
+ /**
+ */
+ public void removeAllAlignment()
+ {
+ this._alignmentList.clear();
+ }
+
+ /**
+ */
+ public void removeAllSequenceSet()
+ {
+ this._sequenceSetList.clear();
+ }
+
+ /**
+ */
+ public void removeAllTree()
+ {
+ this._treeList.clear();
+ }
+
+ /**
+ * Method removeSequenceSet.
+ *
+ * @param vSequenceSet
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSequenceSet(final SequenceSet vSequenceSet)
+ {
+ boolean removed = _sequenceSetList.remove(vSequenceSet);
+ return removed;
+ }
+
+ /**
+ * Method removeSequenceSetAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public SequenceSet removeSequenceSetAt(final int index)
+ {
+ java.lang.Object obj = this._sequenceSetList.remove(index);
+ return (SequenceSet) obj;
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public java.lang.String removeTreeAt(final int index)
+ {
+ java.lang.Object obj = this._treeList.remove(index);
+ return (java.lang.String) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAlignment
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setAlignment(final int index, final Alignment vAlignment)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._alignmentList.size())
+ {
+ throw new IndexOutOfBoundsException("setAlignment: Index value '"
+ + index + "' not in range [0.."
+ + (this._alignmentList.size() - 1) + "]");
+ }
+
+ this._alignmentList.set(index, vAlignment);
+ }
+
+ /**
+ *
+ *
+ * @param vAlignmentArray
+ */
+ public void setAlignment(final Alignment[] vAlignmentArray)
+ {
+ // -- copy array
+ _alignmentList.clear();
+
+ for (int i = 0; i < vAlignmentArray.length; i++)
+ {
+ this._alignmentList.add(vAlignmentArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequenceSet
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setSequenceSet(final int index, final 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) + "]");
+ }
+
+ this._sequenceSetList.set(index, vSequenceSet);
+ }
+
+ /**
+ *
+ *
+ * @param vSequenceSetArray
+ */
+ public void setSequenceSet(final SequenceSet[] vSequenceSetArray)
+ {
+ // -- copy array
+ _sequenceSetList.clear();
+
+ for (int i = 0; i < vSequenceSetArray.length; i++)
+ {
+ this._sequenceSetList.add(vSequenceSetArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ 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) + "]");
+ }
+
+ this._treeList.set(index, vTree);
+ }
+
+ /**
+ *
+ *
+ * @param vTreeArray
+ */
+ public void setTree(final java.lang.String[] vTreeArray)
+ {
+ // -- copy array
+ _treeList.clear();
+
+ for (int i = 0; i < vTreeArray.length; i++)
+ {
+ this._treeList.add(vTreeArray[i]);
+ }
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.binding.VAMSAS
+ */
+ public static jalview.binding.VAMSAS unmarshal(final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(
+ jalview.binding.VAMSAS.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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class VamsasModel extends VAMSAS
-implements java.io.Serializable
+public class VamsasModel extends VAMSAS implements java.io.Serializable
{
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
- //----------------/
- //- Constructors -/
- //----------------/
-
- public VamsasModel() {
- super();
- }
-
+ public VamsasModel()
+ {
+ super();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * 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;
+ /**
+ * 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 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);
- }
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
- /**
- * Method 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.binding.VAMSAS
- */
- public static jalview.binding.VAMSAS unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(jalview.binding.VamsasModel.class, reader);
- }
+ /**
+ * 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.binding.VAMSAS
+ */
+ public static jalview.binding.VAMSAS unmarshal(final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(
+ jalview.binding.VamsasModel.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.binding;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Viewport implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _conservationSelected.
- */
- private boolean _conservationSelected;
-
- /**
- * keeps track of state for field: _conservationSelected
- */
- private boolean _has_conservationSelected;
-
- /**
- * Field _pidSelected.
- */
- private boolean _pidSelected;
-
- /**
- * keeps track of state for field: _pidSelected
- */
- private boolean _has_pidSelected;
-
- /**
- * Field _bgColour.
- */
- private java.lang.String _bgColour;
-
- /**
- * Field _consThreshold.
- */
- private int _consThreshold;
-
- /**
- * keeps track of state for field: _consThreshold
- */
- private boolean _has_consThreshold;
-
- /**
- * Field _pidThreshold.
- */
- private int _pidThreshold;
-
- /**
- * keeps track of state for field: _pidThreshold
- */
- private boolean _has_pidThreshold;
-
- /**
- * Field _title.
- */
- private java.lang.String _title;
-
- /**
- * Field _showFullId.
- */
- private boolean _showFullId;
-
- /**
- * keeps track of state for field: _showFullId
- */
- private boolean _has_showFullId;
+public class Viewport implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _conservationSelected.
+ */
+ private boolean _conservationSelected;
+
+ /**
+ * keeps track of state for field: _conservationSelected
+ */
+ private boolean _has_conservationSelected;
+
+ /**
+ * Field _pidSelected.
+ */
+ private boolean _pidSelected;
+
+ /**
+ * keeps track of state for field: _pidSelected
+ */
+ private boolean _has_pidSelected;
+
+ /**
+ * Field _bgColour.
+ */
+ private java.lang.String _bgColour;
+
+ /**
+ * Field _consThreshold.
+ */
+ private int _consThreshold;
+
+ /**
+ * keeps track of state for field: _consThreshold
+ */
+ private boolean _has_consThreshold;
+
+ /**
+ * Field _pidThreshold.
+ */
+ private int _pidThreshold;
+
+ /**
+ * keeps track of state for field: _pidThreshold
+ */
+ private boolean _has_pidThreshold;
+
+ /**
+ * Field _title.
+ */
+ private java.lang.String _title;
+
+ /**
+ * Field _showFullId.
+ */
+ private boolean _showFullId;
+
+ /**
+ * keeps track of state for field: _showFullId
+ */
+ private boolean _has_showFullId;
+
+ /**
+ * Field _showText.
+ */
+ private boolean _showText;
+
+ /**
+ * keeps track of state for field: _showText
+ */
+ private boolean _has_showText;
+
+ /**
+ * Field _showColourText.
+ */
+ private boolean _showColourText;
+
+ /**
+ * keeps track of state for field: _showColourText
+ */
+ private boolean _has_showColourText;
+
+ /**
+ * Field _showBoxes.
+ */
+ private boolean _showBoxes;
+
+ /**
+ * keeps track of state for field: _showBoxes
+ */
+ private boolean _has_showBoxes;
+
+ /**
+ * Field _wrapAlignment.
+ */
+ private boolean _wrapAlignment;
+
+ /**
+ * keeps track of state for field: _wrapAlignment
+ */
+ private boolean _has_wrapAlignment;
+
+ /**
+ * Field _renderGaps.
+ */
+ private boolean _renderGaps;
+
+ /**
+ * keeps track of state for field: _renderGaps
+ */
+ private boolean _has_renderGaps;
+
+ /**
+ * Field _showSequenceFeatures.
+ */
+ private boolean _showSequenceFeatures;
+
+ /**
+ * keeps track of state for field: _showSequenceFeatures
+ */
+ private boolean _has_showSequenceFeatures;
+
+ /**
+ * Field _showAnnotation.
+ */
+ private boolean _showAnnotation;
+
+ /**
+ * keeps track of state for field: _showAnnotation
+ */
+ private boolean _has_showAnnotation;
+
+ /**
+ * Field _showConservation.
+ */
+ private boolean _showConservation;
+
+ /**
+ * keeps track of state for field: _showConservation
+ */
+ private boolean _has_showConservation;
+
+ /**
+ * Field _showQuality.
+ */
+ private boolean _showQuality;
+
+ /**
+ * keeps track of state for field: _showQuality
+ */
+ private boolean _has_showQuality;
+
+ /**
+ * Field _showIdentity.
+ */
+ private boolean _showIdentity;
+
+ /**
+ * keeps track of state for field: _showIdentity
+ */
+ private boolean _has_showIdentity;
+
+ /**
+ * Field _xpos.
+ */
+ private int _xpos;
+
+ /**
+ * keeps track of state for field: _xpos
+ */
+ private boolean _has_xpos;
+
+ /**
+ * Field _ypos.
+ */
+ private int _ypos;
+
+ /**
+ * keeps track of state for field: _ypos
+ */
+ private boolean _has_ypos;
+
+ /**
+ * Field _width.
+ */
+ private int _width;
+
+ /**
+ * keeps track of state for field: _width
+ */
+ private boolean _has_width;
+
+ /**
+ * Field _height.
+ */
+ private int _height;
+
+ /**
+ * keeps track of state for field: _height
+ */
+ private boolean _has_height;
+
+ /**
+ * Field _startRes.
+ */
+ private int _startRes;
+
+ /**
+ * keeps track of state for field: _startRes
+ */
+ private boolean _has_startRes;
+
+ /**
+ * Field _startSeq.
+ */
+ private int _startSeq;
+
+ /**
+ * keeps track of state for field: _startSeq
+ */
+ private boolean _has_startSeq;
+
+ /**
+ * Field _fontName.
+ */
+ private java.lang.String _fontName;
+
+ /**
+ * Field _fontSize.
+ */
+ private int _fontSize;
+
+ /**
+ * keeps track of state for field: _fontSize
+ */
+ private boolean _has_fontSize;
+
+ /**
+ * Field _fontStyle.
+ */
+ private int _fontStyle;
+
+ /**
+ * keeps track of state for field: _fontStyle
+ */
+ private boolean _has_fontStyle;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Viewport()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * Field _showText.
+ /**
*/
- private boolean _showText;
+ public void deleteConsThreshold()
+ {
+ this._has_consThreshold = false;
+ }
- /**
- * keeps track of state for field: _showText
+ /**
*/
- private boolean _has_showText;
+ public void deleteConservationSelected()
+ {
+ this._has_conservationSelected = false;
+ }
- /**
- * Field _showColourText.
+ /**
*/
- private boolean _showColourText;
+ public void deleteFontSize()
+ {
+ this._has_fontSize = false;
+ }
- /**
- * keeps track of state for field: _showColourText
+ /**
*/
- private boolean _has_showColourText;
+ public void deleteFontStyle()
+ {
+ this._has_fontStyle = false;
+ }
- /**
- * Field _showBoxes.
+ /**
*/
- private boolean _showBoxes;
+ public void deleteHeight()
+ {
+ this._has_height = false;
+ }
- /**
- * keeps track of state for field: _showBoxes
+ /**
*/
- private boolean _has_showBoxes;
+ public void deletePidSelected()
+ {
+ this._has_pidSelected = false;
+ }
- /**
- * Field _wrapAlignment.
+ /**
*/
- private boolean _wrapAlignment;
+ public void deletePidThreshold()
+ {
+ this._has_pidThreshold = false;
+ }
- /**
- * keeps track of state for field: _wrapAlignment
+ /**
*/
- private boolean _has_wrapAlignment;
+ public void deleteRenderGaps()
+ {
+ this._has_renderGaps = false;
+ }
- /**
- * Field _renderGaps.
+ /**
*/
- private boolean _renderGaps;
+ public void deleteShowAnnotation()
+ {
+ this._has_showAnnotation = false;
+ }
- /**
- * keeps track of state for field: _renderGaps
+ /**
*/
- private boolean _has_renderGaps;
+ public void deleteShowBoxes()
+ {
+ this._has_showBoxes = false;
+ }
- /**
- * Field _showSequenceFeatures.
+ /**
*/
- private boolean _showSequenceFeatures;
+ public void deleteShowColourText()
+ {
+ this._has_showColourText = false;
+ }
- /**
- * keeps track of state for field: _showSequenceFeatures
+ /**
*/
- private boolean _has_showSequenceFeatures;
+ public void deleteShowConservation()
+ {
+ this._has_showConservation = false;
+ }
- /**
- * Field _showAnnotation.
+ /**
*/
- private boolean _showAnnotation;
+ public void deleteShowFullId()
+ {
+ this._has_showFullId = false;
+ }
- /**
- * keeps track of state for field: _showAnnotation
+ /**
*/
- private boolean _has_showAnnotation;
+ public void deleteShowIdentity()
+ {
+ this._has_showIdentity = false;
+ }
- /**
- * Field _showConservation.
+ /**
*/
- private boolean _showConservation;
-
- /**
- * keeps track of state for field: _showConservation
- */
- private boolean _has_showConservation;
-
- /**
- * Field _showQuality.
- */
- private boolean _showQuality;
-
- /**
- * keeps track of state for field: _showQuality
- */
- private boolean _has_showQuality;
-
- /**
- * Field _showIdentity.
- */
- private boolean _showIdentity;
-
- /**
- * keeps track of state for field: _showIdentity
- */
- private boolean _has_showIdentity;
-
- /**
- * Field _xpos.
- */
- private int _xpos;
-
- /**
- * keeps track of state for field: _xpos
- */
- private boolean _has_xpos;
-
- /**
- * Field _ypos.
- */
- private int _ypos;
-
- /**
- * keeps track of state for field: _ypos
- */
- private boolean _has_ypos;
-
- /**
- * Field _width.
- */
- private int _width;
-
- /**
- * keeps track of state for field: _width
- */
- private boolean _has_width;
-
- /**
- * Field _height.
- */
- private int _height;
-
- /**
- * keeps track of state for field: _height
- */
- private boolean _has_height;
-
- /**
- * Field _startRes.
- */
- private int _startRes;
-
- /**
- * keeps track of state for field: _startRes
- */
- private boolean _has_startRes;
-
- /**
- * Field _startSeq.
- */
- private int _startSeq;
-
- /**
- * keeps track of state for field: _startSeq
- */
- private boolean _has_startSeq;
-
- /**
- * Field _fontName.
- */
- private java.lang.String _fontName;
-
- /**
- * Field _fontSize.
- */
- private int _fontSize;
-
- /**
- * keeps track of state for field: _fontSize
- */
- private boolean _has_fontSize;
-
- /**
- * Field _fontStyle.
- */
- private int _fontStyle;
-
- /**
- * keeps track of state for field: _fontStyle
- */
- private boolean _has_fontStyle;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Viewport() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteConsThreshold(
- ) {
- this._has_consThreshold= false;
- }
-
- /**
- */
- public void deleteConservationSelected(
- ) {
- this._has_conservationSelected= false;
- }
-
- /**
- */
- public void deleteFontSize(
- ) {
- this._has_fontSize= false;
- }
-
- /**
- */
- public void deleteFontStyle(
- ) {
- this._has_fontStyle= false;
- }
-
- /**
- */
- public void deleteHeight(
- ) {
- this._has_height= false;
- }
-
- /**
- */
- public void deletePidSelected(
- ) {
- this._has_pidSelected= false;
- }
-
- /**
- */
- public void deletePidThreshold(
- ) {
- this._has_pidThreshold= false;
- }
-
- /**
- */
- public void deleteRenderGaps(
- ) {
- this._has_renderGaps= false;
- }
-
- /**
- */
- public void deleteShowAnnotation(
- ) {
- this._has_showAnnotation= false;
- }
-
- /**
- */
- public void deleteShowBoxes(
- ) {
- this._has_showBoxes= false;
- }
-
- /**
- */
- public void deleteShowColourText(
- ) {
- this._has_showColourText= false;
- }
-
- /**
- */
- public void deleteShowConservation(
- ) {
- this._has_showConservation= false;
- }
-
- /**
- */
- public void deleteShowFullId(
- ) {
- this._has_showFullId= false;
- }
-
- /**
- */
- public void deleteShowIdentity(
- ) {
- this._has_showIdentity= false;
- }
-
- /**
- */
- public void deleteShowQuality(
- ) {
- this._has_showQuality= false;
- }
-
- /**
- */
- public void deleteShowSequenceFeatures(
- ) {
- this._has_showSequenceFeatures= false;
- }
-
- /**
- */
- public void deleteShowText(
- ) {
- this._has_showText= false;
- }
-
- /**
- */
- public void deleteStartRes(
- ) {
- this._has_startRes= false;
- }
-
- /**
- */
- public void deleteStartSeq(
- ) {
- this._has_startSeq= false;
- }
-
- /**
- */
- public void deleteWidth(
- ) {
- this._has_width= false;
- }
-
- /**
- */
- public void deleteWrapAlignment(
- ) {
- this._has_wrapAlignment= false;
- }
-
- /**
- */
- public void deleteXpos(
- ) {
- this._has_xpos= false;
- }
-
- /**
- */
- public void deleteYpos(
- ) {
- this._has_ypos= false;
- }
-
- /**
- * Returns the value of field 'bgColour'.
- *
- * @return the value of field 'BgColour'.
- */
- public java.lang.String getBgColour(
- ) {
- return this._bgColour;
- }
-
- /**
- * Returns the value of field 'consThreshold'.
- *
- * @return the value of field 'ConsThreshold'.
- */
- public int getConsThreshold(
- ) {
- return this._consThreshold;
- }
-
- /**
- * Returns the value of field 'conservationSelected'.
- *
- * @return the value of field 'ConservationSelected'.
- */
- public boolean getConservationSelected(
- ) {
- return this._conservationSelected;
- }
-
- /**
- * Returns the value of field 'fontName'.
- *
- * @return the value of field 'FontName'.
- */
- public java.lang.String getFontName(
- ) {
- return this._fontName;
- }
-
- /**
- * Returns the value of field 'fontSize'.
- *
- * @return the value of field 'FontSize'.
- */
- public int getFontSize(
- ) {
- return this._fontSize;
- }
-
- /**
- * Returns the value of field 'fontStyle'.
- *
- * @return the value of field 'FontStyle'.
- */
- public int getFontStyle(
- ) {
- return this._fontStyle;
- }
-
- /**
- * Returns the value of field 'height'.
- *
- * @return the value of field 'Height'.
- */
- public int getHeight(
- ) {
- return this._height;
- }
-
- /**
- * Returns the value of field 'pidSelected'.
- *
- * @return the value of field 'PidSelected'.
- */
- public boolean getPidSelected(
- ) {
- return this._pidSelected;
- }
-
- /**
- * Returns the value of field 'pidThreshold'.
- *
- * @return the value of field 'PidThreshold'.
- */
- public int getPidThreshold(
- ) {
- return this._pidThreshold;
- }
-
- /**
- * Returns the value of field 'renderGaps'.
- *
- * @return the value of field 'RenderGaps'.
- */
- public boolean getRenderGaps(
- ) {
- return this._renderGaps;
- }
-
- /**
- * Returns the value of field 'showAnnotation'.
- *
- * @return the value of field 'ShowAnnotation'.
- */
- public boolean getShowAnnotation(
- ) {
- return this._showAnnotation;
- }
-
- /**
- * Returns the value of field 'showBoxes'.
- *
- * @return the value of field 'ShowBoxes'.
- */
- public boolean getShowBoxes(
- ) {
- return this._showBoxes;
- }
-
- /**
- * Returns the value of field 'showColourText'.
- *
- * @return the value of field 'ShowColourText'.
- */
- public boolean getShowColourText(
- ) {
- return this._showColourText;
- }
-
- /**
- * Returns the value of field 'showConservation'.
- *
- * @return the value of field 'ShowConservation'.
- */
- public boolean getShowConservation(
- ) {
- return this._showConservation;
- }
-
- /**
- * Returns the value of field 'showFullId'.
- *
- * @return the value of field 'ShowFullId'.
- */
- public boolean getShowFullId(
- ) {
- return this._showFullId;
- }
-
- /**
- * Returns the value of field 'showIdentity'.
- *
- * @return the value of field 'ShowIdentity'.
- */
- public boolean getShowIdentity(
- ) {
- return this._showIdentity;
- }
-
- /**
- * Returns the value of field 'showQuality'.
- *
- * @return the value of field 'ShowQuality'.
- */
- public boolean getShowQuality(
- ) {
- return this._showQuality;
- }
-
- /**
- * Returns the value of field 'showSequenceFeatures'.
- *
- * @return the value of field 'ShowSequenceFeatures'.
- */
- public boolean getShowSequenceFeatures(
- ) {
- return this._showSequenceFeatures;
- }
-
- /**
- * Returns the value of field 'showText'.
- *
- * @return the value of field 'ShowText'.
- */
- public boolean getShowText(
- ) {
- return this._showText;
- }
-
- /**
- * Returns the value of field 'startRes'.
- *
- * @return the value of field 'StartRes'.
- */
- public int getStartRes(
- ) {
- return this._startRes;
- }
-
- /**
- * Returns the value of field 'startSeq'.
- *
- * @return the value of field 'StartSeq'.
- */
- public int getStartSeq(
- ) {
- return this._startSeq;
- }
-
- /**
- * Returns the value of field 'title'.
- *
- * @return the value of field 'Title'.
- */
- public java.lang.String getTitle(
- ) {
- return this._title;
- }
-
- /**
- * Returns the value of field 'width'.
- *
- * @return the value of field 'Width'.
- */
- public int getWidth(
- ) {
- return this._width;
- }
-
- /**
- * Returns the value of field 'wrapAlignment'.
- *
- * @return the value of field 'WrapAlignment'.
- */
- public boolean getWrapAlignment(
- ) {
- return this._wrapAlignment;
- }
-
- /**
- * Returns the value of field 'xpos'.
- *
- * @return the value of field 'Xpos'.
- */
- public int getXpos(
- ) {
- return this._xpos;
- }
-
- /**
- * Returns the value of field 'ypos'.
- *
- * @return the value of field 'Ypos'.
- */
- public int getYpos(
- ) {
- return this._ypos;
- }
-
- /**
- * Method hasConsThreshold.
- *
- * @return true if at least one ConsThreshold has been added
- */
- public boolean hasConsThreshold(
- ) {
- return this._has_consThreshold;
- }
-
- /**
- * Method hasConservationSelected.
- *
- * @return true if at least one ConservationSelected has been
- * added
- */
- public boolean hasConservationSelected(
- ) {
- return this._has_conservationSelected;
- }
-
- /**
- * Method hasFontSize.
- *
- * @return true if at least one FontSize has been added
- */
- public boolean hasFontSize(
- ) {
- return this._has_fontSize;
- }
-
- /**
- * Method hasFontStyle.
- *
- * @return true if at least one FontStyle has been added
- */
- public boolean hasFontStyle(
- ) {
- return this._has_fontStyle;
- }
-
- /**
- * Method hasHeight.
- *
- * @return true if at least one Height has been added
- */
- public boolean hasHeight(
- ) {
- return this._has_height;
- }
-
- /**
- * Method hasPidSelected.
- *
- * @return true if at least one PidSelected has been added
- */
- public boolean hasPidSelected(
- ) {
- return this._has_pidSelected;
- }
-
- /**
- * Method hasPidThreshold.
- *
- * @return true if at least one PidThreshold has been added
- */
- public boolean hasPidThreshold(
- ) {
- return this._has_pidThreshold;
- }
-
- /**
- * Method hasRenderGaps.
- *
- * @return true if at least one RenderGaps has been added
- */
- public boolean hasRenderGaps(
- ) {
- return this._has_renderGaps;
- }
-
- /**
- * Method hasShowAnnotation.
- *
- * @return true if at least one ShowAnnotation has been added
- */
- public boolean hasShowAnnotation(
- ) {
- return this._has_showAnnotation;
- }
-
- /**
- * Method hasShowBoxes.
- *
- * @return true if at least one ShowBoxes has been added
- */
- public boolean hasShowBoxes(
- ) {
- return this._has_showBoxes;
- }
-
- /**
- * Method hasShowColourText.
- *
- * @return true if at least one ShowColourText has been added
- */
- public boolean hasShowColourText(
- ) {
- return this._has_showColourText;
- }
-
- /**
- * Method hasShowConservation.
- *
- * @return true if at least one ShowConservation has been added
- */
- public boolean hasShowConservation(
- ) {
- return this._has_showConservation;
- }
-
- /**
- * Method hasShowFullId.
- *
- * @return true if at least one ShowFullId has been added
- */
- public boolean hasShowFullId(
- ) {
- return this._has_showFullId;
- }
-
- /**
- * Method hasShowIdentity.
- *
- * @return true if at least one ShowIdentity has been added
- */
- public boolean hasShowIdentity(
- ) {
- return this._has_showIdentity;
- }
-
- /**
- * Method hasShowQuality.
- *
- * @return true if at least one ShowQuality has been added
- */
- public boolean hasShowQuality(
- ) {
- return this._has_showQuality;
- }
-
- /**
- * Method hasShowSequenceFeatures.
- *
- * @return true if at least one ShowSequenceFeatures has been
- * added
- */
- public boolean hasShowSequenceFeatures(
- ) {
- return this._has_showSequenceFeatures;
- }
-
- /**
- * Method hasShowText.
- *
- * @return true if at least one ShowText has been added
- */
- public boolean hasShowText(
- ) {
- return this._has_showText;
- }
-
- /**
- * Method hasStartRes.
- *
- * @return true if at least one StartRes has been added
- */
- public boolean hasStartRes(
- ) {
- return this._has_startRes;
- }
-
- /**
- * Method hasStartSeq.
- *
- * @return true if at least one StartSeq has been added
- */
- public boolean hasStartSeq(
- ) {
- return this._has_startSeq;
- }
-
- /**
- * Method hasWidth.
- *
- * @return true if at least one Width has been added
- */
- public boolean hasWidth(
- ) {
- return this._has_width;
- }
-
- /**
- * 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 true if at least one Ypos has been added
- */
- public boolean hasYpos(
- ) {
- return this._has_ypos;
- }
-
- /**
- * Returns the value of field 'conservationSelected'.
- *
- * @return the value of field 'ConservationSelected'.
- */
- public boolean isConservationSelected(
- ) {
- return this._conservationSelected;
- }
-
- /**
- * Returns the value of field 'pidSelected'.
- *
- * @return the value of field 'PidSelected'.
- */
- public boolean isPidSelected(
- ) {
- return this._pidSelected;
- }
-
- /**
- * Returns the value of field 'renderGaps'.
- *
- * @return the value of field 'RenderGaps'.
- */
- public boolean isRenderGaps(
- ) {
- return this._renderGaps;
- }
-
- /**
- * Returns the value of field 'showAnnotation'.
- *
- * @return the value of field 'ShowAnnotation'.
- */
- public boolean isShowAnnotation(
- ) {
- return this._showAnnotation;
- }
-
- /**
- * 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 'showConservation'.
- *
- * @return the value of field 'ShowConservation'.
- */
- public boolean isShowConservation(
- ) {
- return this._showConservation;
- }
-
- /**
- * Returns the value of field 'showFullId'.
- *
- * @return the value of field 'ShowFullId'.
- */
- public boolean isShowFullId(
- ) {
- return this._showFullId;
- }
-
- /**
- * Returns the value of field 'showIdentity'.
- *
- * @return the value of field 'ShowIdentity'.
- */
- public boolean isShowIdentity(
- ) {
- return this._showIdentity;
- }
-
- /**
- * Returns the value of field 'showQuality'.
- *
- * @return the value of field 'ShowQuality'.
- */
- public boolean isShowQuality(
- ) {
- return this._showQuality;
- }
-
- /**
- * 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 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;
- }
-
- /**
- * Returns the value of field 'wrapAlignment'.
- *
- * @return the value of field 'WrapAlignment'.
- */
- public boolean isWrapAlignment(
- ) {
- return this._wrapAlignment;
- }
-
- /**
- *
- *
- * @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 'bgColour'.
- *
- * @param bgColour the value of field 'bgColour'.
- */
- public void setBgColour(
- final java.lang.String bgColour) {
- this._bgColour = bgColour;
- }
-
- /**
- * Sets the value of field 'consThreshold'.
- *
- * @param consThreshold the value of field 'consThreshold'.
- */
- public void setConsThreshold(
- final int consThreshold) {
- this._consThreshold = consThreshold;
- this._has_consThreshold = true;
- }
-
- /**
- * Sets the value of field 'conservationSelected'.
- *
- * @param conservationSelected the value of field
- * 'conservationSelected'.
- */
- public void setConservationSelected(
- final boolean conservationSelected) {
- this._conservationSelected = conservationSelected;
- this._has_conservationSelected = true;
- }
-
- /**
- * Sets the value of field 'fontName'.
- *
- * @param fontName the value of field 'fontName'.
- */
- public void setFontName(
- final java.lang.String fontName) {
- this._fontName = fontName;
- }
-
- /**
- * Sets the value of field 'fontSize'.
- *
- * @param fontSize the value of field 'fontSize'.
- */
- public void setFontSize(
- final int fontSize) {
- this._fontSize = fontSize;
- this._has_fontSize = true;
- }
-
- /**
- * Sets the value of field 'fontStyle'.
- *
- * @param fontStyle the value of field 'fontStyle'.
- */
- public void setFontStyle(
- final int fontStyle) {
- this._fontStyle = fontStyle;
- this._has_fontStyle = true;
- }
-
- /**
- * Sets the value of field 'height'.
- *
- * @param height the value of field 'height'.
- */
- public void setHeight(
- final int height) {
- this._height = height;
- this._has_height = true;
- }
-
- /**
- * Sets the value of field 'pidSelected'.
- *
- * @param pidSelected the value of field 'pidSelected'.
- */
- public void setPidSelected(
- final boolean pidSelected) {
- this._pidSelected = pidSelected;
- this._has_pidSelected = true;
- }
-
- /**
- * Sets the value of field 'pidThreshold'.
- *
- * @param pidThreshold the value of field 'pidThreshold'.
- */
- public void setPidThreshold(
- final int pidThreshold) {
- this._pidThreshold = pidThreshold;
- this._has_pidThreshold = true;
- }
-
- /**
- * Sets the value of field 'renderGaps'.
- *
- * @param renderGaps the value of field 'renderGaps'.
- */
- public void setRenderGaps(
- final boolean renderGaps) {
- this._renderGaps = renderGaps;
- this._has_renderGaps = true;
- }
-
- /**
- * Sets the value of field 'showAnnotation'.
- *
- * @param showAnnotation the value of field 'showAnnotation'.
- */
- public void setShowAnnotation(
- final boolean showAnnotation) {
- this._showAnnotation = showAnnotation;
- this._has_showAnnotation = true;
- }
-
- /**
- * Sets the value of field 'showBoxes'.
- *
- * @param showBoxes the value of field 'showBoxes'.
- */
- public void setShowBoxes(
- final boolean showBoxes) {
- this._showBoxes = showBoxes;
- this._has_showBoxes = true;
- }
-
- /**
- * Sets the value of field 'showColourText'.
- *
- * @param showColourText the value of field 'showColourText'.
- */
- public void setShowColourText(
- final boolean showColourText) {
- this._showColourText = showColourText;
- this._has_showColourText = true;
- }
-
- /**
- * Sets the value of field 'showConservation'.
- *
- * @param showConservation the value of field 'showConservation'
- */
- public void setShowConservation(
- final boolean showConservation) {
- this._showConservation = showConservation;
- this._has_showConservation = true;
- }
-
- /**
- * Sets the value of field 'showFullId'.
- *
- * @param showFullId the value of field 'showFullId'.
- */
- public void setShowFullId(
- final boolean showFullId) {
- this._showFullId = showFullId;
- this._has_showFullId = true;
- }
-
- /**
- * Sets the value of field 'showIdentity'.
- *
- * @param showIdentity the value of field 'showIdentity'.
- */
- public void setShowIdentity(
- final boolean showIdentity) {
- this._showIdentity = showIdentity;
- this._has_showIdentity = true;
- }
-
- /**
- * Sets the value of field 'showQuality'.
- *
- * @param showQuality the value of field 'showQuality'.
- */
- public void setShowQuality(
- final boolean showQuality) {
- this._showQuality = showQuality;
- this._has_showQuality = true;
- }
-
- /**
- * Sets the value of field 'showSequenceFeatures'.
- *
- * @param showSequenceFeatures the value of field
- * 'showSequenceFeatures'.
- */
- public void setShowSequenceFeatures(
- final boolean showSequenceFeatures) {
- this._showSequenceFeatures = showSequenceFeatures;
- this._has_showSequenceFeatures = true;
- }
-
- /**
- * Sets the value of field 'showText'.
- *
- * @param showText the value of field 'showText'.
- */
- public void setShowText(
- final boolean showText) {
- this._showText = showText;
- this._has_showText = true;
- }
-
- /**
- * Sets the value of field 'startRes'.
- *
- * @param startRes the value of field 'startRes'.
- */
- public void setStartRes(
- final int startRes) {
- this._startRes = startRes;
- this._has_startRes = true;
- }
-
- /**
- * Sets the value of field 'startSeq'.
- *
- * @param startSeq the value of field 'startSeq'.
- */
- public void setStartSeq(
- final int startSeq) {
- this._startSeq = startSeq;
- this._has_startSeq = true;
- }
-
- /**
- * Sets the value of field 'title'.
- *
- * @param title the value of field 'title'.
- */
- public void setTitle(
- final java.lang.String title) {
- this._title = title;
- }
-
- /**
- * Sets the value of field 'width'.
- *
- * @param width the value of field 'width'.
- */
- public void setWidth(
- final int width) {
- this._width = width;
- this._has_width = true;
- }
-
- /**
- * Sets the value of field 'wrapAlignment'.
- *
- * @param wrapAlignment the value of field 'wrapAlignment'.
- */
- public void setWrapAlignment(
- final boolean wrapAlignment) {
- this._wrapAlignment = wrapAlignment;
- this._has_wrapAlignment = true;
- }
-
- /**
- * Sets the value of field 'xpos'.
- *
- * @param xpos the value of field 'xpos'.
- */
- public void setXpos(
- final int xpos) {
- this._xpos = xpos;
- this._has_xpos = true;
- }
-
- /**
- * Sets the value of field 'ypos'.
- *
- * @param ypos the value of field 'ypos'.
- */
- public void setYpos(
- final int ypos) {
- this._ypos = ypos;
- this._has_ypos = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.binding.Viewport
- */
- public static jalview.binding.Viewport unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.binding.Viewport) Unmarshaller.unmarshal(jalview.binding.Viewport.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);
- }
+ public void deleteShowQuality()
+ {
+ this._has_showQuality = false;
+ }
+
+ /**
+ */
+ public void deleteShowSequenceFeatures()
+ {
+ this._has_showSequenceFeatures = false;
+ }
+
+ /**
+ */
+ public void deleteShowText()
+ {
+ this._has_showText = false;
+ }
+
+ /**
+ */
+ public void deleteStartRes()
+ {
+ this._has_startRes = false;
+ }
+
+ /**
+ */
+ public void deleteStartSeq()
+ {
+ this._has_startSeq = false;
+ }
+
+ /**
+ */
+ public void deleteWidth()
+ {
+ this._has_width = false;
+ }
+
+ /**
+ */
+ public void deleteWrapAlignment()
+ {
+ this._has_wrapAlignment = false;
+ }
+
+ /**
+ */
+ public void deleteXpos()
+ {
+ this._has_xpos = false;
+ }
+
+ /**
+ */
+ public void deleteYpos()
+ {
+ this._has_ypos = false;
+ }
+
+ /**
+ * Returns the value of field 'bgColour'.
+ *
+ * @return the value of field 'BgColour'.
+ */
+ public java.lang.String getBgColour()
+ {
+ return this._bgColour;
+ }
+
+ /**
+ * Returns the value of field 'consThreshold'.
+ *
+ * @return the value of field 'ConsThreshold'.
+ */
+ public int getConsThreshold()
+ {
+ return this._consThreshold;
+ }
+
+ /**
+ * Returns the value of field 'conservationSelected'.
+ *
+ * @return the value of field 'ConservationSelected'.
+ */
+ public boolean getConservationSelected()
+ {
+ return this._conservationSelected;
+ }
+
+ /**
+ * Returns the value of field 'fontName'.
+ *
+ * @return the value of field 'FontName'.
+ */
+ public java.lang.String getFontName()
+ {
+ return this._fontName;
+ }
+
+ /**
+ * Returns the value of field 'fontSize'.
+ *
+ * @return the value of field 'FontSize'.
+ */
+ public int getFontSize()
+ {
+ return this._fontSize;
+ }
+
+ /**
+ * Returns the value of field 'fontStyle'.
+ *
+ * @return the value of field 'FontStyle'.
+ */
+ public int getFontStyle()
+ {
+ return this._fontStyle;
+ }
+
+ /**
+ * Returns the value of field 'height'.
+ *
+ * @return the value of field 'Height'.
+ */
+ public int getHeight()
+ {
+ return this._height;
+ }
+
+ /**
+ * Returns the value of field 'pidSelected'.
+ *
+ * @return the value of field 'PidSelected'.
+ */
+ public boolean getPidSelected()
+ {
+ return this._pidSelected;
+ }
+
+ /**
+ * Returns the value of field 'pidThreshold'.
+ *
+ * @return the value of field 'PidThreshold'.
+ */
+ public int getPidThreshold()
+ {
+ return this._pidThreshold;
+ }
+
+ /**
+ * Returns the value of field 'renderGaps'.
+ *
+ * @return the value of field 'RenderGaps'.
+ */
+ public boolean getRenderGaps()
+ {
+ return this._renderGaps;
+ }
+
+ /**
+ * Returns the value of field 'showAnnotation'.
+ *
+ * @return the value of field 'ShowAnnotation'.
+ */
+ public boolean getShowAnnotation()
+ {
+ return this._showAnnotation;
+ }
+
+ /**
+ * Returns the value of field 'showBoxes'.
+ *
+ * @return the value of field 'ShowBoxes'.
+ */
+ public boolean getShowBoxes()
+ {
+ return this._showBoxes;
+ }
+
+ /**
+ * Returns the value of field 'showColourText'.
+ *
+ * @return the value of field 'ShowColourText'.
+ */
+ public boolean getShowColourText()
+ {
+ return this._showColourText;
+ }
+
+ /**
+ * Returns the value of field 'showConservation'.
+ *
+ * @return the value of field 'ShowConservation'.
+ */
+ public boolean getShowConservation()
+ {
+ return this._showConservation;
+ }
+
+ /**
+ * Returns the value of field 'showFullId'.
+ *
+ * @return the value of field 'ShowFullId'.
+ */
+ public boolean getShowFullId()
+ {
+ return this._showFullId;
+ }
+
+ /**
+ * Returns the value of field 'showIdentity'.
+ *
+ * @return the value of field 'ShowIdentity'.
+ */
+ public boolean getShowIdentity()
+ {
+ return this._showIdentity;
+ }
+
+ /**
+ * Returns the value of field 'showQuality'.
+ *
+ * @return the value of field 'ShowQuality'.
+ */
+ public boolean getShowQuality()
+ {
+ return this._showQuality;
+ }
+
+ /**
+ * Returns the value of field 'showSequenceFeatures'.
+ *
+ * @return the value of field 'ShowSequenceFeatures'.
+ */
+ public boolean getShowSequenceFeatures()
+ {
+ return this._showSequenceFeatures;
+ }
+
+ /**
+ * Returns the value of field 'showText'.
+ *
+ * @return the value of field 'ShowText'.
+ */
+ public boolean getShowText()
+ {
+ return this._showText;
+ }
+
+ /**
+ * Returns the value of field 'startRes'.
+ *
+ * @return the value of field 'StartRes'.
+ */
+ public int getStartRes()
+ {
+ return this._startRes;
+ }
+
+ /**
+ * Returns the value of field 'startSeq'.
+ *
+ * @return the value of field 'StartSeq'.
+ */
+ public int getStartSeq()
+ {
+ return this._startSeq;
+ }
+
+ /**
+ * Returns the value of field 'title'.
+ *
+ * @return the value of field 'Title'.
+ */
+ public java.lang.String getTitle()
+ {
+ return this._title;
+ }
+
+ /**
+ * Returns the value of field 'width'.
+ *
+ * @return the value of field 'Width'.
+ */
+ public int getWidth()
+ {
+ return this._width;
+ }
+
+ /**
+ * Returns the value of field 'wrapAlignment'.
+ *
+ * @return the value of field 'WrapAlignment'.
+ */
+ public boolean getWrapAlignment()
+ {
+ return this._wrapAlignment;
+ }
+
+ /**
+ * Returns the value of field 'xpos'.
+ *
+ * @return the value of field 'Xpos'.
+ */
+ public int getXpos()
+ {
+ return this._xpos;
+ }
+
+ /**
+ * Returns the value of field 'ypos'.
+ *
+ * @return the value of field 'Ypos'.
+ */
+ public int getYpos()
+ {
+ return this._ypos;
+ }
+
+ /**
+ * Method hasConsThreshold.
+ *
+ * @return true if at least one ConsThreshold has been added
+ */
+ public boolean hasConsThreshold()
+ {
+ return this._has_consThreshold;
+ }
+
+ /**
+ * Method hasConservationSelected.
+ *
+ * @return true if at least one ConservationSelected has been added
+ */
+ public boolean hasConservationSelected()
+ {
+ return this._has_conservationSelected;
+ }
+
+ /**
+ * Method hasFontSize.
+ *
+ * @return true if at least one FontSize has been added
+ */
+ public boolean hasFontSize()
+ {
+ return this._has_fontSize;
+ }
+
+ /**
+ * Method hasFontStyle.
+ *
+ * @return true if at least one FontStyle has been added
+ */
+ public boolean hasFontStyle()
+ {
+ return this._has_fontStyle;
+ }
+
+ /**
+ * Method hasHeight.
+ *
+ * @return true if at least one Height has been added
+ */
+ public boolean hasHeight()
+ {
+ return this._has_height;
+ }
+
+ /**
+ * Method hasPidSelected.
+ *
+ * @return true if at least one PidSelected has been added
+ */
+ public boolean hasPidSelected()
+ {
+ return this._has_pidSelected;
+ }
+
+ /**
+ * Method hasPidThreshold.
+ *
+ * @return true if at least one PidThreshold has been added
+ */
+ public boolean hasPidThreshold()
+ {
+ return this._has_pidThreshold;
+ }
+
+ /**
+ * Method hasRenderGaps.
+ *
+ * @return true if at least one RenderGaps has been added
+ */
+ public boolean hasRenderGaps()
+ {
+ return this._has_renderGaps;
+ }
+
+ /**
+ * Method hasShowAnnotation.
+ *
+ * @return true if at least one ShowAnnotation has been added
+ */
+ public boolean hasShowAnnotation()
+ {
+ return this._has_showAnnotation;
+ }
+
+ /**
+ * Method hasShowBoxes.
+ *
+ * @return true if at least one ShowBoxes has been added
+ */
+ public boolean hasShowBoxes()
+ {
+ return this._has_showBoxes;
+ }
+
+ /**
+ * Method hasShowColourText.
+ *
+ * @return true if at least one ShowColourText has been added
+ */
+ public boolean hasShowColourText()
+ {
+ return this._has_showColourText;
+ }
+
+ /**
+ * Method hasShowConservation.
+ *
+ * @return true if at least one ShowConservation has been added
+ */
+ public boolean hasShowConservation()
+ {
+ return this._has_showConservation;
+ }
+
+ /**
+ * Method hasShowFullId.
+ *
+ * @return true if at least one ShowFullId has been added
+ */
+ public boolean hasShowFullId()
+ {
+ return this._has_showFullId;
+ }
+
+ /**
+ * Method hasShowIdentity.
+ *
+ * @return true if at least one ShowIdentity has been added
+ */
+ public boolean hasShowIdentity()
+ {
+ return this._has_showIdentity;
+ }
+
+ /**
+ * Method hasShowQuality.
+ *
+ * @return true if at least one ShowQuality has been added
+ */
+ public boolean hasShowQuality()
+ {
+ return this._has_showQuality;
+ }
+
+ /**
+ * Method hasShowSequenceFeatures.
+ *
+ * @return true if at least one ShowSequenceFeatures has been added
+ */
+ public boolean hasShowSequenceFeatures()
+ {
+ return this._has_showSequenceFeatures;
+ }
+
+ /**
+ * Method hasShowText.
+ *
+ * @return true if at least one ShowText has been added
+ */
+ public boolean hasShowText()
+ {
+ return this._has_showText;
+ }
+
+ /**
+ * Method hasStartRes.
+ *
+ * @return true if at least one StartRes has been added
+ */
+ public boolean hasStartRes()
+ {
+ return this._has_startRes;
+ }
+
+ /**
+ * Method hasStartSeq.
+ *
+ * @return true if at least one StartSeq has been added
+ */
+ public boolean hasStartSeq()
+ {
+ return this._has_startSeq;
+ }
+
+ /**
+ * Method hasWidth.
+ *
+ * @return true if at least one Width has been added
+ */
+ public boolean hasWidth()
+ {
+ return this._has_width;
+ }
+
+ /**
+ * 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 true if at least one Ypos has been added
+ */
+ public boolean hasYpos()
+ {
+ return this._has_ypos;
+ }
+
+ /**
+ * Returns the value of field 'conservationSelected'.
+ *
+ * @return the value of field 'ConservationSelected'.
+ */
+ public boolean isConservationSelected()
+ {
+ return this._conservationSelected;
+ }
+
+ /**
+ * Returns the value of field 'pidSelected'.
+ *
+ * @return the value of field 'PidSelected'.
+ */
+ public boolean isPidSelected()
+ {
+ return this._pidSelected;
+ }
+
+ /**
+ * Returns the value of field 'renderGaps'.
+ *
+ * @return the value of field 'RenderGaps'.
+ */
+ public boolean isRenderGaps()
+ {
+ return this._renderGaps;
+ }
+
+ /**
+ * Returns the value of field 'showAnnotation'.
+ *
+ * @return the value of field 'ShowAnnotation'.
+ */
+ public boolean isShowAnnotation()
+ {
+ return this._showAnnotation;
+ }
+
+ /**
+ * 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 'showConservation'.
+ *
+ * @return the value of field 'ShowConservation'.
+ */
+ public boolean isShowConservation()
+ {
+ return this._showConservation;
+ }
+
+ /**
+ * Returns the value of field 'showFullId'.
+ *
+ * @return the value of field 'ShowFullId'.
+ */
+ public boolean isShowFullId()
+ {
+ return this._showFullId;
+ }
+
+ /**
+ * Returns the value of field 'showIdentity'.
+ *
+ * @return the value of field 'ShowIdentity'.
+ */
+ public boolean isShowIdentity()
+ {
+ return this._showIdentity;
+ }
+
+ /**
+ * Returns the value of field 'showQuality'.
+ *
+ * @return the value of field 'ShowQuality'.
+ */
+ public boolean isShowQuality()
+ {
+ return this._showQuality;
+ }
+
+ /**
+ * 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 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;
+ }
+
+ /**
+ * Returns the value of field 'wrapAlignment'.
+ *
+ * @return the value of field 'WrapAlignment'.
+ */
+ public boolean isWrapAlignment()
+ {
+ return this._wrapAlignment;
+ }
+
+ /**
+ *
+ *
+ * @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 'bgColour'.
+ *
+ * @param bgColour
+ * the value of field 'bgColour'.
+ */
+ public void setBgColour(final java.lang.String bgColour)
+ {
+ this._bgColour = bgColour;
+ }
+
+ /**
+ * Sets the value of field 'consThreshold'.
+ *
+ * @param consThreshold
+ * the value of field 'consThreshold'.
+ */
+ public void setConsThreshold(final int consThreshold)
+ {
+ this._consThreshold = consThreshold;
+ this._has_consThreshold = true;
+ }
+
+ /**
+ * Sets the value of field 'conservationSelected'.
+ *
+ * @param conservationSelected
+ * the value of field 'conservationSelected'.
+ */
+ public void setConservationSelected(final boolean conservationSelected)
+ {
+ this._conservationSelected = conservationSelected;
+ this._has_conservationSelected = true;
+ }
+
+ /**
+ * Sets the value of field 'fontName'.
+ *
+ * @param fontName
+ * the value of field 'fontName'.
+ */
+ public void setFontName(final java.lang.String fontName)
+ {
+ this._fontName = fontName;
+ }
+
+ /**
+ * Sets the value of field 'fontSize'.
+ *
+ * @param fontSize
+ * the value of field 'fontSize'.
+ */
+ public void setFontSize(final int fontSize)
+ {
+ this._fontSize = fontSize;
+ this._has_fontSize = true;
+ }
+
+ /**
+ * Sets the value of field 'fontStyle'.
+ *
+ * @param fontStyle
+ * the value of field 'fontStyle'.
+ */
+ public void setFontStyle(final int fontStyle)
+ {
+ this._fontStyle = fontStyle;
+ this._has_fontStyle = true;
+ }
+
+ /**
+ * Sets the value of field 'height'.
+ *
+ * @param height
+ * the value of field 'height'.
+ */
+ public void setHeight(final int height)
+ {
+ this._height = height;
+ this._has_height = true;
+ }
+
+ /**
+ * Sets the value of field 'pidSelected'.
+ *
+ * @param pidSelected
+ * the value of field 'pidSelected'.
+ */
+ public void setPidSelected(final boolean pidSelected)
+ {
+ this._pidSelected = pidSelected;
+ this._has_pidSelected = true;
+ }
+
+ /**
+ * Sets the value of field 'pidThreshold'.
+ *
+ * @param pidThreshold
+ * the value of field 'pidThreshold'.
+ */
+ public void setPidThreshold(final int pidThreshold)
+ {
+ this._pidThreshold = pidThreshold;
+ this._has_pidThreshold = true;
+ }
+
+ /**
+ * Sets the value of field 'renderGaps'.
+ *
+ * @param renderGaps
+ * the value of field 'renderGaps'.
+ */
+ public void setRenderGaps(final boolean renderGaps)
+ {
+ this._renderGaps = renderGaps;
+ this._has_renderGaps = true;
+ }
+
+ /**
+ * Sets the value of field 'showAnnotation'.
+ *
+ * @param showAnnotation
+ * the value of field 'showAnnotation'.
+ */
+ public void setShowAnnotation(final boolean showAnnotation)
+ {
+ this._showAnnotation = showAnnotation;
+ this._has_showAnnotation = true;
+ }
+
+ /**
+ * Sets the value of field 'showBoxes'.
+ *
+ * @param showBoxes
+ * the value of field 'showBoxes'.
+ */
+ public void setShowBoxes(final boolean showBoxes)
+ {
+ this._showBoxes = showBoxes;
+ this._has_showBoxes = true;
+ }
+
+ /**
+ * Sets the value of field 'showColourText'.
+ *
+ * @param showColourText
+ * the value of field 'showColourText'.
+ */
+ public void setShowColourText(final boolean showColourText)
+ {
+ this._showColourText = showColourText;
+ this._has_showColourText = true;
+ }
+
+ /**
+ * Sets the value of field 'showConservation'.
+ *
+ * @param showConservation
+ * the value of field 'showConservation'
+ */
+ public void setShowConservation(final boolean showConservation)
+ {
+ this._showConservation = showConservation;
+ this._has_showConservation = true;
+ }
+
+ /**
+ * Sets the value of field 'showFullId'.
+ *
+ * @param showFullId
+ * the value of field 'showFullId'.
+ */
+ public void setShowFullId(final boolean showFullId)
+ {
+ this._showFullId = showFullId;
+ this._has_showFullId = true;
+ }
+
+ /**
+ * Sets the value of field 'showIdentity'.
+ *
+ * @param showIdentity
+ * the value of field 'showIdentity'.
+ */
+ public void setShowIdentity(final boolean showIdentity)
+ {
+ this._showIdentity = showIdentity;
+ this._has_showIdentity = true;
+ }
+
+ /**
+ * Sets the value of field 'showQuality'.
+ *
+ * @param showQuality
+ * the value of field 'showQuality'.
+ */
+ public void setShowQuality(final boolean showQuality)
+ {
+ this._showQuality = showQuality;
+ this._has_showQuality = true;
+ }
+
+ /**
+ * Sets the value of field 'showSequenceFeatures'.
+ *
+ * @param showSequenceFeatures
+ * the value of field 'showSequenceFeatures'.
+ */
+ public void setShowSequenceFeatures(final boolean showSequenceFeatures)
+ {
+ this._showSequenceFeatures = showSequenceFeatures;
+ this._has_showSequenceFeatures = true;
+ }
+
+ /**
+ * Sets the value of field 'showText'.
+ *
+ * @param showText
+ * the value of field 'showText'.
+ */
+ public void setShowText(final boolean showText)
+ {
+ this._showText = showText;
+ this._has_showText = true;
+ }
+
+ /**
+ * Sets the value of field 'startRes'.
+ *
+ * @param startRes
+ * the value of field 'startRes'.
+ */
+ public void setStartRes(final int startRes)
+ {
+ this._startRes = startRes;
+ this._has_startRes = true;
+ }
+
+ /**
+ * Sets the value of field 'startSeq'.
+ *
+ * @param startSeq
+ * the value of field 'startSeq'.
+ */
+ public void setStartSeq(final int startSeq)
+ {
+ this._startSeq = startSeq;
+ this._has_startSeq = true;
+ }
+
+ /**
+ * Sets the value of field 'title'.
+ *
+ * @param title
+ * the value of field 'title'.
+ */
+ public void setTitle(final java.lang.String title)
+ {
+ this._title = title;
+ }
+
+ /**
+ * Sets the value of field 'width'.
+ *
+ * @param width
+ * the value of field 'width'.
+ */
+ public void setWidth(final int width)
+ {
+ this._width = width;
+ this._has_width = true;
+ }
+
+ /**
+ * Sets the value of field 'wrapAlignment'.
+ *
+ * @param wrapAlignment
+ * the value of field 'wrapAlignment'.
+ */
+ public void setWrapAlignment(final boolean wrapAlignment)
+ {
+ this._wrapAlignment = wrapAlignment;
+ this._has_wrapAlignment = true;
+ }
+
+ /**
+ * Sets the value of field 'xpos'.
+ *
+ * @param xpos
+ * the value of field 'xpos'.
+ */
+ public void setXpos(final int xpos)
+ {
+ this._xpos = xpos;
+ this._has_xpos = true;
+ }
+
+ /**
+ * Sets the value of field 'ypos'.
+ *
+ * @param ypos
+ * the value of field 'ypos'.
+ */
+ public void setYpos(final int ypos)
+ {
+ this._ypos = ypos;
+ this._has_ypos = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.binding.Viewport
+ */
+ public static jalview.binding.Viewport unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.binding.Viewport) Unmarshaller.unmarshal(
+ jalview.binding.Viewport.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);
+ }
}
import jalview.datamodel.*;
/**
- *
+ *
* <p>
* Title: EditCommmand
* </p>
- *
+ *
* <p>
* Description: Essential information for performing undo and redo for cut/paste
* insert/delete gap which can be stored in the HistoryList
* </p>
- *
+ *
* <p>
* Copyright: Copyright (c) 2006
* </p>
- *
+ *
* <p>
* Company: Dundee University
* </p>
- *
+ *
* @author not attributable
* @version 1.0
*/
public static final int REPLACE = 4;
- public static final int INSERT_NUC=5;
+ public static final int INSERT_NUC = 5;
Edit[] edits;
* operation affects more alignment objects than the one referenced in al (for
* example, cut or pasting whole sequences). Use the form with an additional
* AlignmentI[] views parameter.
- *
+ *
* @param command
* @param seqs
* @param position
/**
* append a new edit command with a set of alignment views that may be
* operated on
- *
+ *
* @param command
* @param seqs
* @param position
case REPLACE:
replace(edits[e]);
break;
- //TODO:add deleteNuc for UNDO
-// case INSERT_NUC:
-// insertNuc(edits[e]);
-// break;
+ // TODO:add deleteNuc for UNDO
+ // case INSERT_NUC:
+ // insertNuc(edits[e]);
+ // break;
}
}
}
case REPLACE:
replace(edits[e]);
break;
- }
+ }
}
}
{
command.seqs[s].insertCharAt(command.position, command.number,
command.gapChar);
-// System.out.println("pos: "+command.position+" number: "+command.number);
+ // System.out.println("pos: "+command.position+" number: "+command.number);
}
adjustAnnotations(command, true, false, null);
}
-//
-// final void insertNuc(Edit command)
-// {
-//
-// for (int s = 0; s < command.seqs.length; s++)
-// {
-// System.out.println("pos: "+command.position+" number: "+command.number);
-// command.seqs[s].insertCharAt(command.position, command.number,'A');
-// }
-//
-// adjustAnnotations(command, true, false, null);
-// }
+
+ //
+ // final void insertNuc(Edit command)
+ // {
+ //
+ // for (int s = 0; s < command.seqs.length; s++)
+ // {
+ // System.out.println("pos: "+command.position+" number: "+command.number);
+ // command.seqs[s].insertCharAt(command.position, command.number,'A');
+ // }
+ //
+ // adjustAnnotations(command, true, false, null);
+ // }
final void deleteGap(Edit command)
{
if (command.alIndex[i] < command.al.getHeight())
{
List<SequenceI> sequences;
- synchronized (sequences=command.al.getSequences()) {
+ synchronized (sequences = command.al.getSequences())
+ {
sequences.add(command.alIndex[i], command.seqs[i]);
}
}
command.number = start + command.string[0].length;
for (int i = 0; i < command.seqs.length; i++)
{
- boolean newDSWasNeeded = command.oldds != null && command.oldds[i] != null;
+ boolean newDSWasNeeded = command.oldds != null
+ && command.oldds[i] != null;
/**
* cut addHistoryItem(new EditCommand("Cut Sequences", EditCommand.CUT,
* cut, sg.getStartRes(), sg.getEndRes()-sg.getStartRes()+1,
* viewport.alignment));
- *
+ *
*/
/**
* then addHistoryItem(new EditCommand( "Add sequences",
* EditCommand.PASTE, sequences, 0, alignment.getWidth(), alignment) );
- *
+ *
*/
oldstring = command.seqs[i].getSequenceAsString();
tmp = new StringBuffer(oldstring.substring(0, start));
fullseq = osp.substring(0, ipos) + nogaprep
+ osp.substring(ipos + nogaprep.length());
newds.setSequence(fullseq.toUpperCase());
- // TODO: JAL-1131 ensure newly created dataset sequence is added to the set of
+ // TODO: JAL-1131 ensure newly created dataset sequence is added to
+ // the set of
// dataset sequences associated with the alignment.
// TODO: JAL-1131 fix up any annotation associated with new dataset
// sequence to ensure that original sequence/annotation relationships
*/
/**
* @author JimP
- *
+ *
*/
public class Alignment implements AlignmentI
{
/**
* Make an alignment from an array of Sequences.
- *
+ *
* @param sequences
*/
public Alignment(SequenceI[] seqs)
/**
* Make a new alignment from an array of SeqCigars
- *
+ *
* @param seqs
* SeqCigar[]
*/
* compactAlignment does not contain hidden regions. JBPNote - must also check
* that compactAlignment resolves to a set of SeqCigars - or construct them
* appropriately.
- *
+ *
* @param compactAlignment
* CigarArray
*/
/**
* DOCUMENT ME!
- *
+ *
* @return DOCUMENT ME!
*/
@Override
/**
* DOCUMENT ME!
- *
+ *
* @param i
* DOCUMENT ME!
- *
+ *
* @return DOCUMENT ME!
*/
@Override
/**
* Adds a sequence to the alignment. Recalculates maxLength and size.
- *
+ *
* @param snew
*/
@Override
/**
* Adds a sequence to the alignment. Recalculates maxLength and size.
- *
+ *
* @param snew
*/
@Override
/**
* DOCUMENT ME!
- *
+ *
* @return DOCUMENT ME!
*/
@Override
/**
* DOCUMENT ME!
- *
+ *
* @param s
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param i
* DOCUMENT ME!
*/
/*
* (non-Javadoc)
- *
+ *
* @see jalview.datamodel.AlignmentI#findGroup(jalview.datamodel.SequenceI)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.datamodel.AlignmentI#findAllGroups(jalview.datamodel.SequenceI)
*/
/**
* remove any annotation that references gp
- *
+ *
* @param gp
* (if null, removes all group associated annotation)
*/
/*
* (non-Javadoc)
- *
+ *
* @see jalview.datamodel.AlignmentI#findName(java.lang.String, boolean)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see jalview.datamodel.AlignmentI#findName(SequenceI, java.lang.String,
* boolean)
*/
/*
* (non-Javadoc)
- *
+ *
* @see jalview.datamodel.AlignmentI#findIndex(jalview.datamodel.SequenceI)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.datamodel.AlignmentI#findIndex(jalview.datamodel.SearchResults)
*/
/**
* DOCUMENT ME!
- *
+ *
* @return DOCUMENT ME!
*/
@Override
/**
* DOCUMENT ME!
- *
+ *
* @return DOCUMENT ME!
*/
@Override
/**
* DOCUMENT ME!
- *
+ *
* @param gc
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @return DOCUMENT ME!
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see jalview.datamodel.AlignmentI#isAligned()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see jalview.datamodel.AlignmentI#isAligned(boolean)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @seejalview.datamodel.AlignmentI#deleteAnnotation(jalview.datamodel.
* AlignmentAnnotation)
*/
/**
* remove any object references associated with this annotation
- *
+ *
* @param aa
*/
private void unhookAnnotation(AlignmentAnnotation aa)
/*
* (non-Javadoc)
- *
+ *
* @seejalview.datamodel.AlignmentI#addAnnotation(jalview.datamodel.
* AlignmentAnnotation)
*/
/*
* (non-Javadoc)
- *
+ *
* @seejalview.datamodel.AlignmentI#addAnnotation(jalview.datamodel.
* AlignmentAnnotation, int)
*/
/**
* Justify the sequences to the left or right by deleting and inserting gaps
* before the initial residue or after the terminal residue
- *
+ *
* @param right
* true if alignment padded to right, false to justify to left
* @return true if alignment was changed
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.datamodel.AlignmentI#addCodonFrame(jalview.datamodel.AlignedCodonFrame
* )
/*
* (non-Javadoc)
- *
+ *
* @see jalview.datamodel.AlignmentI#getCodonFrame(int)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.datamodel.AlignmentI#getCodonFrame(jalview.datamodel.SequenceI)
*/
/*
* (non-Javadoc)
- *
+ *
* @see jalview.datamodel.AlignmentI#getCodonFrames()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @seejalview.datamodel.AlignmentI#removeCodonFrame(jalview.datamodel.
* AlignedCodonFrame)
*/
@Override
public AlignmentAnnotation findOrCreateAnnotation(String name,
- String calcId, boolean autoCalc, SequenceI seqRef, SequenceGroup groupRef)
+ String calcId, boolean autoCalc, SequenceI seqRef,
+ SequenceGroup groupRef)
{
- assert(name!=null);
+ assert (name != null);
for (AlignmentAnnotation annot : getAlignmentAnnotation())
{
- if (annot.autoCalculated == autoCalc
- && (name.equals(annot.label))
- && (calcId==null || annot.getCalcId().equals(calcId))
+ if (annot.autoCalculated == autoCalc && (name.equals(annot.label))
+ && (calcId == null || annot.getCalcId().equals(calcId))
&& annot.sequenceRef == seqRef && annot.groupRef == groupRef)
{
return annot;
float min = graphMin;
float max = graphMax;
boolean drawValues = true;
- _linecolour=null;
+ _linecolour = null;
if (min == max)
{
min = 999999999;
this.annotations = new Annotation[ann.length];
for (int i = 0; i < ann.length; i++)
{
- if (ann[i]!=null)
+ if (ann[i] != null)
{
annotations[i] = new Annotation(ann[i]);
- if (_linecolour!=null)
+ if (_linecolour != null)
{
_linecolour = annotations[i].colour;
}
{
/**
* Calculates the number of sequences in an alignment
- *
+ *
* @return Number of sequences in alignment
*/
public int getHeight();
/**
* Calculates the maximum width of the alignment, including gaps.
- *
+ *
* @return Greatest sequence length within alignment.
*/
@Override
/**
* Calculates if this set of sequences (visible and invisible) are all the
* same length
- *
+ *
* @return true if all sequences in alignment are the same length
*/
public boolean isAligned();
/**
* Calculates if this set of sequences is all the same length
- *
+ *
* @param includeHidden
* optionally exclude hidden sequences from test
* @return true if all (or just visible) sequences are the same length
/**
* Gets sequences as a Synchronized collection
- *
+ *
* @return All sequences in alignment.
*/
@Override
/**
* Gets sequences as a SequenceI[]
- *
+ *
* @return All sequences in alignment.
*/
public SequenceI[] getSequencesArray();
/**
* Find a specific sequence in this alignment.
- *
+ *
* @param i
* Index of required sequence.
- *
+ *
* @return SequenceI at given index.
*/
public SequenceI getSequenceAt(int i);
/**
* Add a new sequence to this alignment.
- *
+ *
* @param seq
* New sequence will be added at end of alignment.
*/
public void addSequence(SequenceI seq);
-
/**
* Used to set a particular index of the alignment with the given sequence.
- *
+ *
* @param i
* Index of sequence to be updated.
* @param seq
/**
* Deletes a sequence from the alignment
- *
+ *
* @param s
* Sequence to be deleted.
*/
/**
* Deletes a sequence from the alignment.
- *
+ *
* @param i
* Index of sequence to be deleted.
*/
/**
* Finds sequence in alignment using sequence name as query.
- *
+ *
* @param name
* Id of sequence to search for.
- *
+ *
* @return Sequence matching query, if found. If not found returns null.
*/
public SequenceI findName(String name);
/**
* Finds index of a given sequence in the alignment.
- *
+ *
* @param s
* Sequence to look for.
- *
+ *
* @return Index of sequence within the alignment or -1 if not found
*/
public int findIndex(SequenceI s);
/**
* Finds group that given sequence is part of.
- *
+ *
* @param s
* Sequence in alignment.
- *
+ *
* @return First group found for sequence. WARNING : Sequences may be members
* of several groups. This method is incomplete.
*/
/**
* Finds all groups that a given sequence is part of.
- *
+ *
* @param s
* Sequence in alignment.
- *
+ *
* @return All groups containing given sequence.
*/
public SequenceGroup[] findAllGroups(SequenceI s);
/**
* Adds a new SequenceGroup to this alignment.
- *
+ *
* @param sg
* New group to be added.
*/
/**
* Deletes a specific SequenceGroup
- *
+ *
* @param g
* Group will be deleted from alignment.
*/
/**
* Get all the groups associated with this alignment.
- *
+ *
* @return All groups as a list.
*/
public List<SequenceGroup> getGroups();
/**
* Adds a new AlignmentAnnotation to this alignment
- *
+ *
* @note Care should be taken to ensure that annotation is at least as wide as
* the longest sequence in the alignment for rendering purposes.
*/
/**
* moves annotation to a specified index in alignment annotation display stack
- *
+ *
* @param aa
* the annotation object to be moved
* @param index
* reference from any SequenceI or SequenceGroup object's annotation if and
* only if aa is contained within the alignment's annotation vector.
* Otherwise, it will do nothing.
- *
+ *
* @param aa
* the annotation to delete
* @return true if annotation was deleted from this alignment.
* removes any reference from any SequenceI or SequenceGroup object's
* annotation if and only if aa is contained within the alignment's annotation
* vector. Otherwise, it will do nothing.
- *
+ *
* @param aa
* the annotation to delete
* @param unhook
/**
* Get the annotation associated with this alignment (this can be null if no
* annotation has ever been created on the alignment)
- *
+ *
* @return array of AlignmentAnnotation objects
*/
@Override
/**
* Change the gap character used in this alignment to 'gc'
- *
+ *
* @param gc
* the new gap character.
*/
/**
* Get the gap character used in this alignment
- *
+ *
* @return gap character
*/
public char getGapCharacter();
/**
* Test for all nucleotide alignment
- *
+ *
* @return true if alignment is nucleotide sequence
*/
public boolean isNucleotide();
/**
* Test if alignment contains RNA structure
- *
+ *
* @return true if RNA structure AligmnentAnnotation was added to alignment
*/
public boolean hasRNAStructure();
/**
* Set alignment to be a nucleotide sequence
- *
+ *
*/
public void setNucleotide(boolean b);
/**
* Get the associated dataset for the alignment.
- *
+ *
* @return Alignment containing dataset sequences or null of this is a
* dataset.
*/
/**
* Set the associated dataset for the alignment, or create one.
- *
+ *
* @param dataset
* The dataset alignment or null to construct one.
*/
/**
* pads sequences with gaps (to ensure the set looks like an alignment)
- *
+ *
* @return boolean true if alignment was modified
*/
public boolean padGaps();
/**
* Compact representation of alignment
- *
+ *
* @return CigarArray
*/
public CigarArray getCompactAlignment();
/**
* Set an arbitrary key value pair for an alignment. Note: both key and value
* objects should return a meaningful, human readable response to .toString()
- *
+ *
* @param key
* @param value
*/
/**
* Get a named property from the alignment.
- *
+ *
* @param key
* @return value of property
*/
/**
* Get the property hashtable.
- *
+ *
* @return hashtable of alignment properties (or null if none are defined)
*/
public Hashtable getProperties();
/**
* add a reference to a frame of aligned codons for this alignment
- *
+ *
* @param codons
*/
public void addCodonFrame(AlignedCodonFrame codons);
/**
* remove a particular codon frame reference from this alignment
- *
+ *
* @param codons
* @return true if codon frame was removed.
*/
/**
* get all codon frames associated with this alignment
- *
+ *
* @return
*/
public AlignedCodonFrame[] getCodonFrames();
/**
* get a particular codon frame
- *
+ *
* @param index
* @return
*/
/**
* find sequence with given name in alignment
- *
+ *
* @param token
* name to find
* @param b
/**
* find next sequence with given name in alignment starting after a given
* sequence
- *
+ *
* @param startAfter
* the sequence after which the search will be started (usually the
* result of the last call to findName)
/**
* find first sequence in alignment which is involved in the given search
* result object
- *
+ *
* @param results
* @return -1 or index of sequence in alignment
*/
* gap characters, etc...). If you are uncertain, use the copy Alignment copy
* constructor to create a new version which can be appended without side
* effect.
- *
+ *
* @param toappend
* - the alignment to be appended.
*/
/**
* Justify the sequences to the left or right by deleting and inserting gaps
* before the initial residue or after the terminal residue
- *
+ *
* @param right
* true if alignment padded to right, false to justify to left
* @return true if alignment was changed TODO: return undo object
/**
* add given annotation row at given position (0 is start, -1 is end)
- *
+ *
* @param consensus
* @param i
*/
/**
* search for or create a specific annotation row on the alignment
- * @param name name for annotation (must match)
- * @param calcId calcId for the annotation (null or must match)
- * @param autoCalc - value of autocalc flag for the annotation
- * @param seqRef - null or specific sequence reference
- * @param groupRef - null or specific group reference
- * @param method - CalcId for the annotation (must match)
- *
+ *
+ * @param name
+ * name for annotation (must match)
+ * @param calcId
+ * calcId for the annotation (null or must match)
+ * @param autoCalc
+ * - value of autocalc flag for the annotation
+ * @param seqRef
+ * - null or specific sequence reference
+ * @param groupRef
+ * - null or specific group reference
+ * @param method
+ * - CalcId for the annotation (must match)
+ *
* @return existing annotation matching the given attributes
*/
- public AlignmentAnnotation findOrCreateAnnotation(String name, String calcId,
- boolean autoCalc, SequenceI seqRef, SequenceGroup groupRef);
+ public AlignmentAnnotation findOrCreateAnnotation(String name,
+ String calcId, boolean autoCalc, SequenceI seqRef,
+ SequenceGroup groupRef);
/**
- * move the given group up or down in the alignment by the given number of rows.
- * Implementor assumes given group is already present on alignment - no recalculations are triggered.
+ * move the given group up or down in the alignment by the given number of
+ * rows. Implementor assumes given group is already present on alignment - no
+ * recalculations are triggered.
+ *
* @param sg
* @param map
* @param up
\r
/**\r
* Construct an alignmentView from a live jalview alignment view. Note -\r
- * hidden rows will be excluded from alignmentView\r
- * Note: JAL-1179\r
+ * hidden rows will be excluded from alignmentView Note: JAL-1179\r
+ * \r
* @param alignment\r
* - alignment as referenced by an AlignViewport\r
* @param columnSelection\r
// and record non-empty groups in group list.\r
// record / sub-select selected region on the alignment view\r
SequenceI[] selseqs;\r
- if (selection != null && selection.getSize()>0)\r
+ if (selection != null && selection.getSize() > 0)\r
{\r
List<SequenceI> sel = selection.getSequences(null);\r
this.selected = new Vector();\r
- selseqs = selection.getSequencesInOrder(alignment, selectedRegionOnly);\r
+ selseqs = selection\r
+ .getSequencesInOrder(alignment, selectedRegionOnly);\r
}\r
else\r
{\r
{\r
sg.setEndRes(esel);\r
}\r
- sg.setStartRes(sg.getStartRes()-ssel+1);\r
- sg.setEndRes(sg.getEndRes()-ssel+1);\r
- \r
+ sg.setStartRes(sg.getStartRes() - ssel + 1);\r
+ sg.setEndRes(sg.getEndRes() - ssel + 1);\r
+\r
isg.addElement(sg);\r
}\r
}\r
{\r
if (selseqs[i] != null)\r
{\r
- if (selection != null && selection.getSize()>0 && !selectedRegionOnly)\r
+ if (selection != null && selection.getSize() > 0\r
+ && !selectedRegionOnly)\r
{\r
sequences[csi].setGroupMembership(selected);\r
selected.addElement(sequences[csi]);\r
// may need to shift/trim start and end ?\r
if (r && !viscontigs)\r
{\r
- // Not fully tested code - routine not yet called with viscontigs==false\r
+ // Not fully tested code - routine not yet called with\r
+ // viscontigs==false\r
if (nsg[g].getStartRes() < gstart)\r
{\r
nsg[g].setStartRes(0);\r
nsg[g].setStartRes(nsg[g].getStartRes() - gstart);\r
nsg[g].setEndRes(nsg[g].getEndRes() - gstart);\r
}\r
- if (nsg[g].getEndRes() > (gend-gstart))\r
+ if (nsg[g].getEndRes() > (gend - gstart))\r
{\r
- nsg[g].setEndRes(gend-gstart);\r
+ nsg[g].setEndRes(gend - gstart);\r
}\r
}\r
}\r
for (nvc = 0; nvc < contigviews.length; nvc++)\r
{\r
vcals[nvc] = new Alignment(contigviews[nvc]);\r
- if (scGroups!=null && scGroups.size()>0)\r
+ if (scGroups != null && scGroups.size() > 0)\r
{\r
- addPrunedGroupsInOrder(vcals[nvc], vcontigs[nvc*2],vcontigs[nvc*2+1], true);\r
+ addPrunedGroupsInOrder(vcals[nvc], vcontigs[nvc * 2],\r
+ vcontigs[nvc * 2 + 1], true);\r
}\r
}\r
return vcals;\r
}\r
\r
-\r
/**\r
* get an array of visible sequence strings for a view on an alignment using\r
* the given gap character\r
PrintStream os)\r
{\r
os.print("View has " + view.sequences.length + " of which ");\r
- if (view.selected == null) {\r
+ if (view.selected == null)\r
+ {\r
os.print("None");\r
- } else {\r
- os.print(" "+view.selected.size());\r
+ }\r
+ else\r
+ {\r
+ os.print(" " + view.selected.size());\r
}\r
os.println(" are selected.");\r
os.print("View is " + view.getWidth() + " columns wide");\r
+ " wide and has " + visal.getHeight() + " seqs.");\r
if (visal.getGroups() != null && visal.getGroups().size() > 0)\r
{\r
- \r
+\r
int i = 1;\r
- for (SequenceGroup sg:visal.getGroups())\r
+ for (SequenceGroup sg : visal.getGroups())\r
{\r
os.println("Group " + (i++) + " begins at column "\r
+ sg.getStartRes() + " and ends at " + sg.getEndRes());\r
{
/**
- * TODO: decide if null is a valid response if there is no annotation on the object
+ * TODO: decide if null is a valid response if there is no annotation on the
+ * object
+ *
* @return null
*/
AlignmentAnnotation[] getAlignmentAnnotation();
double[] dbinary;
- boolean isNa=false;
+ boolean isNa = false;
+
/**
* Creates a new BinarySequence object.
*
public BinarySequence(String s, boolean isNa)
{
super("", s, 0, s.length());
- this.isNa=isNa;
+ this.isNa = isNa;
}
/**
- * clear the dbinary matrix
+ * clear the dbinary matrix
+ *
* @return nores - dimension of sequence symbol encoding for this sequence
*/
private int initMatrixGetNoRes()
{
- int nores=(isNa) ? ResidueProperties.maxNucleotideIndex : ResidueProperties.maxProteinIndex;
+ int nores = (isNa) ? ResidueProperties.maxNucleotideIndex
+ : ResidueProperties.maxProteinIndex;
// Set all matrix to 0
dbinary = new double[getSequence().length * nores];
}
return nores;
}
+
private int[] getSymbolmatrix()
{
- return (isNa) ? ResidueProperties.nucleotideIndex : ResidueProperties.aaIndex;
+ return (isNa) ? ResidueProperties.nucleotideIndex
+ : ResidueProperties.aaIndex;
}
+
/**
* DOCUMENT ME!
*/
public void encode()
{
- int nores=initMatrixGetNoRes();
- final int[] sindex=getSymbolmatrix();
+ int nores = initMatrixGetNoRes();
+ final int[] sindex = getSymbolmatrix();
for (int i = 0; i < getSequence().length; i++)
{
- int aanum = nores-1;
+ int aanum = nores - 1;
try
{
aanum = sindex[getCharAt(i)];
} catch (NullPointerException e)
{
- aanum = nores-1;
+ aanum = nores - 1;
}
if (aanum >= nores)
{
- aanum = nores-1;
+ aanum = nores - 1;
}
dbinary[(i * nores) + aanum] = 1.0;
*
* @param matrix
*/
- public void matrixEncode(final ScoreMatrix matrix) throws InvalidSequenceTypeException
+ public void matrixEncode(final ScoreMatrix matrix)
+ throws InvalidSequenceTypeException
{
- if (isNa!=matrix.isDNA())
+ if (isNa != matrix.isDNA())
{
throw new InvalidSequenceTypeException("matrix "
+ matrix.getClass().getCanonicalName()
// for (int i = 0; i < dbinary.length; i++) {
// dbinary[i] = 0.0;
// }
- for (int i = 0,iSize=getSequence().length; i<iSize; i++)
+ for (int i = 0, iSize = getSequence().length; i < iSize; i++)
{
- int aanum = nores-1;
+ int aanum = nores - 1;
try
{
aanum = aaIndex[getCharAt(i)];
} catch (NullPointerException e)
{
- aanum = nores-1;
+ aanum = nores - 1;
}
- if (aanum >=nores)
+ if (aanum >= nores)
{
- aanum = nores-1;
+ aanum = nores - 1;
}
// Do the blosum^H^H^H^H^H score matrix summation thing
}\r
\r
/**\r
- * construct a cigar array from the current alignment, or just the subset of the current alignment specified by selectionGroup. Any columns marked as hidden in columnSelection will be marked as deleted in the array.\r
+ * construct a cigar array from the current alignment, or just the subset of\r
+ * the current alignment specified by selectionGroup. Any columns marked as\r
+ * hidden in columnSelection will be marked as deleted in the array.\r
+ * \r
* @param alignment\r
- * @param columnSelection \r
+ * @param columnSelection\r
* @param selectionGroup\r
*/\r
- public CigarArray(AlignmentI alignment, ColumnSelection columnSelection, SequenceGroup selectionGroup)\r
+ public CigarArray(AlignmentI alignment, ColumnSelection columnSelection,\r
+ SequenceGroup selectionGroup)\r
{\r
this(constructSeqCigarArray(alignment, selectionGroup));\r
- constructFromAlignment(alignment, columnSelection!=null ? columnSelection.getHiddenColumns() : null, selectionGroup);\r
+ constructFromAlignment(alignment,\r
+ columnSelection != null ? columnSelection.getHiddenColumns()\r
+ : null, selectionGroup);\r
}\r
- private static int[] _calcStartEndBounds(AlignmentI alignment, SequenceGroup selectionGroup)\r
+\r
+ private static int[] _calcStartEndBounds(AlignmentI alignment,\r
+ SequenceGroup selectionGroup)\r
{\r
- int[] startend = new int[] { 0,0,0};\r
+ int[] startend = new int[]\r
+ { 0, 0, 0 };\r
if (selectionGroup != null)\r
{\r
startend[0] = selectionGroup.getSize();\r
startend[1] = selectionGroup.getStartRes();\r
- startend[2] = selectionGroup.getEndRes(); // inclusive for start and end in\r
+ startend[2] = selectionGroup.getEndRes(); // inclusive for start and end\r
+ // in\r
// SeqCigar constructor\r
}\r
else\r
}\r
return startend;\r
}\r
- public static SeqCigar[] constructSeqCigarArray(AlignmentI alignment, SequenceGroup selectionGroup)\r
+\r
+ public static SeqCigar[] constructSeqCigarArray(AlignmentI alignment,\r
+ SequenceGroup selectionGroup)\r
{\r
SequenceI[] seqs = null;\r
int i, iSize;\r
int _startend[] = _calcStartEndBounds(alignment, selectionGroup);\r
- int start = _startend[1],end=_startend[2];\r
+ int start = _startend[1], end = _startend[2];\r
if (selectionGroup != null)\r
{\r
iSize = selectionGroup.getSize();\r
}\r
return selseqs;\r
}\r
+\r
/**\r
* internal constructor function - called by CigarArray(AlignmentI, ...);\r
+ * \r
* @param alignment\r
- * @param columnSelection - vector of visible regions as returned from columnSelection.getHiddenColumns() \r
+ * @param columnSelection\r
+ * - vector of visible regions as returned from\r
+ * columnSelection.getHiddenColumns()\r
* @param selectionGroup\r
*/\r
- private void constructFromAlignment(AlignmentI alignment, Vector columnSelection, SequenceGroup selectionGroup)\r
+ private void constructFromAlignment(AlignmentI alignment,\r
+ Vector columnSelection, SequenceGroup selectionGroup)\r
{\r
int[] _startend = _calcStartEndBounds(alignment, selectionGroup);\r
- int start = _startend[1],end=_startend[2];\r
+ int start = _startend[1], end = _startend[2];\r
// now construct the CigarArray operations\r
- if (columnSelection!=null)\r
+ if (columnSelection != null)\r
{\r
int[] region;\r
int hideStart, hideEnd;\r
{\r
throw new Error("Implementation error. Invalid operation string.");\r
}\r
- if (range==0)\r
+ if (range == 0)\r
{\r
return; // No Operation to add.\r
}\r
* AlignmentView\r
* \r
* @param profileseq\r
- * @param al - alignment to have gaps inserted into it\r
- * @param input - alignment view where sequence corresponding to profileseq is first entry\r
- * @return new Column selection for new alignment view, with insertions into profileseq marked as hidden.\r
+ * @param al\r
+ * - alignment to have gaps inserted into it\r
+ * @param input\r
+ * - alignment view where sequence corresponding to profileseq is\r
+ * first entry\r
+ * @return new Column selection for new alignment view, with insertions into\r
+ * profileseq marked as hidden.\r
*/\r
public static ColumnSelection propagateInsertions(SequenceI profileseq,\r
Alignment al, AlignmentView input)\r
{\r
- int profsqpos=0;\r
- \r
-// return propagateInsertions(profileseq, al, )\r
+ int profsqpos = 0;\r
+\r
+ // return propagateInsertions(profileseq, al, )\r
char gc = al.getGapCharacter();\r
Object[] alandcolsel = input.getAlignmentAndColumnSelection(gc);\r
ColumnSelection nview = (ColumnSelection) alandcolsel[1];\r
SequenceI origseq = ((SequenceI[]) alandcolsel[0])[profsqpos];\r
- nview.propagateInsertions(profileseq,\r
- al, origseq);\r
+ nview.propagateInsertions(profileseq, al, origseq);\r
return nview;\r
}\r
+\r
/**\r
* \r
- * @param profileseq - sequence in al which corresponds to origseq \r
- * @param al - alignment which is to have gaps inserted into it\r
- * @param origseq - sequence corresponding to profileseq which defines gap map for modifying al\r
+ * @param profileseq\r
+ * - sequence in al which corresponds to origseq\r
+ * @param al\r
+ * - alignment which is to have gaps inserted into it\r
+ * @param origseq\r
+ * - sequence corresponding to profileseq which defines gap map for\r
+ * modifying al\r
*/\r
- public void propagateInsertions(SequenceI profileseq, AlignmentI al, SequenceI origseq)\r
+ public void propagateInsertions(SequenceI profileseq, AlignmentI al,\r
+ SequenceI origseq)\r
{\r
char gc = al.getGapCharacter();\r
- // recover mapping between sequence's non-gap positions and positions \r
+ // recover mapping between sequence's non-gap positions and positions\r
// mapping to view.\r
- pruneDeletions(ShiftList\r
- .parseMap(origseq\r
- .gapMap())); \r
+ pruneDeletions(ShiftList.parseMap(origseq.gapMap()));\r
int[] viscontigs = getVisibleContigs(0, profileseq.getLength());\r
int spos = 0;\r
int offset = 0;\r
sq = sq + sb;\r
while ((diff = spos + offset - sq.length() - 1) > 0)\r
{\r
- //sq = sq\r
- // + ((diff >= sb.length()) ? sb.toString() : sb\r
- // .substring(0, diff));\r
- if (diff>=sb.length()) {\r
- sq+=sb.toString();\r
- } else {\r
+ // sq = sq\r
+ // + ((diff >= sb.length()) ? sb.toString() : sb\r
+ // .substring(0, diff));\r
+ if (diff >= sb.length())\r
+ {\r
+ sq += sb.toString();\r
+ }\r
+ else\r
+ {\r
char[] buf = new char[diff];\r
sb.getChars(0, diff, buf, 0);\r
- sq+=buf.toString();\r
+ sq += buf.toString();\r
}\r
}\r
}\r
for (int s = 0, ns = al.getHeight(); s < ns; s++)\r
{\r
SequenceI sqobj = al.getSequenceAt(s);\r
- if (sqobj==profileseq)\r
+ if (sqobj == profileseq)\r
{\r
continue;\r
}\r
int diff = origseq.getLength() - sq.length();\r
while (diff > 0)\r
{\r
- //sq = sq\r
- // + ((diff >= sb.length()) ? sb.toString() : sb\r
- // .substring(0, diff));\r
- if (diff>=sb.length()) {\r
- sq+=sb.toString();\r
- } else {\r
+ // sq = sq\r
+ // + ((diff >= sb.length()) ? sb.toString() : sb\r
+ // .substring(0, diff));\r
+ if (diff >= sb.length())\r
+ {\r
+ sq += sb.toString();\r
+ }\r
+ else\r
+ {\r
char[] buf = new char[diff];\r
sb.getChars(0, diff, buf, 0);\r
- sq+=buf.toString();\r
+ sq += buf.toString();\r
}\r
diff = origseq.getLength() - sq.length();\r
}\r
* PFAM ID\r
*/\r
public static String PFAM = "PFAM";\r
- \r
+\r
/**\r
* RFAM ID\r
*/\r
{\r
return ((dbrefsource == null\r
|| dbrefsource.equalsIgnoreCase(DBRefSource.EMBL) || dbrefsource\r
- .equalsIgnoreCase(DBRefSource.EMBLCDS)) && type\r
+ .equalsIgnoreCase(DBRefSource.EMBLCDS)) && type\r
.equalsIgnoreCase("CDS"));\r
}\r
}\r
.equalsIgnoreCase(id)))
&& (properties == o.properties || (properties != null
&& o.properties != null && properties
- .equals(o.properties)));
+ .equals(o.properties)));
}
public PDBEntry()
result[resultLength] = matchStart;
result[resultLength + 1] = matchEnd;
}
- } else {\r
- // debug\r
- // System.err.println("Outwith bounds!" + matchStart+">"+end +" or " + matchEnd+"<"+start);\r
+ }
+ else
+ {
+ // debug
+ // System.err.println("Outwith bounds!" + matchStart+">"+end +" or "
+ // + matchEnd+"<"+start);
}
}
}
* to the residues of this sequence
*/
Vector annotation;
-
+
/**
- * The index of the sequence in a MSA
+ * The index of the sequence in a MSA
*/
int index = -1;
void checkValidRange()
{
- // Note: JAL-774 : http://issues.jalview.org/browse/JAL-774?focusedCommentId=11239&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-11239
+ // Note: JAL-774 :
+ // http://issues.jalview.org/browse/JAL-774?focusedCommentId=11239&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-11239
{
int endRes = 0;
for (int j = 0; j < sequence.length; j++)
endRes += start - 1;
}
- if (end<endRes) {
+ if (end < endRes)
+ {
end = endRes;
}
}
return this.description;
}
-
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see jalview.datamodel.SequenceI#findIndex(int)
*/
public int findIndex(int pos)
}
/**
- * @return The index (zero-based) on this sequence in the MSA.
- * It returns {@code -1} if this information is not available.
+ * @return The index (zero-based) on this sequence in the MSA. It returns
+ * {@code -1} if this information is not available.
*/
- public int getIndex() { return index; }
-
+ public int getIndex()
+ {
+ return index;
+ }
+
/**
- * Defines the position of this sequence in the MSA.
- * Use the value {@code -1} if this information is undefined.
+ * Defines the position of this sequence in the MSA. Use the value {@code -1}
+ * if this information is undefined.
*
- * @param The position for this sequence. This value is zero-based (zero for this first sequence)
+ * @param The
+ * position for this sequence. This value is zero-based (zero for
+ * this first sequence)
*/
- public void setIndex(int value) { index = value; }
+ public void setIndex(int value)
+ {
+ index = value;
+ }
}
public interface SequenceCollectionI
{
List<SequenceI> getSequences();
- List<SequenceI> getSequences(Map<SequenceI,SequenceCollectionI> hiddenReps);
+
+ List<SequenceI> getSequences(
+ Map<SequenceI, SequenceCollectionI> hiddenReps);
+
int getWidth();
}
public Hashtable otherDetails;
public java.util.Vector links;
-
+
// Feature group can be set from a features file
// as a group of features between STARTGROUP and ENDGROUP markers
public String featureGroup;
}
}
}
-
+
public SequenceFeature(String type, String desc, String status,
int begin, int end, String featureGroup)
{
* consensus calculation property
*/
private boolean showSequenceLogo = false;
+
/**
* flag indicating if logo should be rendered normalised
*/
private boolean normaliseSequenceLogo;
-
/**
* @return the includeAllConsSymbols
*/
return eres;
}
+
public List<SequenceI> getSequences()
{
return sequences;
}
- public List<SequenceI> getSequences(Map<SequenceI, SequenceCollectionI> hiddenReps)
+
+ public List<SequenceI> getSequences(
+ Map<SequenceI, SequenceCollectionI> hiddenReps)
{
if (hiddenReps == null)
{
if (hiddenReps.containsKey(seq))
{
SequenceCollectionI hsg = hiddenReps.get(seq);
- for (SequenceI seq2:hsg.getSequences())
+ for (SequenceI seq2 : hsg.getSequences())
{
if (seq2 != seq && !allSequences.contains(seq2))
{
}
}
- public SequenceI[] getSequencesAsArray(Map<SequenceI, SequenceCollectionI> map)
+ public SequenceI[] getSequencesAsArray(
+ Map<SequenceI, SequenceCollectionI> map)
{
List<SequenceI> tmp = getSequences(map);
- if (tmp==null)
+ if (tmp == null)
{
return null;
}
{
return;
}
- if (cs!=null)
+ if (cs != null)
{
- cs.alignmentChanged(this,null);
+ cs.alignmentChanged(this, null);
}
try
{
if (cs != null)
{
cs.setConsensus(cnsns);
- cs.alignmentChanged(this,null);
+ cs.alignmentChanged(this, null);
}
if ((conservation != null)
if (cs.conservationApplied())
{
cs.setConservation(c);
- cs.alignmentChanged(this,null);
+ cs.alignmentChanged(this, null);
}
}
}
* (may be null)
* @return new group containing sequences common to this group and alignment
*/
- public SequenceGroup intersect(AlignmentI alignment, Map<SequenceI, SequenceCollectionI> map)
+ public SequenceGroup intersect(AlignmentI alignment,
+ Map<SequenceI, SequenceCollectionI> map)
{
SequenceGroup sgroup = new SequenceGroup(this);
SequenceI[] insect = getSequencesInOrder(alignment);
/**
* set flag indicating if logo should be normalised when rendered
+ *
* @param norm
*/
public void setNormaliseSequenceLogo(boolean norm)
{
- normaliseSequenceLogo=norm;
+ normaliseSequenceLogo = norm;
}
+
public boolean isNormaliseSequenceLogo()
{
return normaliseSequenceLogo;
}
+
@Override
/**
* returns a new array with all annotation involving this group
*/
public AlignmentAnnotation[] getAlignmentAnnotation()
{
- // TODO add in other methods like 'getAlignmentAnnotation(String label), etc'
+ // TODO add in other methods like 'getAlignmentAnnotation(String label),
+ // etc'
ArrayList<AlignmentAnnotation> annot = new ArrayList<AlignmentAnnotation>();
- for (SequenceI seq:(Vector<SequenceI>)sequences)
+ for (SequenceI seq : (Vector<SequenceI>) sequences)
{
- for (AlignmentAnnotation al: seq.getAnnotation())
+ for (AlignmentAnnotation al : seq.getAnnotation())
{
- if (al.groupRef==this)
+ if (al.groupRef == this)
{
annot.add(al);
}
}
}
- if (consensus!=null)
+ if (consensus != null)
{
annot.add(consensus);
}
- if (conservation!=null)
+ if (conservation != null)
{
annot.add(conservation);
}
return annot.toArray(new AlignmentAnnotation[0]);
}
+
@Override
public Iterable<AlignmentAnnotation> findAnnotation(String calcId)
{
- ArrayList<AlignmentAnnotation> aa=new ArrayList<AlignmentAnnotation>();
- for (AlignmentAnnotation a:getAlignmentAnnotation())
+ ArrayList<AlignmentAnnotation> aa = new ArrayList<AlignmentAnnotation>();
+ for (AlignmentAnnotation a : getAlignmentAnnotation())
{
- if (a.getCalcId()==calcId)
+ if (a.getCalcId() == calcId)
{
aa.add(a);
}
public String getDescription();
/**
- * Return the alignment column for a sequence position
- * * Return the alignment position for a sequence position
+ * Return the alignment column for a sequence position * Return the alignment
+ * position for a sequence position
*
* @param pos
* lying from start to end
*
- * @return aligned column for residue (0 if residue is upstream from alignment, -1 if residue is downstream from alignment)
- * note. Sequence object returns sequence.getEnd() for positions upstream currently. TODO: change sequence for assert(findIndex(seq.getEnd()+1)==-1) and fix incremental bugs
+ * @return aligned column for residue (0 if residue is upstream from
+ * alignment, -1 if residue is downstream from alignment) note.
+ * Sequence object returns sequence.getEnd() for positions upstream
+ * currently. TODO: change sequence for
+ * assert(findIndex(seq.getEnd()+1)==-1) and fix incremental bugs
*
*/
public int findIndex(int pos);
* null or mapping from entry's numbering to local start/end
*/
public void transferAnnotation(SequenceI entry, Mapping mp);
-
+
/**
- * @param index The sequence index in the MSA
+ * @param index
+ * The sequence index in the MSA
*/
public void setIndex(int index);
-
+
/**
* @return The index of the sequence in the alignment
*/
\r
public abstract class JalviewJmolBinding implements StructureListener,\r
JmolStatusListener, SequenceStructureBinding,\r
- JmolSelectionListener, ComponentListener, StructureSelectionManagerProvider\r
+ JmolSelectionListener, ComponentListener,\r
+ StructureSelectionManagerProvider\r
\r
{\r
/**\r
\r
public JmolViewer viewer;\r
\r
- public JalviewJmolBinding(StructureSelectionManager ssm, PDBEntry[] pdbentry, SequenceI[][] sequenceIs,\r
- String[][] chains, String protocol)\r
+ public JalviewJmolBinding(StructureSelectionManager ssm,\r
+ PDBEntry[] pdbentry, SequenceI[][] sequenceIs, String[][] chains,\r
+ String protocol)\r
{\r
this.ssm = ssm;\r
this.sequence = sequenceIs;\r
*/\r
}\r
\r
- public JalviewJmolBinding(StructureSelectionManager ssm, JmolViewer viewer2)\r
+ public JalviewJmolBinding(StructureSelectionManager ssm,\r
+ JmolViewer viewer2)\r
{\r
this.ssm = ssm;\r
viewer = viewer2;\r
for (int pdbfnum = 0; pdbfnum < files.length; pdbfnum++)\r
{\r
StructureMapping[] mapping = ssm.getMapping(files[pdbfnum]);\r
- // RACE CONDITION - getMapping only returns Jmol loaded filenames once Jmol callback has completed. \r
+ // RACE CONDITION - getMapping only returns Jmol loaded filenames once\r
+ // Jmol callback has completed.\r
if (mapping == null || mapping.length < 1)\r
continue;\r
\r
}\r
AlignmentI alignment = alignmentv.getAlignment();\r
\r
- for (jalview.structure.StructureMappingcommandSet cpdbbyseq: JmolCommands.getColourBySequenceCommand(ssm, files, sequence, sr, fr, alignment))\r
- for (String cbyseq : cpdbbyseq.commands) {\r
- evalStateCommand(cbyseq);\r
- }\r
+ for (jalview.structure.StructureMappingcommandSet cpdbbyseq : JmolCommands\r
+ .getColourBySequenceCommand(ssm, files, sequence, sr, fr,\r
+ alignment))\r
+ for (String cbyseq : cpdbbyseq.commands)\r
+ {\r
+ evalStateCommand(cbyseq);\r
+ }\r
}\r
- \r
+\r
public boolean isColourBySequence()\r
{\r
return colourBySequence;\r
String mset[] = new String[viewer.getModelCount()];\r
_modelFileNameMap = new int[mset.length];\r
int j = 1;\r
- String m=viewer.getModelFileName(0);\r
- if (m!=null)\r
+ String m = viewer.getModelFileName(0);\r
+ if (m != null)\r
{\r
- try {\r
+ try\r
+ {\r
mset[0] = new File(m).getAbsolutePath();\r
- } catch (AccessControlException x) {\r
+ } catch (AccessControlException x)\r
+ {\r
// usually not allowed to do this in applet, so keep raw handle\r
mset[0] = m;\r
- //System.err.println("jmolBinding: Using local file string from Jmol: "+m); \r
+ // System.err.println("jmolBinding: Using local file string from Jmol: "+m);\r
}\r
}\r
for (int i = 1; i < mset.length; i++)\r
{\r
- m=viewer.getModelFileName(i);\r
- if (m!=null) {\r
- try {\r
+ m = viewer.getModelFileName(i);\r
+ if (m != null)\r
+ {\r
+ try\r
+ {\r
mset[j] = new File(m).getAbsolutePath();\r
- } catch (AccessControlException x) {\r
+ } catch (AccessControlException x)\r
+ {\r
// usually not allowed to do this in applet, so keep raw handle\r
mset[j] = m;\r
- //System.err.println("jmolBinding: Using local file string from Jmol: "+m); \r
+ // System.err.println("jmolBinding: Using local file string from Jmol: "+m);\r
}\r
}\r
_modelFileNameMap[j] = i; // record the model index for the filename\r
try\r
{\r
// recover PDB filename for the model hovered over.\r
- int _mp=_modelFileNameMap.length-1,\r
- mnumber=new Integer(mdlId).intValue() - 1;\r
- while(mnumber<_modelFileNameMap[_mp])\r
+ int _mp = _modelFileNameMap.length - 1, mnumber = new Integer(mdlId)\r
+ .intValue() - 1;\r
+ while (mnumber < _modelFileNameMap[_mp])\r
{\r
_mp--;\r
}\r
pdbfilename = modelFileNames[_mp];\r
- if (pdbfilename==null) {pdbfilename=new File(viewer\r
- .getModelFileName(mnumber)).getAbsolutePath();\r
+ if (pdbfilename == null)\r
+ {\r
+ pdbfilename = new File(viewer.getModelFileName(mnumber))\r
+ .getAbsolutePath();\r
}\r
- \r
+\r
} catch (Exception e)\r
{\r
}\r
else\r
{\r
File fl;\r
- if (matches = (fl=new File(pdbentry[pe].getFile())).equals(new File(fileName)))\r
+ if (matches = (fl = new File(pdbentry[pe].getFile()))\r
+ .equals(new File(fileName)))\r
{\r
foundEntry = true;\r
// TODO: Jmol can in principle retrieve from CLASSLOADER but\r
} catch (Error e)\r
{\r
}\r
- //Explicitly map to the filename used by Jmol ;\r
- pdb = ssm.setMapping(sequence[pe], chains[pe],\r
- fileName, protocol);\r
- //pdbentry[pe].getFile(), protocol);\r
+ // Explicitly map to the filename used by Jmol ;\r
+ pdb = ssm.setMapping(sequence[pe], chains[pe], fileName,\r
+ protocol);\r
+ // pdbentry[pe].getFile(), protocol);\r
\r
}\r
}\r
String commandOptions, final Container consolePanel,\r
String buttonsToShow)\r
{\r
- if (commandOptions==null) {
- commandOptions="";
- }
+ if (commandOptions == null)\r
+ {\r
+ commandOptions = "";\r
+ }\r
viewer = JmolViewer.allocateViewer(renderPanel,\r
(jmolfileio ? new SmarterJmolAdapter() : null), htmlName\r
+ ((Object) this).toString(), documentBase, codeBase,\r
chains[pe] = null;\r
}\r
}\r
+\r
/**\r
* \r
* @param pdbfile\r
- * @return text report of alignment between pdbfile and any associated alignment sequences\r
+ * @return text report of alignment between pdbfile and any associated\r
+ * alignment sequences\r
*/\r
public String printMapping(String pdbfile)\r
{\r
return ssm.printMapping(pdbfile);\r
}\r
+\r
@Override\r
public void resizeInnerPanel(String data)\r
{\r
// Jalview doesn't honour resize panel requests\r
- \r
+\r
}\r
}\r
*
* You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
-/**\r
- * \r
- */\r
-package jalview.ext.jmol;\r
-\r
-import jalview.api.FeatureRenderer;\r
-import jalview.api.SequenceRenderer;\r
-import jalview.datamodel.AlignmentI;\r
-import jalview.datamodel.SequenceI;\r
-import jalview.structure.StructureMapping;\r
-import jalview.structure.StructureMappingcommandSet;\r
-import jalview.structure.StructureSelectionManager;\r
-import jalview.util.Comparison;\r
-\r
-import java.awt.Color;\r
-import java.util.ArrayList;\r
-/**\r
- * Routines for generating Jmol commands for Jalview/Jmol binding\r
- * another cruisecontrol test.\r
- * \r
- * @author JimP\r
- *\r
- */\r
-public class JmolCommands\r
-{\r
-\r
- /**\r
- * Jmol utility which constructs the commands to colour chains by the given alignment\r
- * @returns Object[] { Object[] { <model being coloured>, \r
- * \r
- */\r
- public static StructureMappingcommandSet[] getColourBySequenceCommand(StructureSelectionManager ssm, String[] files, SequenceI[][] sequence, SequenceRenderer sr, FeatureRenderer fr, AlignmentI alignment)\r
- {\r
- \r
- ArrayList<StructureMappingcommandSet> cset = new ArrayList<StructureMappingcommandSet>();\r
- \r
- for (int pdbfnum = 0; pdbfnum < files.length; pdbfnum++)\r
- {\r
- StructureMapping[] mapping = ssm.getMapping(files[pdbfnum]);\r
- StringBuffer command = new StringBuffer();\r
- StructureMappingcommandSet smc;\r
- ArrayList<String> str = new ArrayList<String>();\r
- \r
- if (mapping == null || mapping.length < 1)\r
- continue;\r
- \r
- int lastPos = -1;\r
- for (int s = 0; s < sequence[pdbfnum].length; s++)\r
- {\r
- for (int sp, m = 0; m < mapping.length; m++)\r
- {\r
- if (mapping[m].getSequence() == sequence[pdbfnum][s]\r
- && (sp = alignment.findIndex(sequence[pdbfnum][s])) > -1)\r
- {\r
- SequenceI asp = alignment.getSequenceAt(sp);\r
- for (int r = 0; r < asp.getLength(); r++)\r
- {\r
- // no mapping to gaps in sequence\r
- if (jalview.util.Comparison.isGap(asp.getCharAt(r)))\r
- {\r
- continue;\r
- }\r
- int pos = mapping[m].getPDBResNum(asp.findPosition(r));\r
- \r
- if (pos < 1 || pos == lastPos)\r
- continue;\r
- \r
- lastPos = pos;\r
- \r
- Color col = sr.getResidueBoxColour(sequence[pdbfnum][s], r);\r
- \r
- if (fr != null)\r
- col = fr.findFeatureColour(col, sequence[pdbfnum][s], r);\r
- String newSelcom = (mapping[m].getChain() != " " ? ":"\r
- + mapping[m].getChain() : "")\r
- + "/"\r
- + (pdbfnum + 1)\r
- + ".1"\r
- + ";color["\r
- + col.getRed()\r
- + ","\r
- + col.getGreen()\r
- + ","\r
- + col.getBlue() + "]";\r
- if (command.length()>newSelcom.length() && command.substring(command.length()-newSelcom.length()).equals(newSelcom))\r
- {\r
- command = JmolCommands.condenseCommand(command, pos);\r
- continue;\r
- }\r
- // TODO: deal with case when buffer is too large for Jmol to parse\r
- // - execute command and flush\r
- \r
- command.append(";");\r
- if (command.length()>51200)\r
- {\r
- // add another chunk\r
- str.add(command.toString());\r
- command.setLength(0);\r
- }\r
- command.append("select " + pos);\r
- command.append(newSelcom);\r
- }\r
- break;\r
- }\r
- }\r
- }\r
- {\r
- // add final chunk\r
- str.add(command.toString());\r
- command.setLength(0);\r
- }\r
- // Finally, add the command set ready to be returned.\r
- cset.add(new StructureMappingcommandSet(JmolCommands.class,files[pdbfnum], str.toArray(new String[str.size()])));\r
-\r
- }\r
- return cset.toArray(new StructureMappingcommandSet[cset.size()]);\r
- }\r
-\r
- public static StringBuffer condenseCommand(StringBuffer command, int pos)\r
- {\r
- \r
- // work back to last 'select'\r
- int p=command.length(),q=p;\r
- do {\r
- p-=6;\r
- if (p<1) { p=0; };\r
- } while ((q=command.indexOf("select",p))==-1 && p>0);\r
- \r
- StringBuffer sb = new StringBuffer(command.substring(0,q+7));\r
- \r
- command = command.delete(0,q+7);\r
- \r
- String start;\r
- \r
- if (command.indexOf("-") > -1)\r
- {\r
- start = command.substring(0, command.indexOf("-"));\r
- }\r
- else\r
- {\r
- start = command.substring(0, command.indexOf(":"));\r
- }\r
- \r
- sb.append(start + "-" + pos + command.substring(command.indexOf(":")));\r
- \r
- return sb;\r
- }\r
-\r
-}\r
+/**
+ *
+ */
+package jalview.ext.jmol;
+
+import jalview.api.FeatureRenderer;
+import jalview.api.SequenceRenderer;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SequenceI;
+import jalview.structure.StructureMapping;
+import jalview.structure.StructureMappingcommandSet;
+import jalview.structure.StructureSelectionManager;
+import jalview.util.Comparison;
+
+import java.awt.Color;
+import java.util.ArrayList;
+
+/**
+ * Routines for generating Jmol commands for Jalview/Jmol binding another
+ * cruisecontrol test.
+ *
+ * @author JimP
+ *
+ */
+public class JmolCommands
+{
+
+ /**
+ * Jmol utility which constructs the commands to colour chains by the given
+ * alignment
+ *
+ * @returns Object[] { Object[] { <model being coloured>,
+ *
+ */
+ public static StructureMappingcommandSet[] getColourBySequenceCommand(
+ StructureSelectionManager ssm, String[] files,
+ SequenceI[][] sequence, SequenceRenderer sr, FeatureRenderer fr,
+ AlignmentI alignment)
+ {
+
+ ArrayList<StructureMappingcommandSet> cset = new ArrayList<StructureMappingcommandSet>();
+
+ for (int pdbfnum = 0; pdbfnum < files.length; pdbfnum++)
+ {
+ StructureMapping[] mapping = ssm.getMapping(files[pdbfnum]);
+ StringBuffer command = new StringBuffer();
+ StructureMappingcommandSet smc;
+ ArrayList<String> str = new ArrayList<String>();
+
+ if (mapping == null || mapping.length < 1)
+ continue;
+
+ int lastPos = -1;
+ for (int s = 0; s < sequence[pdbfnum].length; s++)
+ {
+ for (int sp, m = 0; m < mapping.length; m++)
+ {
+ if (mapping[m].getSequence() == sequence[pdbfnum][s]
+ && (sp = alignment.findIndex(sequence[pdbfnum][s])) > -1)
+ {
+ SequenceI asp = alignment.getSequenceAt(sp);
+ for (int r = 0; r < asp.getLength(); r++)
+ {
+ // no mapping to gaps in sequence
+ if (jalview.util.Comparison.isGap(asp.getCharAt(r)))
+ {
+ continue;
+ }
+ int pos = mapping[m].getPDBResNum(asp.findPosition(r));
+
+ if (pos < 1 || pos == lastPos)
+ continue;
+
+ lastPos = pos;
+
+ Color col = sr.getResidueBoxColour(sequence[pdbfnum][s], r);
+
+ if (fr != null)
+ col = fr.findFeatureColour(col, sequence[pdbfnum][s], r);
+ String newSelcom = (mapping[m].getChain() != " " ? ":"
+ + mapping[m].getChain() : "")
+ + "/"
+ + (pdbfnum + 1)
+ + ".1"
+ + ";color["
+ + col.getRed()
+ + ","
+ + col.getGreen()
+ + ","
+ + col.getBlue() + "]";
+ if (command.length() > newSelcom.length()
+ && command.substring(
+ command.length() - newSelcom.length())
+ .equals(newSelcom))
+ {
+ command = JmolCommands.condenseCommand(command, pos);
+ continue;
+ }
+ // TODO: deal with case when buffer is too large for Jmol to parse
+ // - execute command and flush
+
+ command.append(";");
+ if (command.length() > 51200)
+ {
+ // add another chunk
+ str.add(command.toString());
+ command.setLength(0);
+ }
+ command.append("select " + pos);
+ command.append(newSelcom);
+ }
+ break;
+ }
+ }
+ }
+ {
+ // add final chunk
+ str.add(command.toString());
+ command.setLength(0);
+ }
+ // Finally, add the command set ready to be returned.
+ cset.add(new StructureMappingcommandSet(JmolCommands.class,
+ files[pdbfnum], str.toArray(new String[str.size()])));
+
+ }
+ return cset.toArray(new StructureMappingcommandSet[cset.size()]);
+ }
+
+ public static StringBuffer condenseCommand(StringBuffer command, int pos)
+ {
+
+ // work back to last 'select'
+ int p = command.length(), q = p;
+ do
+ {
+ p -= 6;
+ if (p < 1)
+ {
+ p = 0;
+ }
+ ;
+ } while ((q = command.indexOf("select", p)) == -1 && p > 0);
+
+ StringBuffer sb = new StringBuffer(command.substring(0, q + 7));
+
+ command = command.delete(0, q + 7);
+
+ String start;
+
+ if (command.indexOf("-") > -1)
+ {
+ start = command.substring(0, command.indexOf("-"));
+ }
+ else
+ {
+ start = command.substring(0, command.indexOf(":"));
+ }
+
+ sb.append(start + "-" + pos + command.substring(command.indexOf(":")));
+
+ return sb;
+ }
+
+}
\r
import fr.orsay.lri.varna.applications.*;\r
\r
-\r
-public abstract class JalviewVarnaBinding implements StructureListener, SequenceStructureBinding,\r
- ComponentListener, StructureSelectionManagerProvider\r
+public abstract class JalviewVarnaBinding implements StructureListener,\r
+ SequenceStructureBinding, ComponentListener,\r
+ StructureSelectionManagerProvider\r
\r
{\r
- \r
+\r
}\r
import java.util.ArrayList;\r
\r
/**\r
- * Routines for generating Jmol commands for Jalview/Jmol binding\r
- * another cruisecontrol test.\r
+ * Routines for generating Jmol commands for Jalview/Jmol binding another\r
+ * cruisecontrol test.\r
* \r
* @author JimP\r
- *\r
+ * \r
*/\r
public class VarnaCommands\r
{\r
\r
/**\r
- * Jmol utility which constructs the commands to colour chains by the given alignment\r
+ * Jmol utility which constructs the commands to colour chains by the given\r
+ * alignment\r
* \r
*/\r
- public static String[] getColourBySequenceCommand(StructureSelectionManager ssm, String[] files, SequenceI[][] sequence, SequenceRenderer sr, FeatureRenderer fr, AlignmentI alignment)\r
+ public static String[] getColourBySequenceCommand(\r
+ StructureSelectionManager ssm, String[] files,\r
+ SequenceI[][] sequence, SequenceRenderer sr, FeatureRenderer fr,\r
+ AlignmentI alignment)\r
{\r
ArrayList<String> str = new ArrayList<String>();\r
StringBuffer command = new StringBuffer();\r
- \r
+\r
for (int pdbfnum = 0; pdbfnum < files.length; pdbfnum++)\r
{\r
StructureMapping[] mapping = ssm.getMapping(files[pdbfnum]);\r
- \r
+\r
if (mapping == null || mapping.length < 1)\r
continue;\r
- \r
+\r
int lastPos = -1;\r
for (int s = 0; s < sequence[pdbfnum].length; s++)\r
{\r
continue;\r
}\r
int pos = mapping[m].getPDBResNum(asp.findPosition(r));\r
- \r
+\r
if (pos < 1 || pos == lastPos)\r
continue;\r
- \r
+\r
lastPos = pos;\r
- \r
+\r
Color col = sr.getResidueBoxColour(sequence[pdbfnum][s], r);\r
- \r
+\r
if (fr != null)\r
col = fr.findFeatureColour(col, sequence[pdbfnum][s], r);\r
String newSelcom = (mapping[m].getChain() != " " ? ":"\r
+ col.getGreen()\r
+ ","\r
+ col.getBlue() + "]";\r
- if (command.length()>newSelcom.length() && command.substring(command.length()-newSelcom.length()).equals(newSelcom))\r
+ if (command.length() > newSelcom.length()\r
+ && command.substring(\r
+ command.length() - newSelcom.length())\r
+ .equals(newSelcom))\r
{\r
command = VarnaCommands.condenseCommand(command, pos);\r
continue;\r
}\r
// TODO: deal with case when buffer is too large for Jmol to parse\r
// - execute command and flush\r
- \r
+\r
command.append(";");\r
- if (command.length()>51200)\r
+ if (command.length() > 51200)\r
{\r
// add another chunk\r
str.add(command.toString());\r
\r
public static StringBuffer condenseCommand(StringBuffer command, int pos)\r
{\r
- \r
+\r
// work back to last 'select'\r
- int p=command.length(),q=p;\r
- do {\r
- p-=6;\r
- if (p<1) { p=0; };\r
- } while ((q=command.indexOf("select",p))==-1 && p>0);\r
- \r
- StringBuffer sb = new StringBuffer(command.substring(0,q+7));\r
- \r
- command = command.delete(0,q+7);\r
- \r
+ int p = command.length(), q = p;\r
+ do\r
+ {\r
+ p -= 6;\r
+ if (p < 1)\r
+ {\r
+ p = 0;\r
+ }\r
+ ;\r
+ } while ((q = command.indexOf("select", p)) == -1 && p > 0);\r
+\r
+ StringBuffer sb = new StringBuffer(command.substring(0, q + 7));\r
+\r
+ command = command.delete(0, q + 7);\r
+\r
String start;\r
- \r
+\r
if (command.indexOf("-") > -1)\r
{\r
start = command.substring(0, command.indexOf("-"));\r
{\r
start = command.substring(0, command.indexOf(":"));\r
}\r
- \r
+\r
sb.append(start + "-" + pos + command.substring(command.indexOf(":")));\r
- \r
+\r
return sb;\r
}\r
\r
/**
* DOCUMENT ME!
- *
+ *
* @author $author$
* @version $Revision$
*/
/**
* Creates a new AlignFrame object with specific width and height.
- *
+ *
* @param al
* @param width
* @param height
/**
* Creates a new AlignFrame object with specific width, height and
* sequenceSetId
- *
+ *
* @param al
* @param width
* @param height
/**
* Creates a new AlignFrame object with specific width, height and
* sequenceSetId
- *
+ *
* @param al
* @param width
* @param height
/**
* new alignment window with hidden columns
- *
+ *
* @param al
* AlignmentI
* @param hiddenColumns
/**
* Create alignment frame for al with hiddenColumns, a specific width and
* height, and specific sequenceId
- *
+ *
* @param al
* @param hiddenColumns
* @param width
/**
* Create alignment frame for al with hiddenColumns, a specific width and
* height, and specific sequenceId
- *
+ *
* @param al
* @param hiddenColumns
* @param width
/**
* Make a new AlignFrame from exisiting alignmentPanels
- *
+ *
* @param ap
* AlignmentPanel
* @param av
/**
* Change the filename and format for the alignment, and enable the 'reload'
* button functionality.
- *
+ *
* @param file
* valid filename
* @param format
/**
* Need to call this method when tabs are selected for multiple views, or when
* loading from Jalview2XML.java
- *
+ *
* @param av
* AlignViewport
*/
updateEditMenuBar();
}
+
// methods for implementing IProgressIndicator
// need to refactor to a reusable stub class
Hashtable progressBars, progressBarHandlers;
/*
* (non-Javadoc)
- *
+ *
* @see jalview.gui.IProgressIndicator#setProgressBar(java.lang.String, long)
*/
@Override
}
/**
- *
+ *
* @return true if any progress bars are still active
*/
@Override
for (int i = 0; i < frames.length; i++)
{
if (frames[i] instanceof AlignFrame && frames[i] != this
- && ((AlignFrame) frames[i]).fileName!=null && ((AlignFrame) frames[i]).fileName.equals(fileName))
+ && ((AlignFrame) frames[i]).fileName != null
+ && ((AlignFrame) frames[i]).fileName.equals(fileName))
{
try
{
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
}
}
FormatAdapter f = new FormatAdapter();
- String output = f.formatSequences(
- format,
+ String output = f.formatSequences(format,
viewport.getAlignment(), // class cast exceptions will
// occur in the distant future
omitHidden, f.getCacheSuffixDefault(format),
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* Close the current view or all views in the alignment frame. If the frame
* only contains one view then the alignment will be removed from memory.
- *
+ *
* @param closeAllTabs
*/
@Override
/**
* close alignPanel2 and shuffle tabs appropriately.
- *
+ *
* @param alignPanel2
*/
public void closeView(AlignmentPanel alignPanel2)
}
/**
- *
+ *
* @return alignment objects for all views
*/
AlignmentI[] getViewAlignments()
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param up
* DOCUMENT ME!
*/
{
return;
}
- viewport.getAlignment().moveSelectedSequencesByOne(sg, viewport.getHiddenRepSequences(), up);
+ viewport.getAlignment().moveSelectedSequencesByOne(sg,
+ viewport.getHiddenRepSequences(), up);
alignPanel.paintAlignment(true);
}
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* Paste contents of Jalview clipboard
- *
+ *
* @param newAlignment
* true to paste to a new alignment, otherwise add to this.
*/
}
int alwidth = 0;
- ArrayList<Integer> newGraphGroups=new ArrayList<Integer>();
- int fgroup=-1;
+ ArrayList<Integer> newGraphGroups = new ArrayList<Integer>();
+ int fgroup = -1;
if (newAlignment)
{
{
newDs.clear(); // tidy up
}
- if (alignment.getAlignmentAnnotation()!=null)
+ if (alignment.getAlignmentAnnotation() != null)
{
- for (AlignmentAnnotation alan:alignment.getAlignmentAnnotation())
+ for (AlignmentAnnotation alan : alignment
+ .getAlignmentAnnotation())
{
- if (alan.graphGroup>fgroup)
+ if (alan.graphGroup > fgroup)
{
- fgroup=alan.graphGroup;
+ fgroup = alan.graphGroup;
}
}
}
if (alann[i].sequenceRef == null && !alann[i].autoCalculated)
{
AlignmentAnnotation newann = new AlignmentAnnotation(alann[i]);
- if (newann.graphGroup>-1)
+ if (newann.graphGroup > -1)
{
- if (newGraphGroups.size()<=newann.graphGroup || newGraphGroups.get(newann.graphGroup)==null)
+ if (newGraphGroups.size() <= newann.graphGroup
+ || newGraphGroups.get(newann.graphGroup) == null)
{
- for (int q=newGraphGroups.size();q<=newann.graphGroup; q++)
+ for (int q = newGraphGroups.size(); q <= newann.graphGroup; q++)
{
newGraphGroups.add(q, null);
}
- newGraphGroups.set(newann.graphGroup,new Integer(++fgroup));
+ newGraphGroups.set(newann.graphGroup, new Integer(
+ ++fgroup));
}
- newann.graphGroup = newGraphGroups.get(newann.graphGroup).intValue();
+ newann.graphGroup = newGraphGroups.get(newann.graphGroup)
+ .intValue();
}
newann.padAnnotation(alwidth);
for (int a = 0; a < sequences[i].getAnnotation().length; a++)
{
annotationAdded = true;
- newann=sequences[i].getAnnotation()[a];
+ newann = sequences[i].getAnnotation()[a];
newann.adjustForAlignment();
newann.padAnnotation(alwidth);
- if (newann.graphGroup>-1)
+ if (newann.graphGroup > -1)
{
- if (newann.graphGroup>-1)
+ if (newann.graphGroup > -1)
{
- if (newGraphGroups.size()<=newann.graphGroup || newGraphGroups.get(newann.graphGroup)==null)
+ if (newGraphGroups.size() <= newann.graphGroup
+ || newGraphGroups.get(newann.graphGroup) == null)
{
- for (int q=newGraphGroups.size();q<=newann.graphGroup; q++)
+ for (int q = newGraphGroups.size(); q <= newann.graphGroup; q++)
{
newGraphGroups.add(q, null);
}
- newGraphGroups.set(newann.graphGroup,new Integer(++fgroup));
+ newGraphGroups.set(newann.graphGroup, new Integer(
+ ++fgroup));
}
- newann.graphGroup = newGraphGroups.get(newann.graphGroup).intValue();
+ newann.graphGroup = newGraphGroups.get(newann.graphGroup)
+ .intValue();
}
}
alignment.addAnnotation(sequences[i].getAnnotation()[a]); // annotation
newann.padAnnotation(avwidth);
alview[avnum].addAnnotation(newann); // annotation was
// duplicated earlier
- // TODO JAL-1145 graphGroups are not updated for sequence annotation added to several views. This may cause strangeness
+ // TODO JAL-1145 graphGroups are not updated for sequence
+ // annotation added to several views. This may cause
+ // strangeness
alview[avnum].setAnnotationIndex(newann, a);
}
}
}
viewport.firePropertyChange("alignment", null,
alignment.getSequences());
- if (alignPanels!=null ) {for (AlignmentPanel ap:((Vector<AlignmentPanel>)alignPanels))
+ if (alignPanels != null)
+ {
+ for (AlignmentPanel ap : ((Vector<AlignmentPanel>) alignPanels))
+ {
+ ap.validateAnnotationDimensions(false);
+ }
+ }
+ else
{
- ap.validateAnnotationDimensions(false);
- }} else { alignPanel.validateAnnotationDimensions(false);}
+ alignPanel.validateAnnotationDimensions(false);
+ }
}
else
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
addHistoryItem(trimRegion);
- for (SequenceGroup sg :viewport.getAlignment().getGroups())
+ for (SequenceGroup sg : viewport.getAlignment().getGroups())
{
if ((trimLeft && !sg.adjustForRemoveLeft(column))
|| (!trimLeft && !sg.adjustForRemoveRight(column)))
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
}
/**
- *
+ *
* @param copyAnnotation
* if true then duplicate all annnotation, groups and settings
* @return new alignment panel, already displayed.
}
/**
- *
+ *
* @param viewTitle
* title of newly created view
* @return new alignment panel, already displayed.
}
/**
- *
+ *
* @param viewTitle
* title of newly created view
* @param copyAnnotation
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/*
* (non-Javadoc)
- *
+ *
* @see jalview.jbgui.GAlignFrame#followHighlight_actionPerformed()
*/
@Override
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* called by key handler and the hide all/show all menu items
- *
+ *
* @param toggleSeqs
* @param toggleCols
*/
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.jbgui.GAlignFrame#hideAllButSelection_actionPerformed(java.awt.
* event.ActionEvent)
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.jbgui.GAlignFrame#hideAllSelection_actionPerformed(java.awt.event
* .ActionEvent)
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.jbgui.GAlignFrame#showAllhidden_actionPerformed(java.awt.event.
* ActionEvent)
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* Set or clear 'Show Sequence Features'
- *
+ *
* @param evt
* DOCUMENT ME!
*/
/**
* Set or clear 'Show Sequence Features'
- *
+ *
* @param evt
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
@Override
public void clustalColour_actionPerformed(ActionEvent e)
{
- changeColour(new ClustalxColourScheme(viewport.getAlignment(), viewport.getHiddenRepSequences()));
+ changeColour(new ClustalxColourScheme(viewport.getAlignment(),
+ viewport.getHiddenRepSequences()));
}
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param cs
* DOCUMENT ME!
*/
if (viewport.getColourAppliesToAllGroups())
{
-
- for (SequenceGroup sg:viewport.getAlignment().getGroups())
+ for (SequenceGroup sg : viewport.getAlignment().getGroups())
{
if (cs == null)
{
if (cs instanceof ClustalxColourScheme)
{
- sg.cs = new ClustalxColourScheme(sg, viewport
- .getHiddenRepSequences());
+ sg.cs = new ClustalxColourScheme(sg,
+ viewport.getHiddenRepSequences());
}
else if (cs instanceof UserColourScheme)
{
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param type
* DOCUMENT ME!
* @param pwType
{
TreePanel tp;
- if (viewport.getSelectionGroup() != null && viewport.getSelectionGroup().getSize()>0)
+ if (viewport.getSelectionGroup() != null
+ && viewport.getSelectionGroup().getSize() > 0)
{
if (viewport.getSelectionGroup().getSize() < 3)
{
SequenceGroup sg = viewport.getSelectionGroup();
/* Decide if the selection is a column region */
- for (SequenceI _s:sg.getSequences())
+ for (SequenceI _s : sg.getSequences())
{
- if (_s.getLength() < sg
- .getEndRes())
+ if (_s.getLength() < sg.getEndRes())
{
JOptionPane
.showMessageDialog(
/**
* DOCUMENT ME!
- *
+ *
* @param title
* DOCUMENT ME!
* @param order
/**
* Add a new sort by annotation score menu item
- *
+ *
* @param sort
* the menu to add the option to
* @param scoreLabel
* search the alignment and rebuild the sort by annotation score submenu the
* last alignment annotation vector hash is stored to minimize cost of
* rebuilding in subsequence calls.
- *
+ *
*/
@Override
public void buildSortByAnnotationScoresMenu()
// almost certainly a quicker way to do this - but we keep it simple
Hashtable scoreSorts = new Hashtable();
AlignmentAnnotation aann[];
- for (SequenceI sqa:viewport.getAlignment().getSequences())
+ for (SequenceI sqa : viewport.getAlignment().getSequences())
{
aann = sqa.getAnnotation();
for (int i = 0; aann != null && i < aann.length; i++)
* call. Listeners are added to remove the menu item when the treePanel is
* closed, and adjust the tree leaf to sequence mapping when the alignment is
* modified.
- *
+ *
* @param treePanel
* Displayed tree window.
* @param title
/**
* Work out whether the whole set of sequences or just the selected set will
* be submitted for multiple alignment.
- *
+ *
*/
public jalview.datamodel.AlignmentView gatherSequencesForAlignment()
{
/*
* SequenceGroup seqs = viewport.getSelectionGroup(); int sz; msa = new
* SequenceI[sz = seqs.getSize(false)];
- *
+ *
* for (int i = 0; i < sz; i++) { msa[i] = (SequenceI)
* seqs.getSequenceAt(i); }
*/
{
/*
* Vector seqs = viewport.getAlignment().getSequences();
- *
+ *
* if (seqs.size() > 1) { msa = new SequenceI[seqs.size()];
- *
+ *
* for (int i = 0; i < seqs.size(); i++) { msa[i] = (SequenceI)
* seqs.elementAt(i); } }
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* Add a treeviewer for the tree extracted from a newick file object to the
* current alignment view
- *
+ *
* @param nf
* the tree
* @param title
/**
* Generates menu items and listener event actions for web service clients
- *
+ *
*/
public void BuildWebServiceMenu()
{
}
} catch (Exception e)
{
- Cache.log.debug("Exception during web service menu building process.",e);
+ Cache.log
+ .debug("Exception during web service menu building process.",
+ e);
}
;
}
/**
* construct any groupURL type service menu entries.
- *
+ *
* @param webService
*/
private void build_urlServiceMenu(JMenu webService)
/*
* JMenuItem testAlView = new JMenuItem("Test AlignmentView"); final
* AlignFrame af = this; testAlView.addActionListener(new ActionListener() {
- *
+ *
* @Override public void actionPerformed(ActionEvent e) {
* jalview.datamodel.AlignmentView
* .testSelectionViews(af.viewport.getAlignment(),
* af.viewport.getColumnSelection(), af.viewport.selectionGroup); }
- *
+ *
* }); webService.add(testAlView);
*/
// TODO: refactor to RestClient discoverer and merge menu entries for
* public void vamsasStore_actionPerformed(ActionEvent e) { JalviewFileChooser
* chooser = new JalviewFileChooser(jalview.bin.Cache.
* getProperty("LAST_DIRECTORY"));
- *
+ *
* chooser.setFileView(new JalviewFileView()); chooser.setDialogTitle("Export
* to Vamsas file"); chooser.setToolTipText("Export");
- *
+ *
* int value = chooser.showSaveDialog(this);
- *
+ *
* if (value == JalviewFileChooser.APPROVE_OPTION) {
* jalview.io.VamsasDatastore vs = new jalview.io.VamsasDatastore(viewport);
* //vs.store(chooser.getSelectedFile().getAbsolutePath() ); vs.storeJalview(
*/
/**
* prototype of an automatically enabled/disabled analysis function
- *
+ *
*/
protected void setShowProductsEnabled()
{
/**
* search selection for sequence xRef products and build the show products
* menu.
- *
+ *
* @param selection
* @param dataset
* @return true if showProducts menu should be enabled.
/**
* Try to load a features file onto the alignment.
- *
+ *
* @param file
* contents or path to retrieve file
* @param type
* it's and Annotation file, then a JNet file, and finally a features file. If
* all are false then the user may have dropped an alignment file onto this
* AlignFrame.
- *
+ *
* @param file
* either a filename or a URL string.
*/
}
else
{
- // some problem - if no warning its probable that the ID matching process didn't work
- JOptionPane.showMessageDialog(Desktop.desktop,
- tcf.getWarningMessage()==null ? "Check that the file matches sequence IDs in the alignment." : tcf.getWarningMessage(),
- "Problem reading T-COFFEE score file",
- JOptionPane.WARNING_MESSAGE);
+ // some problem - if no warning its probable that the ID matching
+ // process didn't work
+ JOptionPane
+ .showMessageDialog(
+ Desktop.desktop,
+ tcf.getWarningMessage() == null ? "Check that the file matches sequence IDs in the alignment."
+ : tcf.getWarningMessage(),
+ "Problem reading T-COFFEE score file",
+ JOptionPane.WARNING_MESSAGE);
}
}
else
}
} catch (Exception x)
{
- Cache.log.debug("Exception when processing data source as T-COFFEE score file",x);
+ Cache.log
+ .debug("Exception when processing data source as T-COFFEE score file",
+ x);
tcf = null;
}
if (tcf == null)
{
/*
* if (format.equalsIgnoreCase("PDB")) {
- *
+ *
* String pdbfn = ""; // try to match up filename with sequence id
* try { if (protocol == jalview.io.FormatAdapter.FILE) { File fl =
* new File(file); pdbfn = fl.getName(); } else if (protocol ==
} catch (Exception ex)
{
ex.printStackTrace();
- }
- catch (OutOfMemoryError oom)
+ } catch (OutOfMemoryError oom)
{
- try {
+ try
+ {
System.gc();
- } catch (Exception x){};
- new OOMWarning("loading data "+(protocol!=null ? (protocol.equals(FormatAdapter.PASTE) ? "from clipboard." : "using "+protocol+" from "+file) : ".")+(format!=null ? "(parsing as '"+format+"' file)" :""), oom, Desktop.desktop);
+ } catch (Exception x)
+ {
+ }
+ ;
+ new OOMWarning(
+ "loading data "
+ + (protocol != null ? (protocol.equals(FormatAdapter.PASTE) ? "from clipboard."
+ : "using " + protocol + " from " + file)
+ : ".")
+ + (format != null ? "(parsing as '" + format
+ + "' file)" : ""), oom, Desktop.desktop);
}
}
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.jbgui.GAlignFrame#showDbRefs_actionPerformed(java.awt.event.ActionEvent
* )
/*
* (non-Javadoc)
- *
+ *
* @seejalview.jbgui.GAlignFrame#showNpFeats_actionPerformed(java.awt.event.
* ActionEvent)
*/
/**
* find the viewport amongst the tabs in this alignment frame and close that
* tab
- *
+ *
* @param av
*/
public boolean closeView(AlignViewport av)
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.jbgui.GAlignFrame#showUnconservedMenuItem_actionPerformed(java.
* awt.event.ActionEvent)
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.jbgui.GAlignFrame#showGroupConsensus_actionPerformed(java.awt.event
* .ActionEvent)
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.jbgui.GAlignFrame#showGroupConservation_actionPerformed(java.awt
* .event.ActionEvent)
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.jbgui.GAlignFrame#showConsensusHistogram_actionPerformed(java.awt
* .event.ActionEvent)
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.jbgui.GAlignFrame#showConsensusProfile_actionPerformed(java.awt
* .event.ActionEvent)
/*
* (non-Javadoc)
- *
+ *
* @see
* jalview.jbgui.GAlignFrame#makeGrpsFromSelection_actionPerformed(java.awt
* .event.ActionEvent)
Color col = new Color((int) (Math.random() * 255),
(int) (Math.random() * 255), (int) (Math.random() * 255));
col = col.brighter();
- for (SequenceI s:gps[g].getSequences())
- viewport.setSequenceColour(
- s, col)
- ;
+ for (SequenceI s : gps[g].getSequences())
+ viewport.setSequenceColour(s, col);
}
PaintRefresher.Refresh(this, viewport.getSequenceSetId());
alignPanel.updateAnnotation();
/**
* make the given alignmentPanel the currently selected tab
- *
+ *
* @param alignmentPanel
*/
public void setDisplayedView(AlignmentPanel alignmentPanel)
* @author $author$
* @version $Revision: 1.141 $
*/
-public class AlignViewport extends AlignmentViewport implements SelectionSource, VamsasSource, AlignViewportI
+public class AlignViewport extends AlignmentViewport implements
+ SelectionSource, VamsasSource, AlignViewportI
{
int startRes;
boolean seqNameItalics;
-
NJTree currentTree = null;
boolean scaleAboveWrapped = false;
{
if (!alignment.isNucleotide())
{
- showConservation=Cache.getDefault("SHOW_CONSERVATION", true);
- showQuality=Cache.getDefault("SHOW_QUALITY", true);
+ showConservation = Cache.getDefault("SHOW_CONSERVATION", true);
+ showQuality = Cache.getDefault("SHOW_QUALITY", true);
showGroupConservation = Cache.getDefault("SHOW_GROUP_CONSERVATION",
false);
- }
+ }
showConsensusHistogram = Cache.getDefault("SHOW_CONSENSUS_HISTOGRAM",
true);
showSequenceLogo = Cache.getDefault("SHOW_CONSENSUS_LOGO", false);
- normaliseSequenceLogo = Cache.getDefault("NORMALISE_CONSENSUS_LOGO", false);
+ normaliseSequenceLogo = Cache.getDefault("NORMALISE_CONSENSUS_LOGO",
+ false);
showGroupConsensus = Cache.getDefault("SHOW_GROUP_CONSENSUS", false);
- showConsensus=Cache.getDefault("SHOW_IDENTITY", true);
+ showConsensus = Cache.getDefault("SHOW_IDENTITY", true);
consensus = new AlignmentAnnotation("Consensus", "PID",
new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH);
consensus.hasText = true;
Desktop.instance).removeMappings(alignment.getCodonFrames());
}
this.alignment = align;
- if (alignment!=null && alignment.getCodonFrames() != null)
+ if (alignment != null && alignment.getCodonFrames() != null)
{
StructureSelectionManager.getStructureSelectionManager(
Desktop.instance).addMappings(alignment.getCodonFrames());
scaleRightWrapped = b;
}
-
public void setDataset(boolean b)
{
isDataset = b;
return isDataset;
}
-
-
public boolean getShowHiddenMarkers()
{
return showHiddenMarkers;
{
sequenceColours = new Hashtable();
}
- for (SequenceGroup sg:alignment.getGroups())
+ for (SequenceGroup sg : alignment.getGroups())
{
if (sg.idColour != null)
{
- for (SequenceI s:sg.getSequences(getHiddenRepSequences()))
+ for (SequenceI s : sg.getSequences(getHiddenRepSequences()))
{
sequenceColours.put(s, sg.idColour);
}
return seqvectors.toArray(new SequenceI[seqvectors.size()][]);
}
-
public boolean isNormaliseSequenceLogo()
{
return normaliseSequenceLogo;
normaliseSequenceLogo = state;
}
-
/**
*
- * @return true if alignment characters should be displayed
+ * @return true if alignment characters should be displayed
*/
public boolean isValidCharWidth()
{
return validCharWidth;
}
- private Hashtable<String, AutoCalcSetting> calcIdParams=new Hashtable<String, AutoCalcSetting>();
+
+ private Hashtable<String, AutoCalcSetting> calcIdParams = new Hashtable<String, AutoCalcSetting>();
+
public AutoCalcSetting getCalcIdSettingsFor(String calcId)
{
return calcIdParams.get(calcId);
}
- public void setCalcIdSettingsFor(String calcId, AutoCalcSetting settings, boolean needsUpdate)
+ public void setCalcIdSettingsFor(String calcId, AutoCalcSetting settings,
+ boolean needsUpdate)
{
calcIdParams.put(calcId, settings);
- // TODO: create a restart list to trigger any calculations that need to be restarted after load
+ // TODO: create a restart list to trigger any calculations that need to be
+ // restarted after load
// calculator.getRegisteredWorkersOfClass(settings.getWorkerClass())
if (needsUpdate)
{
- Cache.log.debug("trigger update for "+calcId);
+ Cache.log.debug("trigger update for " + calcId);
}
- }
+ }
}
public Dimension calculateIdWidth()
{
// calculate sensible default width when no preference is available
-
+
int afwidth = (alignFrame != null ? alignFrame.getWidth() : 300);
int maxwidth = Math.max(20,
Math.min(afwidth - 200, (int) 2 * afwidth / 3));
return calculateIdWidth(maxwidth);
}
+
/**
* Calculate the width of the alignment labels based on the displayed names
* and any bounds on label width set in preferences.
- * @param maxwidth -1 or maximum width allowed for IdWidth
+ *
+ * @param maxwidth
+ * -1 or maximum width allowed for IdWidth
* @return Dimension giving the maximum width of the alignment label panel
* that should be used.
*/
}
}
- return new Dimension(maxwidth<0 ? idWidth : Math.min(maxwidth, idWidth), 12);
+ return new Dimension(maxwidth < 0 ? idWidth : Math.min(maxwidth,
+ idWidth), 12);
}
/**
return false;
}
SequenceI seq = av.getAlignment().getSequenceAt(seqIndex);
-
- int[] r=results.getResults(seq, 0, av.getAlignment().getWidth());
+
+ int[] r = results.getResults(seq, 0, av.getAlignment().getWidth());
if (r == null)
{
return false;
{
start = av.getColumnSelection().findColumnPosition(start);
end = av.getColumnSelection().findColumnPosition(end);
- if (start==end)
+ if (start == end)
{
if (!av.getColumnSelection().isVisible(r[0]))
{
/**
*
- * @param b Hide or show annotation panel
- *
+ * @param b
+ * Hide or show annotation panel
+ *
*/
public void setAnnotationVisible(boolean b)
{
}
/**
- * automatically adjust annotation panel height for new annotation
- * whilst ensuring the alignment is still visible.
+ * automatically adjust annotation panel height for new annotation whilst
+ * ensuring the alignment is still visible.
*/
public void adjustAnnotationHeight()
{
addNotify();
paintAlignment(true);
}
+
/**
* calculate the annotation dimensions and refresh slider values accordingly.
- * need to do repaints/notifys afterwards.
+ * need to do repaints/notifys afterwards.
*/
- protected void validateAnnotationDimensions(boolean adjustPanelHeight) {
+ protected void validateAnnotationDimensions(boolean adjustPanelHeight)
+ {
int height = annotationPanel.adjustPanelHeight();
-
+
if (hscroll.isVisible())
{
height += hscroll.getPreferredSize().height;
if (!adjustPanelHeight)
{
// maintain same window layout whilst updating sliders
- height=annotationScroller.getSize().height;
+ height = annotationScroller.getSize().height;
}
hscroll.addNotify();
-
+
annotationScroller.setPreferredSize(new Dimension(annotationScroller
.getWidth(), height));
/**
* Adjust row/column scrollers to show a visible position in the alignment.
*
- * @param x visible column to scroll to
- * DOCUMENT ME!
- * @param y visible row to scroll to
- *
+ * @param x
+ * visible column to scroll to DOCUMENT ME!
+ * @param y
+ * visible row to scroll to
+ *
*/
public void setScrollValues(int x, int y)
{
endSeq = av.getAlignment().getHeight();
}
- int pagesHigh = ((av.getAlignment().getHeight() / totalSeq) + 1) * pheight;
+ int pagesHigh = ((av.getAlignment().getHeight() / totalSeq) + 1)
+ * pheight;
if (av.showAnnotation)
{
if (av.showAnnotation && (endSeq == av.getAlignment().getHeight()))
{
// draw annotation - need to offset for current scroll position
- int offset=-alabels.scrollOffset;
+ int offset = -alabels.scrollOffset;
pg.translate(0, offset);
pg.translate(-idWidth - 3, (endSeq - startSeq) * av.charHeight + 3);
alabels.drawComponent((Graphics2D) pg, idWidth);
pg.translate(idWidth + 3, 0);
- annotationPanel.renderer.drawComponent(annotationPanel, av, (Graphics2D) pg, -1, startRes, endRes + 1);
+ annotationPanel.renderer.drawComponent(annotationPanel, av,
+ (Graphics2D) pg, -1, startRes, endRes + 1);
pg.translate(0, -offset);
}
return Printable.NO_SUCH_PAGE;
}
}
+
/**
- * get current sequence ID panel width, or nominal value if panel were to be displayed using default settings
+ * get current sequence ID panel width, or nominal value if panel were to be
+ * displayed using default settings
+ *
* @return
*/
int getVisibleIdWidth()
}
/**
- * get current sequence ID panel width, or nominal value if panel were to be displayed using default settings
- * @param onscreen indicate if the Id width for onscreen or offscreen display should be returned
+ * get current sequence ID panel width, or nominal value if panel were to be
+ * displayed using default settings
+ *
+ * @param onscreen
+ * indicate if the Id width for onscreen or offscreen display should
+ * be returned
* @return
*/
int getVisibleIdWidth(boolean onscreen)
// see if rendering offscreen - check preferences and calc width accordingly
if (!onscreen && Cache.getDefault("FIGURE_AUTOIDWIDTH", false))
{
- return calculateIdWidth(-1).width+4;
+ return calculateIdWidth(-1).width + 4;
}
- Integer idwidth=null;
- if (onscreen || (idwidth=Cache.getIntegerProperty("FIGURE_FIXEDIDWIDTH"))==null) {
+ Integer idwidth = null;
+ if (onscreen
+ || (idwidth = Cache.getIntegerProperty("FIGURE_FIXEDIDWIDTH")) == null)
+ {
return (idPanel.getWidth() > 0 ? idPanel.getWidth()
- : calculateIdWidth().width + 4);
+ : calculateIdWidth().width + 4);
}
- return idwidth.intValue()+4;
+ return idwidth.intValue() + 4;
}
void makeAlignmentImage(int type, File file)
{
- long progress=System.currentTimeMillis();
- if (alignFrame!=null) {
- alignFrame.setProgressBar("Saving "+(type == jalview.util.ImageMaker.PNG ? "PNG image":"EPS file") , progress);
- }
- try {
- int maxwidth = av.getAlignment().getWidth();
- if (av.hasHiddenColumns())
+ long progress = System.currentTimeMillis();
+ if (alignFrame != null)
{
- maxwidth = av.getColumnSelection().findColumnPosition(maxwidth);
+ alignFrame.setProgressBar("Saving "
+ + (type == jalview.util.ImageMaker.PNG ? "PNG image"
+ : "EPS file"), progress);
}
-
- int height = ((av.getAlignment().getHeight() + 1) * av.charHeight)
- + scalePanel.getHeight();
- int width = getVisibleIdWidth(false) + (maxwidth * av.charWidth);
-
- if (av.getWrapAlignment())
+ try
{
- height = getWrappedHeight();
- if (System.getProperty("java.awt.headless") != null
- && System.getProperty("java.awt.headless").equals("true"))
- {
- // need to obtain default alignment width and then add in any additional allowance for id margin
- // this duplicates the calculation in getWrappedHeight but adjusts for offscreen idWith
- width = alignFrame.getWidth() - vscroll.getPreferredSize().width
- - alignFrame.getInsets().left
- - alignFrame.getInsets().right
- - getVisibleIdWidth()+getVisibleIdWidth(false);
- }
- else
+ int maxwidth = av.getAlignment().getWidth();
+ if (av.hasHiddenColumns())
{
- width = seqPanel.getWidth() + getVisibleIdWidth(false);
+ maxwidth = av.getColumnSelection().findColumnPosition(maxwidth);
}
- }
- else if (av.getShowAnnotation())
- {
- height += annotationPanel.adjustPanelHeight() + 3;
- }
-
- try
- {
+ int height = ((av.getAlignment().getHeight() + 1) * av.charHeight)
+ + scalePanel.getHeight();
+ int width = getVisibleIdWidth(false) + (maxwidth * av.charWidth);
- jalview.util.ImageMaker im;
- final String imageAction,imageTitle;
- if (type == jalview.util.ImageMaker.PNG)
- {
- imageAction="Create PNG image from alignment";
- imageTitle=null;
- } else {
- imageAction="Create EPS file from alignment";
- imageTitle=alignFrame.getTitle();
- }
- im = new jalview.util.ImageMaker(this, type, imageAction, width, height, file,
- imageTitle);
if (av.getWrapAlignment())
{
- if (im.getGraphics() != null)
+ height = getWrappedHeight();
+ if (System.getProperty("java.awt.headless") != null
+ && System.getProperty("java.awt.headless").equals("true"))
{
- printWrappedAlignment(im.getGraphics(), width, height, 0);
- im.writeImage();
+ // need to obtain default alignment width and then add in any
+ // additional allowance for id margin
+ // this duplicates the calculation in getWrappedHeight but adjusts for
+ // offscreen idWith
+ width = alignFrame.getWidth() - vscroll.getPreferredSize().width
+ - alignFrame.getInsets().left
+ - alignFrame.getInsets().right - getVisibleIdWidth()
+ + getVisibleIdWidth(false);
}
+ else
+ {
+ width = seqPanel.getWidth() + getVisibleIdWidth(false);
+ }
+
}
- else
+ else if (av.getShowAnnotation())
+ {
+ height += annotationPanel.adjustPanelHeight() + 3;
+ }
+
+ try
{
- if (im.getGraphics() != null)
+
+ jalview.util.ImageMaker im;
+ final String imageAction, imageTitle;
+ if (type == jalview.util.ImageMaker.PNG)
+ {
+ imageAction = "Create PNG image from alignment";
+ imageTitle = null;
+ }
+ else
+ {
+ imageAction = "Create EPS file from alignment";
+ imageTitle = alignFrame.getTitle();
+ }
+ im = new jalview.util.ImageMaker(this, type, imageAction, width,
+ height, file, imageTitle);
+ if (av.getWrapAlignment())
+ {
+ if (im.getGraphics() != null)
+ {
+ printWrappedAlignment(im.getGraphics(), width, height, 0);
+ im.writeImage();
+ }
+ }
+ else
{
- printUnwrapped(im.getGraphics(), width, height, 0);
- im.writeImage();
+ if (im.getGraphics() != null)
+ {
+ printUnwrapped(im.getGraphics(), width, height, 0);
+ im.writeImage();
+ }
}
+ } catch (OutOfMemoryError err)
+ {
+ // Be noisy here.
+ System.out.println("########################\n" + "OUT OF MEMORY "
+ + file + "\n" + "########################");
+ new OOMWarning("Creating Image for " + file, err);
+ // System.out.println("Create IMAGE: " + err);
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
}
- } catch (OutOfMemoryError err)
+ } finally
{
- // Be noisy here.
- System.out.println("########################\n" + "OUT OF MEMORY "
- + file + "\n" + "########################");
- new OOMWarning("Creating Image for " + file, err);
- // System.out.println("Create IMAGE: " + err);
- } catch (Exception ex)
- {
- ex.printStackTrace();
- }
- }
- finally {
- if (alignFrame!=null)
+ if (alignFrame != null)
{
alignFrame.setProgressBar("Export complete.", progress);
}
{
try
{
- int s, sSize = av.getAlignment().getHeight(), res, alwidth = av.getAlignment()
- .getWidth(), g, gSize, f, fSize, sy;
+ int s, sSize = av.getAlignment().getHeight(), res, alwidth = av
+ .getAlignment().getWidth(), g, gSize, f, fSize, sy;
StringBuffer text = new StringBuffer();
PrintWriter out = new PrintWriter(new FileWriter(imgMapFile));
out.println(jalview.io.HTMLOutput.getImageMapHTML());
PaintRefresher.RemoveComponent(this);
if (av != null)
{
- jalview.structure.StructureSelectionManager ssm = av.getStructureSelectionManager();
+ jalview.structure.StructureSelectionManager ssm = av
+ .getStructureSelectionManager();
ssm.removeStructureViewerListener(seqPanel, null);
ssm.removeSelectionListener(seqPanel);
av.setAlignment(null);
{
updateAnnotation(false, false);
}
+
public void updateAnnotation(boolean applyGlobalSettings)
{
- updateAnnotation(applyGlobalSettings,false);
+ updateAnnotation(applyGlobalSettings, false);
}
- public void updateAnnotation(boolean applyGlobalSettings, boolean preserveNewGroupSettings)
+
+ public void updateAnnotation(boolean applyGlobalSettings,
+ boolean preserveNewGroupSettings)
{
- av.updateGroupAnnotationSettings(applyGlobalSettings, preserveNewGroupSettings);
+ av.updateGroupAnnotationSettings(applyGlobalSettings,
+ preserveNewGroupSettings);
adjustAnnotationHeight();
}
/**
* get the name for this view
- * @return
+ *
+ * @return
*/
public String getViewName()
{
/**
* Make/Unmake this alignment panel the current input focus
+ *
* @param b
*/
public void setSelected(boolean b)
{
- try {
+ try
+ {
alignFrame.setSelected(b);
- } catch (Exception ex) {};
-
+ } catch (Exception ex)
+ {
+ }
+ ;
+
if (b)
{
alignFrame.setDisplayedView(this);
- }
+ }
}
@Override
@Override
public void raiseOOMWarning(String string, OutOfMemoryError error)
{
- new OOMWarning(string, error, this);
+ new OOMWarning(string, error, this);
}
public FeatureRenderer cloneFeatureRenderer()
{
-
+
return new FeatureRenderer(this);
}
public void updateFeatureRendererFrom(FeatureRenderer fr)
{
- if (seqPanel.seqCanvas.getFeatureRenderer()!=null) {
+ if (seqPanel.seqCanvas.getFeatureRenderer() != null)
+ {
seqPanel.seqCanvas.getFeatureRenderer().transferSettings(fr);
}
}
if (av.getAlignment().getGroups() != null)
{
oldgroupColours = new Hashtable();
- for (SequenceGroup sg:ap.av.getAlignment().getGroups())
+ for (SequenceGroup sg : ap.av.getAlignment().getGroups())
{
if (sg.cs != null)
{
// Always get default shading from preferences.
setDefaultMinMax();
-
+
if (oldcs instanceof AnnotationColourGradient)
{
AnnotationColourGradient acg = (AnnotationColourGradient) oldcs;
currentColours.setSelected(acg.predefinedColours);
if (!acg.predefinedColours)
{
- minColour.setBackground(acg.getMinColour());
+ minColour.setBackground(acg.getMinColour());
maxColour.setBackground(acg.getMaxColour());
}
seqAssociated.setSelected(acg.isSeqAssociated());
}
adjusting = true;
- annotations = new JComboBox(getAnnotationItems(seqAssociated.isSelected()));
+ annotations = new JComboBox(
+ getAnnotationItems(seqAssociated.isSelected()));
threshold.addItem("No Threshold");
threshold.addItem("Above Threshold");
{
AnnotationColourGradient acg = (AnnotationColourGradient) oldcs;
annotations.setSelectedItem(acg.getAnnotation());
- switch (acg.getAboveThreshold()) {
+ switch (acg.getAboveThreshold())
+ {
case AnnotationColourGradient.NO_THRESHOLD:
- threshold.setSelectedItem("No Threshold");
+ threshold.setSelectedItem("No Threshold");
break;
case AnnotationColourGradient.ABOVE_THRESHOLD:
- threshold.setSelectedItem("Above Threshold");
+ threshold.setSelectedItem("Above Threshold");
break;
case AnnotationColourGradient.BELOW_THRESHOLD:
threshold.setSelectedItem("Below Threshold");
break;
- default:
- throw new Error("Implementation error: don't know about threshold setting for current AnnotationColourGradient.");
+ default:
+ throw new Error(
+ "Implementation error: don't know about threshold setting for current AnnotationColourGradient.");
}
thresholdIsMin.setSelected(acg.thresholdIsMinMax);
- thresholdValue.setText(""+acg.getAnnotationThreshold());
+ thresholdValue.setText("" + acg.getAnnotationThreshold());
}
try
}
- private Vector<String> getAnnotationItems(boolean isSeqAssociated) {
+ private Vector<String> getAnnotationItems(boolean isSeqAssociated)
+ {
Vector<String> list = new Vector<String>();
int index = 1;
int[] anmap = new int[av.getAlignment().getAlignmentAnnotation().length];
- boolean enableSeqAss=false;
+ boolean enableSeqAss = false;
for (int i = 0; i < av.getAlignment().getAlignmentAnnotation().length; i++)
{
- if (av.getAlignment().getAlignmentAnnotation()[i].sequenceRef==null)
+ if (av.getAlignment().getAlignmentAnnotation()[i].sequenceRef == null)
{
if (isSeqAssociated)
- {
+ {
continue;
- }
- } else {
- enableSeqAss=true;
+ }
+ }
+ else
+ {
+ enableSeqAss = true;
}
String label = av.getAlignment().getAlignmentAnnotation()[i].label;
if (!list.contains(label))
- {anmap[list.size()] = i;
+ {
+ anmap[list.size()] = i;
list.addElement(label);
-
- }else {
- if (!isSeqAssociated) {
+
+ }
+ else
+ {
+ if (!isSeqAssociated)
+ {
anmap[list.size()] = i;
list.addElement(label + "_" + (index++));
}
}
seqAssociated.setEnabled(enableSeqAss);
annmap = new int[list.size()];
- System.arraycopy(anmap, 0, annmap, 0, annmap.length);
+ System.arraycopy(anmap, 0, annmap, 0, annmap.length);
return list;
}
+
private void setDefaultMinMax()
{
- minColour.setBackground(Cache.getDefaultColour("ANNOTATIONCOLOUR_MIN", Color.orange));
- maxColour.setBackground(Cache.getDefaultColour("ANNOTATIONCOLOUR_MAX", Color.red));
+ minColour.setBackground(Cache.getDefaultColour("ANNOTATIONCOLOUR_MIN",
+ Color.orange));
+ maxColour.setBackground(Cache.getDefaultColour("ANNOTATIONCOLOUR_MAX",
+ Color.red));
}
public AnnotationColourChooser()
});
defColours.setOpaque(false);
defColours.setText("Defaults");
- defColours.setToolTipText("Reset min and max colours to defaults from user preferences.");
+ defColours
+ .setToolTipText("Reset min and max colours to defaults from user preferences.");
defColours.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent arg0)
{
resetColours_actionPerformed(arg0);
}
});
-
+
annotations.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
seqAssociated.setText("Per-sequence only");
seqAssociated.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent arg0)
{
seqAssociated_actionPerformed(arg0);
}
});
-
+
this.setLayout(borderLayout1);
- jPanel2.setLayout(new MigLayout("","[left][center][right]","[][][]"));
+ jPanel2.setLayout(new MigLayout("", "[left][center][right]", "[][][]"));
jPanel1.setBackground(Color.white);
jPanel2.setBackground(Color.white);
colpanel.add(maxColour);
jPanel2.add(colpanel, "wrap");
jPanel2.add(threshold);
- jPanel2.add(defColours,"skip 1, wrap");
+ jPanel2.add(defColours, "skip 1, wrap");
jPanel2.add(thresholdIsMin);
jPanel2.add(slider, "grow");
jPanel2.add(thresholdValue, "grow");
protected void seqAssociated_actionPerformed(ActionEvent arg0)
{
- adjusting=true;
+ adjusting = true;
String cursel = (String) annotations.getSelectedItem();
- boolean isvalid=false,isseqs=seqAssociated.isSelected();
+ boolean isvalid = false, isseqs = seqAssociated.isSelected();
this.annotations.removeAllItems();
- for (String anitem:getAnnotationItems(seqAssociated.isSelected()))
+ for (String anitem : getAnnotationItems(seqAssociated.isSelected()))
{
- if (anitem.equals( cursel) || (isseqs && cursel.startsWith(anitem)))
+ if (anitem.equals(cursel) || (isseqs && cursel.startsWith(anitem)))
{
- isvalid=true;
- cursel=anitem;
+ isvalid = true;
+ cursel = anitem;
}
this.annotations.addItem(anitem);
}
- adjusting=false;
- if (isvalid) { this.annotations.setSelectedItem(cursel); } else {
- if (annotations.getItemCount()>0) {
+ adjusting = false;
+ if (isvalid)
+ {
+ this.annotations.setSelectedItem(cursel);
+ }
+ else
+ {
+ if (annotations.getItemCount() > 0)
+ {
annotations.setSelectedIndex(0);
}
}
}
JComboBox annotations;
+
int[] annmap;
+
JPanel minColour = new JPanel();
JPanel maxColour = new JPanel();
+
JButton defColours = new JButton();
+
JButton ok = new JButton();
JButton cancel = new JButton();
JPanel jPanel1 = new JPanel();
+
JPanel jPanel2 = new JPanel();
-
+
BorderLayout borderLayout1 = new BorderLayout();
JComboBox threshold = new JComboBox();
-
JSlider slider = new JSlider();
JTextField thresholdValue = new JTextField(20);
JCheckBox currentColours = new JCheckBox();
JCheckBox thresholdIsMin = new JCheckBox();
-
+
JCheckBox seqAssociated = new JCheckBox();
public void minColour_actionPerformed()
if (av.getAlignment().getGroups() != null)
{
-
- for (SequenceGroup sg:ap.av.getAlignment().getGroups())
+
+ for (SequenceGroup sg : ap.av.getAlignment().getGroups())
{
if (sg.cs == null)
{
{
sg.cs = new AnnotationColourGradient(currentAnnotation, sg.cs,
aboveThreshold);
- ((AnnotationColourGradient)sg.cs).setSeqAssociated(seqAssociated.isSelected());
+ ((AnnotationColourGradient) sg.cs).setSeqAssociated(seqAssociated
+ .isSelected());
}
else
sg.cs = new AnnotationColourGradient(currentAnnotation,
minColour.getBackground(), maxColour.getBackground(),
aboveThreshold);
- ((AnnotationColourGradient)sg.cs).setSeqAssociated(seqAssociated.isSelected());
+ ((AnnotationColourGradient) sg.cs).setSeqAssociated(seqAssociated
+ .isSelected());
}
}
}
ap.alignmentChanged();
- // ensure all associated views (overviews, structures, etc) are notified of updated colours.
+ // ensure all associated views (overviews, structures, etc) are notified of
+ // updated colours.
ap.paintAlignment(true);
}
public void cancel_actionPerformed(ActionEvent e)
{
reset();
- // ensure all original colouring is propagated to listeners.
+ // ensure all original colouring is propagated to listeners.
ap.paintAlignment(true);
try
{
av.setGlobalColourScheme(oldcs);
if (av.getAlignment().getGroups() != null)
{
-
- for (SequenceGroup sg:ap.av.getAlignment().getGroups())
+
+ for (SequenceGroup sg : ap.av.getAlignment().getGroups())
{
sg.cs = (ColourSchemeI) oldgroupColours.get(sg);
}
frame = new JInternalFrame();\r
frame.setContentPane(this);\r
frame.setLayer(JLayeredPane.PALETTE_LAYER);\r
- Desktop.addInternalFrame(frame, "", frame.getPreferredSize().width, frame.getPreferredSize().height);\r
+ Desktop.addInternalFrame(frame, "", frame.getPreferredSize().width,\r
+ frame.getPreferredSize().height);\r
}\r
\r
public void exportFeatures(AlignmentPanel ap)\r
private void jbInit() throws Exception\r
{\r
this.setLayout(new BorderLayout());\r
- \r
+\r
toFile.setText("to File");\r
toFile.addActionListener(new ActionListener()\r
{\r
{
x = width - fm.stringWidth(aa[gg].label) - 3;
g.drawString(aa[gg].label, x, y - graphExtras);
-
+
if (aa[gg]._linecolour != null)
{
import jalview.renderer.AwtRenderPanelI;
/**
- * AnnotationPanel displays visible portion of annotation rows below unwrapped alignment
+ * AnnotationPanel displays visible portion of annotation rows below unwrapped
+ * alignment
+ *
* @author $author$
* @version $Revision$
*/
/**
* Creates a new AnnotationPanel object.
- *
+ *
* @param ap
* DOCUMENT ME!
*/
addMouseMotionListener(this);
ap.annotationScroller.getVerticalScrollBar()
.addAdjustmentListener(this);
- // save any wheel listeners on the scroller, so we can propagate scroll events to them.
+ // save any wheel listeners on the scroller, so we can propagate scroll
+ // events to them.
_mwl = ap.annotationScroller.getMouseWheelListeners();
// and then set our own listener to consume all mousewheel events
ap.annotationScroller.addMouseWheelListener(this);
}
else
{
- // TODO: find the correct way to let the event bubble up to ap.annotationScroller
+ // TODO: find the correct way to let the event bubble up to
+ // ap.annotationScroller
for (MouseWheelListener mwl : _mwl)
{
if (mwl != null)
/*
* (non-Javadoc)
- * @see java.awt.event.AdjustmentListener#adjustmentValueChanged(java.awt.event.AdjustmentEvent)
+ *
+ * @see
+ * java.awt.event.AdjustmentListener#adjustmentValueChanged(java.awt.event
+ * .AdjustmentEvent)
*/
@Override
public void adjustmentValueChanged(AdjustmentEvent evt)
* Calculates the height of the annotation displayed in the annotation panel.
* Callers should normally call the ap.adjustAnnotationHeight method to ensure
* all annotation associated components are updated correctly.
- *
+ *
*/
public int adjustPanelHeight()
{
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
{
String collatedInput = "";
String last = "";
- ColumnSelection viscols=av.getColumnSelection();
+ ColumnSelection viscols = av.getColumnSelection();
// TODO: refactor and save av.getColumnSelection for efficiency
for (int i = 0; i < columnSelection.size(); i++)
{
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
}
}
- private volatile boolean imageFresh=false;
+
+ private volatile boolean imageFresh = false;
+
/**
* DOCUMENT ME!
- *
+ *
* @param g
* DOCUMENT ME!
*/
if (image == null || imgWidth != image.getWidth()
|| image.getHeight(this) != getHeight())
{
- try {
- image = new BufferedImage(imgWidth, ap.annotationPanel.getHeight(),
- BufferedImage.TYPE_INT_RGB);
+ try
+ {
+ image = new BufferedImage(imgWidth, ap.annotationPanel.getHeight(),
+ BufferedImage.TYPE_INT_RGB);
} catch (OutOfMemoryError oom)
{
- try {
+ try
+ {
System.gc();
- } catch (Exception x){};
- new OOMWarning("Couldn't allocate memory to redraw screen. Please restart Jalview", oom);
+ } catch (Exception x)
+ {
+ }
+ ;
+ new OOMWarning(
+ "Couldn't allocate memory to redraw screen. Please restart Jalview",
+ oom);
return;
}
gg = (Graphics2D) image.getGraphics();
fm = gg.getFontMetrics();
gg.setColor(Color.white);
gg.fillRect(0, 0, imgWidth, image.getHeight());
- imageFresh=true;
+ imageFresh = true;
}
drawComponent(gg, av.startRes, av.endRes + 1);
- imageFresh=false;
+ imageFresh = false;
g.drawImage(image, 0, 0, this);
}
/**
* non-Thread safe repaint
- *
+ *
* @param horizontal
* repaint with horizontal shift in alignment
*/
repaint();
}
- private volatile boolean lastImageGood=false;
+
+ private volatile boolean lastImageGood = false;
+
/**
* DOCUMENT ME!
- *
+ *
* @param g
* DOCUMENT ME!
* @param startRes
*/
public void drawComponent(Graphics g, int startRes, int endRes)
{
- BufferedImage oldFaded=fadedImage;
+ BufferedImage oldFaded = fadedImage;
if (av.isCalcInProgress())
{
if (image == null)
{
- lastImageGood=false;
+ lastImageGood = false;
return;
}
// We'll keep a record of the old image,
// and draw a faded image until the calculation
// has completed
- if (lastImageGood && (fadedImage == null || fadedImage.getWidth() != imgWidth
- || fadedImage.getHeight() != image.getHeight()))
+ if (lastImageGood
+ && (fadedImage == null || fadedImage.getWidth() != imgWidth || fadedImage
+ .getHeight() != image.getHeight()))
{
-// System.err.println("redraw faded image ("+(fadedImage==null ? "null image" : "") + " lastGood="+lastImageGood+")");
+ // System.err.println("redraw faded image ("+(fadedImage==null ?
+ // "null image" : "") + " lastGood="+lastImageGood+")");
fadedImage = new BufferedImage(imgWidth, image.getHeight(),
BufferedImage.TYPE_INT_RGB);
fadedG.drawImage(image, 0, 0, this);
}
- // make sure we don't overwrite the last good faded image until all calculations have finished
- lastImageGood=false;
+ // make sure we don't overwrite the last good faded image until all
+ // calculations have finished
+ lastImageGood = false;
}
else
{
- if (fadedImage!=null)
+ if (fadedImage != null)
{
- oldFaded=fadedImage;
+ oldFaded = fadedImage;
}
fadedImage = null;
}
return;
}
- lastImageGood = renderer.drawComponent(this, av, g, activeRow, startRes, endRes);
- if (!lastImageGood && fadedImage==null)
+ lastImageGood = renderer.drawComponent(this, av, g, activeRow,
+ startRes, endRes);
+ if (!lastImageGood && fadedImage == null)
{
- fadedImage=oldFaded;
+ fadedImage = oldFaded;
}
}
* - add the alignment panel to the list used for aligning these
* structures
* @param leaveColouringToJmol
- * - do not update the colours from any other source. Jmol is handling them
+ * - do not update the colours from any other source. Jmol is
+ * handling them
* @param loadStatus
* @param bounds
* @param viewid
*/
public AppJmol(String[] files, String[] ids, SequenceI[][] seqs,
- AlignmentPanel ap, boolean usetoColour, boolean useToAlign, boolean leaveColouringToJmol,
- String loadStatus, Rectangle bounds, String viewid)
+ AlignmentPanel ap, boolean usetoColour, boolean useToAlign,
+ boolean leaveColouringToJmol, String loadStatus,
+ Rectangle bounds, String viewid)
{
PDBEntry[] pdbentrys = new PDBEntry[files.length];
for (int i = 0; i < pdbentrys.length; i++)
}
// / TODO: check if protocol is needed to be set, and if chains are
// autodiscovered.
- jmb = new AppJmolBinding(this, ap.getStructureSelectionManager(), pdbentrys, seqs, null, null);
+ jmb = new AppJmolBinding(this, ap.getStructureSelectionManager(),
+ pdbentrys, seqs, null, null);
jmb.setLoadingFromArchive(true);
addAlignmentPanel(ap);
{
seqColour.setSelected(jmb.isColourBySequence());
jmolColour.setSelected(!jmb.isColourBySequence());
- if (_colourwith==null)
+ if (_colourwith == null)
{
- _colourwith=new Vector<AlignmentPanel>();
+ _colourwith = new Vector<AlignmentPanel>();
}
- if (_alignwith==null)
+ if (_alignwith == null)
{
- _alignwith=new Vector<AlignmentPanel>();
+ _alignwith = new Vector<AlignmentPanel>();
}
-
+
seqColourBy = new ViewSelectionMenu("Colour by ..", this, _colourwith,
new ItemListener()
{
}
});
}
+
IProgressIndicator progressBar = null;
/**
* add a single PDB structure to a new or existing Jmol view
+ *
* @param pdbentry
* @param seq
* @param chains
progressBar = ap.alignFrame;
// ////////////////////////////////
// Is the pdb file already loaded?
- String alreadyMapped = ap.getStructureSelectionManager().alreadyMappedToFile(
- pdbentry.getId());
+ String alreadyMapped = ap.getStructureSelectionManager()
+ .alreadyMappedToFile(pdbentry.getId());
if (alreadyMapped != null)
{
if (option == JOptionPane.YES_OPTION)
{
// TODO : Fix multiple seq to one chain issue here.
- ap.getStructureSelectionManager().setMapping(seq, chains, alreadyMapped,
- AppletFormatAdapter.FILE);
+ ap.getStructureSelectionManager().setMapping(seq, chains,
+ alreadyMapped, AppletFormatAdapter.FILE);
if (ap.seqPanel.seqCanvas.fr != null)
{
ap.seqPanel.seqCanvas.fr.featuresAdded();
// add it to the set used for colouring
topJmol.useAlignmentPanelForColourbyseq(ap);
topJmol.buildJmolActionMenu();
- ap.getStructureSelectionManager().sequenceColoursChanged(ap);
+ ap.getStructureSelectionManager()
+ .sequenceColoursChanged(ap);
break;
}
}
}
}
// /////////////////////////////////
- openNewJmol(ap, new PDBEntry[] { pdbentry }, new SequenceI[][] { seq });
+ openNewJmol(ap, new PDBEntry[]
+ { pdbentry }, new SequenceI[][]
+ { seq });
}
- private void openNewJmol(AlignmentPanel ap, PDBEntry[] pdbentrys, SequenceI[][] seqs) {
+
+ private void openNewJmol(AlignmentPanel ap, PDBEntry[] pdbentrys,
+ SequenceI[][] seqs)
+ {
progressBar = ap.alignFrame;
- jmb = new AppJmolBinding(this, ap.getStructureSelectionManager(), pdbentrys, seqs, null, null);
+ jmb = new AppJmolBinding(this, ap.getStructureSelectionManager(),
+ pdbentrys, seqs, null, null);
addAlignmentPanel(ap);
useAlignmentPanelForColourbyseq(ap);
- if (pdbentrys.length>1)
+ if (pdbentrys.length > 1)
{
- alignAddedStructures=true;
+ alignAddedStructures = true;
useAlignmentPanelForSuperposition(ap);
}
jmb.setColourBySequence(true);
setSize(400, 400); // probably should be a configurable/dynamic default here
initMenus();
- worker=null;
- {
- addingStructures = false;
- worker = new Thread(this);
- worker.start();
- }
+ worker = null;
+ {
+ addingStructures = false;
+ worker = new Thread(this);
+ worker.start();
+ }
this.addInternalFrameListener(new InternalFrameAdapter()
{
public void internalFrameClosing(InternalFrameEvent internalFrameEvent)
}
/**
- * create a new Jmol containing several structures superimposed using the given alignPanel.
+ * create a new Jmol containing several structures superimposed using the
+ * given alignPanel.
+ *
* @param ap
* @param pe
* @param seqs
}
}
- public void useAlignmentPanelForColourbyseq(AlignmentPanel nap, boolean enableColourBySeq)
+ public void useAlignmentPanelForColourbyseq(AlignmentPanel nap,
+ boolean enableColourBySeq)
{
useAlignmentPanelForColourbyseq(nap);
jmb.setColourBySequence(enableColourBySeq);
seqColour.setSelected(enableColourBySeq);
jmolColour.setSelected(!enableColourBySeq);
}
+
public void useAlignmentPanelForColourbyseq(AlignmentPanel nap)
{
addAlignmentPanel(nap);
jmb.allocateViewer(renderPanel, true, "", null, null, "", scriptWindow,
null);
jmb.newJmolPopup(true, "Jmol", true);
- if (command==null)
+ if (command == null)
{
- command="";
+ command = "";
}
jmb.evalStateCommand(command);
jmb.setFinishedInit(true);
{
// just transfer the file name from the first sequence's first
// PDBEntry
- file = new File(((PDBEntry) pdbseq
- .getSequenceAt(0).getPDBId().elementAt(0)).getFile()).getAbsolutePath();
+ file = new File(((PDBEntry) pdbseq.getSequenceAt(0).getPDBId()
+ .elementAt(0)).getFile()).getAbsolutePath();
jmb.pdbentry[pi].setFile(file);
-
+
files.append(" \"" + Platform.escapeString(file) + "\"");
}
else
final String command = cmd.toString();
cmd = null;
lastnotify = jmb.getLoadNotifiesHandled();
-
+
try
{
jmb.evalStateCommand(command);
Cache.log.error("Couldn't add files to Jmol viewer!", ex);
}
}
-
+
// need to wait around until script has finished
while (addingStructures ? lastnotify >= jmb.getLoadNotifiesHandled()
- : (jmb.isFinishedInit() && jmb.getPdbFile().length!=jmb.pdbentry.length))
+ : (jmb.isFinishedInit() && jmb.getPdbFile().length != jmb.pdbentry.length))
{
try
{
{
for (int pdbe = 0; pdbe < jmb.pdbentry.length; pdbe++)
{
- cap.appendText(jmb.printMapping(
- jmb.pdbentry[pdbe].getFile()));
+ cap.appendText(jmb.printMapping(jmb.pdbentry[pdbe].getFile()));
cap.appendText("\n");
}
} catch (OutOfMemoryError e)
im.writeImage();
}
}
+
public void jmolColour_actionPerformed(ActionEvent actionEvent)
{
- if (jmolColour.isSelected()) {
+ if (jmolColour.isSelected())
+ {
// disable automatic sequence colouring.
jmb.setColourBySequence(false);
}
}
+
public void seqColour_actionPerformed(ActionEvent actionEvent)
{
jmb.setColourBySequence(seqColour.isSelected());
{
if (!jmb.isLoadingFromArchive())
{
- if (_colourwith.size()==0 && ap!=null) {
+ if (_colourwith.size() == 0 && ap != null)
+ {
// Make the currently displayed alignment panel the associated view
_colourwith.add(ap.alignFrame.alignPanel);
}
buriedColour.setSelected(true);
jmb.setJalviewColourScheme(new BuriedColourScheme());
}
-
+
public void purinePyrimidineColour_actionPerformed(ActionEvent actionEvent)
{
setJalviewColourScheme(new PurinePyrimidineColourScheme());
}
-
+
public void userColour_actionPerformed(ActionEvent actionEvent)
{
userColour.setSelected(true);
public boolean isColouredByJmol()
{
return !jmb.isColourBySequence();
- }
-
+ }
}
*/
private AppJmol appJmolWindow;
- public AppJmolBinding(AppJmol appJmol, StructureSelectionManager sSm, PDBEntry[] pdbentry,
- SequenceI[][] sequenceIs, String[][] chains, String protocol)
+ public AppJmolBinding(AppJmol appJmol, StructureSelectionManager sSm,
+ PDBEntry[] pdbentry, SequenceI[][] sequenceIs, String[][] chains,
+ String protocol)
{
super(sSm, pdbentry, sequenceIs, chains, protocol);
appJmolWindow = appJmol;
FeatureRenderer fr = null;
@Override
- public jalview.api.FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment)
+ public jalview.api.FeatureRenderer getFeatureRenderer(
+ AlignmentViewPanel alignment)
{
- AlignmentPanel ap = (alignment==null) ? appJmolWindow.ap : (AlignmentPanel) alignment;
+ AlignmentPanel ap = (alignment == null) ? appJmolWindow.ap
+ : (AlignmentPanel) alignment;
if (ap.av.showSequenceFeatures)
{
- if (fr==null)
+ if (fr == null)
+ {
+ fr = ap.cloneFeatureRenderer();
+ }
+ else
{
- fr=ap.cloneFeatureRenderer();
- } else {
ap.updateFeatureRenderer(fr);
}
}
}
@Override
- public jalview.api.SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment)
+ public jalview.api.SequenceRenderer getSequenceRenderer(
+ AlignmentViewPanel alignment)
{
- return new SequenceRenderer(((AlignmentPanel)alignment).av);
+ return new SequenceRenderer(((AlignmentPanel) alignment).av);
}
public void sendConsoleEcho(String strEcho)
public void updateColours(Object source)
{
- AlignmentPanel ap = (AlignmentPanel) source,topap;
+ AlignmentPanel ap = (AlignmentPanel) source, topap;
// ignore events from panels not used to colour this view
if (!appJmolWindow.isUsedforcolourby(ap))
return;
- if (!isLoadingFromArchive()) {
+ if (!isLoadingFromArchive())
+ {
colourBySequence(ap.av.getShowSequenceFeatures(), ap);
}
}
{
jmolpopup = new JmolPopup();
- jmolpopup.initialize(viewer, translateLocale, menuName,
- asPopup);
+ jmolpopup.initialize(viewer, translateLocale, menuName, asPopup);
}
public void selectionChanged(BitSet arg0)
@Override
public void releaseReferences(Object svl)
{
- if (svl instanceof SeqPanel) {
+ if (svl instanceof SeqPanel)
+ {
appJmolWindow.removeAlignmentPanel(((SeqPanel) svl).ap);
-
- };
+
+ }
+ ;
}
}
AlignmentPanel ap;
- public AppVarna(String sname, SequenceI seq, String strucseq, String struc,
- String name, AlignmentPanel ap)
+ public AppVarna(String sname, SequenceI seq, String strucseq,
+ String struc, String name, AlignmentPanel ap)
{
this.ap = ap;
ArrayList<RNA> rnaList = new ArrayList<RNA>();
{
e3.printStackTrace();
}
- RNA trim = trimRNA(rna1, "trimmed "+sname);
+ RNA trim = trimRNA(rna1, "trimmed " + sname);
rnaList.add(trim);
rnaList.add(rna1);
rnas.put(seq, rna1);
rnas.put(seq, trim);
- rna1.setName(sname+" (with gaps)");
+ rna1.setName(sname + " (with gaps)");
{
seqs.put(trim, seq);
vab = new AppVarnaBinding(rnaList);
// vab = new AppVarnaBinding(seq,struc);
// System.out.println("Hallo: "+name);
- this.name = sname+" trimmed to "+name;
+ this.name = sname + " trimmed to " + name;
initVarna();
ssm = ap.getStructureSelectionManager();
ssm.addStructureViewerListener(this);
ShiftList shift = offsets.get(rna);
if (shift != null)
{
- // System.err.print("Orig pos:"+index);
- index = shift.shift(index);
- // System.err.println("\nFinal pos:"+index);
+ // System.err.print("Orig pos:"+index);
+ index = shift.shift(index);
+ // System.err.println("\nFinal pos:"+index);
}
mouseOverHighlighter.highlightRegion(rna, index, index);
vab.updateSelectedRNA(rna);
if (shift != null)
{
int i = shift.shift(arg1.getIndex());
- // System.err.println("shifted "+(arg1.getIndex())+" to "+i);
+ // System.err.println("shifted "+(arg1.getIndex())+" to "+i);
ssm.mouseOverVamsasSequence(seq, i, this);
}
else
JLabel j = new JLabel("Structures Manager", JLabel.CENTER);
_listPanel.setLayout(new BorderLayout());
- //_listPanel.add(ops, BorderLayout.SOUTH);
+ // _listPanel.add(ops, BorderLayout.SOUTH);
_listPanel.add(j, BorderLayout.NORTH);
_listPanel.add(listScroller, BorderLayout.CENTER);
_rnaList.add(bck.config, bck.rna, bck.name, true);
} catch (ExceptionLoadingFailed e3)
{
- int mn=1;
- Collection<RNA> mdls=fr.orsay.lri.varna.factories.RNAFactory.loadSecStr(path);
- for (RNA r:mdls)
+ int mn = 1;
+ Collection<RNA> mdls = fr.orsay.lri.varna.factories.RNAFactory
+ .loadSecStr(path);
+ for (RNA r : mdls)
{
- r.drawRNA(vp.getConfig());
- String name = r.getName();
- if (name.equals(""))
- {
- name = path.substring(path
- .lastIndexOf(File.separatorChar) + 1);
- }
- if (mdls.size()>1)
- {
- name += " (Model "+mn+++")";
- }
- _rnaList.add(vp.getConfig().clone(), r, name, true);
+ r.drawRNA(vp.getConfig());
+ String name = r.getName();
+ if (name.equals(""))
+ {
+ name = path.substring(path
+ .lastIndexOf(File.separatorChar) + 1);
+ }
+ if (mdls.size() > 1)
+ {
+ name += " (Model " + mn++ + ")";
+ }
+ _rnaList.add(vp.getConfig().clone(), r, name, true);
}
}
}
/**
* GUI related routines for associating PDB files with sequences
+ *
* @author JimP
- *
+ *
*/
public class AssociatePdbFileWithSeq
{
-/**
- * assocate the given PDB file with
- * @param choice
- * @param sequence
- */
- public PDBEntry associatePdbWithSeq(String choice, String protocol, SequenceI sequence, boolean prompt)
+ /**
+ * assocate the given PDB file with
+ *
+ * @param choice
+ * @param sequence
+ */
+ public PDBEntry associatePdbWithSeq(String choice, String protocol,
+ SequenceI sequence, boolean prompt)
{
PDBEntry entry = new PDBEntry();
try
{
- MCview.PDBfile pdbfile = new MCview.PDBfile(choice,
- protocol);
+ MCview.PDBfile pdbfile = new MCview.PDBfile(choice, protocol);
if (pdbfile.id == null)
{
String reply = null;
-
- if (prompt) { reply = JOptionPane
- .showInternalInputDialog(
- Desktop.desktop,
- "Couldn't find a PDB id in the file supplied."
- + "Please enter an Id to identify this structure.",
- "No PDB Id in File", JOptionPane.QUESTION_MESSAGE);}
+
+ if (prompt)
+ {
+ reply = JOptionPane
+ .showInternalInputDialog(
+ Desktop.desktop,
+ "Couldn't find a PDB id in the file supplied."
+ + "Please enter an Id to identify this structure.",
+ "No PDB Id in File", JOptionPane.QUESTION_MESSAGE);
+ }
if (reply == null)
{
return null;
@Override
public void actionPerformed(ActionEvent arg0)
{
- if (xf!=null)
+ if (xf != null)
{
xf.dispose();
}
- xf=null;jd=null;
+ xf = null;
+ jd = null;
if (parent != null)
{
parent.showNews(false);
if (parent != null)
{
Cache.log.info("News window closed.");
- jd=null;
+ jd = null;
parent.showNews(false);
}
}
{
lastread.add(Calendar.MONTH, 1);
}
-
+
}
}
import jalview.jbgui.*;
/**
- * Cut'n'paste files into the desktop
- * See JAL-1105
+ * Cut'n'paste files into the desktop See JAL-1105
*
* @author $author$
* @version $Revision$
displaySource.setSelected(false);
textarea.addKeyListener(new KeyListener()
{
-
+
@Override
public void keyTyped(KeyEvent arg0)
{
- //if (arg0.isControlDown() && arg0.getKeyCode()==KeyEvent.VK_C)
- //{
- // copyItem_actionPerformed(null);
- //}
+ // if (arg0.isControlDown() && arg0.getKeyCode()==KeyEvent.VK_C)
+ // {
+ // copyItem_actionPerformed(null);
+ // }
arg0.consume();
}
-
+
@Override
public void keyReleased(KeyEvent arg0)
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
public void keyPressed(KeyEvent arg0)
{
// TODO Auto-generated method stub
-
+
}
});
textarea.setEditable(false);
textarea.addHyperlinkListener(new HyperlinkListener()
{
-
+
@Override
public void hyperlinkUpdate(HyperlinkEvent e)
{
{
return textarea.getText();
}
+
/**
* Set contents of HTML Display pane
*
- * @param text HTML text
+ * @param text
+ * HTML text
*/
public void setText(String text)
{
public void toggleHtml_actionPerformed(ActionEvent e)
{
- String txt=textarea.getText();
- textarea.setContentType(displaySource.isSelected() ? "text/text" : "text/html");
+ String txt = textarea.getText();
+ textarea.setContentType(displaySource.isSelected() ? "text/text"
+ : "text/html");
textarea.setText(txt);
}
+
/**
* DOCUMENT ME!
*
{
Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();
StringWriter sw = new StringWriter();
- try {
- textarea.getEditorKit().write(sw, textarea.getDocument(), textarea.getSelectionStart(), textarea.getSelectionEnd()-textarea.getSelectionStart());
- } catch (Exception x){};
- StringSelection ssel=new StringSelection(sw.getBuffer().toString());
- c.setContents(ssel,ssel);
+ try
+ {
+ textarea.getEditorKit().write(sw, textarea.getDocument(),
+ textarea.getSelectionStart(),
+ textarea.getSelectionEnd() - textarea.getSelectionStart());
+ } catch (Exception x)
+ {
+ }
+ ;
+ StringSelection ssel = new StringSelection(sw.getBuffer().toString());
+ c.setContents(ssel, ssel);
}
-
/**
* DOCUMENT ME!
*
import jalview.jbgui.*;
/**
- * Cut'n'paste files into the desktop
- * See JAL-1105
+ * Cut'n'paste files into the desktop See JAL-1105
*
* @author $author$
* @version $Revision$
text.append("<br>");\r
\r
text.append("<font color=\"#0000FF\">Coordinates:</font>");\r
- int i=1;\r
+ int i = 1;\r
for (COORDINATES dcs : latest.getCOORDINATES())\r
{\r
- text.append("<br/>"+i+++". ");\r
- text.append(dcs.getAuthority()+" : "+dcs.getSource());\r
+ text.append("<br/>" + i++ + ". ");\r
+ text.append(dcs.getAuthority() + " : " + dcs.getSource());\r
if (dcs.getTaxid() != null && dcs.getTaxid().trim().length() > 0)\r
{\r
- text.append(" [TaxId:" + dcs.getTaxid()+"]");\r
+ text.append(" [TaxId:" + dcs.getTaxid() + "]");\r
}\r
if (dcs.getVersion() != null\r
&& dcs.getVersion().trim().length() > 0)\r
{\r
{\r
- text.append(" {v. " + dcs.getVersion()+"}");\r
+ text.append(" {v. " + dcs.getVersion() + "}");\r
}\r
}\r
- text.append(" (<a href=\""+dcs.getUri() +"\">"+dcs.getUri() + "</a>)");\r
+ text.append(" (<a href=\"" + dcs.getUri() + "\">" + dcs.getUri()\r
+ + "</a>)");\r
}\r
text.append("</font></html>");\r
\r
{
/*
- JalviewDialog jd =new JalviewDialog() {
- @Override
- protected void cancelPressed()
- {
- // TODO Auto-generated method stub
-
- }@Override
- protected void okPressed()
- {
- // TODO Auto-generated method stub
-
- }@Override
- protected void raiseClosed()
- {
- // TODO Auto-generated method stub
-
- }
- };
- jd.initDialogFrame(new JLabel("<html><table width=\"450\"><tr><td>"
- + ermsg
- + "<br/>It may be that you have invalid JABA URLs in your web service preferences,"
- + " or mis-configured HTTP proxy settings.<br/>"
- + "Check the <em>Connections</em> and <em>Web services</em> tab of the"
- + " Tools->Preferences dialog box to change them.</td></tr></table></html>"), true, true, "Web Service Configuration Problem", 450, 400);
-
- jd.waitForInput();
- */
- JOptionPane.showConfirmDialog(
- Desktop.desktop,
- new JLabel("<html><table width=\"450\"><tr><td>"
- + ermsg+"</td></tr></table>"
- + "<p>It may be that you have invalid JABA URLs<br/>in your web service preferences,"
- + " or mis-configured HTTP proxy settings.</p>"
- + "<p>Check the <em>Connections</em> and <em>Web services</em> tab<br/>of the"
- + " Tools->Preferences dialog box to change them.</p></html>"), "Web Service Configuration Problem",
+ * JalviewDialog jd =new JalviewDialog() {
+ *
+ * @Override protected void cancelPressed() { // TODO
+ * Auto-generated method stub
+ *
+ * }@Override protected void okPressed() { // TODO
+ * Auto-generated method stub
+ *
+ * }@Override protected void raiseClosed() { // TODO
+ * Auto-generated method stub
+ *
+ * } }; jd.initDialogFrame(new
+ * JLabel("<html><table width=\"450\"><tr><td>" + ermsg +
+ * "<br/>It may be that you have invalid JABA URLs in your web service preferences,"
+ * + " or mis-configured HTTP proxy settings.<br/>" +
+ * "Check the <em>Connections</em> and <em>Web services</em> tab of the"
+ * +
+ * " Tools->Preferences dialog box to change them.</td></tr></table></html>"
+ * ), true, true, "Web Service Configuration Problem", 450,
+ * 400);
+ *
+ * jd.waitForInput();
+ */
+ JOptionPane
+ .showConfirmDialog(
+ Desktop.desktop,
+ new JLabel(
+ "<html><table width=\"450\"><tr><td>"
+ + ermsg
+ + "</td></tr></table>"
+ + "<p>It may be that you have invalid JABA URLs<br/>in your web service preferences,"
+ + " or mis-configured HTTP proxy settings.</p>"
+ + "<p>Check the <em>Connections</em> and <em>Web services</em> tab<br/>of the"
+ + " Tools->Preferences dialog box to change them.</p></html>"),
+ "Web Service Configuration Problem",
JOptionPane.DEFAULT_OPTION,
- JOptionPane.ERROR_MESSAGE);
+ JOptionPane.ERROR_MESSAGE);
serviceChangedDialog = null;
}
this.fr = frender;
this.type = type;
ap = fr.ap;
- initDialogFrame(this,true, block,"Graduated Feature Colour for " + type, 480, 185);
+ initDialogFrame(this, true, block, "Graduated Feature Colour for "
+ + type, 480, 185);
// frame.setLayer(JLayeredPane.PALETTE_LAYER);
// Desktop.addInternalFrame(frame, "Graduated Feature Colour for "+type,
// 480, 145);
changeColour();
}
-
public void cancelPressed()
{
reset();
FontMetrics fm;
int charOffset;
-
+
Map featureColours = new ConcurrentHashMap();
// A higher level for grouping features of a
this.featureColours = frs.featureColours;
this.transparency = frs.transparency;
this.featureOrder = frs.featureOrder;
- if (av != null && av!=fr.av)
+ if (av != null && av != fr.av)
{
// copy over the displayed feature settings
if (fr.av != null)
}
}
}
- }
+ }
}
BufferedImage offscreenImage;
* This is used by the Molecule Viewer and Overview to get the accurate
* colourof the rendered sequence
*/
- public synchronized int findFeatureColour(int initialCol, SequenceI seq, int column)
+ public synchronized int findFeatureColour(int initialCol, SequenceI seq,
+ int column)
{
if (!av.showSequenceFeatures)
{
}
currentColour = null;
- // TODO: non-threadsafe - each rendering thread needs its own instance of the feature renderer - or this should be synchronized.
+ // TODO: non-threadsafe - each rendering thread needs its own instance of
+ // the feature renderer - or this should be synchronized.
offscreenRender = true;
if (offscreenImage != null)
{
minmax = new Hashtable();
}
- AlignmentI alignment=av.getAlignment();
+ AlignmentI alignment = av.getAlignment();
for (int i = 0; i < alignment.getHeight(); i++)
{
SequenceFeature[] features = alignment.getSequenceAt(i)
String group;
for (int i = 0; i < af.getViewport().getAlignment().getHeight(); i++)
{
- if (af.getViewport().getAlignment().getSequenceAt(i).getDatasetSequence()
- .getSequenceFeatures() == null)
+ if (af.getViewport().getAlignment().getSequenceAt(i)
+ .getDatasetSequence().getSequenceFeatures() == null)
{
continue;
}
public void fetchDasFeatures(Vector sources, boolean block)
{
initDasSources();
- List<jalviewSourceI> resolved = dassourceBrowser.sourceRegistry.resolveSourceNicknames(sources);
+ List<jalviewSourceI> resolved = dassourceBrowser.sourceRegistry
+ .resolveSourceNicknames(sources);
if (resolved.size() == 0)
{
resolved = dassourceBrowser.getSelectedSources();
}
}
- private Font lastSelected=null;
- private int lastSelStyle=0;
- private int lastSelSize=0;
- private boolean lastSelMono=false;
+ private Font lastSelected = null;
+
+ private int lastSelStyle = 0;
+
+ private int lastSelSize = 0;
+
+ private boolean lastSelMono = false;
+
/**
* DOCUMENT ME!
*/
void changeFont()
{
- if (lastSelected==null)
+ if (lastSelected == null)
{
// initialise with original font
- lastSelected=oldFont;
- lastSelSize=oldFont.getSize();
- lastSelStyle=oldFont.getStyle();
+ lastSelected = oldFont;
+ lastSelSize = oldFont.getSize();
+ lastSelStyle = oldFont.getStyle();
FontMetrics fm = getGraphics().getFontMetrics(oldFont);
- double mw=fm.getStringBounds("M", getGraphics())
- .getWidth(),iw=fm.getStringBounds("I", getGraphics())
- .getWidth();
- lastSelMono=mw==iw;
+ double mw = fm.getStringBounds("M", getGraphics()).getWidth(), iw = fm
+ .getStringBounds("I", getGraphics()).getWidth();
+ lastSelMono = mw == iw;
}
-
+
Font newFont = new Font(fontName.getSelectedItem().toString(),
fontStyle.getSelectedIndex(), Integer.parseInt(fontSize
.getSelectedItem().toString()));
FontMetrics fm = getGraphics().getFontMetrics(newFont);
- double mw=fm.getStringBounds("M", getGraphics())
- .getWidth(),iw=fm.getStringBounds("I", getGraphics())
- .getWidth();
- if (mw<1 || iw < 1) {
+ double mw = fm.getStringBounds("M", getGraphics()).getWidth(), iw = fm
+ .getStringBounds("I", getGraphics()).getWidth();
+ if (mw < 1 || iw < 1)
+ {
fontName.setSelectedItem(lastSelected.getName());
fontStyle.setSelectedIndex(lastSelStyle);
- fontSize.setSelectedItem(""+lastSelSize);
+ fontSize.setSelectedItem("" + lastSelSize);
monospaced.setSelected(lastSelMono);
- JOptionPane.showInternalMessageDialog(this, "Font doesn't have letters defined\nso cannot be used\nwith alignment data.", "Invalid Font", JOptionPane.WARNING_MESSAGE);
+ JOptionPane
+ .showInternalMessageDialog(
+ this,
+ "Font doesn't have letters defined\nso cannot be used\nwith alignment data.",
+ "Invalid Font", JOptionPane.WARNING_MESSAGE);
return;
}
if (tp != null)
ap.fontChanged();
}
-
- monospaced.setSelected(mw==iw);
+ monospaced.setSelected(mw == iw);
// remember last selected
- lastSelected=newFont;
+ lastSelected = newFont;
}
/**
*/\r
public abstract void registerHandler(long id,\r
IProgressIndicatorHandler handler);\r
+\r
/**\r
- *\r
- * @return true if any progress bars are still active\r
- */\r
+ * \r
+ * @return true if any progress bars are still active\r
+ */\r
boolean operationInProgress();\r
\r
}\r
/**
* DOCUMENT ME!
- *
+ *
* @author $author$
* @version $Revision$
*/
int lastid = -1;
boolean mouseDragging = false;
+
private final SequenceAnnotationReport seqAnnotReport;
/**
* Creates a new IdPanel object.
- *
+ *
* @param av
* DOCUMENT ME!
* @param parent
addMouseWheelListener(this);
ToolTipManager.sharedInstance().registerComponent(this);
}
+
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
{
SequenceI sequence = av.getAlignment().getSequenceAt(seq);
StringBuffer tip = new StringBuffer();
- seqAnnotReport.createSequenceAnnotationReport(tip, sequence,
- av.isShowDbRefs(), av.isShowNpFeats(),
- sp.seqCanvas.fr.minmax);
+ seqAnnotReport
+ .createSequenceAnnotationReport(tip, sequence,
+ av.isShowDbRefs(), av.isShowNpFeats(),
+ sp.seqCanvas.fr.minmax);
setToolTipText("<html>" + sequence.getDisplayId(true) + " "
- + tip.toString()+"</html>");
+ + tip.toString() + "</html>");
}
}
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
if (e.isShiftDown())
{
alignPanel.scrollRight(true);
-
- } else {
+
+ }
+ else
+ {
alignPanel.scrollUp(false);
}
}
if (e.isShiftDown())
{
alignPanel.scrollRight(false);
- } else {
+ }
+ else
+ {
alignPanel.scrollUp(true);
}
}
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
// build a new links menu based on the current links + any non-positional
// features
Vector nlinks = new Vector(Preferences.sequenceURLLinks);
- SequenceFeature sf[] = sq==null ? null : sq.getDatasetSequence().getSequenceFeatures();
+ SequenceFeature sf[] = sq == null ? null : sq.getDatasetSequence()
+ .getSequenceFeatures();
for (int sl = 0; sf != null && sl < sf.length; sl++)
{
if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0)
/**
* DOCUMENT ME!
- *
+ *
* @param seq
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param start
* DOCUMENT ME!
* @param end
for (int i = start; i <= end; i++)
{
av.getSelectionGroup().addSequence(
- av.getAlignment().getSequenceAt(i), i==end);
+ av.getAlignment().getSequenceAt(i), i == end);
}
}
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param list
* DOCUMENT ME!
*/
Hashtable<String, DefaultMutableTreeNode> source = new Hashtable<String, DefaultMutableTreeNode>();
sfetcher = sfetch;
String dbs[] = sfetch.getSupportedDb();
- Hashtable<String,String> ht = new Hashtable<String,String>();
+ Hashtable<String, String> ht = new Hashtable<String, String>();
for (int i = 0; i < dbs.length; i++)
{
tn = source.get(dbs[i]);
private void sortTreeNodes(DefaultMutableTreeNode root)
{
- if (root.getChildCount()==0)
+ if (root.getChildCount() == 0)
{
return;
}
- int count=root.getChildCount();
- String[] names=new String[count];
- DefaultMutableTreeNode[] nodes=new DefaultMutableTreeNode[count];
- for (int i=0;i<count;i++)
+ int count = root.getChildCount();
+ String[] names = new String[count];
+ DefaultMutableTreeNode[] nodes = new DefaultMutableTreeNode[count];
+ for (int i = 0; i < count; i++)
{
TreeNode node = root.getChildAt(i);
if (node instanceof DefaultMutableTreeNode)
{
- DefaultMutableTreeNode child=(DefaultMutableTreeNode) node;
- nodes[i]=child;
- if (child.getUserObject() instanceof DbSourceProxy) {
- names[i]=((DbSourceProxy)child.getUserObject()).getDbName().toLowerCase();
- } else {
+ DefaultMutableTreeNode child = (DefaultMutableTreeNode) node;
+ nodes[i] = child;
+ if (child.getUserObject() instanceof DbSourceProxy)
+ {
+ names[i] = ((DbSourceProxy) child.getUserObject()).getDbName()
+ .toLowerCase();
+ }
+ else
+ {
names[i] = ((String) child.getUserObject()).toLowerCase();
sortTreeNodes(child);
}
- } else {
- throw new Error("Implementation Error: Can't reorder this tree. Not DefaultMutableTreeNode.");
+ }
+ else
+ {
+ throw new Error(
+ "Implementation Error: Can't reorder this tree. Not DefaultMutableTreeNode.");
}
}
- jalview.util.QuickSort.sort(names, nodes);
+ jalview.util.QuickSort.sort(names, nodes);
root.removeAllChildren();
- for (int i=count-1;i>=0;i--)
+ for (int i = count - 1; i >= 0; i--)
{
root.add(nodes[i]);
}
/**
* Write out the current jalview desktop state as a Jalview XML stream.
- *
+ *
* Note: the vamsas objects referred to here are primitive versions of the
* VAMSAS project schema elements - they are not the same and most likely never
* will be :)
- *
+ *
* @author $author$
* @version $Revision: 1.134 $
*/
{
/**
* create/return unique hash string for sq
- *
+ *
* @param sq
* @return new or existing unique string for sq
*/
/**
* Writes a jalview project archive to the given Jar output stream.
- *
+ *
* @param jout
*/
public void SaveState(JarOutputStream jout)
/**
* create a JalviewModel from an algnment view and marshall it to a
* JarOutputStream
- *
+ *
* @param ap
* panel to create jalview model for
* @param fileName
}
JSeq jseq;
- Set<String> calcIdSet=new HashSet<String>();
+ Set<String> calcIdSet = new HashSet<String>();
// SAVE SEQUENCES
String id = "";
// Construct new annotation from model.
AnnotationElement[] ae = an[i].getAnnotationElement();
jalview.datamodel.Annotation[] anot = null;
- java.awt.Color firstColour=null;
+ java.awt.Color firstColour = null;
int anpos;
if (!an[i].getScoreOnly())
{
// {
// anot[ae[aa].getPosition()].displayCharacter = "";
// }
- anot[anpos].colour = new java.awt.Color(
- ae[aa].getColour());
- if (firstColour==null)
+ anot[anpos].colour = new java.awt.Color(ae[aa].getColour());
+ if (firstColour == null)
{
- firstColour=anot[anpos].colour;
+ firstColour = anot[anpos].colour;
}
}
}
an[i].getGraphType());
jaa.graphGroup = an[i].getGraphGroup();
- jaa._linecolour=firstColour;
+ jaa._linecolour = firstColour;
if (an[i].getThresholdLine() != null)
{
jaa.setThreshold(new jalview.datamodel.GraphLine(an[i]
{
jaa = new jalview.datamodel.AlignmentAnnotation(an[i].getLabel(),
an[i].getDescription(), anot);
- jaa._linecolour=firstColour;
+ jaa._linecolour = firstColour;
}
// register new annotation
if (an[i].getId() != null)
if (view.hasNormaliseSequenceLogo())
{
af.viewport.setNormaliseSequenceLogo(view.getNormaliseSequenceLogo());
- }
+ }
if (view.hasShowDbRefTooltip())
{
af.viewport.setShowDbRefs(view.getShowDbRefTooltip());
/**
* TODO remove this method
- *
+ *
* @param view
* @return AlignFrame bound to sequenceSetId from view, if one exists. private
* AlignFrame getSkippedFrame(Viewport view) { if (skipList==null) {
/**
* Check if the Jalview view contained in object should be skipped or not.
- *
+ *
* @param object
* @return true if view's sequenceSetId is a key in skipList
*/
}
/**
- *
+ *
* @param vamsasSeq
* sequence definition to create/merge dataset sequence for
* @param ds
/**
* make a new dataset ID for this jalview dataset alignment
- *
+ *
* @param dataset
* @return
*/
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#finalize()
*/
@Override
* finalize and clearSeqRefs will not clear the tables when the Jalview2XML
* object goes out of scope. - also populates the datasetIds hashtable with
* alignment objects containing dataset sequences
- *
+ *
* @param vobj2jv
* Map from ID strings to jalview datamodel
* @param jv2vobj
* Map from jalview datamodel to ID strings
- *
- *
+ *
+ *
*/
public void setObjectMappingTables(Hashtable vobj2jv,
IdentityHashMap jv2vobj)
* set the uniqueSetSuffix used to prefix/suffix object IDs for jalview
* objects created from the project archive. If string is null (default for
* construction) then suffix will be set automatically.
- *
+ *
* @param string
*/
public void setUniqueSetSuffix(String string)
/**
* uses skipList2 as the skipList for skipping views on sequence sets
* associated with keys in the skipList
- *
+ *
* @param skipList2
*/
public void setSkipList(Hashtable skipList2)
\r
for (int i = 0; i < JSEQ.length; i++)\r
{\r
- af.viewport.setSequenceColour(af.viewport.getAlignment().getSequenceAt(i),\r
- new java.awt.Color(JSEQ[i].getColour()));\r
+ af.viewport.setSequenceColour(af.viewport.getAlignment()\r
+ .getSequenceAt(i), new java.awt.Color(JSEQ[i].getColour()));\r
}\r
\r
// af.changeColour() );\r
/**
* change listeners are notified of changes to resources so they can update
- * their state. E.g. - the 'services' property notifies when the available
- * set of web service endpoints have changed.
+ * their state. E.g. - the 'services' property notifies when the available set
+ * of web service endpoints have changed.
*/
private java.beans.PropertyChangeSupport changeSupport = new java.beans.PropertyChangeSupport(
this);
*
* @param newValue
*
- * @see
- * java.beans.PropertyChangeSupport#firePropertyChange(java.lang.String,
+ * @see java.beans.PropertyChangeSupport#firePropertyChange(java.lang.String,
* java.lang.Object, java.lang.Object) public void firePropertyChange(String
* propertyName, Object oldValue, Object newValue) {
* changeSupport.firePropertyChange(propertyName, oldValue, newValue); }
import javax.swing.JPanel;
/**
- * Boilerplate dialog class. Implements basic functionality necessary for model blocking/non-blocking dialogs
- * with an OK and Cancel button ready to add to the content pane.
+ * Boilerplate dialog class. Implements basic functionality necessary for model
+ * blocking/non-blocking dialogs with an OK and Cancel button ready to add to
+ * the content pane.
+ *
* @author jimp
- *
+ *
*/
public abstract class JalviewDialog extends JPanel
{
protected JDialog frame;
+
protected JButton ok = new JButton();
+
protected JButton cancel = new JButton();
- boolean block=false;
-
+
+ boolean block = false;
+
public void waitForInput()
{
if (!block)
}
}
- protected void initDialogFrame(Container content,
- boolean modal, boolean block, String title, int width, int height)
+ protected void initDialogFrame(Container content, boolean modal,
+ boolean block, String title, int width, int height)
{
-
+
frame = new JDialog(Desktop.instance, modal);
frame.setTitle(title);
- if (Desktop.instance!=null)
+ if (Desktop.instance != null)
+ {
+ Rectangle deskr = Desktop.instance.getBounds();
+ frame.setBounds(new Rectangle((int) (deskr.getCenterX() - width / 2),
+ (int) (deskr.getCenterY() - height / 2), width, height));
+ }
+ else
{
- Rectangle deskr = Desktop.instance.getBounds();
- frame.setBounds(new Rectangle((int) (deskr.getCenterX() - width/2),
- (int) (deskr.getCenterY() - height/2), width, height));
- } else {
- frame.setSize(width,height);
+ frame.setSize(width, height);
}
frame.setContentPane(content);
this.block = block;
-
+
ok.setOpaque(false);
ok.setText("OK");
ok.addActionListener(new ActionListener()
});
frame.addWindowListener(new WindowListener()
{
-
+
@Override
public void windowOpened(WindowEvent e)
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
public void windowIconified(WindowEvent e)
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
public void windowDeiconified(WindowEvent e)
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
public void windowDeactivated(WindowEvent e)
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
public void windowClosing(WindowEvent e)
{
// user has cancelled the dialog
closeDialog();
}
-
+
@Override
public void windowClosed(WindowEvent e)
{
}
-
+
@Override
public void windowActivated(WindowEvent e)
{
// TODO Auto-generated method stub
-
+
}
});
}
+
/**
* clean up and raise the 'dialog closed' event by calling raiseClosed
*/
{
}
}
-
+
protected abstract void raiseClosed();
+
protected abstract void okPressed();
+
protected abstract void cancelPressed();
-
+
}
menu.add(submenuinstance);
}
return submenuinstance;
-
+
}
/**
* @param tooltip
* @param label
* @param valBox
- * @return the GUI element created that was added to the layout so it's attributes can be changed.
+ * @return the GUI element created that was added to the layout so it's
+ * attributes can be changed.
*/
- public static JPanel addtoLayout(JPanel panel, String tooltip, JComponent label, JComponent valBox)
+ public static JPanel addtoLayout(JPanel panel, String tooltip,
+ JComponent label, JComponent valBox)
{
- JPanel laypanel = new JPanel(),labPanel=new JPanel(), valPanel=new JPanel();
+ JPanel laypanel = new JPanel(), labPanel = new JPanel(), valPanel = new JPanel();
// laypanel.setSize(panel.getPreferredSize());
// laypanel.setLayout(null);
labPanel.setBounds(new Rectangle(7, 7, 158, 23));
- valPanel.setBounds(new Rectangle(172, 7, 270,23));
- //labPanel.setLayout(new GridLayout(1,1));
- //valPanel.setLayout(new GridLayout(1,1));
+ valPanel.setBounds(new Rectangle(172, 7, 270, 23));
+ // labPanel.setLayout(new GridLayout(1,1));
+ // valPanel.setLayout(new GridLayout(1,1));
labPanel.add(label);
valPanel.add(valBox);
laypanel.add(labPanel);
public static void mgAddtoLayout(JPanel cpanel, String tooltip,
JLabel jLabel, JComponent name)
{
- mgAddtoLayout(cpanel, tooltip, jLabel, name,null);
+ mgAddtoLayout(cpanel, tooltip, jLabel, name, null);
}
+
public static void mgAddtoLayout(JPanel cpanel, String tooltip,
JLabel jLabel, JComponent name, String params)
{
cpanel.add(jLabel);
- if (params==null) {
+ if (params == null)
+ {
cpanel.add(name);
- } else {cpanel.add(name, params);
+ }
+ else
+ {
+ cpanel.add(name, params);
}
name.setToolTipText(tooltip);
jLabel.setToolTipText(tooltip);
}
/**
- * standard font for labels and check boxes in dialog boxes
+ * standard font for labels and check boxes in dialog boxes
+ *
* @return
*/
public static Font getLabelFont()
{
- return getLabelFont(false,false);
+ return getLabelFont(false, false);
}
+
public static Font getLabelFont(boolean bold, boolean italic)
{
- return new java.awt.Font("Verdana", (!bold && !italic) ? Font.PLAIN : (bold ? Font.BOLD : 0) + (italic ? Font.ITALIC : 0), 11);
+ return new java.awt.Font("Verdana", (!bold && !italic) ? Font.PLAIN
+ : (bold ? Font.BOLD : 0) + (italic ? Font.ITALIC : 0), 11);
}
/**
* standard font for editable text areas
+ *
* @return
*/
public static Font getTextAreaFont()
{
- return getLabelFont(false,false);
+ return getLabelFont(false, false);
}
/**
- * clean up a swing menu.
- * Removes any empty submenus without selection listeners.
+ * clean up a swing menu. Removes any empty submenus without selection
+ * listeners.
+ *
* @param webService
*/
public static void cleanMenu(JMenu webService)
{
- for (int i=0;i<webService.getItemCount(); )
+ for (int i = 0; i < webService.getItemCount();)
{
JMenuItem item = webService.getItem(i);
- if (item instanceof JMenu && ((JMenu)item).getItemCount()==0)
+ if (item instanceof JMenu && ((JMenu) item).getItemCount() == 0)
{
webService.remove(i);
- } else {
+ }
+ else
+ {
i++;
}
}
}
else
{
- notmod &= (initVal!=null) ? initVal.equals(val.getSelectedItem()) : val.getSelectedItem()!=initVal;
+ notmod &= (initVal != null) ? initVal.equals(val.getSelectedItem())
+ : val.getSelectedItem() != initVal;
}
poparent.argSetModified(this, !notmod);
}
return null;
}
OptionI opt = option.copy();
- if (opt.getPossibleValues()!=null && opt.getPossibleValues().size()==1)
+ if (opt.getPossibleValues() != null
+ && opt.getPossibleValues().size() == 1)
{
- // Hack to make sure the default value for an enabled option with only one value is actually returned
+ // Hack to make sure the default value for an enabled option with only
+ // one value is actually returned
opt.setValue(opt.getPossibleValues().get(0));
}
if (val.getSelectedItem() != null)
{
opt.setValue((String) val.getSelectedItem());
- } else {
- if (option.getValue()!=null)
+ }
+ else
+ {
+ if (option.getValue() != null)
{
opt.setValue(option.getValue());
}
}
else
{
- initVal = (initEnabled) ? (String)val.getSelectedItem() : null;
+ initVal = (initEnabled) ? (String) val.getSelectedItem() : null;
}
}
choice = true;
}
}
-
+
if (!compact)
{
makeExpanderParam(parm);
private void makeCompactParam(ParameterI parm)
{
- setLayout(new MigLayout("","[][grow]"));
+ setLayout(new MigLayout("", "[][grow]"));
- String ttipText=null;
+ String ttipText = null;
controlPanel.setLayout(new BorderLayout());
{
// Only create description boxes if there actually is a description.
ttipText = ("<html>"
- + JvSwingUtils
- .wrapTooltip(parm.getDescription()+(finfo!=null ?"<br><img src=\""
- + linkImageURL
- + "\"/> Right click for further information.":""))
- + "</html>");
+ + JvSwingUtils
+ .wrapTooltip(parm.getDescription()
+ + (finfo != null ? "<br><img src=\""
+ + linkImageURL
+ + "\"/> Right click for further information."
+ : "")) + "</html>");
}
-
- JvSwingUtils.mgAddtoLayout(this, ttipText, new JLabel(parm.getName()),controlPanel, "");
+
+ JvSwingUtils.mgAddtoLayout(this, ttipText,
+ new JLabel(parm.getName()), controlPanel, "");
updateControls(parm);
validate();
}
valueField.addActionListener(this);
valueField.addKeyListener(new KeyListener()
{
-
+
@Override
public void keyTyped(KeyEvent e)
{
}
-
+
@Override
public void keyReleased(KeyEvent e)
{
- if (valueField.getText().trim().length()>0)
- {
+ if (valueField.getText().trim().length() > 0)
+ {
actionPerformed(null);
- }
+ }
}
-
+
@Override
public void keyPressed(KeyEvent e)
{
}
;
// update value field to reflect any bound checking we performed.
- valueField.setText(""+iVal);
+ valueField.setText("" + iVal);
if (validator.getMin() != null && validator.getMax() != null)
{
slider.getModel().setRangeProperties(iVal, 1,
// TODO: provide visual indication that hard limit was reached for
// this parameter
// update value field to reflect any bound checking we performed.
- valueField.setText(""+fVal);
+ valueField.setText("" + fVal);
}
if (validator.getMax() != null
&& validator.getMax().floatValue() < fVal)
// TODO: provide visual indication that hard limit was reached for
// this parameter
// update value field to reflect any bound checking we performed.
- valueField.setText(""+fVal);
+ valueField.setText("" + fVal);
}
} catch (Exception e)
{
public OptsAndParamsPage(OptsParametersContainerI paramContainer)
{
- this(paramContainer,false);
+ this(paramContainer, false);
}
- public OptsAndParamsPage(OptsParametersContainerI paramContainer, boolean compact)
+
+ public OptsAndParamsPage(OptsParametersContainerI paramContainer,
+ boolean compact)
{
poparent = paramContainer;
- this.compact=compact;
+ this.compact = compact;
}
public static void showUrlPopUp(JComponent invoker, final String finfo,
/**
* DOCUMENT ME!
- *
+ *
* @author $author$
* @version $Revision$
*/
AlignmentPanel ap;
final AnnotationRenderer renderer = new AnnotationRenderer();
+
float scalew = 1f;
float scaleh = 1f;
/**
* Creates a new OverviewPanel object.
- *
+ *
* @param ap
* DOCUMENT ME!
*/
float initialScale = (float) av.getAlignment().getWidth()
/ (float) av.getAlignment().getHeight();
- if (av.getAlignmentConservationAnnotation()== null)
+ if (av.getAlignmentConservationAnnotation() == null)
{
graphHeight = 0;
}
if (av.hasHiddenRows())
{
- row = av.getAlignment().getHiddenSequences().findIndexWithoutHiddenSeqs(
- row);
+ row = av.getAlignment().getHiddenSequences()
+ .findIndexWithoutHiddenSeqs(row);
}
ap.setScrollValues(col, row);
hiddenRow = false;
if (av.hasHiddenRows())
{
- seq = av.getAlignment().getHiddenSequences().getHiddenSequence(lastrow);
+ seq = av.getAlignment().getHiddenSequences()
+ .getHiddenSequence(lastrow);
if (seq == null)
{
int index = av.getAlignment().getHiddenSequences()
}
}
- if (av.getAlignmentConservationAnnotation()!= null)
+ if (av.getAlignmentConservationAnnotation() != null)
{
renderer.updateFromAlignViewport(av);
for (col = 0; col < width; col++)
lastcol = (int) (col * sampleCol);
{
mg.translate(col, sequencesHeight);
- renderer.drawGraph(mg, av.getAlignmentConservationAnnotation(),av.getAlignmentConservationAnnotation().annotations,
+ renderer.drawGraph(mg, av.getAlignmentConservationAnnotation(),
+ av.getAlignmentConservationAnnotation().annotations,
(int) (sampleCol) + 1, graphHeight,
(int) (col * sampleCol), (int) (col * sampleCol) + 1);
mg.translate(-col, -sequencesHeight);
{
int fullsizeWidth = av.getAlignment().getWidth() * av.getCharWidth();
int fullsizeHeight = (av.getAlignment().getHeight() + av.getAlignment()
- .getHiddenSequences().getSize()) * av.getCharHeight();
+ .getHiddenSequences().getSize())
+ * av.getCharHeight();
int startRes = av.getStartRes();
int endRes = av.getEndRes();
if (av.hasHiddenRows())
{
- startSeq = av.getAlignment().getHiddenSequences().adjustForHiddenSeqs(
- startSeq);
+ startSeq = av.getAlignment().getHiddenSequences()
+ .adjustForHiddenSeqs(startSeq);
endSeq = av.getAlignment().getHiddenSequences()
.adjustForHiddenSeqs(endSeq);
/**
* DOCUMENT ME!
- *
+ *
* @param g
* DOCUMENT ME!
*/
this.ap = ap;
boolean sameLength = true;
- boolean selected=av.getSelectionGroup()!=null && av.getSelectionGroup().getSize()>0;
- AlignmentView seqstrings = av
- .getAlignmentView(selected);
+ boolean selected = av.getSelectionGroup() != null
+ && av.getSelectionGroup().getSize() > 0;
+ AlignmentView seqstrings = av.getAlignmentView(selected);
boolean nucleotide = av.getAlignment().isNucleotide();
SequenceI[] seqs;
if (!selected)
/**
* DOCUMENT ME!
- *
+ *
* @author $author$
* @version $Revision$
*/
/**
* DOCUMENT ME!
- *
+ *
* @param comp
* DOCUMENT ME!
* @param al
{
if (i < comp.getHeight())
{
- // TODO: the following does not trigger any recalculation of height/etc, or maintain the dataset
- if (comp.getDataset()!=source.getDataset())
+ // TODO: the following does not trigger any recalculation of
+ // height/etc, or maintain the dataset
+ if (comp.getDataset() != source.getDataset())
{
- // raise an implementation warning here - not sure if this situation will ever occur
- System.err.println("IMPLEMENTATION PROBLEM: DATASET out of sync due to an insert whilst calling PaintRefresher.validateSequences(AlignmentI, ALignmentI)");
+ // raise an implementation warning here - not sure if this situation
+ // will ever occur
+ System.err
+ .println("IMPLEMENTATION PROBLEM: DATASET out of sync due to an insert whilst calling PaintRefresher.validateSequences(AlignmentI, ALignmentI)");
}
List<SequenceI> alsq;
- synchronized (alsq=comp.getSequences()) {
+ synchronized (alsq = comp.getSequences())
+ {
alsq.add(i, a1[i]);
}
}
static AlignmentPanel[] getAssociatedPanels(String id)
{
- if (components==null) { return new AlignmentPanel[0]; };
+ if (components == null)
+ {
+ return new AlignmentPanel[0];
+ }
+ ;
Vector comps = (Vector) components.get(id);
- if (comps==null) { return new AlignmentPanel[0]; };
+ if (comps == null)
+ {
+ return new AlignmentPanel[0];
+ }
+ ;
Vector tmp = new Vector();
int i, iSize = comps.size();
for (i = 0; i < iSize; i++)
JMenu sequenceMenu = new JMenu();
JMenuItem sequenceName = new JMenuItem();
-
+
JMenuItem sequenceDetails = new JMenuItem();
+
JMenuItem sequenceSelDetails = new JMenuItem();
SequenceI sequence;
* @param links
* @param groupLinks
*/
- public PopupMenu(final AlignmentPanel ap, final SequenceI seq, Vector links,
- Vector groupLinks)
+ public PopupMenu(final AlignmentPanel ap, final SequenceI seq,
+ Vector links, Vector groupLinks)
{
// /////////////////////////////////////////////////////////
// If this is activated from the sequence panel, the user may want to
{
public void actionPerformed(ActionEvent e)
{
- // TODO re JAL-860: optionally open dialog or provide a menu entry allowing user to open just one structure per sequence
- new AppJmol(pdb, ap.av.collateForPDB(new PDBEntry[] { pdb })[0], null, ap);
+ // TODO re JAL-860: optionally open dialog or provide a menu entry
+ // allowing user to open just one structure per sequence
+ new AppJmol(pdb, ap.av.collateForPDB(new PDBEntry[]
+ { pdb })[0], null, ap);
// new PDBViewer(pdb, seqs2, null, ap, AppletFormatAdapter.FILE);
}
{
if (ap.av.getAlignment().isNucleotide() == false)
{
- structureMenu.remove(viewStructureMenu);
+ structureMenu.remove(viewStructureMenu);
}
// structureMenu.remove(colStructureMenu);
}
if (ap.av.getAlignment().isNucleotide() == true)
{
- AlignmentAnnotation[] aa = ap.av.getAlignment().getAlignmentAnnotation();
+ AlignmentAnnotation[] aa = ap.av.getAlignment()
+ .getAlignmentAnnotation();
for (int i = 0; i < aa.length; i++)
{
if (aa[i].getRNAStruc() != null)
{
final String rnastruc = aa[i].getRNAStruc();
- final String structureLine=aa[i].label;
+ final String structureLine = aa[i].label;
menuItem = new JMenuItem();
- menuItem.setText("2D RNA "+structureLine);
+ menuItem.setText("2D RNA " + structureLine);
menuItem.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
- new AppVarna(structureLine, seq, seq.getSequenceAsString(), rnastruc, seq
- .getName(), ap);
+ new AppVarna(structureLine, seq, seq.getSequenceAsString(),
+ rnastruc, seq.getName(), ap);
}
});
viewStructureMenu.add(menuItem);
if (seqAnno[i].getRNAStruc() != null)
{
final String rnastruc = seqAnno[i].getRNAStruc();
-
- // TODO: make rnastrucF a bit more nice
+
+ // TODO: make rnastrucF a bit more nice
menuItem = new JMenuItem();
- menuItem.setText("2D RNA - "+seq.getName());
+ menuItem.setText("2D RNA - " + seq.getName());
menuItem.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
// TODO: VARNA does'nt print gaps in the sequence
- new AppVarna(seq.getName()+" structure",seq,seq.getSequenceAsString(), rnastruc, seq
- .getName(), ap);
+ new AppVarna(seq.getName() + " structure", seq, seq
+ .getSequenceAsString(), rnastruc, seq.getName(),
+ ap);
}
});
viewStructureMenu.add(menuItem);
}
}
-
}
menuItem = new JMenuItem("Hide Sequences");
}
}
// for the case when no sequences are even visible
- if (ap.av.hasHiddenRows()) {
+ if (ap.av.hasHiddenRows())
+ {
{
menuItem = new JMenuItem("Reveal All");
menuItem.addActionListener(new ActionListener()
SequenceGroup sg = ap.av.getSelectionGroup();
- if (sg != null&& sg.getSize()>0)
+ if (sg != null && sg.getSize() > 0)
{
- groupName.setText("Name: "+sg.getName());
+ groupName.setText("Name: " + sg.getName());
groupName.setText("Edit name and description of current group.");
if (sg.cs instanceof ZappoColourScheme)
buildGroupURLMenu(sg, groupLinks);
}
// Add a 'show all structures' for the current selection
- Hashtable<String, PDBEntry> pdbe=new Hashtable<String,PDBEntry>();
- SequenceI sqass=null;
- for (SequenceI sq: ap.av.getSequenceSelection())
+ Hashtable<String, PDBEntry> pdbe = new Hashtable<String, PDBEntry>();
+ SequenceI sqass = null;
+ for (SequenceI sq : ap.av.getSequenceSelection())
{
- Vector<PDBEntry> pes = (Vector<PDBEntry>) sq.getDatasetSequence().getPDBId();
- if (pes!=null) {
- for (PDBEntry pe: pes)
+ Vector<PDBEntry> pes = (Vector<PDBEntry>) sq.getDatasetSequence()
+ .getPDBId();
+ if (pes != null)
+ {
+ for (PDBEntry pe : pes)
{
- pdbe.put(pe.getId(), pe);
- if (sqass==null)
+ pdbe.put(pe.getId(), pe);
+ if (sqass == null)
{
sqass = sq;
}
}
}
}
- if (pdbe.size()>0)
+ if (pdbe.size() > 0)
{
- final PDBEntry[] pe = pdbe.values().toArray(new PDBEntry[pdbe.size()]);
+ final PDBEntry[] pe = pdbe.values().toArray(
+ new PDBEntry[pdbe.size()]);
final JMenuItem gpdbview;
- if (pdbe.size()==1)
+ if (pdbe.size() == 1)
{
- structureMenu.add(gpdbview=new JMenuItem("View structure for "+sqass.getDisplayId(false)));
- } else {
- structureMenu.add(gpdbview=new JMenuItem("View all "+pdbe.size()+" structures."));
+ structureMenu.add(gpdbview = new JMenuItem("View structure for "
+ + sqass.getDisplayId(false)));
+ }
+ else
+ {
+ structureMenu.add(gpdbview = new JMenuItem("View all "
+ + pdbe.size() + " structures."));
}
gpdbview.setToolTipText("Open a new Jmol view with all structures associated with the current selection and superimpose them using the alignment.");
gpdbview.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
continue;
}
final String label = urlLink.getLabel();
- if (seq!=null && urlLink.isDynamic())
+ if (seq != null && urlLink.isDynamic())
{
// collect matching db-refs
public void actionPerformed(ActionEvent e)
{
sequenceDetails_actionPerformed();
- }});
+ }
+ });
sequenceSelDetails.setText("Sequence Details ...");
- sequenceSelDetails.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- sequenceSelectionDetails_actionPerformed();
- }});
+ sequenceSelDetails
+ .addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ sequenceSelectionDetails_actionPerformed();
+ }
+ });
PIDColour.setFocusPainted(false);
unGroupMenuItem.setText("Remove Group");
unGroupMenuItem.addActionListener(new java.awt.event.ActionListener()
editSequence_actionPerformed(actionEvent);
}
});
-
+
/*
* annotationMenuItem.setText("By Annotation");
* annotationMenuItem.addActionListener(new ActionListener() { public void
colourMenu.add(turnColour);
colourMenu.add(buriedColour);
colourMenu.add(nucleotideMenuItem);
- if (ap.getAlignment().isNucleotide()) {
- colourMenu.add(purinePyrimidineColour);
+ if (ap.getAlignment().isNucleotide())
+ {
+ colourMenu.add(purinePyrimidineColour);
}
// colourMenu.add(covariationColour);
colourMenu.add(userDefinedColour);
protected void sequenceDetails_actionPerformed()
{
- createSequenceDetailsReport(new SequenceI[]{sequence});
+ createSequenceDetailsReport(new SequenceI[]
+ { sequence });
}
+
public void createSequenceDetailsReport(SequenceI[] sequences)
{
CutAndPasteHtmlTransfer cap = new CutAndPasteHtmlTransfer();
StringBuffer contents = new StringBuffer();
- for (SequenceI seq:sequences)
- {
- contents.append("<p><h2>Annotation for "+seq.getDisplayId(true)+"</h2></p><p>");
- new SequenceAnnotationReport(null)
- .createSequenceAnnotationReport(
- contents,
- seq,
- true,
- true,false,
- (ap.seqPanel.seqCanvas.fr != null) ? ap.seqPanel.seqCanvas.fr.minmax
- : null);
- contents.append("</p>");
+ for (SequenceI seq : sequences)
+ {
+ contents.append("<p><h2>Annotation for " + seq.getDisplayId(true)
+ + "</h2></p><p>");
+ new SequenceAnnotationReport(null)
+ .createSequenceAnnotationReport(
+ contents,
+ seq,
+ true,
+ true,
+ false,
+ (ap.seqPanel.seqCanvas.fr != null) ? ap.seqPanel.seqCanvas.fr.minmax
+ : null);
+ contents.append("</p>");
}
cap.setText("<html>" + contents.toString() + "</html>");
-
- Desktop.instance.addInternalFrame(cap,
- "Sequence Details for " + (sequences.length==1 ? sequences[0].getDisplayId(true) : "Selection")
-, 500, 400);
-
+
+ Desktop.instance.addInternalFrame(cap, "Sequence Details for "
+ + (sequences.length == 1 ? sequences[0].getDisplayId(true)
+ : "Selection"), 500, 400);
+
}
protected void showNonconserved_actionPerformed()
protected void clustalColour_actionPerformed()
{
SequenceGroup sg = getGroup();
- sg.cs = new ClustalxColourScheme(
- sg,ap.av.getHiddenRepSequences());
+ sg.cs = new ClustalxColourScheme(sg, ap.av.getHiddenRepSequences());
refresh();
}
if (abovePIDColour.isSelected())
{
sg.cs.setConsensus(AAFrequency.calculate(
- sg.getSequences(ap.av.getHiddenRepSequences()), sg.getStartRes(),
- sg.getEndRes() + 1));
+ sg.getSequences(ap.av.getHiddenRepSequences()),
+ sg.getStartRes(), sg.getEndRes() + 1));
int threshold = SliderPanel.setPIDSliderSource(ap, sg.cs, getGroup()
.getName());
SequenceGroup sg = getGroup();
sg.cs = new PIDColourScheme();
sg.cs.setConsensus(AAFrequency.calculate(
- sg.getSequences(ap.av.getHiddenRepSequences()), sg.getStartRes(),
- sg.getEndRes() + 1));
+ sg.getSequences(ap.av.getHiddenRepSequences()),
+ sg.getStartRes(), sg.getEndRes() + 1));
refresh();
}
sg.cs = new Blosum62ColourScheme();
sg.cs.setConsensus(AAFrequency.calculate(
- sg.getSequences(ap.av.getHiddenRepSequences()), sg.getStartRes(),
- sg.getEndRes() + 1));
+ sg.getSequences(ap.av.getHiddenRepSequences()),
+ sg.getStartRes(), sg.getEndRes() + 1));
refresh();
}
if (conservationMenuItem.isSelected())
{
Conservation c = new Conservation("Group",
- ResidueProperties.propHash, 3,
- sg.getSequences(ap.av.getHiddenRepSequences()), sg.getStartRes(),
+ ResidueProperties.propHash, 3, sg.getSequences(ap.av
+ .getHiddenRepSequences()), sg.getStartRes(),
sg.getEndRes() + 1);
c.calculate();
}
ChangeCaseCommand caseCommand = new ChangeCaseCommand(description,
- sg.getSequencesAsArray(ap.av.getHiddenRepSequences()), startEnd,
- caseChange);
+ sg.getSequencesAsArray(ap.av.getHiddenRepSequences()),
+ startEnd, caseChange);
ap.alignFrame.addHistoryItem(caseCommand);
ColumnSelection csel = new ColumnSelection(ap.av.getColumnSelection());
omitHidden = ap.av.getViewAsString(true);
Alignment oal = new Alignment(ap.av.getSequenceSelection());
- AlignmentAnnotation[] nala = ap.av.getAlignment().getAlignmentAnnotation();
+ AlignmentAnnotation[] nala = ap.av.getAlignment()
+ .getAlignmentAnnotation();
if (nala != null)
{
for (int i = 0; i < nala.length; i++)
jalview.io.JalviewFileChooser chooser = new jalview.io.JalviewFileChooser(
jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
chooser.setFileView(new jalview.io.JalviewFileView());
- chooser.setDialogTitle("Select a PDB file for "+sequence.getDisplayId(false));
- chooser.setToolTipText("Load a PDB file and associate it with sequence '"+sequence.getDisplayId(false)+"'");
+ chooser.setDialogTitle("Select a PDB file for "
+ + sequence.getDisplayId(false));
+ chooser.setToolTipText("Load a PDB file and associate it with sequence '"
+ + sequence.getDisplayId(false) + "'");
int value = chooser.showOpenDialog(null);
{
String choice = chooser.getSelectedFile().getPath();
jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice);
- new AssociatePdbFileWithSeq().associatePdbWithSeq(choice, jalview.io.AppletFormatAdapter.FILE, sequence, true);
+ new AssociatePdbFileWithSeq().associatePdbWithSeq(choice,
+ jalview.io.AppletFormatAdapter.FILE, sequence, true);
}
}
public void colourByStructure(String pdbid)
{
- Annotation[] anots = ap.av.getStructureSelectionManager().colourSequenceFromStructure(
- sequence, pdbid);
+ Annotation[] anots = ap.av.getStructureSelectionManager()
+ .colourSequenceFromStructure(sequence, pdbid);
AlignmentAnnotation an = new AlignmentAnnotation("Structure",
"Coloured by " + pdbid, anots);
/**
* default min-max colours for annotation shading
*/
- minColour.setBackground(Cache.getDefaultColour("ANNOTATIONCOLOUR_MIN", Color.orange));
- maxColour.setBackground(Cache.getDefaultColour("ANNOTATIONCOLOUR_MAX", Color.red));
+ minColour.setBackground(Cache.getDefaultColour("ANNOTATIONCOLOUR_MIN",
+ Color.orange));
+ maxColour.setBackground(Cache.getDefaultColour("ANNOTATIONCOLOUR_MAX",
+ Color.red));
String[] fonts = java.awt.GraphicsEnvironment
.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
startupCheckbox
.setSelected(Cache.getDefault("SHOW_STARTUP_FILE", true));
startupFileTextfield.setText(Cache.getDefault("STARTUP_FILE",
- Cache.getDefault("www.jalview.org","http://www.jalview.org")+"/examples/exampleFile_2_3.jar"));
+ Cache.getDefault("www.jalview.org", "http://www.jalview.org")
+ + "/examples/exampleFile_2_3.jar"));
sortby.addItem("No sort");
sortby.addItem("Id");
Cache.applicationProperties.setProperty("SORT_ALIGNMENT", sortby
.getSelectedItem().toString());
- Cache.setColourProperty("ANNOTATIONCOLOUR_MIN", minColour.getBackground());
- Cache.setColourProperty("ANNOTATIONCOLOUR_MAX", maxColour.getBackground());
-
+ Cache.setColourProperty("ANNOTATIONCOLOUR_MIN",
+ minColour.getBackground());
+ Cache.setColourProperty("ANNOTATIONCOLOUR_MAX",
+ maxColour.getBackground());
+
if (epsRendering.getSelectedItem().equals("Prompt each time"))
{
Cache.applicationProperties.remove("EPS_RENDERING");
Boolean.toString(autoIdWidth.isSelected()));
userIdWidth_actionPerformed();
Cache.applicationProperties.setProperty("FIGURE_USERIDWIDTH",
- userIdWidth.getText());
+ userIdWidth.getText());
Cache.applicationProperties.setProperty("AUTO_CALC_CONSENSUS",
Boolean.toString(autoCalculateConsCheck.isSelected()));
{
return groupURLLinks;
}
+
public void minColour_actionPerformed()
{
Color col = JColorChooser.showDialog(this,
(allowCancel) ? JOptionPane.YES_NO_CANCEL_OPTION
: JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
- // now, ask the desktop to relayer any external windows that might have been obsured
- if (Desktop.instance!=null)
+ // now, ask the desktop to relayer any external windows that might have
+ // been obsured
+ if (Desktop.instance != null)
{
Desktop.instance.relayerWindows();
}
{
omitHidden = ap.av.getViewAsString(sg != null);
}
- redundancy = AlignSeq.computeRedundancyMatrix(originalSequences, omitHidden, start, end, false);
+ redundancy = AlignSeq.computeRedundancyMatrix(originalSequences,
+ omitHidden, start, end, false);
progress.setIndeterminate(false);
progress.setVisible(false);
ap.alignFrame.addHistoryItem(cut);
PaintRefresher.Refresh(this, ap.av.getSequenceSetId(), true, true);
- //ap.av.firePropertyChange("alignment", null, ap.av.getAlignment()
- // .getSequences());
+ // ap.av.firePropertyChange("alignment", null, ap.av.getAlignment()
+ // .getSequences());
}
}
Hashtable<String, ArrayList<JPanel>> typeopts = new Hashtable<String, ArrayList<JPanel>>();
- Hashtable<String,OptsAndParamsPage> opanps = new Hashtable<String, OptsAndParamsPage>();
-
+ Hashtable<String, OptsAndParamsPage> opanps = new Hashtable<String, OptsAndParamsPage>();
+
private InputType getTypeFor(String name)
{
try
}
int reply;
+
JalviewDialog frame = new JalviewDialog()
{
-
+
@Override
protected void raiseClosed()
{
-
+
}
-
+
@Override
protected void okPressed()
{
- reply=JOptionPane.OK_OPTION;
+ reply = JOptionPane.OK_OPTION;
}
-
+
@Override
protected void cancelPressed()
{
- reply=JOptionPane.CANCEL_OPTION;
-
+ reply = JOptionPane.CANCEL_OPTION;
+
}
};
- InputType old,current;
+
+ InputType old, current;
+
public RestInputParamEditDialog(
RestServiceEditorPane restServiceEditorPane,
RestServiceDescription currentservice, InputType toedit)
{
initFor(restServiceEditorPane, currentservice, toedit);
frame.waitForInput();
- // TODO: warn user if they are about to overwrite an existing parameter because they have used the same name when editing a different parameter.
+ // TODO: warn user if they are about to overwrite an existing parameter
+ // because they have used the same name when editing a different parameter.
// TODO: make any press of the return key cause 'OK' to be pressed
}
+
private void initFor(RestServiceEditorPane restServiceEditorPane,
RestServiceDescription currentservice, InputType toedit)
{
okcancel.add(frame.cancel);
okcancel.add(frame.ok);
- frame.initDialogFrame(dpane, true, true, "Edit parameter for service "+currentservice.getName(), 600,800);
-
+ frame.initDialogFrame(dpane, true, true, "Edit parameter for service "
+ + currentservice.getName(), 600, 800);
+
initTypeLists();
- reply=JOptionPane.CANCEL_OPTION;
+ reply = JOptionPane.CANCEL_OPTION;
old = toedit;
current = null;
- if (old!=null) {
+ if (old != null)
+ {
setStateFor(old);
}
- updated = updated && reply==JOptionPane.OK_OPTION;
+ updated = updated && reply == JOptionPane.OK_OPTION;
frame.validate();
}
RestServiceEditorPane restServiceEditorPane,
RestServiceDescription currentservice, String string)
{
- initFor(restServiceEditorPane, currentservice,null);
+ initFor(restServiceEditorPane, currentservice, null);
tok.setText(string);
frame.waitForInput();
}
private void setStateFor(InputType current)
{
tok.setText(current.token);
- OptsAndParamsPage opanp=opanps.get(current.getURLtokenPrefix());
- for (OptionI ops:current.getOptions())
+ OptsAndParamsPage opanp = opanps.get(current.getURLtokenPrefix());
+ for (OptionI ops : current.getOptions())
{
if (ops instanceof ParameterI)
{
opanp.setParameter((ParameterI) ops);
- } else {
- if (ops.getValue()!=null && ops.getValue().length()>0) {
+ }
+ else
+ {
+ if (ops.getValue() != null && ops.getValue().length() > 0)
+ {
opanp.selectOption(ops, ops.getValue());
}
}
typeList.setSelectedValue(current.getURLtokenPrefix(), true);
type_SelectionChangedActionPerformed(null);
}
+
private void updateCurrentType()
{
- if (typeList.getSelectedValue()!=null) {
- InputType newType = getTypeFor((String)typeList.getSelectedValue());
- if (newType!=null) {
- newType.token = tok.getText().trim();
- try {
- newType.configureFromArgumentI(opanps.get(newType.getURLtokenPrefix()).getCurrentSettings());
- current=newType;
- updated=true;
- } catch (InvalidArgumentException ex) {
- System.err.println("IMPLEMENTATION ERROR: Invalid argument for type : "+typeList.getSelectedValue()+"\n");
- ex.printStackTrace();
+ if (typeList.getSelectedValue() != null)
+ {
+ InputType newType = getTypeFor((String) typeList.getSelectedValue());
+ if (newType != null)
+ {
+ newType.token = tok.getText().trim();
+ try
+ {
+ newType.configureFromArgumentI(opanps.get(
+ newType.getURLtokenPrefix()).getCurrentSettings());
+ current = newType;
+ updated = true;
+ } catch (InvalidArgumentException ex)
+ {
+ System.err
+ .println("IMPLEMENTATION ERROR: Invalid argument for type : "
+ + typeList.getSelectedValue() + "\n");
+ ex.printStackTrace();
+ }
}
}
- }
-
+
}
+
private void initTypeLists()
{
- ArrayList<String> types=new ArrayList<String>();
+ ArrayList<String> types = new ArrayList<String>();
// populate type list
for (Class type : RestServiceDescription.getInputTypes())
{
jtype = (InputType) (type.getConstructor().newInstance(null));
typeclass.put(jtype.getURLtokenPrefix(), type);
// and populate parameters from this type
- OptsAndParamsPage opanp = new OptsAndParamsPage(this,true);
- opanps.put(jtype.getURLtokenPrefix(),opanp);
+ OptsAndParamsPage opanp = new OptsAndParamsPage(this, true);
+ opanps.put(jtype.getURLtokenPrefix(), opanp);
for (OptionI opt : jtype.getOptions())
{
}
}
typeList.setListData(types.toArray());
-
+
}
@Override
for (JPanel opt : typeopts.get(typen))
{
opt.setOpaque(true);
- options.add(opt,"wrap");
+ options.add(opt, "wrap");
}
options.invalidate();
optionsPanel.setVisible(true);
updateCurrentType();
}
- boolean updated=false;
+ boolean updated = false;
+
public boolean wasUpdated()
{
return updated;
@Override
protected void tokChanged_actionPerformed()
{
- if (tok.getText().trim().length()>0)
+ if (tok.getText().trim().length() > 0)
{
- if (current!=null)
+ if (current != null)
{
current.token = tok.getText().trim();
- updated = true;
- }
+ updated = true;
+ }
}
}
+
@Override
public void argSetModified(Object modifiedElement, boolean b)
{
public void keyTyped(KeyEvent e)
{
}
-
+
@Override
public void keyReleased(KeyEvent e)
{
- refreshCutnPaste(true);
+ refreshCutnPaste(true);
}
-
+
@Override
public void keyPressed(KeyEvent e)
{
-
+
}
});
panels.addChangeListener(new ChangeListener()
{
/**
- * last panel selected - used to decide whether the service or the GUI has the latest info
+ * last panel selected - used to decide whether the service or the GUI has
+ * the latest info
*/
Object lastComp;
+
@Override
public void stateChanged(ChangeEvent e)
{
- if (lastComp!=paste) {
+ if (lastComp != paste)
+ {
updateServiceFromGui();
refreshCutnPaste(false);
- } else {
+ }
+ else
+ {
refreshCutnPaste(true);
}
lastComp = panels.getSelectedComponent();
-
+
}
- });
- currentservice = new RestServiceDescription("Analysis", "service description", "service name", "http://localhost/", "", null, false, false, '-');
+ });
+ currentservice = new RestServiceDescription("Analysis",
+ "service description", "service name", "http://localhost/", "",
+ null, false, false, '-');
initGuiWith(currentservice);
refreshCutnPaste(false);
updateButtons();
{
this();
oldservice = toedit;
- if (oldservice!=null)
- { currentservice = new RestServiceDescription(toedit);
- } else {
- currentservice = new RestServiceDescription("Analysis", "service description", "service name", "http://localhost/", "", null, false, false, '-');
+ if (oldservice != null)
+ {
+ currentservice = new RestServiceDescription(toedit);
+ }
+ else
+ {
+ currentservice = new RestServiceDescription("Analysis",
+ "service description", "service name", "http://localhost/",
+ "", null, false, false, '-');
}
initGuiWith(currentservice);
refreshCutnPaste(false);
gapChar.addItem(".");
gapChar.addItem(" ");
gapChar.addItem("-");
- if (currentservice==null)
+ if (currentservice == null)
{
name.setText("");
descr.setText("");
urlsuff.setText("");
action.setSelectedItem("Analysis");
gapChar.setSelectedItem("-");
- } else {
- name.setText(currentservice.getName());
- descr.setText(currentservice.getDescription());
- url.setText(currentservice.getPostUrl());
- urlsuff.setText(currentservice.getUrlSuffix());
- for (Map.Entry<String, InputType> inparam : currentservice
- .getInputParams().entrySet())
- {
- _iparam.add(inparam.getKey() + " "
- + inparam.getValue().getURLtokenPrefix() + ":"
- + inparam.getValue().getURLEncodedParameter().toString());
}
-
- for (JvDataType oparam : currentservice.getResultDataTypes())
+ else
{
- _rparam.add(oparam.name());
- }
- iprms.setListData(_iparam);
- rdata.setListData(_rparam);
+ name.setText(currentservice.getName());
+ descr.setText(currentservice.getDescription());
+ url.setText(currentservice.getPostUrl());
+ urlsuff.setText(currentservice.getUrlSuffix());
+ for (Map.Entry<String, InputType> inparam : currentservice
+ .getInputParams().entrySet())
+ {
+ _iparam.add(inparam.getKey() + " "
+ + inparam.getValue().getURLtokenPrefix() + ":"
+ + inparam.getValue().getURLEncodedParameter().toString());
+ }
- action.setSelectedItem(currentservice.getAction());
+ for (JvDataType oparam : currentservice.getResultDataTypes())
+ {
+ _rparam.add(oparam.name());
+ }
+ iprms.setListData(_iparam);
+ rdata.setListData(_rparam);
+
+ action.setSelectedItem(currentservice.getAction());
- gapChar.setSelectedItem(""+currentservice.getGapCharacter());
+ gapChar.setSelectedItem("" + currentservice.getGapCharacter());
}
revalidate();
}
+
private String getSelectedInputToken()
{
- if (iprms.getSelectedIndex()>-1)
+ if (iprms.getSelectedIndex() > -1)
{
- String toktoedit = (String) iprms.getSelectedValue();
- toktoedit=toktoedit.substring(0, toktoedit.indexOf(" "));
- return toktoedit;
+ String toktoedit = (String) iprms.getSelectedValue();
+ toktoedit = toktoedit.substring(0, toktoedit.indexOf(" "));
+ return toktoedit;
}
return null;
}
+
@Override
protected void iprmListSelection_doubleClicked()
{
String toktoedit = getSelectedInputToken();
- if (toktoedit!=null)
+ if (toktoedit != null)
{
InputType toedit = currentservice.getInputParams().get(toktoedit);
- String oldParam=toktoedit;
- RestInputParamEditDialog dialog=new RestInputParamEditDialog(this, currentservice, toedit);
- if (dialog.wasUpdated()) {
+ String oldParam = toktoedit;
+ RestInputParamEditDialog dialog = new RestInputParamEditDialog(this,
+ currentservice, toedit);
+ if (dialog.wasUpdated())
+ {
currentservice.getInputParams().remove(oldParam);
- currentservice.getInputParams().put(dialog.current.token, dialog.current);
+ currentservice.getInputParams().put(dialog.current.token,
+ dialog.current);
initGuiWith(currentservice);
}
-
+
}
}
+
@Override
protected void iprmsAdd_actionPerformed(ActionEvent e)
{
- RestInputParamEditDialog dialog=new RestInputParamEditDialog(this, currentservice, "param"+(1+currentservice.getInputParams().size()));
- if (dialog.wasUpdated()) {
- currentservice.getInputParams().put(dialog.current.token, dialog.current);
+ RestInputParamEditDialog dialog = new RestInputParamEditDialog(this,
+ currentservice, "param"
+ + (1 + currentservice.getInputParams().size()));
+ if (dialog.wasUpdated())
+ {
+ currentservice.getInputParams().put(dialog.current.token,
+ dialog.current);
initGuiWith(currentservice);
}
}
+
@Override
protected void iprmsRem_actionPerformed(ActionEvent e)
{
String toktoedit = getSelectedInputToken();
- if (toktoedit!=null)
+ if (toktoedit != null)
{
currentservice.getInputParams().remove(toktoedit);
initGuiWith(currentservice);
}
}
+
@Override
protected void rdata_rightClicked(MouseEvent mouse)
{
final int rdatasel = rdata.getSelectedIndex();
- if (rdatasel>-1)
+ if (rdatasel > -1)
{
JPopupMenu popup = new JPopupMenu("Select return type");
- for (final JvDataType type:JvDataType.values()) {
- popup.add(new JMenuItem(type.name())).addActionListener(new ActionListener()
- {
-
- @Override
- public void actionPerformed(ActionEvent e)
- {
- currentservice.getResultDataTypes().set(rdatasel, type);
- initGuiWith(currentservice);
- rdata.setSelectedIndex(rdatasel);
- }
- });
+ for (final JvDataType type : JvDataType.values())
+ {
+ popup.add(new JMenuItem(type.name())).addActionListener(
+ new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ currentservice.getResultDataTypes().set(rdatasel, type);
+ initGuiWith(currentservice);
+ rdata.setSelectedIndex(rdatasel);
+ }
+ });
}
popup.show(rdata, mouse.getX(), mouse.getY());
}
}
+
@Override
protected void rdataAdd_actionPerformed(ActionEvent e)
{
int p;
- if ((p=rdata.getSelectedIndex())>-1)
+ if ((p = rdata.getSelectedIndex()) > -1)
+ {
+ currentservice.getResultDataTypes().add(p + 1, JvDataType.ANNOTATION);
+ }
+ else
{
- currentservice.getResultDataTypes().add(p+1, JvDataType.ANNOTATION);
- } else {
currentservice.addResultDatatype(JvDataType.ANNOTATION);
}
initGuiWith(currentservice);
- rdata.setSelectedIndex(p==-1 ? currentservice.getResultDataTypes().size()-1 : p+1);
+ rdata.setSelectedIndex(p == -1 ? currentservice.getResultDataTypes()
+ .size() - 1 : p + 1);
}
+
@Override
protected void rdataNdown_actionPerformed(ActionEvent e)
{
int p;
- if ((p=rdata.getSelectedIndex())>-1 && p<_rparam.size()-1)
+ if ((p = rdata.getSelectedIndex()) > -1 && p < _rparam.size() - 1)
{
List<JvDataType> rtypes = currentservice.getResultDataTypes();
- JvDataType below = rtypes.get(p+1);
- rtypes.set(p+1, rtypes.get(p));
+ JvDataType below = rtypes.get(p + 1);
+ rtypes.set(p + 1, rtypes.get(p));
rtypes.set(p, below);
initGuiWith(currentservice);
- rdata.setSelectedIndex(p+1);
+ rdata.setSelectedIndex(p + 1);
}
}
+
@Override
protected void rdataNup_actionPerformed(ActionEvent e)
{
int p;
- if ((p=rdata.getSelectedIndex())>0)
+ if ((p = rdata.getSelectedIndex()) > 0)
{
List<JvDataType> rtypes = currentservice.getResultDataTypes();
- JvDataType above = rtypes.get(p-1);
- rtypes.set(p-1, rtypes.get(p));
+ JvDataType above = rtypes.get(p - 1);
+ rtypes.set(p - 1, rtypes.get(p));
rtypes.set(p, above);
initGuiWith(currentservice);
- rdata.setSelectedIndex(p-1);
+ rdata.setSelectedIndex(p - 1);
}
}
+
@Override
protected void rdataRem_actionPerformed(ActionEvent e)
{
- if (rdata.getSelectedIndex()>-1)
+ if (rdata.getSelectedIndex() > -1)
{
currentservice.getResultDataTypes().remove(rdata.getSelectedIndex());
initGuiWith(currentservice);
}
}
- private boolean updateServiceFromGui() {
- Map<String,InputType>inputTypes = new HashMap<String, InputType>();
- StringBuffer warnings=new StringBuffer();
- for (String its:_iparam)
+ private boolean updateServiceFromGui()
+ {
+ Map<String, InputType> inputTypes = new HashMap<String, InputType>();
+ StringBuffer warnings = new StringBuffer();
+ for (String its : _iparam)
{
- Matcher mtch = Pattern.compile("(\\S+)\\s(\\S+):\\[(.+)]").matcher(its);
- if (mtch.find()) {
- if (!RestServiceDescription.parseTypeString(mtch.group(2)+":"+mtch.group(3), mtch.group(1), mtch.group(2),mtch.group(3), inputTypes, warnings))
+ Matcher mtch = Pattern.compile("(\\S+)\\s(\\S+):\\[(.+)]").matcher(
+ its);
+ if (mtch.find())
+ {
+ if (!RestServiceDescription.parseTypeString(mtch.group(2) + ":"
+ + mtch.group(3), mtch.group(1), mtch.group(2),
+ mtch.group(3), inputTypes, warnings))
{
- System.err.println("IMPLEMENTATION PROBLEM: Cannot parse RestService input parameter string '"+its+"'"+"\n"+warnings);
- }
+ System.err
+ .println("IMPLEMENTATION PROBLEM: Cannot parse RestService input parameter string '"
+ + its + "'" + "\n" + warnings);
+ }
}
}
- char gc = gapChar.getSelectedItem()==null ? ' ' : ((String)gapChar.getSelectedItem()).charAt(0);
- RestServiceDescription newService = new RestServiceDescription((String) action.getSelectedItem(),
- descr.getText().trim(), name.getText().trim(), url.getText().trim(), urlsuff.getText().trim(), inputTypes, hSeparable.isSelected(), vSeparable.isSelected(), gc);
-
+ char gc = gapChar.getSelectedItem() == null ? ' ' : ((String) gapChar
+ .getSelectedItem()).charAt(0);
+ RestServiceDescription newService = new RestServiceDescription(
+ (String) action.getSelectedItem(), descr.getText().trim(), name
+ .getText().trim(), url.getText().trim(), urlsuff
+ .getText().trim(), inputTypes, hSeparable.isSelected(),
+ vSeparable.isSelected(), gc);
+
if (newService.isValid())
{
- for (String its:_rparam)
+ for (String its : _rparam)
{
JvDataType dtype;
- try {
+ try
+ {
dtype = JvDataType.valueOf(its);
newService.addResultDatatype(dtype);
- }
- catch (Throwable x)
+ } catch (Throwable x)
{
- System.err.println("IMPLEMENTATION PROBLEM: Cannot parse RestService output parameter string '"+its+"'"+"\n"+warnings);
+ System.err
+ .println("IMPLEMENTATION PROBLEM: Cannot parse RestService output parameter string '"
+ + its + "'" + "\n" + warnings);
}
}
currentservice = newService;
return true;
- } else {
- System.err.println("IMPLEMENTATION PROBLEM: Restservice generated from GUI is invalid\n"+warnings);
+ }
+ else
+ {
+ System.err
+ .println("IMPLEMENTATION PROBLEM: Restservice generated from GUI is invalid\n"
+ + warnings);
}
return false;
}
+
protected void refreshCutnPaste(boolean reparse)
{
if (!reparse && currentservice.isValid())
{
parseWarnings.setVisible(false);
parseRes.setText("");
- initGuiWith(currentservice=rsd);
+ initGuiWith(currentservice = rsd);
}
else
{
paste.revalidate();
}
}
-
+
}
public static void main(String[] args)
public void run()
{
- boolean nulserv=true;
+ boolean nulserv = true;
while (visible)
{
final Thread runner = Thread.currentThread();
JFrame df = new JFrame();
df.getContentPane().setLayout(new BorderLayout());
df.getContentPane().add(
- (nulserv=!nulserv) ? new RestServiceEditorPane(jalview.ws.rest.RestClient
- .makeShmmrRestClient().getRestDescription()) : new RestServiceEditorPane(),
+ (nulserv = !nulserv) ? new RestServiceEditorPane(
+ jalview.ws.rest.RestClient
+ .makeShmmrRestClient()
+ .getRestDescription())
+ : new RestServiceEditorPane(),
BorderLayout.CENTER);
df.setBounds(100, 100, 600, 400);
df.addComponentListener(new ComponentListener()
}
}
- String finalService=null;
+
+ String finalService = null;
+
public void showDialog(String title)
{
- if (oldservice!=null)
+ if (oldservice != null)
{
finalService = oldservice.toString();
}
JalviewDialog jvd = new JalviewDialog()
{
-
+
@Override
protected void raiseClosed()
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
protected void okPressed()
{
updateServiceFromGui();
- finalService = currentservice.toString();
+ finalService = currentservice.toString();
}
-
+
@Override
protected void cancelPressed()
{
-
+
}
};
- JPanel pane = new JPanel(new BorderLayout()),okcancel=new JPanel(new FlowLayout());
- pane.add(this,BorderLayout.CENTER);
+ JPanel pane = new JPanel(new BorderLayout()), okcancel = new JPanel(
+ new FlowLayout());
+ pane.add(this, BorderLayout.CENTER);
okcancel.add(jvd.ok);
okcancel.add(jvd.cancel);
pane.add(okcancel, BorderLayout.SOUTH);
- jvd.initDialogFrame(pane, true, true, title, 600,350);
+ jvd.initDialogFrame(pane, true, true, title, 600, 350);
jvd.waitForInput();
}
repaint();
}
- boolean first=true;
+ boolean first = true;
+
public void setPoints(Vector points, int npoint)
{
this.points = points;
this.npoint = npoint;
- if (first) {
- ToolTipManager.sharedInstance().registerComponent(this);
- ToolTipManager.sharedInstance().setInitialDelay(0);
- ToolTipManager.sharedInstance().setDismissDelay(10000);
+ if (first)
+ {
+ ToolTipManager.sharedInstance().registerComponent(this);
+ ToolTipManager.sharedInstance().setInitialDelay(0);
+ ToolTipManager.sharedInstance().setDismissDelay(10000);
}
prefsize = getPreferredSize();
orig = new float[npoint][3];
findWidth();
scale = findScale();
- if (first) {
-
- addMouseListener(this);
+ if (first)
+ {
+
+ addMouseListener(this);
- addMouseMotionListener(this);
+ addMouseMotionListener(this);
}
- first=false;
+ first = false;
}
public void initAxes()
{
av.hideColumns(res, res);
if (av.getSelectionGroup() != null
- && av.getSelectionGroup().getSize() == av.getAlignment()
- .getHeight())
+ && av.getSelectionGroup().getSize() == av
+ .getAlignment().getHeight())
{
av.setSelectionGroup(null);
}
annotations = new AnnotationPanel(av);
}
- annotations.renderer.drawComponent(annotations, av, (Graphics2D) g, -1, startRes, endx + 1);
+ annotations.renderer.drawComponent(annotations, av, (Graphics2D) g,
+ -1, startRes, endx + 1);
g.translate(0, -cHeight - ypos - 3);
}
g.setClip(clip);
break;
}
- group = (SequenceGroup) av.getAlignment().getGroups().get(
- groupIndex);
+ group = (SequenceGroup) av.getAlignment().getGroups()
+ .get(groupIndex);
} while (groupIndex < av.getAlignment().getGroups().size());
/**
* DOCUMENT ME!
- *
+ *
* @author $author$
* @version $Revision: 1.130 $
*/
StringBuffer keyboardNo2;
java.net.URL linkImageURL;
+
private final SequenceAnnotationReport seqARep;
+
StringBuffer tooltipText = new StringBuffer("<html>");
String tmpString;
/**
* Creates a new SeqPanel object.
- *
+ *
* @param avp
* DOCUMENT ME!
* @param p
public SeqPanel(AlignViewport av, AlignmentPanel ap)
{
linkImageURL = getClass().getResource("/images/link.gif");
- seqARep=new SequenceAnnotationReport(linkImageURL.toString());
+ seqARep = new SequenceAnnotationReport(linkImageURL.toString());
ToolTipManager.sharedInstance().registerComponent(this);
ToolTipManager.sharedInstance().setInitialDelay(0);
ToolTipManager.sharedInstance().setDismissDelay(10000);
addMouseMotionListener(this);
addMouseListener(this);
addMouseWheelListener(this);
- ssm = StructureSelectionManager.getStructureSelectionManager(Desktop.instance);
+ ssm = StructureSelectionManager
+ .getStructureSelectionManager(Desktop.instance);
ssm.addStructureViewerListener(this);
ssm.addSelectionListener(this);
}
}
else
{
- if (x>seqCanvas.getWidth()+seqCanvas.getWidth())
+ if (x > seqCanvas.getWidth() + seqCanvas.getWidth())
{
- // make sure we calculate relative to visible alignment, rather than right-hand gutter
- x = seqCanvas.getX()+seqCanvas.getWidth();
+ // make sure we calculate relative to visible alignment, rather than
+ // right-hand gutter
+ x = seqCanvas.getX() + seqCanvas.getWidth();
}
res = (x / av.getCharWidth()) + av.getStartRes();
}
y -= hgap;
- seq = Math.min((y % cHeight) / av.getCharHeight(),
- av.getAlignment().getHeight() - 1);
+ seq = Math.min((y % cHeight) / av.getCharHeight(), av.getAlignment()
+ .getHeight() - 1);
}
else
{
- seq = Math.min((y / av.getCharHeight()) + av.getStartSeq(),
- av.getAlignment().getHeight() - 1);
+ seq = Math.min((y / av.getCharHeight()) + av.getStartSeq(), av
+ .getAlignment().getHeight() - 1);
}
return seq;
void setCursorPosition()
{
- SequenceI sequence = av.getAlignment().getSequenceAt(
- seqCanvas.cursorY);
+ SequenceI sequence = av.getAlignment().getSequenceAt(seqCanvas.cursorY);
seqCanvas.cursorX = sequence.findIndex(getKeyboardNo1() - 1);
scrollToVisible();
{
seqCanvas.cursorX += dx;
seqCanvas.cursorY += dy;
- if (av.hasHiddenColumns() && !av.getColumnSelection().isVisible(seqCanvas.cursorX))
+ if (av.hasHiddenColumns()
+ && !av.getColumnSelection().isVisible(seqCanvas.cursorX))
{
int original = seqCanvas.cursorX - dx;
int maxWidth = av.getAlignment().getWidth();
void setSelectionAreaAtCursor(boolean topLeft)
{
- SequenceI sequence = av.getAlignment().getSequenceAt(
- seqCanvas.cursorY);
+ SequenceI sequence = av.getAlignment().getSequenceAt(seqCanvas.cursorY);
if (av.getSelectionGroup() != null)
{
endEditing();
}
- void insertNucAtCursor(boolean group,String nuc){
- groupEditing = group;
- startseq = seqCanvas.cursorY;
- lastres = seqCanvas.cursorX;
- editSequence(false, true, seqCanvas.cursorX + getKeyboardNo1());
- endEditing();
+ void insertNucAtCursor(boolean group, String nuc)
+ {
+ groupEditing = group;
+ startseq = seqCanvas.cursorY;
+ lastres = seqCanvas.cursorX;
+ editSequence(false, true, seqCanvas.cursorX + getKeyboardNo1());
+ endEditing();
}
void numberPressed(char value)
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
{
if (ap.scrollToPosition(results, false))
{
- seqCanvas.revalidate();
+ seqCanvas.revalidate();
}
}
seqCanvas.highlightSearchResults(results);
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
SequenceFeature[] features = findFeaturesAtRes(
sequence.getDatasetSequence(),
rpos = sequence.findPosition(res));
- seqARep.appendFeatures(tooltipText, rpos, features,
+ seqARep.appendFeatures(tooltipText, rpos, features,
this.ap.seqPanel.seqCanvas.fr.minmax);
}
if (tooltipText.length() == 6) // <html></html>
return lastp = p;
}
-
String lastTooltip;
/**
* Set status message in alignment panel
- *
+ *
* @param sequence
* aligned sequence object
* @param res
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
if ((res < av.getAlignment().getWidth()) && (res < lastres))
{
// dragLeft, delete gap
- editSequence(false, false,res);
+ editSequence(false, false, res);
}
else
{
- editSequence(true, false,res);
+ editSequence(true, false, res);
}
mouseDragging = true;
}
}
- //TODO: Make it more clever than many booleans
- synchronized void editSequence(boolean insertGap, boolean editSeq, int startres)
+ // TODO: Make it more clever than many booleans
+ synchronized void editSequence(boolean insertGap, boolean editSeq,
+ int startres)
{
int fixedLeft = -1;
int fixedRight = -1;
{
if (sg.getSize() == av.getAlignment().getHeight())
{
- if ((av.hasHiddenColumns() && startres < av.getColumnSelection()
- .getHiddenBoundaryRight(startres)))
+ if ((av.hasHiddenColumns() && startres < av
+ .getColumnSelection().getHiddenBoundaryRight(startres)))
{
endEditing();
return;
int alWidth = av.getAlignment().getWidth();
if (av.hasHiddenRows())
{
- int hwidth = av.getAlignment().getHiddenSequences().getWidth();
+ int hwidth = av.getAlignment().getHiddenSequences()
+ .getWidth();
if (hwidth > alWidth)
{
alWidth = hwidth;
{
editCommand.appendEdit(EditCommand.INSERT_GAP, new SequenceI[]
{ seq }, lastres, startres - lastres, av.getAlignment(), true);
- }
+ }
}
else
{
- if(!editSeq){
- // dragging to the left
- if (fixedColumns && fixedRight != -1)
+ if (!editSeq)
{
- for (int j = lastres; j > startres; j--)
+ // dragging to the left
+ if (fixedColumns && fixedRight != -1)
{
- if (!jalview.util.Comparison.isGap(seq.getCharAt(startres)))
+ for (int j = lastres; j > startres; j--)
{
- endEditing();
- break;
+ if (!jalview.util.Comparison.isGap(seq.getCharAt(startres)))
+ {
+ endEditing();
+ break;
+ }
+ deleteChar(startres, new SequenceI[]
+ { seq }, fixedRight);
+ }
+ }
+ else
+ {
+ // could be a keyboard edit trying to delete none gaps
+ int max = 0;
+ for (int m = startres; m < lastres; m++)
+ {
+ if (!jalview.util.Comparison.isGap(seq.getCharAt(m)))
+ {
+ break;
+ }
+ max++;
+ }
+
+ if (max > 0)
+ {
+ editCommand.appendEdit(EditCommand.DELETE_GAP,
+ new SequenceI[]
+ { seq }, startres, max, av.getAlignment(), true);
}
- deleteChar(startres, new SequenceI[]
- { seq }, fixedRight);
}
}
else
- {
- // could be a keyboard edit trying to delete none gaps
- int max = 0;
- for (int m = startres; m < lastres; m++)
+ {// insertGap==false AND editSeq==TRUE;
+ if (fixedColumns && fixedRight != -1)
{
- if (!jalview.util.Comparison.isGap(seq.getCharAt(m)))
+ for (int j = lastres; j < startres; j++)
{
- break;
+ insertChar(j, new SequenceI[]
+ { seq }, fixedRight);
}
- max++;
}
-
- if (max > 0)
+ else
{
- editCommand.appendEdit(EditCommand.DELETE_GAP, new SequenceI[]
- { seq }, startres, max, av.getAlignment(), true);
+ editCommand.appendEdit(EditCommand.INSERT_NUC, new SequenceI[]
+ { seq }, lastres, startres - lastres, av.getAlignment(), true);
}
}
- }else{//insertGap==false AND editSeq==TRUE;
- if (fixedColumns && fixedRight != -1)
- {
- for (int j = lastres; j < startres; j++)
- {
- insertChar(j, new SequenceI[]
- { seq }, fixedRight);
- }
- }
- else
- {
- editCommand.appendEdit(EditCommand.INSERT_NUC, new SequenceI[]
- { seq }, lastres, startres - lastres, av.getAlignment(), true);
- }
- }
}
}
editCommand.appendEdit(EditCommand.DELETE_GAP, seq, blankColumn, 1,
av.getAlignment(), true);
- editCommand.appendEdit(EditCommand.INSERT_GAP, seq, j, 1, av.getAlignment(),
- true);
+ editCommand.appendEdit(EditCommand.INSERT_GAP, seq, j, 1,
+ av.getAlignment(), true);
}
void deleteChar(int j, SequenceI[] seq, int fixedColumn)
{
- editCommand.appendEdit(EditCommand.DELETE_GAP, seq, j, 1, av.getAlignment(),
- true);
+ editCommand.appendEdit(EditCommand.DELETE_GAP, seq, j, 1,
+ av.getAlignment(), true);
editCommand.appendEdit(EditCommand.INSERT_GAP, seq, fixedColumn, 1,
av.getAlignment(), true);
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param e
* DOCUMENT ME!
*/
if (e.isShiftDown())
{
ap.scrollRight(true);
-
- } else {
+
+ }
+ else
+ {
ap.scrollUp(false);
}
}
if (e.isShiftDown())
{
ap.scrollRight(false);
- } else {
+ }
+ else
+ {
ap.scrollUp(true);
}
}
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
// state
if (stretchGroup.cs != null)
{
- stretchGroup.cs.alignmentChanged(
- stretchGroup,av.getHiddenRepSequences());
+ stretchGroup.cs.alignmentChanged(stretchGroup,
+ av.getHiddenRepSequences());
if (stretchGroup.cs.conservationApplied())
{
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
dragDirection = -1;
}
- while ((y != oldSeq) && (oldSeq > -1) && (y < av.getAlignment().getHeight()))
+ while ((y != oldSeq) && (oldSeq > -1)
+ && (y < av.getAlignment().getHeight()))
{
// This routine ensures we don't skip any sequences, as the
// selection is quite slow.
// shared between viewports.
if (av == source
|| !av.followSelection
- || (av.isSelectionGroupChanged(false) || av.isColSelChanged(false))
+ || (av.isSelectionGroupChanged(false) || av
+ .isColSelChanged(false))
|| (source instanceof AlignViewport && ((AlignViewport) source)
.getSequenceSetId().equals(av.getSequenceSetId())))
{
// if (!av.isSelectionGroupChanged(false))
{
SequenceGroup sgroup = null;
- if (seqsel != null && seqsel.getSize()>0)
+ if (seqsel != null && seqsel.getSize() > 0)
{
if (av.getAlignment() == null)
{
if (av.getColumnSelection() != null)
{
av.getColumnSelection().clear();
- repaint=true;
+ repaint = true;
}
}
else
av.isColSelChanged(true);
repaint = true;
}
- if (copycolsel && av.hasHiddenColumns()
- && (av.getColumnSelection() == null || av.getColumnSelection().getHiddenColumns() == null))
+ if (copycolsel
+ && av.hasHiddenColumns()
+ && (av.getColumnSelection() == null || av.getColumnSelection()
+ .getHiddenColumns() == null))
{
System.err.println("Bad things");
}
/**
* Blocking method that initialises and returns the shared instance of the
* SequenceFetcher client
- *
+ *
* @param guiWindow
* - where the initialisation delay message should be shown
* @return the singleton instance of the sequence fetcher client
/**
* called by thread spawned by constructor
- *
+ *
* @param guiWindow
*/
private void initGui(IProgressIndicator guiWindow)
+ " others)" : ""));
String eq = database.getExampleQueries();
dbeg.setText("Example query: " + eq);
- boolean enablePunct=!(eq != null && eq.indexOf(",") > -1);
- for (DbSourceProxy dbs:database.getSelectedSources()) {
+ boolean enablePunct = !(eq != null && eq.indexOf(",") > -1);
+ for (DbSourceProxy dbs : database.getSelectedSources())
+ {
if (dbs instanceof jalview.ws.dbsources.das.datamodel.DasSequenceSource)
{
enablePunct = false;
return;
}
// indicate if successive sources should be merged into one alignment.
- boolean addToLast=false;
+ boolean addToLast = false;
ArrayList<String> aresultq = new ArrayList<String>(), presultTitle = new ArrayList<String>();
ArrayList<AlignmentI> presult = new ArrayList<AlignmentI>(), aresult = new ArrayList<AlignmentI>();
Iterator<DbSourceProxy> proxies = database.getSelectedSources()
DBRefEntry dbr = new DBRefEntry(), found[] = null;
dbr.setSource(proxy.getDbSource());
dbr.setVersion(null);
- if (proxy.getAccessionValidator()!=null) {
- Regex vgr=proxy.getAccessionValidator();
+ if (proxy.getAccessionValidator() != null)
+ {
+ Regex vgr = proxy.getAccessionValidator();
vgr.search(q);
- if (vgr.numSubs()>0) {
+ if (vgr.numSubs() > 0)
+ {
dbr.setAccessionId(vgr.stringMatched(1));
- } else {
+ }
+ else
+ {
dbr.setAccessionId(vgr.stringMatched());
}
- } else {
+ }
+ else
+ {
dbr.setAccessionId(q);
}
boolean rfound = false;
AlignmentI ar = null;
if (isAliSource)
{
- addToLast=false;
+ addToLast = false;
// new window for each result
while (aresult.size() > 0)
{
}
else
{
- String titl=null;
- if (addToLast && presult.size()>0)
+ String titl = null;
+ if (addToLast && presult.size() > 0)
{
- ar=presult.remove(presult.size()-1);
- titl=presultTitle.remove(presultTitle.size()-1);
+ ar = presult.remove(presult.size() - 1);
+ titl = presultTitle.remove(presultTitle.size() - 1);
}
// concatenate all results in one window
while (aresult.size() > 0)
}
;
}
- addToLast=true;
+ addToLast = true;
presult.add(ar);
presultTitle.add(titl);
}
}
- guiWindow.setProgressBar("Finished querying", Thread.currentThread().hashCode());
+ guiWindow.setProgressBar("Finished querying", Thread.currentThread()
+ .hashCode());
}
- guiWindow.setProgressBar((presult.size()>0) ? "Parsing results.":"Processing ..", Thread.currentThread().hashCode());
+ guiWindow.setProgressBar((presult.size() > 0) ? "Parsing results."
+ : "Processing ..", Thread.currentThread().hashCode());
// process results
while (presult.size() > 0)
{
sb.append("Didn't retrieve the following "
+ (nextfetch.size() == 1 ? "query" : nextfetch.size()
+ " queries") + ": \n");
- int l = sb.length(),lr=0;
+ int l = sb.length(), lr = 0;
for (String s : nextfetch)
{
if (l != sb.length())
{
sb.append("; ");
}
- if (lr-sb.length()>40)
+ if (lr - sb.length() > 40)
{
sb.append("\n");
}
}
/**
- *
+ *
* @return a standard title for any results retrieved using the currently
* selected source and settings
*/
if (currentSequenceGroup.getShowNonconserved()) // todo optimize
{
// todo - use sequence group consensus
- s = getDisplayChar(av.getAlignmentConsensusAnnotation(), i, s, '.');
+ s = getDisplayChar(av.getAlignmentConsensusAnnotation(), i, s,
+ '.');
}
}
if (av.getShowUnconserved())
{
- s = getDisplayChar(av.getAlignmentConsensusAnnotation(), i, s, '.');
+ s = getDisplayChar(av.getAlignmentConsensusAnnotation(), i, s,
+ '.');
}
/*
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
- * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
* @author $author$
* @version $Revision$
*/
-public class SplashScreen extends JPanel implements Runnable, HyperlinkListener
+public class SplashScreen extends JPanel implements Runnable,
+ HyperlinkListener
{
boolean visible = true;
{
this(false);
}
- private boolean interactiveDialog=false;
+
+ private boolean interactiveDialog = false;
+
/**
*
- * @param interactive if true - an internal dialog is opened rather than a free-floating splash screen
+ * @param interactive
+ * if true - an internal dialog is opened rather than a free-floating
+ * splash screen
*/
public SplashScreen(boolean interactive)
{
- this.interactiveDialog=interactive;
+ this.interactiveDialog = interactive;
// show a splashscreen that will disapper
Thread t = new Thread(this);
t.start();
}
-
MouseAdapter closer = new MouseAdapter()
{
public void mousePressed(MouseEvent evt)
try
{
java.net.URL url = getClass().getResource("/images/Jalview_Logo.png");
- java.net.URL urllogo = getClass().getResource("/images/Jalview_Logo_small.png");
+ java.net.URL urllogo = getClass().getResource(
+ "/images/Jalview_Logo_small.png");
if (url != null)
{
image = java.awt.Toolkit.getDefaultToolkit().createImage(url);
- Image logo=java.awt.Toolkit.getDefaultToolkit().createImage(urllogo);
+ Image logo = java.awt.Toolkit.getDefaultToolkit().createImage(
+ urllogo);
MediaTracker mt = new MediaTracker(this);
mt.addImage(image, 0);
mt.addImage(logo, 1);
- do { try {
- mt.waitForAll(); } catch (InterruptedException x) {};
+ do
+ {
+ try
+ {
+ mt.waitForAll();
+ } catch (InterruptedException x)
+ {
+ }
+ ;
if (mt.isErrorAny())
{
System.err.println("Error when loading images!");
protected boolean refreshText()
{
String newtext = Desktop.instance.getAboutMessage(true).toString();
- //System.err.println("Text found: \n"+newtext+"\nEnd of newtext.");
+ // System.err.println("Text found: \n"+newtext+"\nEnd of newtext.");
if (oldtext != newtext.length())
{
iframe.setVisible(false);
oldtext = newtext.length();
- authlist=new JTextPane();
+ authlist = new JTextPane();
authlist.setEditable(false);
authlist.addMouseListener(closer);
authlist.addHyperlinkListener(this);
revalidate();
iframe.setBounds((int) ((Desktop.instance.getWidth() - 750) / 2),
(int) ((Desktop.instance.getHeight() - 140) / 2), 750,
- authlist.getHeight()+iconimg.getHeight());
+ authlist.getHeight() + iconimg.getHeight());
iframe.validate();
iframe.setVisible(true);
} catch (Exception ex)
{
}
-
- if (!interactiveDialog && ((System.currentTimeMillis() / 1000) - startTime) > 5)
+
+ if (!interactiveDialog
+ && ((System.currentTimeMillis() / 1000) - startTime) > 5)
{
visible = false;
}
if (visible && refreshText())
{
-// if (interactiveDialog) {
- iframe.repaint();
-// } else {
-// iframe.repaint();
-// };
+ // if (interactiveDialog) {
+ iframe.repaint();
+ // } else {
+ // iframe.repaint();
+ // };
}
if (interactiveDialog)
{
setPreferredSize(new Dimension(image.getWidth(this) + 8,
image.getHeight(this)));
}
+
@Override
public Dimension getPreferredSize()
{
- return new Dimension(image.getWidth(this) + 8,
- image.getHeight(this));
+ return new Dimension(image.getWidth(this) + 8, image.getHeight(this));
}
+
public void paintComponent(Graphics g)
{
g.setColor(Color.white);
if (image != null)
{
- g.drawImage(image, (getWidth() - image.getWidth(this)) / 2, (getHeight() - image.getHeight(this)) / 2,
- this);
+ g.drawImage(image, (getWidth() - image.getWidth(this)) / 2,
+ (getHeight() - image.getHeight(this)) / 2, this);
}
}
/*
* += fontSize + 4); }
*/
}
+
@Override
public void hyperlinkUpdate(HyperlinkEvent e)
{
Desktop.hyperlinkUpdate(e);
-
+
}
}
\ No newline at end of file
return;
}
-
-
- for (SequenceGroup sg:ap.av.getAlignment().getGroups())
+ for (SequenceGroup sg : ap.av.getAlignment().getGroups())
{
sg.textColour = ap.av.textColour;
sg.textColour2 = ap.av.textColour2;
}
else
{
- cs = ColourSchemeProperty.getColour(sg, ColourSchemeProperty.getColourName(av
- .getGlobalColourScheme()));
+ cs = ColourSchemeProperty.getColour(sg, ColourSchemeProperty
+ .getColourName(av.getGlobalColourScheme()));
}
// cs is null if shading is an annotationColourGradient
- if (cs!=null)
+ if (cs != null)
{
cs.setThreshold(av.getGlobalColourScheme().getThreshold(),
av.getIgnoreGapsConsensus());
}
}
- sg.cs=cs;
-// sg.recalcConservation();
+ sg.cs = cs;
+ // sg.recalcConservation();
sg.setName("JTreeGroup:" + sg.hashCode());
sg.setIdColour(col);
for (int a = 0; a < aps.length; a++)
for (int a = 0; a < aps.length; a++)
{
aps[a].updateAnnotation();
- // TODO: JAL-868 - need to ensure view colour change message is broadcast to any Jmols listening in
+ // TODO: JAL-868 - need to ensure view colour change message is broadcast
+ // to any Jmols listening in
}
}
{
int start, end;
SequenceI[] seqs;
- boolean selview=av
- .getSelectionGroup() != null && av
- .getSelectionGroup().getSize()>1;
+ boolean selview = av.getSelectionGroup() != null
+ && av.getSelectionGroup().getSize() > 1;
AlignmentView seqStrings = av.getAlignmentView(selview);
if (!selview)
{
{
start = av.getSelectionGroup().getStartRes();
end = av.getSelectionGroup().getEndRes() + 1;
- seqs = av.getSelectionGroup().getSequencesInOrder(av.getAlignment());
+ seqs = av.getSelectionGroup().getSequencesInOrder(
+ av.getAlignment());
}
tree = new NJTree(seqs, seqStrings, type, pwtype, start, end);
*/
public void sortByTree_actionPerformed(ActionEvent e)
{
-
+
if (treeCanvas.applyToAllViews)
{
final ArrayList<CommandI> commands = new ArrayList<CommandI>();
- for (AlignmentPanel ap: PaintRefresher.getAssociatedPanels(av
+ for (AlignmentPanel ap : PaintRefresher.getAssociatedPanels(av
.getSequenceSetId()))
{
commands.add(sortAlignmentIn(ap.av.getAlignPanel()));
}
av.getAlignPanel().alignFrame.addHistoryItem(new CommandI()
{
-
+
@Override
public void undoCommand(AlignmentI[] views)
{
- for (CommandI tsort:commands)
+ for (CommandI tsort : commands)
{
tsort.undoCommand(views);
- }
+ }
}
-
+
@Override
public int getSize()
{
return commands.size();
}
-
+
@Override
public String getDescription()
{
return "Tree Sort (many views)";
}
-
+
@Override
public void doCommand(AlignmentI[] views)
{
- for (CommandI tsort:commands)
+ for (CommandI tsort : commands)
{
tsort.doCommand(views);
- }
+ }
}
});
- for (AlignmentPanel ap: PaintRefresher.getAssociatedPanels(av
+ for (AlignmentPanel ap : PaintRefresher.getAssociatedPanels(av
.getSequenceSetId()))
{
// ensure all the alignFrames refresh their GI after adding an undo item
ap.alignFrame.updateEditMenuBar();
}
- } else {
- treeCanvas.ap.alignFrame.addHistoryItem(sortAlignmentIn(treeCanvas.ap));
+ }
+ else
+ {
+ treeCanvas.ap.alignFrame
+ .addHistoryItem(sortAlignmentIn(treeCanvas.ap));
}
}
+
public CommandI sortAlignmentIn(AlignmentPanel ap)
{
AlignViewport av = ap.av;
SequenceI[] oldOrder = av.getAlignment().getSequencesArray();
AlignmentSorter.sortByTree(av.getAlignment(), tree);
CommandI undo;
- undo=new OrderCommand("Tree Sort", oldOrder,
- av.getAlignment());
+ undo = new OrderCommand("Tree Sort", oldOrder, av.getAlignment());
- ap.paintAlignment(true);
+ ap.paintAlignment(true);
return undo;
}
+
/**
* DOCUMENT ME!
*
* @author jimp
*
*/
-public class VamsasApplication implements SelectionSource,VamsasSource
+public class VamsasApplication implements SelectionSource, VamsasSource
{
IClient vclient = null;
int i = -1;
- public void mouseOver(SequenceI seq, int index, VamsasSource source)
+ public void mouseOver(SequenceI seq, int index,
+ VamsasSource source)
{
if (jv2vobj == null)
return;
{
String[] vobj = new String[seqsel.getSize()];
int o = 0;
- for (SequenceI sel:seqsel.getSequences(null))
+ for (SequenceI sel : seqsel.getSequences(null))
{
VorbaId v = (VorbaId) jv2vobj.get(sel);
if (v != null)
* menu selection event occurred.
*/
private boolean append = false;
+
/**
- * flag indicating if the itemStateChanged listener for view associated menu items is currently enabled
+ * flag indicating if the itemStateChanged listener for view associated menu
+ * items is currently enabled
*/
private boolean enabled = true;
+
private JMenuItem selectAll, invertSel;
- private JCheckBoxMenuItem toggleview=null;
+
+ private JCheckBoxMenuItem toggleview = null;
+
private void rebuild()
{
removeAll();
if (allviews.length >= 2)
{
// ensure we update menu state to reflect external selection list state
- append = append || _selectedviews.size()>1;
- toggleview = new JCheckBoxMenuItem("Select many views",append);
- toggleview.setToolTipText("When enabled, allows many views to be selected.");
- toggleview.addItemListener(new ItemListener() {
+ append = append || _selectedviews.size() > 1;
+ toggleview = new JCheckBoxMenuItem("Select many views", append);
+ toggleview
+ .setToolTipText("When enabled, allows many views to be selected.");
+ toggleview.addItemListener(new ItemListener()
+ {
@Override
public void itemStateChanged(ItemEvent arg0)
selectAll.setEnabled(append);
invertSel.setEnabled(append);
}
-
+
}
-
+
});
add(toggleview);
- add(selectAll= new JMenuItem("Select all views"));
+ add(selectAll = new JMenuItem("Select all views"));
selectAll.addActionListener(new ActionListener()
{
{
for (Component c : getMenuComponents())
{
- boolean t=append;
- append=true;
+ boolean t = append;
+ append = true;
if (c instanceof JCheckBoxMenuItem)
{
- if (toggleview!=c && !((JCheckBoxMenuItem) c).isSelected())
+ if (toggleview != c && !((JCheckBoxMenuItem) c).isSelected())
{
((JCheckBoxMenuItem) c).doClick();
}
}
- append=t;
+ append = t;
}
}
});
@Override
public void actionPerformed(ActionEvent e)
{
- boolean t=append;
- append=true;
+ boolean t = append;
+ append = true;
for (Component c : getMenuComponents())
{
- if (toggleview!=c && c instanceof JCheckBoxMenuItem)
+ if (toggleview != c && c instanceof JCheckBoxMenuItem)
{
((JCheckBoxMenuItem) c).doClick();
}
}
- append=t;
+ append = t;
}
});
invertSel.setEnabled(append);
{
if (enabled)
{
- if (append)
- {
- enabled=false;
- // toggle the inclusion state
- if (_selectedviews.indexOf(p)==-1)
+ if (append)
{
- _selectedviews.add(p);
- a.setSelected(true);
+ enabled = false;
+ // toggle the inclusion state
+ if (_selectedviews.indexOf(p) == -1)
+ {
+ _selectedviews.add(p);
+ a.setSelected(true);
+ }
+ else
+ {
+ _selectedviews.remove(p);
+ a.setSelected(false);
+ }
+ enabled = true;
+ _handler.itemStateChanged(e);
}
else
{
- _selectedviews.remove(p);
- a.setSelected(false);
- }
- enabled=true;
- _handler.itemStateChanged(e);
- }
- else
- {
- // Deselect everything and select this item only
- _selectedviews.clear();
- _selectedviews.add(p);
- enabled=false;
- for (Component c : getMenuComponents())
- {
- if (c instanceof JCheckBoxMenuItem)
+ // Deselect everything and select this item only
+ _selectedviews.clear();
+ _selectedviews.add(p);
+ enabled = false;
+ for (Component c : getMenuComponents())
{
- ((JCheckBoxMenuItem) c).setSelected(a == c);
+ if (c instanceof JCheckBoxMenuItem)
+ {
+ ((JCheckBoxMenuItem) c).setSelected(a == c);
+ }
}
+ enabled = true;
+ // only fire event if we weren't selected before
+ _handler.itemStateChanged(e);
}
- enabled=true;
- // only fire event if we weren't selected before
- _handler.itemStateChanged(e);
- }
}
}
});
this.title = title;
setInfoText(info);
- java.net.URL url = getClass().getResource("/images/Jalview_Logo_small.png");
+ java.net.URL url = getClass().getResource(
+ "/images/Jalview_Logo_small.png");
image = java.awt.Toolkit.getDefaultToolkit().createImage(url);
MediaTracker mt = new MediaTracker(this);
if (image != null)
{
- int x=image.getWidth(this)/2,y=image.getHeight(this)/2;
- g.rotate(Math.toRadians(angle), 10+x, 10+y);
+ int x = image.getWidth(this) / 2, y = image.getHeight(this) / 2;
+ g.rotate(Math.toRadians(angle), 10 + x, 10 + y);
g.drawImage(image, 10, 10, this);
- g.rotate(-Math.toRadians(angle), 10+x, 10+y);
+ g.rotate(-Math.toRadians(angle), 10 + x, 10 + y);
}
}
/*
* (non-Javadoc)
- *
+ *
* @see jalview.gui.IProgressIndicator#setProgressBar(java.lang.String, long)
*/
@Override
}
/**
- *
+ *
* @return true if any progress bars are still active
*/
@Override
*/
JPanel paramList = new JPanel();
-
-
JPanel SetNamePanel = new JPanel();
JPanel setDetails = new JPanel();
JPanel jobPanel = new JPanel();
-
JScrollPane jobOptionsPane = new JScrollPane();
JButton createpref = new JButton();
JScrollPane paramPane = new JScrollPane();
-
-// ScrollablePanel optsAndparams = new ScrollablePanel();
+ // ScrollablePanel optsAndparams = new ScrollablePanel();
JPanel optsAndparams = new JPanel();
+
RunnerConfig serviceOptions;
ParamDatastoreI paramStore;
frame.setTitle("Edit parameters for " + service.getActionText());
Rectangle deskr = Desktop.instance.getBounds();
Dimension pref = this.getPreferredSize();
- frame.setBounds(new Rectangle((int) (deskr.getCenterX() - pref.width/2),
- (int) (deskr.getCenterY() - pref.height/2), pref.width, pref.height));
+ frame.setBounds(new Rectangle(
+ (int) (deskr.getCenterX() - pref.width / 2), (int) (deskr
+ .getCenterY() - pref.height / 2), pref.width,
+ pref.height));
frame.setContentPane(this);
-
+
// should perhaps recover defaults from user prefs.
frame.validate();
javax.swing.SwingUtilities.invokeLater(new Runnable()
{
- public void run()
- {
- //jobPanel.setDividerLocation(0.25);
+ public void run()
+ {
+ // jobPanel.setDividerLocation(0.25);
- }
- });
- frame.setVisible(true);
+ }
+ });
+ frame.setVisible(true);
if (response > 0)
{
{
this.addHierarchyBoundsListener(new HierarchyBoundsListener()
{
-
+
@Override
public void ancestorResized(HierarchyEvent arg0)
{
refreshParamLayout();
}
-
+
@Override
public void ancestorMoved(HierarchyEvent arg0)
{
// TODO Auto-generated method stub
-
+
}
});
updatepref = JvSwingUtils.makeButton("Update",
JLabel setNameLabel = new JLabel("Current parameter set name :");
setNameLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
-
+
setNameInfo.add(setNameLabel);
setNameInfo.add(setName);
-
+
// initial button visibility
updatepref.setVisible(false);
deletepref.setVisible(false);
((FlowLayout) setsavebuts.getLayout()).setHgap(10);
((FlowLayout) setsavebuts.getLayout()).setVgap(0);
JPanel spacer = new JPanel();
- spacer.setPreferredSize(new Dimension(2,30));
+ spacer.setPreferredSize(new Dimension(2, 30));
setsavebuts.add(spacer);
setsavebuts.add(deletepref);
setsavebuts.add(revertpref);
setsavebuts.add(createpref);
setsavebuts.add(updatepref);
-// setsavebuts.setSize(new Dimension(150, 30));
+ // setsavebuts.setSize(new Dimension(150, 30));
JPanel buttonArea = new JPanel(new GridLayout(1, 1));
buttonArea.add(setsavebuts);
SetNamePanel.add(setNameInfo);
jobOptions.setOpaque(true);
paramList.setBorder(new TitledBorder("Parameters"));
paramList.setOpaque(true);
- JPanel bjo=new JPanel(new BorderLayout()),bjp=new JPanel(new BorderLayout());
+ JPanel bjo = new JPanel(new BorderLayout()), bjp = new JPanel(
+ new BorderLayout());
bjo.add(jobOptions, BorderLayout.CENTER);
bjp.add(paramList, BorderLayout.CENTER);
bjp.setOpaque(true);
bjo.setOpaque(true);
- //optsAndparams.setScrollableWidth(ScrollableSizeHint.FIT);
+ // optsAndparams.setScrollableWidth(ScrollableSizeHint.FIT);
// optsAndparams.setScrollableHeight(ScrollableSizeHint.NONE);
- // optsAndparams.setLayout(new BorderLayout());
+ // optsAndparams.setLayout(new BorderLayout());
optsAndparams.setLayout(new BorderLayout());
optsAndparams.add(jobOptions, BorderLayout.NORTH);
optsAndparams.add(paramList, BorderLayout.CENTER);
- JPanel jp=new JPanel(new BorderLayout());
+ JPanel jp = new JPanel(new BorderLayout());
jp.add(optsAndparams, BorderLayout.CENTER);
paramPane.getViewport().setView(jp);
paramPane.setBorder(null);
jobPanel.setLayout(new BorderLayout());
jobPanel.add(setDetails, BorderLayout.NORTH);
jobPanel.add(paramPane, BorderLayout.CENTER);
-// jobPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
+ // jobPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
add(SetNamePanel, BorderLayout.NORTH);
add(jobPanel, BorderLayout.CENTER);
if (jobArgset != null && jobArgset.size() > 0)
{
curSetName = "Supplied Settings";
- isUserPreset=false;
+ isUserPreset = false;
updateTable(p, jobArgset);
setName.setSelectedItem(curSetName);
updateButtonDisplay();
// split to params and required arguments
{
- int cw=0;
+ int cw = 0;
for (ArgumentI myarg : args)
{
// Ideally, Argument would implement isRequired !
MAX_OPTWIDTH = ob.getPreferredSize().width;
}
ob.validate();
- cw+=ob.getPreferredSize().width+5;
+ cw += ob.getPreferredSize().width + 5;
}
else
{
settingDialog = stn;
}
-
public void refreshParamLayout()
{
-// optsAndparams.setPreferredSize(null);
+ // optsAndparams.setPreferredSize(null);
FlowLayout fl = new FlowLayout(FlowLayout.LEFT);
- int sep=fl.getVgap();
- boolean fh=true;
- int os=0,s = jobOptions.getBorder().getBorderInsets(jobOptions).bottom+jobOptions.getBorder().getBorderInsets(jobOptions).top+2 * sep;
+ int sep = fl.getVgap();
+ boolean fh = true;
+ int os = 0, s = jobOptions.getBorder().getBorderInsets(jobOptions).bottom
+ + jobOptions.getBorder().getBorderInsets(jobOptions).top
+ + 2
+ * sep;
/**
* final height for viewport
*/
- int finalh=s;
- int panewidth = paramPane.getViewport().getSize().width-120-jobOptions.getBorder().getBorderInsets(jobOptions).left+jobOptions.getBorder().getBorderInsets(jobOptions).right;
-
- int w = 2 * fl.getHgap() + (MAX_OPTWIDTH > OptsAndParamsPage.PARAM_WIDTH ? MAX_OPTWIDTH : OptsAndParamsPage.PARAM_WIDTH);
- int hgap=fl.getHgap(),cw=hgap;
-
+ int finalh = s;
+ int panewidth = paramPane.getViewport().getSize().width - 120
+ - jobOptions.getBorder().getBorderInsets(jobOptions).left
+ + jobOptions.getBorder().getBorderInsets(jobOptions).right;
+
+ int w = 2
+ * fl.getHgap()
+ + (MAX_OPTWIDTH > OptsAndParamsPage.PARAM_WIDTH ? MAX_OPTWIDTH
+ : OptsAndParamsPage.PARAM_WIDTH);
+ int hgap = fl.getHgap(), cw = hgap;
+
if (opanp.getOptSet().size() > 0)
{
-
- jobOptions.setLayout(new MigLayout("","", ""));
+
+ jobOptions.setLayout(new MigLayout("", "", ""));
jobOptions.removeAll();
-
+
for (OptionBox pbox : opanp.getOptSet().values())
{
pbox.validate();
- cw+=pbox.getSize().width+hgap;
- if (cw+120>panewidth)
- {
- jobOptions.add(pbox, "wrap");
- // System.out.println("Wrap on "+pbox.option.getName());
- cw=hgap+pbox.getSize().width;
- fh=true;
- } else {
- jobOptions.add(pbox);
- }
- if (fh)
- {
- finalh+=pbox.getSize().height+fl.getVgap();
- fh=false;
+ cw += pbox.getSize().width + hgap;
+ if (cw + 120 > panewidth)
+ {
+ jobOptions.add(pbox, "wrap");
+ // System.out.println("Wrap on "+pbox.option.getName());
+ cw = hgap + pbox.getSize().width;
+ fh = true;
+ }
+ else
+ {
+ jobOptions.add(pbox);
+ }
+ if (fh)
+ {
+ finalh += pbox.getSize().height + fl.getVgap();
+ fh = false;
+ }
}
- }
- jobOptions.revalidate();
+ jobOptions.revalidate();
}
else
{
jobOptions.setVisible(false);
}
- // Now layout the parameters assuming they occupy one column - to calculate total height of options+parameters
+ // Now layout the parameters assuming they occupy one column - to calculate
+ // total height of options+parameters
fl = new FlowLayout(FlowLayout.LEFT);
- // helpful hint from http://stackoverflow.com/questions/2743177/top-alignment-for-flowlayout
+ // helpful hint from
+ // http://stackoverflow.com/questions/2743177/top-alignment-for-flowlayout
fl.setAlignOnBaseline(true);
if (opanp.getParamSet().size() > 0)
{
paramList.removeAll();
- paramList.setLayout(new MigLayout("","",""));
- fh=true;
- for (ParamBox pbox:opanp.getParamSet().values())
+ paramList.setLayout(new MigLayout("", "", ""));
+ fh = true;
+ for (ParamBox pbox : opanp.getParamSet().values())
{
pbox.validate();
- cw+=pbox.getSize().width+hgap;
- if (cw+160>panewidth) {
+ cw += pbox.getSize().width + hgap;
+ if (cw + 160 > panewidth)
+ {
paramList.add(pbox, "wrap");
- cw=pbox.getSize().width+hgap;
- fh=true;
- } else {
+ cw = pbox.getSize().width + hgap;
+ fh = true;
+ }
+ else
+ {
paramList.add(pbox);
}
if (fh)
{
- finalh+=pbox.getSize().height+fl.getVgap();
- fh=false;
+ finalh += pbox.getSize().height + fl.getVgap();
+ fh = false;
}
}
-/* s = 2 * sep;
- for (ParamBox pbox : opanp.getParamSet().values())
- {
- pbox.validate();
- s += sep + pbox.getPreferredSize().height+pbox.getBorder().getBorderInsets(pbox).bottom;
- }
-
-// paramList.setPreferredSize(new Dimension(w, s));
- os+=s+2*sep+paramList.getBorder().getBorderInsets(paramList).bottom+paramList.getBorder().getBorderInsets(paramList).top;
- */
+ /*
+ * s = 2 * sep; for (ParamBox pbox : opanp.getParamSet().values()) {
+ * pbox.validate(); s += sep +
+ * pbox.getPreferredSize().height+pbox.getBorder
+ * ().getBorderInsets(pbox).bottom; }
+ *
+ * // paramList.setPreferredSize(new Dimension(w, s));
+ * os+=s+2*sep+paramList
+ * .getBorder().getBorderInsets(paramList).bottom+paramList
+ * .getBorder().getBorderInsets(paramList).top;
+ */
paramList.revalidate();
}
else
{
paramList.setVisible(false);
}
- // TODO: waste some time trying to eliminate any unnecessary .validate calls here
+ // TODO: waste some time trying to eliminate any unnecessary .validate calls
+ // here
// System.out.println("Size will be : "+w+","+os);
// optsAndparams.setPreferredSize(null);
// paramPane.getViewport().setView(optsAndparams);
public boolean isServiceDefaults()
{
- return (!isModified() && (lastParmSet != null && lastParmSet.equals(SVC_DEF)));
+ return (!isModified() && (lastParmSet != null && lastParmSet
+ .equals(SVC_DEF)));
}
+
public List<ArgumentI> getJobParams()
{
return opanp.getCurrentSettings();
public class WsPreferences extends GWsPreferences
{
-
public WsPreferences()
{
super();
};
- private void updateList() {
+ private void updateList()
+ {
Object tdat[][] = new Object[wsUrls.size()][2];
- int r=0;
+ int r = 0;
for (String url : wsUrls)
{
int status = Jws2Discoverer.getDiscoverer().getServerStatusFor(url);
- tdat[r][1]=new Integer(status);
- tdat[r++][0]=url;
+ tdat[r][1] = new Integer(status);
+ tdat[r++][0] = url;
}
-
+
wsList.setModel(new WsUrlTableModel(tdat));
wsList.getColumn("Status").setMinWidth(10);
}
- private class JabaWSStatusRenderer extends JPanel implements TableCellRenderer
+
+ private class JabaWSStatusRenderer extends JPanel implements
+ TableCellRenderer
{
public JabaWSStatusRenderer()
{
setOpaque(true);
- setMinimumSize(new Dimension(10,10));
-// setText(" ");
-
+ setMinimumSize(new Dimension(10, 10));
+ // setText(" ");
+
}
+
/**
* render an Integer reflecting service status as a colour and symbol
*/
@Override
public Component getTableCellRendererComponent(JTable arg0,
- Object status, boolean isSelected, boolean hasFocus, int row, int column)
+ Object status, boolean isSelected, boolean hasFocus, int row,
+ int column)
{
Color c;
- String t=new String("");
+ String t = new String("");
switch (((Integer) status).intValue())
{
case 1:
-// cb.setSelected(true);
- //cb.setBackground(
- c=Color.green;
+ // cb.setSelected(true);
+ // cb.setBackground(
+ c = Color.green;
break;
case 0:
-// cb.setSelected(true);
-// cb.setBackground(
- c=Color.lightGray;
+ // cb.setSelected(true);
+ // cb.setBackground(
+ c = Color.lightGray;
break;
case -1:
- //cb.setSelected(false);
- //cb.setBackground(
- c=Color.red;
+ // cb.setSelected(false);
+ // cb.setBackground(
+ c = Color.red;
break;
default:
- //cb.setSelected(false);
- //cb.setBackground(
- c=Color.orange;
+ // cb.setSelected(false);
+ // cb.setBackground(
+ c = Color.orange;
}
setBackground(c);
- //setText(t);
+ // setText(t);
return this;
-
+
}
}
- private class WsUrlTableModel extends AbstractTableModel {
-
+
+ private class WsUrlTableModel extends AbstractTableModel
+ {
+
private Object[][] data;
+
public WsUrlTableModel(Object[][] tdat)
{
- this.data=tdat;
+ this.data = tdat;
}
@Override
{
return 2;
}
+
@Override
public String getColumnName(int column)
{
- if (column==1)
+ if (column == 1)
{
return "Status";
}
return "Service URL";
}
+
@Override
public int getRowCount()
{
- if (data==null)
+ if (data == null)
{
return 0;
}
return data.length;
}
+
@Override
- public java.lang.Class<?> getColumnClass(int columnIndex) {
+ public java.lang.Class<?> getColumnClass(int columnIndex)
+ {
return getValueAt(0, columnIndex).getClass();
};
+
@Override
public Object getValueAt(int rowIndex, int columnIndex)
{
return data[rowIndex][columnIndex];
}
-
+
}
+
private void updateRsbsList()
{
sbrsList.setListData(rsbsUrls);
wsUrls.setElementAt(wsUrls.elementAt(p), p + 1);
wsUrls.setElementAt(t, p);
updateList();
- wsList.getSelectionModel().setSelectionInterval(p+1,p + 1);
+ wsList.getSelectionModel().setSelectionInterval(p + 1, p + 1);
update++;
}
}
wsUrls.setElementAt(wsUrls.elementAt(p), p - 1);
wsUrls.setElementAt(t, p);
updateList();
- wsList.getSelectionModel().setSelectionInterval(p-1,p - 1);
+ wsList.getSelectionModel().setSelectionInterval(p - 1, p - 1);
update++;
}
}
initData();
parse();
// sets the index of each sequence in the alignment
- for( int i=0,c=seqs.size(); i<c; i++ ) {
- seqs.get(i).setIndex(i);
+ for (int i = 0, c = seqs.size(); i < c; i++)
+ {
+ seqs.get(i).setIndex(i);
}
}
initData();
parse();
// sets the index of each sequence in the alignment
- for( int i=0,c=seqs.size(); i<c; i++ ) {
- seqs.get(i).setIndex(i);
+ for (int i = 0, c = seqs.size(); i < c; i++)
+ {
+ seqs.get(i).setIndex(i);
}
}
import jalview.datamodel.AlignmentI;
/**
- * Render associated attributes of an alignment. The heart of this code was refactored from jalview.gui.AlignFrame and jalview.appletgui.AlignFrame
- * TODO: consider extending the html renderer to annotate elements with CSS ids enabling finer output format control.
+ * Render associated attributes of an alignment. The heart of this code was
+ * refactored from jalview.gui.AlignFrame and jalview.appletgui.AlignFrame TODO:
+ * consider extending the html renderer to annotate elements with CSS ids
+ * enabling finer output format control.
*
*/
public class AlignmentProperties
/**
* render the alignment's properties report as text or an HTML fragment
+ *
* @param pw
* @param html
*/
\r
private void init()\r
{\r
- text = new StringBuffer("JALVIEW_ANNOTATION"+newline + "# Created: "\r
+ text = new StringBuffer("JALVIEW_ANNOTATION" + newline + "# Created: "\r
+ new java.util.Date() + newline + newline);\r
refSeq = null;\r
refSeqId = null;\r
public void printGroups(List<SequenceGroup> list)\r
{\r
SequenceI seqrep = null;\r
- for (SequenceGroup sg:list)\r
+ for (SequenceGroup sg : list)\r
{\r
if (!sg.hasSeqrep())\r
{\r
}\r
// Finally, resolve the groupRefs\r
Enumeration en = groupRefRows.keys();\r
- \r
+\r
while (en.hasMoreElements())\r
{\r
groupRef = (String) en.nextElement();\r
}\r
}\r
if (hasSymbols\r
- && (token.equals("H") || token.equals("E") || token.equals("S") || token\r
- .equals(" ")))\r
+ && (token.equals("H") || token.equals("E")\r
+ || token.equals("S") || token.equals(" ")))\r
{\r
// Either this character represents a helix or sheet\r
// or an integer which can be displayed\r
{\r
return;\r
}\r
- \r
+\r
String name = st.nextToken();\r
- SequenceGroup sg=null;\r
- for (SequenceGroup _sg:al.getGroups())\r
+ SequenceGroup sg = null;\r
+ for (SequenceGroup _sg : al.getGroups())\r
{\r
- if ((sg=_sg).getName().equals(name))\r
+ if ((sg = _sg).getName().equals(name))\r
{\r
break;\r
}\r
AlignFile afile = null;
String inFile;
+
/**
- * character used to write newlines
+ * character used to write newlines
*/
protected String newline = System.getProperty("line.separator");
+
public void setNewlineString(String nl)
{
newline = nl;
}
+
public String getNewlineString()
{
return newline;
}
+
/**
* check that this format is valid for reading
*
{
String protocol = FILE;
String ft = file.toLowerCase().trim();
- if (ft.indexOf("http:") ==0 || ft.indexOf("https:") ==0 || ft.indexOf("file:") == 0)
+ if (ft.indexOf("http:") == 0 || ft.indexOf("https:") == 0
+ || ft.indexOf("file:") == 0)
{
protocol = URL;
}
{
int i = 0;
boolean flag = false;
- boolean rna=false;
- boolean top=false;
- StringBuffer pssecstr=new StringBuffer(),consstr=new StringBuffer();
+ boolean rna = false;
+ boolean top = false;
+ StringBuffer pssecstr = new StringBuffer(), consstr = new StringBuffer();
Vector headers = new Vector();
Hashtable seqhash = new Hashtable();
StringBuffer tempseq;
{
while ((line = nextLine()) != null)
{
- if (line.length()==0)
+ if (line.length() == 0)
{
- top=true;
+ top = true;
}
if (line.indexOf(" ") != 0)
{
{
tempseq.append(str.nextToken());
}
- top=false;
+ top = false;
}
}
}
{
flag = true;
}
- } else {
+ }
+ else
+ {
if (line.matches("\\s+(-|\\.|\\(|\\[|\\]|\\))+"))
{
if (top)
{
pssecstr.append(line.trim());
- } else {
+ }
+ else
+ {
consstr.append(line.trim());
}
}
+ headers.elementAt(i));
}
}
- AlignmentAnnotation lastssa=null;
- if (pssecstr.length()==maxLength)
+ AlignmentAnnotation lastssa = null;
+ if (pssecstr.length() == maxLength)
{
- Vector ss=new Vector();
- AlignmentAnnotation ssa=lastssa=StockholmFile.parseAnnotationRow(ss, "secondary structure", pssecstr.toString());
- ssa.label="Secondary Structure";
+ Vector ss = new Vector();
+ AlignmentAnnotation ssa = lastssa = StockholmFile
+ .parseAnnotationRow(ss, "secondary structure",
+ pssecstr.toString());
+ ssa.label = "Secondary Structure";
annotations.addElement(ssa);
}
- if (consstr.length()==maxLength)
+ if (consstr.length() == maxLength)
{
- Vector ss=new Vector();
- AlignmentAnnotation ssa=StockholmFile.parseAnnotationRow(ss, "secondary structure", consstr.toString());
- ssa.label="Consensus Secondary Structure";
- if (lastssa==null || !lastssa.getRNAStruc().equals(ssa.getRNAStruc().replace('-', '.')))
+ Vector ss = new Vector();
+ AlignmentAnnotation ssa = StockholmFile.parseAnnotationRow(ss,
+ "secondary structure", consstr.toString());
+ ssa.label = "Consensus Secondary Structure";
+ if (lastssa == null
+ || !lastssa.getRNAStruc().equals(
+ ssa.getRNAStruc().replace('-', '.')))
{
annotations.addElement(ssa);
}
}
}
}
+
public String print()
{
return print(getSeqsAsArray());
public String print(SequenceI[] s)
{
- StringBuffer out = new StringBuffer("CLUSTAL"+newline+newline);
+ StringBuffer out = new StringBuffer("CLUSTAL" + newline + newline);
int max = 0;
int maxid = 0;
}\r
\r
/**\r
- * Parse GFF or sequence features file using case-independent matching, discarding URLs\r
- * @param align - alignment/dataset containing sequences that are to be annotated\r
- * @param colours - hashtable to store feature colour definitions\r
- * @param removeHTML - process html strings into plain text\r
+ * Parse GFF or sequence features file using case-independent matching,\r
+ * discarding URLs\r
+ * \r
+ * @param align\r
+ * - alignment/dataset containing sequences that are to be annotated\r
+ * @param colours\r
+ * - hashtable to store feature colour definitions\r
+ * @param removeHTML\r
+ * - process html strings into plain text\r
* @return true if features were added\r
*/\r
public boolean parse(AlignmentI align, Hashtable colours,\r
}\r
\r
/**\r
- * Parse GFF or sequence features file optionally using case-independent matching, discarding URLs\r
- * @param align - alignment/dataset containing sequences that are to be annotated\r
- * @param colours - hashtable to store feature colour definitions\r
- * @param removeHTML - process html strings into plain text\r
- * @param relaxedIdmatching - when true, ID matches to compound sequence IDs are allowed\r
+ * Parse GFF or sequence features file optionally using case-independent\r
+ * matching, discarding URLs\r
+ * \r
+ * @param align\r
+ * - alignment/dataset containing sequences that are to be annotated\r
+ * @param colours\r
+ * - hashtable to store feature colour definitions\r
+ * @param removeHTML\r
+ * - process html strings into plain text\r
+ * @param relaxedIdmatching\r
+ * - when true, ID matches to compound sequence IDs are allowed\r
* @return true if features were added\r
*/\r
- public boolean parse(AlignmentI align, \r
- Map colours, boolean removeHTML, boolean relaxedIdMatching)\r
+ public boolean parse(AlignmentI align, Map colours, boolean removeHTML,\r
+ boolean relaxedIdMatching)\r
{\r
return parse(align, colours, null, removeHTML, relaxedIdMatching);\r
}\r
\r
/**\r
- * Parse GFF or sequence features file optionally using case-independent matching\r
- * @param align - alignment/dataset containing sequences that are to be annotated\r
- * @param colours - hashtable to store feature colour definitions\r
- * @param featureLink - hashtable to store associated URLs \r
- * @param removeHTML - process html strings into plain text\r
+ * Parse GFF or sequence features file optionally using case-independent\r
+ * matching\r
+ * \r
+ * @param align\r
+ * - alignment/dataset containing sequences that are to be annotated\r
+ * @param colours\r
+ * - hashtable to store feature colour definitions\r
+ * @param featureLink\r
+ * - hashtable to store associated URLs\r
+ * @param removeHTML\r
+ * - process html strings into plain text\r
* @return true if features were added\r
*/\r
- public boolean parse(AlignmentI align, Map colours,\r
- Map featureLink, boolean removeHTML)\r
+ public boolean parse(AlignmentI align, Map colours, Map featureLink,\r
+ boolean removeHTML)\r
{\r
return parse(align, colours, featureLink, removeHTML, false);\r
}\r
\r
/**\r
- /**\r
- * Parse GFF or sequence features file \r
- * @param align - alignment/dataset containing sequences that are to be annotated\r
- * @param colours - hashtable to store feature colour definitions\r
- * @param featureLink - hashtable to store associated URLs \r
- * @param removeHTML - process html strings into plain text\r
- * @param relaxedIdmatching - when true, ID matches to compound sequence IDs are allowed\r
+ * /** Parse GFF or sequence features file\r
+ * \r
+ * @param align\r
+ * - alignment/dataset containing sequences that are to be annotated\r
+ * @param colours\r
+ * - hashtable to store feature colour definitions\r
+ * @param featureLink\r
+ * - hashtable to store associated URLs\r
+ * @param removeHTML\r
+ * - process html strings into plain text\r
+ * @param relaxedIdmatching\r
+ * - when true, ID matches to compound sequence IDs are allowed\r
* @return true if features were added\r
*/\r
- public boolean parse(AlignmentI align,\r
- Map colours, Map featureLink, boolean removeHTML, boolean relaxedIdmatching)\r
+ public boolean parse(AlignmentI align, Map colours, Map featureLink,\r
+ boolean removeHTML, boolean relaxedIdmatching)\r
{\r
\r
String line = null;\r
{\r
return;\r
}\r
- jalview.util.ParseHtmlBodyAndLinks parsed = new jalview.util.ParseHtmlBodyAndLinks(sf.getDescription(), removeHTML, newline);\r
+ jalview.util.ParseHtmlBodyAndLinks parsed = new jalview.util.ParseHtmlBodyAndLinks(\r
+ sf.getDescription(), removeHTML, newline);\r
\r
- sf.description = (removeHTML) ? parsed.getNonHtmlContent() : sf.description;\r
- for (String link:parsed.getLinks())\r
+ sf.description = (removeHTML) ? parsed.getNonHtmlContent()\r
+ : sf.description;\r
+ for (String link : parsed.getLinks())\r
{\r
sf.addLink(link);\r
}\r
// same data source
protected char suffixSeparator = '#';
+
/**
- * character used to write newlines
+ * character used to write newlines
*/
protected String newline = System.getProperty("line.separator");
+
public void setNewlineString(String nl)
{
newline = nl;
}
+
public String getNewlineString()
{
return newline;
}
+
/**
* '#' separated string tagged on to end of filename or url that was clipped
* off to resolve to valid filename
{
return dataName;
}
+
/**
* set the (human readable) name or URI for this datasource
+ *
* @param dataname
*/
- protected void setDataName(String dataname) {
+ protected void setDataName(String dataname)
+ {
dataName = dataname;
}
-
/**
* get the underlying bufferedReader for this data source.
+ *
* @return null if no reader available
* @throws IOException
*/
public Reader getReader()
{
- if (dataIn != null) // Probably don't need to test for readiness && dataIn.ready())
+ if (dataIn != null) // Probably don't need to test for readiness &&
+ // dataIn.ready())
{
return dataIn;
}
else if (data.indexOf(">") > -1)
{
// FASTA, PIR file or BLC file
- boolean checkPIR = false,starterm=false;
+ boolean checkPIR = false, starterm = false;
if ((data.indexOf(">P1;") > -1) || (data.indexOf(">DL;") > -1))
{
// watch for PIR file attributes
String data2 = source.nextLine();
if (checkPIR)
{
- starterm = (data1!=null && data1.indexOf("*")>-1) || (data2!=null && data2.indexOf("*")>-1);
+ starterm = (data1 != null && data1.indexOf("*") > -1)
+ || (data2 != null && data2.indexOf("*") > -1);
}
if (data2 != null && data.indexOf("*") > -1)
{
// TODO : AMSA File is indicated if there is annotation in the
// FASTA file - but FASTA will automatically generate this at the
// mo.
- if (!checkPIR) {
+ if (!checkPIR)
+ {
break;
}
}
// final check for PIR content. require
// >P1;title\n<blah>\nterminated sequence to occur at least once.
- // TODO the PIR/fasta ambiguity may be the use case that is needed to have
+ // TODO the PIR/fasta ambiguity may be the use case that is needed to
+ // have
// a 'Parse as type XXX' parameter for the applet/application.
if (checkPIR)
{
- String dta=null;
+ String dta = null;
if (!starterm)
{
- do {
- try {
+ do
+ {
+ try
+ {
dta = source.nextLine();
- } catch(IOException ex) {};
- if (dta!=null && dta.indexOf("*")>-1)
+ } catch (IOException ex)
+ {
+ }
+ ;
+ if (dta != null && dta.indexOf("*") > -1)
{
starterm = true;
}
- } while (dta!=null && !starterm);
+ } while (dta != null && !starterm);
}
if (starterm)
{
- reply="PIR";
+ reply = "PIR";
break;
- } else {
- reply="FASTA"; // probably a bad choice!
+ }
+ else
+ {
+ reply = "FASTA"; // probably a bad choice!
}
}
// read as a FASTA (probably)
// SelectAllFilter needs to be set first before adding further
// file filters to fix bug on Mac OSX
setAcceptAllFileFilterUsed(selectAll);
-
+
for (int i = 0; i < suffix.length; i++)
{
JalviewFileFilter jvf = new JalviewFileFilter(suffix[i], desc[i]);
StringBuffer out = new StringBuffer("!!" + (is_NA ? "NA" : "AA")
+ "_MULTIPLE_ALIGNMENT 1.0");
- // TODO: JBPNote : Jalview doesn't remember NA or AA yet.
+ // TODO: JBPNote : Jalview doesn't remember NA or AA yet.
out.append(newline);
out.append(newline);
int max = 0;
{
// Replace all internal gaps with . and external spaces with ~
s[i] = new Sequence(seqs[i].getName(), seqs[i].getSequenceAsString()
- .replace('-', '.'), seqs[i].getStart(),seqs[i].getEnd());
+ .replace('-', '.'), seqs[i].getStart(), seqs[i].getEnd());
StringBuffer sb = new StringBuffer();
sb.append(s[i].getSequence());
idBlock[i] = new String("Len: "
+ maxLenpad.form(s[i].getSequence().length) + " Check: "
- + maxChkpad.form(checksums[i]) + " Weight: 1.00"+newline);
+ + maxChkpad.form(checksums[i]) + " Weight: 1.00" + newline);
if (s[i].getName().length() > maxid)
{
maxid++;
out.append(newline);
- out.append(newline);out.append("//");
+ out.append(newline);
+ out.append("//");
out.append(newline);
out.append(newline);
int len = 50;
private java.util.Hashtable parseDescription(String desc)
{
java.util.Hashtable fields = new java.util.Hashtable();
- java.util.StringTokenizer st = new java.util.StringTokenizer(desc, ":",true);
-
+ java.util.StringTokenizer st = new java.util.StringTokenizer(desc, ":",
+ true);
+
String field;
int type = -1;
if (st.countTokens() > 0)
{
if (!field.equals(":"))
{
- // validate residue field value
- if (Types[i] == 1)
- {
- resCode val = validResidueCode(field);
- if (val != null)
+ // validate residue field value
+ if (Types[i] == 1)
{
- fields.put(new String(Fields[i] + "num"), val);
+ resCode val = validResidueCode(field);
+ if (val != null)
+ {
+ fields.put(new String(Fields[i] + "num"), val);
+ }
+ else
+ {
+ // jalview.bin.Cache.log.debug(
+ // "Ignoring non-Modeller description: invalid integer-like
+ // field '" + field + "'");
+ type = -1; /* invalid field! - throw the FieldSet away */
+ }
+ ;
}
- else
+ fields.put(Fields[i++], field);
+ if (st.hasMoreTokens())
{
- // jalview.bin.Cache.log.debug(
- // "Ignoring non-Modeller description: invalid integer-like
- // field '" + field + "'");
- type = -1; /* invalid field! - throw the FieldSet away */
+ st.nextToken(); // skip token sep.
}
- ;
}
- fields.put(Fields[i++], field);
- if (st.hasMoreTokens()) {
- st.nextToken(); // skip token sep.
- }
- } else {
+ else
+ {
i++;
}
}
while (st.hasMoreTokens())
{
String tl = st.nextToken(":");
- field += tl.equals(":") ? tl : (":" + tl);
+ field += tl.equals(":") ? tl : (":" + tl);
}
fields.put(Fields[TAIL], field);
}
{
// Set start and end before we update the type (in the case of a
// synthesized field set)
- if (getStartCode()==null || (getStartNum() != seq.getStart() && getStartCode().val != null))
+ if (getStartCode() == null
+ || (getStartNum() != seq.getStart() && getStartCode().val != null))
{
// unset or user updated sequence start position
setStartCode(seq.getStart());
}
- if (getEndCode()==null || (getEndNum() != seq.getEnd() && getStartCode()!=null && getStartCode().val != null))
+ if (getEndCode() == null
+ || (getEndNum() != seq.getEnd() && getStartCode() != null && getStartCode().val != null))
{
setEndCode(seq.getEnd());
}
{
int start = 0;
resCode val = getStartCode();
- if (val!=null && val.val != null)
+ if (val != null && val.val != null)
{
return val.val.intValue();
}
{
int end = 0;
resCode val = getEndCode();
- if (val!=null && val.val != null)
+ if (val != null && val.val != null)
{
return val.val.intValue();
}
{
if (isModellerFieldset())
{
- resCode rc=getStartCode();
- if (rc!=null && rc.val != null)
+ resCode rc = getStartCode();
+ if (rc != null && rc.val != null)
{
newSeq.setStart(getStartNum());
}
{
newSeq.setStart(1);
}
- rc=getEndCode();
- if (rc!=null && rc.val != null)
+ rc = getEndCode();
+ if (rc != null && rc.val != null)
{
newSeq.setEnd(getEndNum());
}
StringBuffer out = new StringBuffer("PileUp");
out.append(newline);
out.append(newline);
-
+
int max = 0;
int maxid = 0;
}
out.append(" MSF: " + s[0].getSequence().length
- + " Type: P Check: " + bigChecksum % 10000
- + " ..");
+ + " Type: P Check: " + bigChecksum % 10000 + " ..");
out.append(newline);
out.append(newline);
out.append(newline);
}
maxid++;
- out.append(newline);out.append(newline);out.append("//");
- out.append(newline);out.append(newline);
+ out.append(newline);
+ out.append(newline);
+ out.append("//");
+ out.append(newline);
+ out.append(newline);
int len = 50;
{
for (String[] urllink : createLinksFrom(null, urlstring))
{
- tooltipText2.append("<br/> <a href=\"" + urllink[3]
- + "\" target=\"" + urllink[0] + "\">"
- + (urllink[0].toLowerCase().equals(urllink[1].toLowerCase()) ? urllink[0] : (urllink[0]+ ":" + urllink[1])) + "</a></br>");
+ tooltipText2.append("<br/> <a href=\""
+ + urllink[3]
+ + "\" target=\""
+ + urllink[0]
+ + "\">"
+ + (urllink[0].toLowerCase().equals(
+ urllink[1].toLowerCase()) ? urllink[0]
+ : (urllink[0] + ":" + urllink[1]))
+ + "</a></br>");
}
} catch (Exception x)
{
public String[][] createLinksFrom(SequenceI seq, String link)
{
ArrayList<String[]> urlSets = new ArrayList<String[]>();
- ArrayList<String> uniques=new ArrayList<String>();
+ ArrayList<String> uniques = new ArrayList<String>();
UrlLink urlLink = new UrlLink(link);
if (!urlLink.isValid())
{
{
for (int u = 0; u < urls.length; u += 2)
{
- String unq=urls[u]+"|"+urls[u+1];
+ String unq = urls[u] + "|" + urls[u + 1];
if (!uniques.contains(unq))
{
urlSets.add(new String[]
- { target, label, urls[u], urls[u + 1] });
+ { target, label, urls[u], urls[u + 1] });
uniques.add(unq);
}
}
{
for (int u = 0; u < urls.length; u += 2)
{
- String unq=urls[u]+"|"+urls[u+1];
+ String unq = urls[u] + "|" + urls[u + 1];
if (!uniques.contains(unq))
{
urlSets.add(new String[]
- { target, label, urls[u], urls[u + 1] });
+ { target, label, urls[u], urls[u + 1] });
uniques.add(unq);
}
}
{
for (int u = 0; u < urls.length; u += 2)
{
- String unq=urls[u]+"|"+urls[u+1];
+ String unq = urls[u] + "|" + urls[u + 1];
if (!uniques.contains(unq))
{
urlSets.add(new String[]
- { target, label, urls[u], urls[u + 1] });
+ { target, label, urls[u], urls[u + 1] });
uniques.add(unq);
}
}
}
}
- } else {
- String unq=label + "|" + urlLink.getUrl_prefix();
- if (!uniques.contains(unq)){
+ }
+ else
+ {
+ String unq = label + "|" + urlLink.getUrl_prefix();
+ if (!uniques.contains(unq))
+ {
uniques.add(unq);
// Add a non-dynamic link
- urlSets.add(new String[] {target, label, null, urlLink.getUrl_prefix()});
+ urlSets.add(new String[]
+ { target, label, null, urlLink.getUrl_prefix() });
}
}
{});
}
-
public void createSequenceAnnotationReport(final StringBuffer tip,
SequenceI sequence, boolean showDbRefs, boolean showNpFeats,
Hashtable minmax)
{
- createSequenceAnnotationReport(tip, sequence, showDbRefs, showNpFeats, true, minmax);
+ createSequenceAnnotationReport(tip, sequence, showDbRefs, showNpFeats,
+ true, minmax);
}
public void createSequenceAnnotationReport(final StringBuffer tip,
- SequenceI sequence, boolean showDbRefs, boolean showNpFeats, boolean tableWrap,
- Hashtable minmax)
+ SequenceI sequence, boolean showDbRefs, boolean showNpFeats,
+ boolean tableWrap, Hashtable minmax)
{
String tmp;
tip.append("<i>");
tip.append("<br>" + tmp);
maxWidth = Math.max(maxWidth, tmp.length());
}
- SequenceI ds=sequence;
- while (ds.getDatasetSequence()!=null)
+ SequenceI ds = sequence;
+ while (ds.getDatasetSequence() != null)
{
- ds=ds.getDatasetSequence();
+ ds = ds.getDatasetSequence();
}
DBRefEntry[] dbrefs = ds.getDBRef();
if (showDbRefs && dbrefs != null)
int end = -1;\r
String sid = acc;\r
/*\r
- * Retrieve hash of annotations for this accession\r
- * Associate Annotation with accession\r
+ * Retrieve hash of annotations for this accession Associate\r
+ * Annotation with accession\r
*/\r
Hashtable accAnnotations = null;\r
\r
if (seqAnn != null && seqAnn.containsKey(acc))\r
{\r
accAnnotations = (Hashtable) seqAnn.remove(acc);\r
- //TODO: add structures to sequence\r
+ // TODO: add structures to sequence\r
}\r
\r
// Split accession in id and from/to\r
jalview.util.DBRefUtils.parseToDbRef(seqO, src, "0", acn);\r
// seqO.addDBRef(dbref);\r
}\r
- } \r
+ }\r
if (accAnnotations != null && accAnnotations.containsKey("SS"))\r
{\r
- Vector v = (Vector) accAnnotations.get("SS");\r
- \r
- for (int i = 0; i < v.size(); i++)\r
- {\r
- AlignmentAnnotation an = (AlignmentAnnotation) v.elementAt(i);\r
- seqO.addAlignmentAnnotation(an);\r
- //annotations.add(an);\r
- }\r
+ Vector v = (Vector) accAnnotations.get("SS");\r
+\r
+ for (int i = 0; i < v.size(); i++)\r
+ {\r
+ AlignmentAnnotation an = (AlignmentAnnotation) v.elementAt(i);\r
+ seqO.addAlignmentAnnotation(an);\r
+ // annotations.add(an);\r
+ }\r
}\r
- \r
+\r
Hashtable features = null;\r
// We need to adjust the positions of all features to account for gaps\r
try\r
ann = new Hashtable();\r
seqAnn.put(acc, ann);\r
}\r
- //TODO test structure, call parseAnnotationRow with vector from hashtable for specific sequence\r
+ // TODO test structure, call parseAnnotationRow with vector from\r
+ // hashtable for specific sequence\r
Hashtable features;\r
// Get an object with all the content for an annotation\r
if (ann.containsKey("features"))\r
}\r
ns += seq;\r
content.put(description, ns);\r
-
- if(type.equals("SS")){\r
- Hashtable strucAnn;\r
- if (seqAnn.containsKey(acc))\r
- {\r
- strucAnn = (Hashtable) seqAnn.get(acc);\r
- }\r
- else\r
- {\r
- strucAnn = new Hashtable();\r
- }\r
- \r
- Vector newStruc=new Vector();\r
- parseAnnotationRow(newStruc, type,ns);\r
- \r
- strucAnn.put(type, newStruc);\r
- seqAnn.put(acc, strucAnn);\r
- }\r
+\r
+ if (type.equals("SS"))\r
+ {\r
+ Hashtable strucAnn;\r
+ if (seqAnn.containsKey(acc))\r
+ {\r
+ strucAnn = (Hashtable) seqAnn.get(acc);\r
+ }\r
+ else\r
+ {\r
+ strucAnn = new Hashtable();\r
+ }\r
+\r
+ Vector newStruc = new Vector();\r
+ parseAnnotationRow(newStruc, type, ns);\r
+\r
+ strucAnn.put(type, newStruc);\r
+ seqAnn.put(acc, strucAnn);\r
+ }\r
}\r
else\r
{\r
}\r
}\r
\r
- protected static AlignmentAnnotation parseAnnotationRow(Vector annotation,\r
- String label, String annots)\r
+ protected static AlignmentAnnotation parseAnnotationRow(\r
+ Vector annotation, String label, String annots)\r
{\r
String convert1, convert2 = null;\r
\r
annot.annotations.length);\r
System.arraycopy(els, 0, anns, annot.annotations.length, els.length);\r
annot.annotations = anns;\r
- //System.out.println("else: ");\r
+ // System.out.println("else: ");\r
}\r
return annot;\r
}\r
import java.util.Map;
/**
- * A file parse for T-Coffee score ascii format. This file contains the alignment consensus
- * for each resude in any sequence.
+ * A file parse for T-Coffee score ascii format. This file contains the
+ * alignment consensus for each resude in any sequence.
* <p>
- * This file is procuded by <code>t_coffee</code> providing the option
+ * This file is procuded by <code>t_coffee</code> providing the option
* <code>-output=score_ascii </code> to the program command line
*
- * An example file is the following
+ * An example file is the following
*
* <pre>
* T-COFFEE, Version_9.02.r1228 (2012-02-16 18:15:12 - Revision 1228 - Build 336)
*
*
* @author Paolo Di Tommaso
- *
+ *
*/
-public class TCoffeeScoreFile extends AlignFile {
-
+public class TCoffeeScoreFile extends AlignFile
+{
+
public TCoffeeScoreFile(String inFile, String type) throws IOException
{
super(inFile, type);
-
+
}
public TCoffeeScoreFile(FileParse source) throws IOException
super(source);
}
- /** The {@link Header} structure holder */
- Header header;
-
- /**
- * Holds the consensues values for each sequences. It uses a LinkedHashMap to maintaint the
- * insertion order.
- */
- LinkedHashMap<String,StringBuilder> scores;
-
- Integer fWidth;
-
- /**
- * Parse the provided reader for the T-Coffee scores file format
- *
- * @param reader
- public static TCoffeeScoreFile load(Reader reader) {
-
- try {
- BufferedReader in = (BufferedReader) (reader instanceof BufferedReader ? reader : new BufferedReader(reader));
- TCoffeeScoreFile result = new TCoffeeScoreFile();
- result.doParsing(in);
- return result.header != null && result.scores != null ? result : null;
- }
- catch( Exception e) {
- throw new RuntimeException(e);
- }
- }
- */
-
- /**
- * @return The 'height' of the score matrix i.e. the numbers of score rows that should matches
- * the number of sequences in the alignment
- */
- public int getHeight() {
- // the last entry will always be the 'global' alingment consensus scores, so it is removed
- // from the 'height' count to make this value compatible with the number of sequences in the MSA
- return scores != null && scores.size() > 0 ? scores.size()-1 : 0;
- }
-
- /**
- * @return The 'width' of the score matrix i.e. the number of columns.
- * Since teh score value are supposd to be calculated for an 'aligned' MSA, all the entries
- * have to have the same width.
- */
- public int getWidth() {
- return fWidth != null ? fWidth : 0;
- }
-
-
- /**
- * Get the string of score values for the specified seqeunce ID.
- * @param id The sequence ID
- * @return The scores as a string of values e.g. {@code 99999987-------432}.
- * It return an empty string when the specified ID is missing.
- */
- public String getScoresFor( String id ) {
- return scores!=null && scores.containsKey(id) ? scores.get(id).toString() : "";
- }
-
- /**
- * @return The list of score string as a {@link List} object, in the same ordeer of the insertion i.e. in the MSA
- */
- public List<String> getScoresList() {
- if (scores==null)
- {
- return null;
- }
- List<String> result = new ArrayList<String>( scores.size() );
- for( Map.Entry<String,StringBuilder> it : scores.entrySet() ) {
- result.add(it.getValue().toString());
- }
-
- return result;
- }
-
- /**
- * @return The parsed score values a matrix of bytes
- */
- public byte[][] getScoresArray() {
- if (scores==null)
- {
- return null;
- }
- byte[][] result = new byte[ scores.size() ][];
-
- int rowCount = 0;
- for( Map.Entry<String,StringBuilder> it : scores.entrySet() ) {
- String line = it.getValue().toString();
- byte[] seqValues = new byte[ line.length() ];
- for( int j=0, c=line.length(); j<c; j++ ) {
-
- byte val = (byte)(line.charAt(j) - '0');
-
- seqValues[j] = ( val >= 0 && val <= 9 ) ? val : -1;
- }
-
- result[rowCount++] = seqValues;
- }
-
- return result;
- }
-
-
- public void parse() throws IOException
- {
- /*
- * read the header
- */
- header = readHeader(this);
-
- if( header == null ) { error=true; return;}
- scores = new LinkedHashMap<String,StringBuilder>();
-
- /*
- * initilize the structure
- */
- for( Map.Entry<String,Integer> entry : header.scores.entrySet() ) {
- scores.put( entry.getKey(), new StringBuilder());
- }
-
- /*
- * go with the reading
- */
- Block block;
- while( (block = readBlock(this,header.scores.size())) != null ) {
-
- /*
- * append sequences read in the block
- */
- for( Map.Entry<String,String> entry : block.items.entrySet() ) {
- StringBuilder scoreStringBuilder = scores.get(entry.getKey());
- if( scoreStringBuilder == null ) {
- error=true;
- errormessage=String.format("Invalid T-Coffee score file: Sequence ID '%s' is not declared in header section", entry.getKey());
- return ;
- }
-
- scoreStringBuilder.append( entry.getValue() );
- }
- }
-
- /*
- * verify that all rows have the same width
- */
- for( StringBuilder str : scores.values() ) {
- if( fWidth == null ) {
- fWidth = str.length();
- }
- else if( fWidth != str.length() ) {
- error=true;
- errormessage="Invalid T-Coffee score file: All the score sequences must have the same length";
- return ;
- }
- }
-
-
- return;
- }
-
-
- static int parseInt( String str ) {
- try {
- return Integer.parseInt(str);
- }
- catch( NumberFormatException e ) {
- // TODO report a warning ?
- return 0;
- }
- }
-
- /**
- * Reaad the header section in the T-Coffee score file format
- *
- * @param reader The scores reader
- * @return The parser {@link Header} instance
- * @throws RuntimeException when the header is not in the expected format
- */
- static Header readHeader(FileParse reader) throws IOException {
-
- Header result = null;
- try {
- result = new Header();
- result.head = reader.nextLine();
-
- String line;
-
- while( (line = reader.nextLine()) != null ) {
- if( line.startsWith("SCORE=")) {
- result.score = parseInt( line.substring(6).trim() );
- break;
- }
- }
-
- if( (line=reader.nextLine())==null || !"*".equals(line.trim())) { error(reader,"Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)"); return null;}
- if( (line=reader.nextLine())==null || !"BAD AVG GOOD".equals(line.trim())) { error(reader,"Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)"); return null;}
- if( (line=reader.nextLine())==null || !"*".equals(line.trim())) {error(reader,"Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)"); return null;}
-
- /*
- * now are expected a list if sequences ID up to the first blank line
- */
- while( (line=reader.nextLine()) != null ) {
- if( "".equals(line) ) {
- break;
- }
-
- int p = line.indexOf(":");
- if( p == -1 ) {
- // TODO report a warning
- continue;
- }
-
- String id = line.substring(0,p).trim();
- int val = parseInt(line.substring(p+1).trim());
- if( "".equals(id) ) {
- // TODO report warning
- continue;
- }
-
- result.scores.put(id,val);
- }
-
- if (result==null) {
- error(reader, "T-COFFEE score file had no per-sequence scores");
- }
-
- }
- catch( IOException e ) {
- error(reader,"Unexpected problem parsing T-Coffee score ascii file");
- throw e;
- }
-
- return result;
- }
- private static void error(FileParse reader, String errm)
- {
- reader.error=true;
- if (reader.errormessage==null)
- { reader.errormessage=errm;
- } else {
- reader.errormessage+="\n"+errm;
- }
- }
- /**
- * Read a scores block ihe provided stream.
- *
- * @param reader The stream to parse
- * @param size The expected number of the sequence to be read
- * @return The {@link Block} instance read or {link null} null if the end of file has reached.
- * @throws IOException Something went wrong on the 'wire'
- */
- static Block readBlock( FileParse reader, int size ) throws IOException {
- Block result = new Block(size);
- String line;
-
- /*
- * read blank lines (eventually)
- */
- while( (line=reader.nextLine()) != null && "".equals(line.trim())) {
- // consume blank lines
- }
-
- if( line == null ) { return null; }
-
- /*
- * read the scores block
- */
- do {
- if( "".equals(line.trim()) ) {
- // terminated
- break;
- }
-
- // split the line on the first blank
- // the first part have to contain the sequence id
- // the remaining part are the scores values
- int p = line.indexOf(" ");
- if( p == -1 ) {
- if (reader.warningMessage==null) { reader.warningMessage=""; }
- reader.warningMessage+="Possible parsing error - expected to find a space in line: '"+line+"'\n";
- continue;
- }
-
- String id = line.substring(0,p).trim();
- String val = line.substring(p+1).trim();
-
- result.items.put(id, val);
-
- } while( (line = reader.nextLine()) != null );
-
-
- return result;
- }
-
- /*
- * The score file header
- */
- static class Header {
- String head;
- int score;
-
- LinkedHashMap<String,Integer> scores = new LinkedHashMap<String,Integer>();
-
- public int getScoreAvg() { return score; }
-
- public int getScoreFor( String ID ) {
-
- return scores.containsKey(ID) ? scores.get(ID) : -1;
-
- }
- }
-
- /*
- * Hold a single block values block in the score file
- */
- static class Block {
- int size;
- Map<String,String> items;
-
- public Block( int size ) {
- this.size = size;
- this.items = new HashMap<String,String>(size);
- }
-
- String getScoresFor( String id ) {
- return items.get(id);
- }
-
- String getConsensus() {
- return items.get("cons");
- }
- }
- /**
- * TCOFFEE score colourscheme
- */
- static final Color[] colors = {
- new Color( 102, 102, 255 ), // #6666FF
- new Color( 0, 255, 0), // #00FF00
- new Color( 102, 255, 0), // #66FF00
- new Color( 204, 255, 0), // #CCFF00
- new Color( 255, 255, 0), // #FFFF00
- new Color( 255, 204, 0), // #FFCC00
- new Color( 255, 153, 0), // #FF9900
- new Color( 255, 102, 0), // #FF6600
- new Color( 255, 51, 0), // #FF3300
- new Color( 255, 34, 0) // #FF2000
- };
- public final static String TCOFFEE_SCORE="TCoffeeScore";
- /**
- * generate annotation for this TCoffee score set on the given alignment
- * @param al alignment to annotate
- * @param matchids if true, annotate sequences based on matching sequence names
- * @return true if alignment annotation was modified, false otherwise.
- */
- public boolean annotateAlignment(AlignmentI al, boolean matchids)
- {
- if (al.getHeight()!=getHeight() || al.getWidth()!=getWidth())
- {
- warningMessage="Alignment shape does not match T-Coffee score file shape.";
- return false;
- }
- boolean added=false;
- int i=0;
- SequenceIdMatcher sidmatcher = new SequenceIdMatcher(al.getSequencesArray());
- byte[][] scoreMatrix=getScoresArray();
- // for 2.8 - we locate any existing TCoffee annotation and remove it first before adding this.
- for (Map.Entry<String,StringBuilder> id:scores.entrySet())
- {
- byte[] srow=scoreMatrix[i];
- SequenceI s;
- if (matchids)
- {
- s=sidmatcher.findIdMatch(id.getKey());
- } else {
- s=al.getSequenceAt(i);
- }
- i++;
- if (s==null && i!=scores.size() && !id.getKey().equals("cons"))
- {
- System.err.println("No "+(matchids ? "match ":" sequences left ")+" for TCoffee score set : "+id.getKey());
- continue;
- }
- int jSize=al.getWidth()< srow.length ? al.getWidth() : srow.length;
- Annotation[] annotations=new Annotation[al.getWidth()];
- for (int j=0;j<jSize;j++) {
- byte val = srow[j];
- if (s!=null && jalview.util.Comparison.isGap(s.getCharAt(j)))
- {
- annotations[j]=null;
- if (val>0)
- {
- System.err.println("Warning: non-zero value for positional T-COFFEE score for gap at "+j+" in sequence "+s.getName());
- }
- } else {
- annotations[j]=new Annotation(s==null ? ""+val:null,s==null ? ""+val:null,'\0',val*1f,val >= 0 && val < colors.length ? colors[val] : Color.white);
- }
- }
- // this will overwrite any existing t-coffee scores for the alignment
- AlignmentAnnotation aa=al.findOrCreateAnnotation(TCOFFEE_SCORE,TCOFFEE_SCORE,false,s, null);
- if (s!=null)
- {
- aa.label="T-COFFEE";
- aa.description=""+id.getKey();
- aa.annotations=annotations;
- aa.visible=false;
- aa.belowAlignment=false;
- aa.setScore(header.getScoreFor(id.getKey()));
- aa.createSequenceMapping(s, s.getStart(),true);
- s.addAlignmentAnnotation(aa);
- aa.adjustForAlignment();
- } else {
- aa.graph=AlignmentAnnotation.NO_GRAPH;
- aa.label="T-COFFEE";
- aa.description="TCoffee column reliability score";
- aa.annotations=annotations;
- aa.belowAlignment=true;
- aa.visible=true;
- aa.setScore(header.getScoreAvg());
- }
- aa.showAllColLabels=true;
- aa.validateRangeAndDisplay();
- added=true;
- }
-
- return added;
- }
+ /** The {@link Header} structure holder */
+ Header header;
+
+ /**
+ * Holds the consensues values for each sequences. It uses a LinkedHashMap to
+ * maintaint the insertion order.
+ */
+ LinkedHashMap<String, StringBuilder> scores;
+
+ Integer fWidth;
+
+ /**
+ * Parse the provided reader for the T-Coffee scores file format
+ *
+ * @param reader
+ * public static TCoffeeScoreFile load(Reader reader) {
+ *
+ * try { BufferedReader in = (BufferedReader) (reader instanceof
+ * BufferedReader ? reader : new BufferedReader(reader));
+ * TCoffeeScoreFile result = new TCoffeeScoreFile();
+ * result.doParsing(in); return result.header != null &&
+ * result.scores != null ? result : null; } catch( Exception e) {
+ * throw new RuntimeException(e); } }
+ */
+
+ /**
+ * @return The 'height' of the score matrix i.e. the numbers of score rows
+ * that should matches the number of sequences in the alignment
+ */
+ public int getHeight()
+ {
+ // the last entry will always be the 'global' alingment consensus scores, so
+ // it is removed
+ // from the 'height' count to make this value compatible with the number of
+ // sequences in the MSA
+ return scores != null && scores.size() > 0 ? scores.size() - 1 : 0;
+ }
+
+ /**
+ * @return The 'width' of the score matrix i.e. the number of columns. Since
+ * teh score value are supposd to be calculated for an 'aligned' MSA,
+ * all the entries have to have the same width.
+ */
+ public int getWidth()
+ {
+ return fWidth != null ? fWidth : 0;
+ }
+
+ /**
+ * Get the string of score values for the specified seqeunce ID.
+ *
+ * @param id
+ * The sequence ID
+ * @return The scores as a string of values e.g. {@code 99999987-------432}.
+ * It return an empty string when the specified ID is missing.
+ */
+ public String getScoresFor(String id)
+ {
+ return scores != null && scores.containsKey(id) ? scores.get(id)
+ .toString() : "";
+ }
+
+ /**
+ * @return The list of score string as a {@link List} object, in the same
+ * ordeer of the insertion i.e. in the MSA
+ */
+ public List<String> getScoresList()
+ {
+ if (scores == null)
+ {
+ return null;
+ }
+ List<String> result = new ArrayList<String>(scores.size());
+ for (Map.Entry<String, StringBuilder> it : scores.entrySet())
+ {
+ result.add(it.getValue().toString());
+ }
+
+ return result;
+ }
+
+ /**
+ * @return The parsed score values a matrix of bytes
+ */
+ public byte[][] getScoresArray()
+ {
+ if (scores == null)
+ {
+ return null;
+ }
+ byte[][] result = new byte[scores.size()][];
+
+ int rowCount = 0;
+ for (Map.Entry<String, StringBuilder> it : scores.entrySet())
+ {
+ String line = it.getValue().toString();
+ byte[] seqValues = new byte[line.length()];
+ for (int j = 0, c = line.length(); j < c; j++)
+ {
+
+ byte val = (byte) (line.charAt(j) - '0');
+
+ seqValues[j] = (val >= 0 && val <= 9) ? val : -1;
+ }
+
+ result[rowCount++] = seqValues;
+ }
+
+ return result;
+ }
+
+ public void parse() throws IOException
+ {
+ /*
+ * read the header
+ */
+ header = readHeader(this);
+
+ if (header == null)
+ {
+ error = true;
+ return;
+ }
+ scores = new LinkedHashMap<String, StringBuilder>();
+
+ /*
+ * initilize the structure
+ */
+ for (Map.Entry<String, Integer> entry : header.scores.entrySet())
+ {
+ scores.put(entry.getKey(), new StringBuilder());
+ }
+
+ /*
+ * go with the reading
+ */
+ Block block;
+ while ((block = readBlock(this, header.scores.size())) != null)
+ {
+
+ /*
+ * append sequences read in the block
+ */
+ for (Map.Entry<String, String> entry : block.items.entrySet())
+ {
+ StringBuilder scoreStringBuilder = scores.get(entry.getKey());
+ if (scoreStringBuilder == null)
+ {
+ error = true;
+ errormessage = String
+ .format("Invalid T-Coffee score file: Sequence ID '%s' is not declared in header section",
+ entry.getKey());
+ return;
+ }
+
+ scoreStringBuilder.append(entry.getValue());
+ }
+ }
+
+ /*
+ * verify that all rows have the same width
+ */
+ for (StringBuilder str : scores.values())
+ {
+ if (fWidth == null)
+ {
+ fWidth = str.length();
+ }
+ else if (fWidth != str.length())
+ {
+ error = true;
+ errormessage = "Invalid T-Coffee score file: All the score sequences must have the same length";
+ return;
+ }
+ }
+
+ return;
+ }
+
+ static int parseInt(String str)
+ {
+ try
+ {
+ return Integer.parseInt(str);
+ } catch (NumberFormatException e)
+ {
+ // TODO report a warning ?
+ return 0;
+ }
+ }
+
+ /**
+ * Reaad the header section in the T-Coffee score file format
+ *
+ * @param reader
+ * The scores reader
+ * @return The parser {@link Header} instance
+ * @throws RuntimeException
+ * when the header is not in the expected format
+ */
+ static Header readHeader(FileParse reader) throws IOException
+ {
+
+ Header result = null;
+ try
+ {
+ result = new Header();
+ result.head = reader.nextLine();
+
+ String line;
+
+ while ((line = reader.nextLine()) != null)
+ {
+ if (line.startsWith("SCORE="))
+ {
+ result.score = parseInt(line.substring(6).trim());
+ break;
+ }
+ }
+
+ if ((line = reader.nextLine()) == null || !"*".equals(line.trim()))
+ {
+ error(reader,
+ "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)");
+ return null;
+ }
+ if ((line = reader.nextLine()) == null
+ || !"BAD AVG GOOD".equals(line.trim()))
+ {
+ error(reader,
+ "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)");
+ return null;
+ }
+ if ((line = reader.nextLine()) == null || !"*".equals(line.trim()))
+ {
+ error(reader,
+ "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)");
+ return null;
+ }
+
+ /*
+ * now are expected a list if sequences ID up to the first blank line
+ */
+ while ((line = reader.nextLine()) != null)
+ {
+ if ("".equals(line))
+ {
+ break;
+ }
+
+ int p = line.indexOf(":");
+ if (p == -1)
+ {
+ // TODO report a warning
+ continue;
+ }
+
+ String id = line.substring(0, p).trim();
+ int val = parseInt(line.substring(p + 1).trim());
+ if ("".equals(id))
+ {
+ // TODO report warning
+ continue;
+ }
+
+ result.scores.put(id, val);
+ }
+
+ if (result == null)
+ {
+ error(reader, "T-COFFEE score file had no per-sequence scores");
+ }
+
+ } catch (IOException e)
+ {
+ error(reader, "Unexpected problem parsing T-Coffee score ascii file");
+ throw e;
+ }
+
+ return result;
+ }
+
+ private static void error(FileParse reader, String errm)
+ {
+ reader.error = true;
+ if (reader.errormessage == null)
+ {
+ reader.errormessage = errm;
+ }
+ else
+ {
+ reader.errormessage += "\n" + errm;
+ }
+ }
+
+ /**
+ * Read a scores block ihe provided stream.
+ *
+ * @param reader
+ * The stream to parse
+ * @param size
+ * The expected number of the sequence to be read
+ * @return The {@link Block} instance read or {link null} null if the end of
+ * file has reached.
+ * @throws IOException
+ * Something went wrong on the 'wire'
+ */
+ static Block readBlock(FileParse reader, int size) throws IOException
+ {
+ Block result = new Block(size);
+ String line;
+
+ /*
+ * read blank lines (eventually)
+ */
+ while ((line = reader.nextLine()) != null && "".equals(line.trim()))
+ {
+ // consume blank lines
+ }
+
+ if (line == null)
+ {
+ return null;
+ }
+
+ /*
+ * read the scores block
+ */
+ do
+ {
+ if ("".equals(line.trim()))
+ {
+ // terminated
+ break;
+ }
+
+ // split the line on the first blank
+ // the first part have to contain the sequence id
+ // the remaining part are the scores values
+ int p = line.indexOf(" ");
+ if (p == -1)
+ {
+ if (reader.warningMessage == null)
+ {
+ reader.warningMessage = "";
+ }
+ reader.warningMessage += "Possible parsing error - expected to find a space in line: '"
+ + line + "'\n";
+ continue;
+ }
+
+ String id = line.substring(0, p).trim();
+ String val = line.substring(p + 1).trim();
+
+ result.items.put(id, val);
+
+ } while ((line = reader.nextLine()) != null);
+
+ return result;
+ }
+
+ /*
+ * The score file header
+ */
+ static class Header
+ {
+ String head;
+
+ int score;
+
+ LinkedHashMap<String, Integer> scores = new LinkedHashMap<String, Integer>();
+
+ public int getScoreAvg()
+ {
+ return score;
+ }
+
+ public int getScoreFor(String ID)
+ {
+
+ return scores.containsKey(ID) ? scores.get(ID) : -1;
+
+ }
+ }
+
+ /*
+ * Hold a single block values block in the score file
+ */
+ static class Block
+ {
+ int size;
+
+ Map<String, String> items;
+
+ public Block(int size)
+ {
+ this.size = size;
+ this.items = new HashMap<String, String>(size);
+ }
+
+ String getScoresFor(String id)
+ {
+ return items.get(id);
+ }
+
+ String getConsensus()
+ {
+ return items.get("cons");
+ }
+ }
+
+ /**
+ * TCOFFEE score colourscheme
+ */
+ static final Color[] colors =
+ { new Color(102, 102, 255), // #6666FF
+ new Color(0, 255, 0), // #00FF00
+ new Color(102, 255, 0), // #66FF00
+ new Color(204, 255, 0), // #CCFF00
+ new Color(255, 255, 0), // #FFFF00
+ new Color(255, 204, 0), // #FFCC00
+ new Color(255, 153, 0), // #FF9900
+ new Color(255, 102, 0), // #FF6600
+ new Color(255, 51, 0), // #FF3300
+ new Color(255, 34, 0) // #FF2000
+ };
+
+ public final static String TCOFFEE_SCORE = "TCoffeeScore";
+
+ /**
+ * generate annotation for this TCoffee score set on the given alignment
+ *
+ * @param al
+ * alignment to annotate
+ * @param matchids
+ * if true, annotate sequences based on matching sequence names
+ * @return true if alignment annotation was modified, false otherwise.
+ */
+ public boolean annotateAlignment(AlignmentI al, boolean matchids)
+ {
+ if (al.getHeight() != getHeight() || al.getWidth() != getWidth())
+ {
+ warningMessage = "Alignment shape does not match T-Coffee score file shape.";
+ return false;
+ }
+ boolean added = false;
+ int i = 0;
+ SequenceIdMatcher sidmatcher = new SequenceIdMatcher(
+ al.getSequencesArray());
+ byte[][] scoreMatrix = getScoresArray();
+ // for 2.8 - we locate any existing TCoffee annotation and remove it first
+ // before adding this.
+ for (Map.Entry<String, StringBuilder> id : scores.entrySet())
+ {
+ byte[] srow = scoreMatrix[i];
+ SequenceI s;
+ if (matchids)
+ {
+ s = sidmatcher.findIdMatch(id.getKey());
+ }
+ else
+ {
+ s = al.getSequenceAt(i);
+ }
+ i++;
+ if (s == null && i != scores.size() && !id.getKey().equals("cons"))
+ {
+ System.err.println("No "
+ + (matchids ? "match " : " sequences left ")
+ + " for TCoffee score set : " + id.getKey());
+ continue;
+ }
+ int jSize = al.getWidth() < srow.length ? al.getWidth() : srow.length;
+ Annotation[] annotations = new Annotation[al.getWidth()];
+ for (int j = 0; j < jSize; j++)
+ {
+ byte val = srow[j];
+ if (s != null && jalview.util.Comparison.isGap(s.getCharAt(j)))
+ {
+ annotations[j] = null;
+ if (val > 0)
+ {
+ System.err
+ .println("Warning: non-zero value for positional T-COFFEE score for gap at "
+ + j + " in sequence " + s.getName());
+ }
+ }
+ else
+ {
+ annotations[j] = new Annotation(s == null ? "" + val : null,
+ s == null ? "" + val : null, '\0', val * 1f, val >= 0
+ && val < colors.length ? colors[val]
+ : Color.white);
+ }
+ }
+ // this will overwrite any existing t-coffee scores for the alignment
+ AlignmentAnnotation aa = al.findOrCreateAnnotation(TCOFFEE_SCORE,
+ TCOFFEE_SCORE, false, s, null);
+ if (s != null)
+ {
+ aa.label = "T-COFFEE";
+ aa.description = "" + id.getKey();
+ aa.annotations = annotations;
+ aa.visible = false;
+ aa.belowAlignment = false;
+ aa.setScore(header.getScoreFor(id.getKey()));
+ aa.createSequenceMapping(s, s.getStart(), true);
+ s.addAlignmentAnnotation(aa);
+ aa.adjustForAlignment();
+ }
+ else
+ {
+ aa.graph = AlignmentAnnotation.NO_GRAPH;
+ aa.label = "T-COFFEE";
+ aa.description = "TCoffee column reliability score";
+ aa.annotations = annotations;
+ aa.belowAlignment = true;
+ aa.visible = true;
+ aa.setScore(header.getScoreAvg());
+ }
+ aa.showAllColLabels = true;
+ aa.validateRangeAndDisplay();
+ added = true;
+ }
+
+ return added;
+ }
@Override
public String print()
}
/**
- *
+ *
* @param vobj
* @return Jalview datamodel object bound to the vamsas document object
*/
/**
* put the alignment viewed by AlignViewport into cdoc.
- *
+ *
* @param av
* alignViewport to be stored
* @param aFtitle
/*
* We do not put local Alignment Sequence Features into the vamsas
* document yet.
- *
- *
+ *
+ *
* jalview.datamodel.SequenceFeature[] features = alseq
* .getSequenceFeatures(); for (int f = 0; f < features.length; f++) {
* if (features[f] != null) { AlignmentSequenceAnnotation valseqf = (
* AlignmentSequenceAnnotation) getjv2vObj(features[i]); if (valseqf
* == null) {
- *
+ *
* valseqf = (AlignmentSequenceAnnotation) getDSAnnotationFromJalview(
* new AlignmentSequenceAnnotation(), features[i]);
* valseqf.setGraph(false);
else
{
// first find the alignment sequence to associate this with.
- for (SequenceI jvalsq:av.getAlignment().getSequences()) {
+ for (SequenceI jvalsq : av.getAlignment().getSequences())
+ {
// saveDatasetSequenceAnnotation(AlSeqMaps,(uk.ac.vamsas.objects.core.Sequence)
// sref, aa[i]);
if (jvalsq.getDatasetSequence() == aa[i].sequenceRef)
* very quick test to see if the viewport would be stored in the vamsas
* document. Reasons for not storing include the unaligned flag being false
* (for all sequences, including the hidden ones!)
- *
+ *
* @param av
* @return true if alignment associated with this view will be stored in
* document.
/**
* remove docseqs from the given alignment marking provenance appropriately
* and removing any references to the sequences.
- *
+ *
* @param alignment
* @param docseqs
*/
* vamsas alignment sequence for jvalsq and adds it to the alignment if
* necessary. unbounddocseq is a duplicate of the vamsas alignment sequences
* and these are removed after being processed w.r.t a bound jvalsq
- *
+ *
*/
private boolean syncToAlignmentSequence(SequenceI jvalsq,
Alignment alignment, Vector unbounddocseq)
/**
* set vamsas annotation object type from jalview annotation
- *
+ *
* @param an
* @param alan
*/
/**
* get start<end range of segment, adjusting for inclusivity flag and
* polarity.
- *
+ *
* @param visSeg
* @param ensureDirection
* when true - always ensure start is less than end.
}
/**
- *
+ *
* @param annotation
* @return true if annotation is not to be stored in document
*/
if (mappings != null && mappings.length > 0)
{
jalview.structure.StructureSelectionManager
- .getStructureSelectionManager(Desktop.instance).addMappings(mappings);
+ .getStructureSelectionManager(Desktop.instance)
+ .addMappings(mappings);
}
}
}
/**
* replaces oldjvobject with newjvobject in the Jalview Object <> VorbaID
* binding tables
- *
+ *
* @param oldjvobject
* @param newjvobject
* (may be null)
Object vobject = jv2vobj.remove(oldjvobject);
if (vobject == null)
{
- // NOTE: this happens if user deletes object in one session then updates from another client
+ // NOTE: this happens if user deletes object in one session then updates
+ // from another client
throw new Error(
"IMPLEMENTATION ERROR: old jalview object is not bound ! ("
+ oldjvobject + ")");
/**
* translate the Vobject keys to strings for use in Jalview2XML
- *
+ *
* @param jv2vobj2
* @return
*/
/**
* translate the Vobject values to strings for use in Jalview2XML
- *
+ *
* @param vobj2jv2
* @return hashtable with string values
*/
/**
* synchronize Jalview from the vamsas document
- *
+ *
* @return number of new views from document
*/
public int updateToJalview()
for (i = 0, iSize = dsseqs.size(); i < iSize; i++)
{
seqs[i] = dsseqs.get(i);
- dsseqs.set(i,null);
+ dsseqs.set(i, null);
}
jal = new jalview.datamodel.Alignment(seqs);
Cache.log.debug("New vamsas alignment imported into jalview "
* jalview.datamodel.Annotation[] rows Two annotation rows are made if there
* are distinct annotation for both at 'pos' and 'after pos' at any particular
* site.
- *
+ *
* @param annotation
* @return { boolean[static int constants ], int[ae.length] - map to annotated
* object frame, jalview.datamodel.Annotation[],
* get real bounds of a RangeType's specification. start and end are an
* inclusive range within which all segments and positions lie. TODO: refactor
* to vamsas utils
- *
+ *
* @param dseta
* @return int[] { start, end}
*/
/**
* map from a rangeType's internal frame to the referenced object's coordinate
* frame.
- *
+ *
* @param dseta
* @return int [] { ref(pos)...} for all pos in rangeType's frame.
*/
}
/**
- *
+ *
* @param maprange
* where the from range is the local mapped range, and the to range
* is the 'mapped' range in the MapRangeType
/**
* initialise a range type object from a set of start/end inclusive intervals
- *
+ *
* @param mrt
* @param range
*/
/**
* initialise a MapType object from a MapList object.
- *
+ *
* @param maprange
* @param ml
* @param setUnits
* App and Action here. Provenance prov = new Provenance();
* org.exolab.castor.types.Date date = new org.exolab.castor.types.Date( new
* java.util.Date()); Entry provEntry;
- *
+ *
* if (jprov != null) { entries = jprov.getEntries(); for (int i = 0; i <
* entries.length; i++) { provEntry = new Entry(); try { date = new
* org.exolab.castor.types.Date(entries[i].getDate()); } catch (Exception ex)
* { ex.printStackTrace();
- *
+ *
* date = new org.exolab.castor.types.Date(entries[i].getDate()); }
* provEntry.setDate(date); provEntry.setUser(entries[i].getUser());
* provEntry.setAction(entries[i].getAction()); prov.addEntry(provEntry); } }
* provEntry.setUser(System.getProperty("user.name")); // TODO: ext string
* provEntry.setApp("JVAPP"); // TODO: ext string provEntry.setAction(action);
* prov.addEntry(provEntry); }
- *
+ *
* return prov; }
*/
jalview.datamodel.Provenance getJalviewProvenance(Provenance prov)
}
/**
- *
+ *
* @return default initial provenance list for a Jalview created vamsas
* object.
*/
package jalview.io.packed;
/**
- * API for a data provider that can be used with jalview.io.packed.ParsePackedSet
+ * API for a data provider that can be used with
+ * jalview.io.packed.ParsePackedSet
+ *
* @author JimP
- *
+ *
*/
public interface DataProvider
{
/**
* class of data expected to be provided by datasource
+ *
* @author JimP
- *
+ *
*/
public enum JvDataType
{
/**
* a jalview annotation file
*/
- ANNOTATION,
+ ANNOTATION,
/**
- * a GFF or Jalview features file
+ * a GFF or Jalview features file
*/
FEATURES,
/**
*/
TREE,
/**
- * any file that provides data that should be associated with a specified sequence.
+ * any file that provides data that should be associated with a specified
+ * sequence.
*/
SEQASSOCATED;
}
/**
- * data to be parsed according to its type. Each call to getDataSource
- * should return a new instance of the same data stream initialised to the
- * beginning of the chunk of data that is to be parsed.
+ * data to be parsed according to its type. Each call to getDataSource should
+ * return a new instance of the same data stream initialised to the beginning
+ * of the chunk of data that is to be parsed.
*
* @return
*/
{
return parentDataset;
}
+
/**
- * @param parentDataset the parentDataset to set
+ * @param parentDataset
+ * the parentDataset to set
*/
public void setParentDataset(AlignmentI parentDataset)
{
this.parentDataset = parentDataset;
}
+
/**
* @return the featureColours
*/
{
return featureColours;
}
+
/**
- * @param featureColours the featureColours to set
+ * @param featureColours
+ * the featureColours to set
*/
public void setFeatureColours(Hashtable featureColours)
{
this.featureColours = featureColours;
}
+
/**
* @return the seqDetails
*/
{
return seqDetails;
}
+
/**
- * @param seqDetails the seqDetails to set
+ * @param seqDetails
+ * the seqDetails to set
*/
public void setSeqDetails(Hashtable seqDetails)
{
this.seqDetails = seqDetails;
}
+
/**
* @return the al
*/
public List<AlignmentSet> getAl()
{
- return (al==null) ? new ArrayList<AlignmentSet>() : al;
+ return (al == null) ? new ArrayList<AlignmentSet>() : al;
}
+
/**
* current alignment being worked on.
*/
List<AlignmentSet> al;
- public class AlignmentSet {
+
+ public class AlignmentSet
+ {
public AlignmentI al;
+
public List<jalview.io.NewickFile> trees;
- AlignmentSet(AlignmentI a) {
+
+ AlignmentSet(AlignmentI a)
+ {
al = a;
trees = new ArrayList<jalview.io.NewickFile>();
}
+
/**
* deuniquify the current alignment in the context, merging any new
* annotation/features with the existing set
*
* @param context
*/
- void deuniquifyAlignment()
+ void deuniquifyAlignment()
+ {
+ if (seqDetails == null || seqDetails.size() == 0)
{
- if (seqDetails==null || seqDetails.size()==0)
- {
- // nothing to do
- return;
- }
- // 1. recover correct names and attributes for each sequence in alignment.
- /*
- * TODO: housekeeping w.r.t. recovery of dataset and annotation
- * references for input sequences, and then dataset sequence creation
- * for new sequences retrieved from service // finally, attempt to
- * de-uniquify to recover input sequence identity, and try to map back
- * onto dataset Note: this
- * jalview.analysis.SeqsetUtils.deuniquify(SeqNames, alseqs, true); will
- * NOT WORK - the returned alignment may contain multiple versions of
- * the input sequence, each being a subsequence of the original.
- * deuniquify also removes existing annotation and features added in the
- * previous step... al.setDataset(dataset); // add in new sequences
- * retrieved from sequence search which are not already in dataset. //
- * trigger a 'fetchDBids' to annotate sequences with database ids...
- */
- //jalview.analysis.SeqsetUtils.deuniquifyAndMerge(parentDataset, seqDetails, al,true);
-
- jalview.analysis.SeqsetUtils.deuniquify(seqDetails, al.getSequencesArray(),true);
- // 2. Update names of associated nodes in any trees
- for (NewickFile nf:trees)
- {
- // the following works because all trees are already had node/SequenceI associations created.
- jalview.analysis.NJTree njt = new jalview.analysis.NJTree(al.getSequencesArray(), nf);
- // this just updates the displayed leaf name on the tree according to the SequenceIs.
- njt.renameAssociatedNodes();
- }
-
+ // nothing to do
+ return;
}
- /**
- * set modification flag. If anything modifies the alignment in the current set, this flag should be true
+ // 1. recover correct names and attributes for each sequence in alignment.
+ /*
+ * TODO: housekeeping w.r.t. recovery of dataset and annotation references
+ * for input sequences, and then dataset sequence creation for new
+ * sequences retrieved from service // finally, attempt to de-uniquify to
+ * recover input sequence identity, and try to map back onto dataset Note:
+ * this jalview.analysis.SeqsetUtils.deuniquify(SeqNames, alseqs, true);
+ * will NOT WORK - the returned alignment may contain multiple versions of
+ * the input sequence, each being a subsequence of the original.
+ * deuniquify also removes existing annotation and features added in the
+ * previous step... al.setDataset(dataset); // add in new sequences
+ * retrieved from sequence search which are not already in dataset. //
+ * trigger a 'fetchDBids' to annotate sequences with database ids...
*/
- private boolean modified=false;
-
- /**
- * @return the modified
- */
- public boolean isModified()
+ // jalview.analysis.SeqsetUtils.deuniquifyAndMerge(parentDataset,
+ // seqDetails, al,true);
+
+ jalview.analysis.SeqsetUtils.deuniquify(seqDetails,
+ al.getSequencesArray(), true);
+ // 2. Update names of associated nodes in any trees
+ for (NewickFile nf : trees)
{
- return modified;
+ // the following works because all trees are already had node/SequenceI
+ // associations created.
+ jalview.analysis.NJTree njt = new jalview.analysis.NJTree(
+ al.getSequencesArray(), nf);
+ // this just updates the displayed leaf name on the tree according to
+ // the SequenceIs.
+ njt.renameAssociatedNodes();
}
- /**
- * or the modification state with the given state
- * @param modifiedFromAction
- */
+
+ }
+
+ /**
+ * set modification flag. If anything modifies the alignment in the current
+ * set, this flag should be true
+ */
+ private boolean modified = false;
+
+ /**
+ * @return the modified
+ */
+ public boolean isModified()
+ {
+ return modified;
+ }
+
+ /**
+ * or the modification state with the given state
+ *
+ * @param modifiedFromAction
+ */
public void updateSetModified(boolean modifiedFromAction)
{
modified |= modifiedFromAction;
*/
Hashtable seqDetails;
- public boolean relaxedIdMatching=false;
+ public boolean relaxedIdMatching = false;
public JalviewDataset()
{
parentDataset = null;
featureColours = new Hashtable();
}
+
/**
* context created from an existing alignment.
+ *
* @param parentAlignment
*/
- public JalviewDataset(AlignmentI aldataset, Hashtable fc, Hashtable seqDets)
+ public JalviewDataset(AlignmentI aldataset, Hashtable fc,
+ Hashtable seqDets)
{
this(aldataset, fc, seqDets, null);
}
+
/**
*
- * @param aldataset - parent dataset for any new alignment/sequence data (must not be null)
- * @param fc (may be null) feature settings for the alignment where new feature renderstyles are stored
- * @param seqDets - (may be null) anonymised sequence information created by Sequence uniquifier
- * @param parentAlignment (may be null) alignment to associate new annotation and trees with.
+ * @param aldataset
+ * - parent dataset for any new alignment/sequence data (must not be
+ * null)
+ * @param fc
+ * (may be null) feature settings for the alignment where new feature
+ * renderstyles are stored
+ * @param seqDets
+ * - (may be null) anonymised sequence information created by
+ * Sequence uniquifier
+ * @param parentAlignment
+ * (may be null) alignment to associate new annotation and trees
+ * with.
*/
- public JalviewDataset(AlignmentI aldataset, Hashtable fc, Hashtable seqDets, AlignmentI parentAlignment)
+ public JalviewDataset(AlignmentI aldataset, Hashtable fc,
+ Hashtable seqDets, AlignmentI parentAlignment)
{
this();
parentDataset = aldataset;
- if (parentAlignment!=null)
+ if (parentAlignment != null)
{
parentDataset = parentAlignment.getDataset();
- if (parentDataset==null)
+ if (parentDataset == null)
{
parentDataset = parentAlignment;
- } else {
+ }
+ else
+ {
addAlignment(parentAlignment);
}
}
- if (seqDets!=null)
+ if (seqDets != null)
{
seqDetails = seqDets;
}
- if (fc!=null)
+ if (fc != null)
{
featureColours = fc;
}
-
-
+
}
public boolean hasAlignments()
{
- return al!=null && al.size()>0;
+ return al != null && al.size() > 0;
}
public AlignmentI getLastAlignment()
{
- return (al==null || al.size()<1) ? null: al.get(al.size()-1).al;
+ return (al == null || al.size() < 1) ? null : al.get(al.size() - 1).al;
}
+
public AlignmentSet getLastAlignmentSet()
{
- return (al==null || al.size()<1) ? null: al.get(al.size()-1);
+ return (al == null || al.size() < 1) ? null : al.get(al.size() - 1);
}
/**
- * post process (deuniquify) the current alignment and its dependent data, and then add newal to the dataset.
+ * post process (deuniquify) the current alignment and its dependent data, and
+ * then add newal to the dataset.
+ *
* @param newal
*/
-public void addAlignment(AlignmentI newal) {
- if (!hasAlignments())
+ public void addAlignment(AlignmentI newal)
{
- al = new ArrayList<AlignmentSet>();
- }
- AlignmentSet last = getLastAlignmentSet();
- if (last!=null) {
- System.err.println("Deuniquifying last alignment set.");
- last.deuniquifyAlignment();
+ if (!hasAlignments())
+ {
+ al = new ArrayList<AlignmentSet>();
+ }
+ AlignmentSet last = getLastAlignmentSet();
+ if (last != null)
+ {
+ System.err.println("Deuniquifying last alignment set.");
+ last.deuniquifyAlignment();
+ }
+ al.add(new AlignmentSet(newal));
}
- al.add(new AlignmentSet(newal));
-}
-public void addTreeFromFile(NewickFile nf)
-{
- AlignmentSet lal = getLastAlignmentSet();
- lal.trees.add(nf);
-}
+ public void addTreeFromFile(NewickFile nf)
+ {
+ AlignmentSet lal = getLastAlignmentSet();
+ lal.trees.add(nf);
+ }
-public boolean hasSequenceAssoc()
-{
- // TODO: discover where sequence associated data should be put.
- return false;
-}
-public SequenceI getLastAssociatedSequence() {
- // TODO: delineate semantics for associating uniquified data with potentially de-uniquified sequence.
- return null;
-}
-/**
- * update the modified state flag for the current set with the given modification state
- * @param modified - this will be ored with current modification state
- */
-public void updateSetModified(boolean modified)
-{
- getLastAlignmentSet().updateSetModified(modified);
-}
+ public boolean hasSequenceAssoc()
+ {
+ // TODO: discover where sequence associated data should be put.
+ return false;
+ }
+
+ public SequenceI getLastAssociatedSequence()
+ {
+ // TODO: delineate semantics for associating uniquified data with
+ // potentially de-uniquified sequence.
+ return null;
+ }
+
+ /**
+ * update the modified state flag for the current set with the given
+ * modification state
+ *
+ * @param modified
+ * - this will be ored with current modification state
+ */
+ public void updateSetModified(boolean modified)
+ {
+ getLastAlignmentSet().updateSetModified(modified);
+ }
}
\ No newline at end of file
{
br = new BufferedReader(src.getReader());
}
- if (new jalview.io.AnnotationFile()
- .parseAnnotationFrom(context.getLastAlignment(), br))
+ if (new jalview.io.AnnotationFile().parseAnnotationFrom(
+ context.getLastAlignment(), br))
{
context.updateSetModified(true);
- } else {
+ }
+ else
+ {
errmsg = "Annotation file contained no data.";
}
try
{
jalview.io.FeaturesFile ff = new jalview.io.FeaturesFile(src);
- context.updateSetModified(ff.parse(context.getLastAlignment(),
+ context.updateSetModified(ff.parse(context.getLastAlignment(),
context.featureColours, false, context.relaxedIdMatching));
} catch (Exception e)
{
}
}
- if (exerror!=null)
+ if (exerror != null)
{
- if (errmsg!=null && errmsg.length()>0)
+ if (errmsg != null && errmsg.length() > 0)
{
- throw new IOException(errmsg,exerror);
- } else {
- throw new IOException(errmsg,exerror);
+ throw new IOException(errmsg, exerror);
+ }
+ else
+ {
+ throw new IOException(errmsg, exerror);
}
- } else {
- if (errmsg!=null && errmsg.length()>0)
- {
- throw new IOException(errmsg);
}
+ else
+ {
+ if (errmsg != null && errmsg.length() > 0)
+ {
+ throw new IOException(errmsg);
+ }
}
}
if (deuniquify)
// to buffers.
// import with deuniquify info, and compare results to input.
- } else {
+ }
+ else
+ {
if (context.getLastAlignmentSet().isModified())
{
- System.err.println("Initial alignment set was modified and any associated views should be updated.");
+ System.err
+ .println("Initial alignment set was modified and any associated views should be updated.");
}
}
}
import jalview.io.FileParse;
/**
- * minimal implementation of the DataProvider interface.
- * Allows a FileParse datasource to be specified as one of the DataProvider.JvDataType content types, with or without some other associated object as external reference.
+ * minimal implementation of the DataProvider interface. Allows a FileParse
+ * datasource to be specified as one of the DataProvider.JvDataType content
+ * types, with or without some other associated object as external reference.
*/
public class SimpleDataProvider implements DataProvider
{
/**
* create a SimpleDataProvider
- * @param type - contents of resource accessible via fp
- * @param fp - datasource
- * @param assoc - external object that fp's content should be associated with (may be null)
+ *
+ * @param type
+ * - contents of resource accessible via fp
+ * @param fp
+ * - datasource
+ * @param assoc
+ * - external object that fp's content should be associated with (may
+ * be null)
*/
public SimpleDataProvider(DataProvider.JvDataType type, FileParse fp,
Object assoc)
/*
* (non-Javadoc)
- *
+ *
* @see jalview.io.vamsas.DatastoreItem#addFromDocument()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see jalview.io.vamsas.DatastoreItem#conflict()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see jalview.io.vamsas.DatastoreItem#update()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see jalview.io.vamsas.DatastoreItem#updateFromDoc()
*/
@Override
// TODO: Tree.updateFromDoc
/*
* TreePanel tp = (TreePanel) jvobj; // getvObj2jv(tree);
- *
+ *
* // make a new tree Object[] idata =
* recoverInputData(tree.getProvenance()); try { if (idata != null &&
* idata[0] != null) { inputData = (AlignmentView) idata[0]; } ntree =
/**
* correctly creates provenance for trees calculated on an alignment by
* jalview.
- *
+ *
* @param jal
* @param tp
* @return
/**
* look up SeqCigars in an existing alignment.
- *
+ *
* @param jal
* @param sequences
* @return vector of alignment sequences in order of SeqCigar array (but
System.arraycopy(sequences, 0, tseqs, 0, sequences.length);
Vector alsq = new Vector();
List<SequenceI> jalsqs;
- synchronized (jalsqs=jal.getSequences())
- {for (SequenceI asq:jalsqs)
+ synchronized (jalsqs = jal.getSequences())
{
- for (int t = 0; t < sequences.length; t++)
+ for (SequenceI asq : jalsqs)
{
- if (tseqs[t] != null
- && (tseqs[t].getRefSeq() == asq || tseqs[t].getRefSeq() == asq
- .getDatasetSequence()))
- // && tseqs[t].getStart()>=asq.getStart() &&
- // tseqs[t].getEnd()<=asq.getEnd())
+ for (int t = 0; t < sequences.length; t++)
{
- tseqs[t] = null;
- alsq.add(asq);
+ if (tseqs[t] != null
+ && (tseqs[t].getRefSeq() == asq || tseqs[t].getRefSeq() == asq
+ .getDatasetSequence()))
+ // && tseqs[t].getStart()>=asq.getStart() &&
+ // tseqs[t].getEnd()<=asq.getEnd())
+ {
+ tseqs[t] = null;
+ alsq.add(asq);
+ }
}
}
- }}
+ }
if (alsq.size() < sequences.length)
Cache.log
.warn("Not recovered all alignment sequences for given set of input sequence CIGARS");
}
/**
- *
+ *
* Update jalview newick representation with TreeNode map
- *
+ *
* @param tp
* the treepanel that this tree is bound to.
*/
// / TODO: refactor to vamsas :start
/**
* construct treenode mappings for mapped sequences
- *
+ *
* @param ntree
* @param newick
* @return
/**
* call to match up Treenode specs to NJTree parsed from document object.
- *
+ *
* @param nodespec
* @param leaves
* as returned from NJTree.findLeaves( .., ..) ..
// todo: end refactor to vamsas library
/**
* add jalview object to vamsas document
- *
+ *
*/
@Override
public void addToDocument()
/**
* note: this function assumes that all sequence and alignment objects
* referenced in input data has already been associated with jalview objects.
- *
+ *
* @param tp
* @param alignFrame
* @return Object[] { AlignmentView, AlignmentI - reference alignment for
*
* You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
-package jalview.javascript;\r
-\r
-import java.net.URL;\r
-import java.util.Vector;\r
-\r
-import netscape.javascript.JSException;\r
-import netscape.javascript.JSObject;\r
-import jalview.bin.JalviewLite;\r
-\r
-public class JSFunctionExec implements Runnable\r
-{\r
- public JalviewLite jvlite;\r
-\r
- public JSFunctionExec(JalviewLite applet)\r
- {\r
- jvlite = applet;\r
- \r
- jsExecQueue = jvlite.getJsExecQueue();\r
- jvlite.setExecutor(this);\r
- }\r
- public void finalize() {\r
- jvlite=null;\r
- executor=null;\r
- if (jsExecQueue!=null)\r
- {\r
- jsExecQueue.clear();\r
- }\r
- jsExecQueue=null;\r
- }\r
- private Vector jsExecQueue;\r
-\r
- private Thread executor = null;\r
-\r
- public void stopQueue()\r
- {\r
- if (jsExecQueue != null)\r
- {\r
- Vector<JSFunctionExec> q=null;\r
- synchronized (jsExecQueue)\r
- {\r
- q = jsExecQueue;\r
- jsExecQueue = null;\r
- }\r
- if (q!=null ) {\r
- for (JSFunctionExec jx : q)\r
- {\r
- jx.jvlite=null;\r
- \r
- }\r
- q.removeAllElements();\r
- synchronized (q)\r
- {\r
- q.notifyAll();\r
- }\r
- }\r
- }\r
- jvlite=null;\r
- executor = null;\r
- }\r
-\r
- public void run()\r
- {\r
- while (jsExecQueue != null)\r
- {\r
- if (jsExecQueue.size() > 0)\r
- {\r
- Runnable r = (Runnable) jsExecQueue.elementAt(0);\r
- jsExecQueue.removeElementAt(0);\r
- try\r
- {\r
- r.run();\r
- } catch (Exception ex)\r
- {\r
- ex.printStackTrace();\r
- } catch (Error ex)\r
- {\r
- ex.printStackTrace();\r
- }\r
- }\r
- else\r
- {\r
- try\r
- {\r
- synchronized (jsExecQueue)\r
- {\r
- jsExecQueue.wait(1000);\r
- }\r
- } catch (Exception ex)\r
- {\r
- }\r
- ;\r
- }\r
- }\r
-\r
- }\r
-\r
- /**\r
- * execute a javascript callback synchronously\r
- * \r
- * @param _listener\r
- * @param objects\r
- * @throws Exception\r
- */\r
- public void executeJavascriptFunction(final String _listener,\r
- final Object[] objects) throws Exception\r
- {\r
- executeJavascriptFunction(false, _listener, objects);\r
- }\r
-\r
- /**\r
- * execute a javascript callback synchronously or asynchronously\r
- * \r
- * @param async\r
- * - true to execute asynchronously (do this for gui events)\r
- * @param _listener\r
- * - javascript function\r
- * @param objects\r
- * - arguments\r
- * @throws Exception\r
- * - only if call is synchronous\r
- */\r
- public void executeJavascriptFunction(final boolean async,\r
- final String _listener, Object[] arguments) throws Exception\r
- {\r
-\r
- executeJavascriptFunction(async, _listener, arguments, null);\r
-\r
- }\r
-\r
- public void executeJavascriptFunction(final boolean async,\r
- final String _listener, Object[] arguments, final String dbgMsg)\r
- throws Exception\r
- {\r
- final Object[] objects = new Object[arguments != null ? arguments.length\r
- : 0];\r
- if (arguments != null)\r
- {\r
- System.arraycopy(arguments, 0, objects, 0, arguments.length);\r
- }\r
- final Exception[] jsex = new Exception[1];\r
- Runnable exec = new Runnable()\r
- {\r
- public void run()\r
- {\r
- try\r
- {\r
- JSObject scriptObject = null;\r
- try\r
- {\r
- scriptObject = JSObject.getWindow(jvlite);\r
- } catch (Exception ex)\r
- {\r
- }\r
- ;\r
- if (scriptObject != null)\r
- {\r
- if (jvlite.debug && dbgMsg != null)\r
- {\r
- System.err.println(dbgMsg);\r
- }\r
- scriptObject.call(_listener, objects);\r
- }\r
- } catch (Exception jex)\r
- {\r
- // squash any malformedURLExceptions thrown by windows/safari\r
- if (!(jex instanceof java.net.MalformedURLException))\r
- {\r
- if (jvlite.debug)\r
- {\r
- System.err.println(jex);\r
- }\r
- if (jex instanceof netscape.javascript.JSException && jvlite.jsfallbackEnabled)\r
- {\r
- jsex[0] = (netscape.javascript.JSException) jex;\r
- if (jvlite.debug)\r
- {\r
- System.err.println("Falling back to javascript: url call");\r
- }\r
- StringBuffer sb = new StringBuffer("javascript:" + _listener\r
- + "(");\r
- for (int i = 0; objects != null && i < objects.length; i++)\r
- {\r
- if (i > 0)\r
- {\r
- sb.append(",");\r
- }\r
- sb.append("\"");\r
- // strip out nulls and complex objects that we can't pass this\r
- // way.\r
- if (objects[i] != null\r
- && !(objects[i].getClass().getName()\r
- .indexOf("jalview") == 0))\r
- {\r
- sb.append(objects[i].toString());\r
- }\r
- sb.append("\"");\r
- }\r
- sb.append(")");\r
- if (jvlite.debug)\r
- {\r
- System.err.println(sb.toString());\r
- }\r
- // alternate\r
- URL url = null;\r
- try\r
- {\r
- url = new URL(sb.toString());\r
- jvlite.getAppletContext().showDocument(url);\r
- jex = null;\r
- } catch (Exception uex)\r
- {\r
- jex = uex;\r
- }\r
- }\r
- if (jex != null)\r
- {\r
- if (async)\r
- {\r
- jex.printStackTrace();\r
- }\r
- else\r
- {\r
- jsex[0] = jex;\r
- }\r
- }\r
- ;\r
- }\r
-\r
- }\r
- }\r
- };\r
- if (async)\r
- {\r
- if (executor == null)\r
- {\r
- executor = new Thread(new JSFunctionExec(jvlite));\r
- executor.start();\r
- }\r
- synchronized (jsExecQueue)\r
- {\r
- jsExecQueue.addElement(exec);\r
- jsExecQueue.notify();\r
- }\r
- }\r
- else\r
- {\r
- // wat for executor to notify us if it's running.\r
- exec.run();\r
- if (jsex[0] != null)\r
- {\r
- throw (jsex[0]);\r
- }\r
- }\r
- }\r
-\r
-}\r
+package jalview.javascript;
+
+import java.net.URL;
+import java.util.Vector;
+
+import netscape.javascript.JSException;
+import netscape.javascript.JSObject;
+import jalview.bin.JalviewLite;
+
+public class JSFunctionExec implements Runnable
+{
+ public JalviewLite jvlite;
+
+ public JSFunctionExec(JalviewLite applet)
+ {
+ jvlite = applet;
+
+ jsExecQueue = jvlite.getJsExecQueue();
+ jvlite.setExecutor(this);
+ }
+
+ public void finalize()
+ {
+ jvlite = null;
+ executor = null;
+ if (jsExecQueue != null)
+ {
+ jsExecQueue.clear();
+ }
+ jsExecQueue = null;
+ }
+
+ private Vector jsExecQueue;
+
+ private Thread executor = null;
+
+ public void stopQueue()
+ {
+ if (jsExecQueue != null)
+ {
+ Vector<JSFunctionExec> q = null;
+ synchronized (jsExecQueue)
+ {
+ q = jsExecQueue;
+ jsExecQueue = null;
+ }
+ if (q != null)
+ {
+ for (JSFunctionExec jx : q)
+ {
+ jx.jvlite = null;
+
+ }
+ q.removeAllElements();
+ synchronized (q)
+ {
+ q.notifyAll();
+ }
+ }
+ }
+ jvlite = null;
+ executor = null;
+ }
+
+ public void run()
+ {
+ while (jsExecQueue != null)
+ {
+ if (jsExecQueue.size() > 0)
+ {
+ Runnable r = (Runnable) jsExecQueue.elementAt(0);
+ jsExecQueue.removeElementAt(0);
+ try
+ {
+ r.run();
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ } catch (Error ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ else
+ {
+ try
+ {
+ synchronized (jsExecQueue)
+ {
+ jsExecQueue.wait(1000);
+ }
+ } catch (Exception ex)
+ {
+ }
+ ;
+ }
+ }
+
+ }
+
+ /**
+ * execute a javascript callback synchronously
+ *
+ * @param _listener
+ * @param objects
+ * @throws Exception
+ */
+ public void executeJavascriptFunction(final String _listener,
+ final Object[] objects) throws Exception
+ {
+ executeJavascriptFunction(false, _listener, objects);
+ }
+
+ /**
+ * execute a javascript callback synchronously or asynchronously
+ *
+ * @param async
+ * - true to execute asynchronously (do this for gui events)
+ * @param _listener
+ * - javascript function
+ * @param objects
+ * - arguments
+ * @throws Exception
+ * - only if call is synchronous
+ */
+ public void executeJavascriptFunction(final boolean async,
+ final String _listener, Object[] arguments) throws Exception
+ {
+
+ executeJavascriptFunction(async, _listener, arguments, null);
+
+ }
+
+ public void executeJavascriptFunction(final boolean async,
+ final String _listener, Object[] arguments, final String dbgMsg)
+ throws Exception
+ {
+ final Object[] objects = new Object[arguments != null ? arguments.length
+ : 0];
+ if (arguments != null)
+ {
+ System.arraycopy(arguments, 0, objects, 0, arguments.length);
+ }
+ final Exception[] jsex = new Exception[1];
+ Runnable exec = new Runnable()
+ {
+ public void run()
+ {
+ try
+ {
+ JSObject scriptObject = null;
+ try
+ {
+ scriptObject = JSObject.getWindow(jvlite);
+ } catch (Exception ex)
+ {
+ }
+ ;
+ if (scriptObject != null)
+ {
+ if (jvlite.debug && dbgMsg != null)
+ {
+ System.err.println(dbgMsg);
+ }
+ scriptObject.call(_listener, objects);
+ }
+ } catch (Exception jex)
+ {
+ // squash any malformedURLExceptions thrown by windows/safari
+ if (!(jex instanceof java.net.MalformedURLException))
+ {
+ if (jvlite.debug)
+ {
+ System.err.println(jex);
+ }
+ if (jex instanceof netscape.javascript.JSException
+ && jvlite.jsfallbackEnabled)
+ {
+ jsex[0] = (netscape.javascript.JSException) jex;
+ if (jvlite.debug)
+ {
+ System.err.println("Falling back to javascript: url call");
+ }
+ StringBuffer sb = new StringBuffer("javascript:" + _listener
+ + "(");
+ for (int i = 0; objects != null && i < objects.length; i++)
+ {
+ if (i > 0)
+ {
+ sb.append(",");
+ }
+ sb.append("\"");
+ // strip out nulls and complex objects that we can't pass this
+ // way.
+ if (objects[i] != null
+ && !(objects[i].getClass().getName()
+ .indexOf("jalview") == 0))
+ {
+ sb.append(objects[i].toString());
+ }
+ sb.append("\"");
+ }
+ sb.append(")");
+ if (jvlite.debug)
+ {
+ System.err.println(sb.toString());
+ }
+ // alternate
+ URL url = null;
+ try
+ {
+ url = new URL(sb.toString());
+ jvlite.getAppletContext().showDocument(url);
+ jex = null;
+ } catch (Exception uex)
+ {
+ jex = uex;
+ }
+ }
+ if (jex != null)
+ {
+ if (async)
+ {
+ jex.printStackTrace();
+ }
+ else
+ {
+ jsex[0] = jex;
+ }
+ }
+ ;
+ }
+
+ }
+ }
+ };
+ if (async)
+ {
+ if (executor == null)
+ {
+ executor = new Thread(new JSFunctionExec(jvlite));
+ executor.start();
+ }
+ synchronized (jsExecQueue)
+ {
+ jsExecQueue.addElement(exec);
+ jsExecQueue.notify();
+ }
+ }
+ else
+ {
+ // wat for executor to notify us if it's running.
+ exec.run();
+ if (jsex[0] != null)
+ {
+ throw (jsex[0]);
+ }
+ }
+ }
+
+}
/**
* @author jimp
- *
+ *
*/
public interface JalviewLiteJsApi
{
AlignFrame alf, String format, String suffix);
/**
- * get a separator separated list of sequence IDs reflecting the order of the current alignment
+ * get a separator separated list of sequence IDs reflecting the order of the
+ * current alignment
+ *
* @return
*/
public abstract String getAlignmentOrder();
+
/**
- * get a separator separated list of sequence IDs reflecting the order of the alignment in alf
- *
+ * get a separator separated list of sequence IDs reflecting the order of the
+ * alignment in alf
+ *
* @param alf
* @return
*/
public abstract String getAlignmentOrderFrom(AlignFrame alf);
/**
- * get a sep separated list of sequence IDs reflecting the order of the alignment in alf
+ * get a sep separated list of sequence IDs reflecting the order of the
+ * alignment in alf
*
* @param alf
- * @param sep - separator to use
+ * @param sep
+ * - separator to use
* @return
*/
public abstract String getAlignmentOrderFrom(AlignFrame alf, String sep);
+
/**
* re-order the current alignment using the given list of sequence IDs
- * @param order - sep separated list
- * @param undoName - string to use when referring to ordering action in undo buffer
- * @return 'true' if alignment was actually reordered. empty string if alignment did not contain sequences.
+ *
+ * @param order
+ * - sep separated list
+ * @param undoName
+ * - string to use when referring to ordering action in undo buffer
+ * @return 'true' if alignment was actually reordered. empty string if
+ * alignment did not contain sequences.
*/
public abstract String orderBy(String order, String undoName);
* @param undoName
* - string to use when referring to ordering action in undo buffer
* @param sep
- * @return 'true' if alignment was actually reordered. empty string if alignment did not contain sequences.
+ * @return 'true' if alignment was actually reordered. empty string if
+ * alignment did not contain sequences.
*/
public abstract String orderBy(String order, String undoName, String sep);
/**
- * re-order the given alignment using the given list of sequence IDs
- * separated by sep
+ * re-order the given alignment using the given list of sequence IDs separated
+ * by sep
*
* @param alf
* @param order
* @param undoName
* - string to use when referring to ordering action in undo buffer
* @param sep
- * @return 'true' if alignment was actually reordered. empty string if alignment did not contain sequences.
+ * @return 'true' if alignment was actually reordered. empty string if
+ * alignment did not contain sequences.
*/
public abstract String orderAlignmentBy(AlignFrame alf, String order,
String undoName, String sep);
/**
- * get alignment as format (format names FASTA, BLC, CLUSTAL, MSF, PILEUP, PFAM - see jalview.io.AppletFormatAdapter for full list)
+ * get alignment as format (format names FASTA, BLC, CLUSTAL, MSF, PILEUP,
+ * PFAM - see jalview.io.AppletFormatAdapter for full list)
+ *
* @param format
* @return
*/
/**
* get alignment displayed in alf as format
+ *
* @param alf
* @param format
* @return
/**
* get alignment as format with jalview start-end sequence suffix appended
+ *
* @param format
* @param suffix
* @return
public abstract String getAlignment(String format, String suffix);
/**
- * get alignment displayed in alf as format
- * with or without the jalview start-end sequence suffix appended
+ * get alignment displayed in alf as format with or without the jalview
+ * start-end sequence suffix appended
+ *
* @param alf
* @param format
* @param suffix
/**
* add the given features or annotation to the current alignment
+ *
* @param annotation
*/
public abstract void loadAnnotation(String annotation);
/**
* add the given features or annotation to the given alignment view
+ *
* @param alf
* @param annotation
*/
public abstract void loadAnnotationFrom(AlignFrame alf, String annotation);
/**
- * parse the given string as a jalview feature or GFF annotation file and optionally enable feature display on the current alignFrame
- * @param features - gff or features file
- * @param autoenabledisplay - when true, feature display will be enabled if any features can be parsed from the string.
+ * parse the given string as a jalview feature or GFF annotation file and
+ * optionally enable feature display on the current alignFrame
+ *
+ * @param features
+ * - gff or features file
+ * @param autoenabledisplay
+ * - when true, feature display will be enabled if any features can
+ * be parsed from the string.
*/
- public abstract void loadFeatures(String features, boolean autoenabledisplay);
+ public abstract void loadFeatures(String features,
+ boolean autoenabledisplay);
/**
- * parse the given string as a jalview feature or GFF annotation file and optionally enable feature display on the given alignFrame.
+ * parse the given string as a jalview feature or GFF annotation file and
+ * optionally enable feature display on the given alignFrame.
+ *
* @param alf
- * @param features - gff or features file
- * @param autoenabledisplay - when true, feature display will be enabled if any features can be parsed from the string.
+ * @param features
+ * - gff or features file
+ * @param autoenabledisplay
+ * - when true, feature display will be enabled if any features can
+ * be parsed from the string.
* @return true if data parsed as features
*/
- public abstract boolean loadFeaturesFrom(AlignFrame alf, String features, boolean autoenabledisplay);
+ public abstract boolean loadFeaturesFrom(AlignFrame alf, String features,
+ boolean autoenabledisplay);
/**
* get the sequence features in the given format (Jalview or GFF)
+ *
* @param format
* @return
*/
/**
* get the sequence features in alf in the given format (Jalview or GFF)
+ *
* @param alf
* @param format
* @return
/**
* get current alignment's annotation as an annotation file
+ *
* @return
*/
public abstract String getAnnotation();
/**
* get alignment view alf's annotation as an annotation file
+ *
* @param alf
* @return
*/
/**
* create a new view and return the alignFrame instance
+ *
* @return
*/
public abstract AlignFrame newView();
/**
* create a new view named name and return the alignFrame instance
+ *
* @param name
* @return
*/
/**
* create a new view on alf and return the alignFrame instance
+ *
* @param alf
* @return
*/
/**
* create a new view named name on alf
+ *
* @param alf
* @param name
* @return
/**
* register a javascript function to handle any alignment mouseover events
- * @param listener name of javascript function (called with arguments [jalview.appletgui.AlignFrame,String(sequence id),String(column in alignment), String(position in sequence)]
+ *
+ * @param listener
+ * name of javascript function (called with arguments
+ * [jalview.appletgui.AlignFrame,String(sequence id),String(column in
+ * alignment), String(position in sequence)]
*/
public abstract void setMouseoverListener(String listener);
/**
* register a javascript function to handle mouseover events
- * @param af (null or specific alignframe for which events are to be listened for)
- * @param listener name of javascript function
+ *
+ * @param af
+ * (null or specific alignframe for which events are to be listened
+ * for)
+ * @param listener
+ * name of javascript function
*/
public abstract void setMouseoverListener(AlignFrame af, String listener);
/**
- * register a javascript function to handle any alignment selection events. Events are generated when the user completes a selection event, or when the user deselects all selected regions.
- * @param listener name of javascript function (called with arguments [jalview.appletgui.AlignFrame, String(sequence set id), String(separator separated list of sequences which were selected), String(separator separated list of column ranges (i.e. single number or hyphenated range) that were selected)]
+ * register a javascript function to handle any alignment selection events.
+ * Events are generated when the user completes a selection event, or when the
+ * user deselects all selected regions.
+ *
+ * @param listener
+ * name of javascript function (called with arguments
+ * [jalview.appletgui.AlignFrame, String(sequence set id),
+ * String(separator separated list of sequences which were selected),
+ * String(separator separated list of column ranges (i.e. single
+ * number or hyphenated range) that were selected)]
*/
public abstract void setSelectionListener(String listener);
public abstract void setSelectionListener(AlignFrame af, String listener);
/**
- * register a javascript function to handle events normally routed to a Jmol structure viewer.
- * @param listener - javascript function (arguments are variable, see jalview.javascript.MouseOverStructureListener for full details)
- * @param modelSet - separator separated list of PDB file URIs that this viewer is handling. These files must be in the same order they appear in Jmol (e.g. first one is frame 1, second is frame 2, etc).
- @see jalview.javascript.MouseOverStructureListener
+ * register a javascript function to handle events normally routed to a Jmol
+ * structure viewer.
+ *
+ * @param listener
+ * - javascript function (arguments are variable, see
+ * jalview.javascript.MouseOverStructureListener for full details)
+ * @param modelSet
+ * - separator separated list of PDB file URIs that this viewer is
+ * handling. These files must be in the same order they appear in
+ * Jmol (e.g. first one is frame 1, second is frame 2, etc).
+ * @see jalview.javascript.MouseOverStructureListener
*/
public abstract void setStructureListener(String listener, String modelSet);
String pdbEntryString, String pdbFile);
/**
- * adjust horizontal/vertical scroll to make the given location the top left hand corner for the given view
+ * adjust horizontal/vertical scroll to make the given location the top left
+ * hand corner for the given view
*
* @param alf
* @param topRow
*/
public abstract void scrollViewToIn(AlignFrame alf, String topRow,
String leftHandColumn);
+
/**
* adjust vertical scroll to make the given row the top one for given view
*
* @param topRow
*/
public abstract void scrollViewToRowIn(AlignFrame alf, String topRow);
+
/**
- * adjust horizontal scroll to make the given column the left one in the given view
+ * adjust horizontal scroll to make the given column the left one in the given
+ * view
*
* @param alf
* @param leftHandColumn
*/
- public abstract void scrollViewToColumnIn(AlignFrame alf, String leftHandColumn);
+ public abstract void scrollViewToColumnIn(AlignFrame alf,
+ String leftHandColumn);
/**
*
/**
* Retrieve fragments of a large packet of data made available by JalviewLite.
+ *
* @param messageclass
* @param viewId
* @return next chunk of message
public interface JsCallBack
{
public jalview.appletgui.AlignFrame getAlignFrame();
+
public String getListenerFunction();
-
+
}
{
strt = seqsel.getStartRes();
}
- if (end==-1 || end > seqsel.getEndRes())
+ if (end == -1 || end > seqsel.getEndRes())
{
end = seqsel.getEndRes();
}
}
System.err.println("Relaying selection to jsfunction:" + _listener);
- executeJavascriptFunction( _listener,
- new Object[]
- { src, setid, jvlite.arrayToSeparatorList(seqs),
- jvlite.arrayToSeparatorList(cols) });
+ executeJavascriptFunction(
+ _listener,
+ new Object[]
+ { src, setid, jvlite.arrayToSeparatorList(seqs),
+ jvlite.arrayToSeparatorList(cols) });
} catch (Exception ex)
{
System.err
}
}
-
@Override
public AlignFrame getAlignFrame()
{
src = ((jalview.appletgui.AlignViewport) source).applet.currentAlignFrame;
}
- // TODO: ensure that if '_af' is specified along with a handler function, then only events from that alignFrame are sent to that function
+ // TODO: ensure that if '_af' is specified along with a handler
+ // function, then only events from that alignFrame are sent to that
+ // function
}
- executeJavascriptFunction(_listener, new Object[]
- { src, seq.getDisplayId(false), "" + (1 + i), ""+seq.findPosition(i) });
+ executeJavascriptFunction(
+ _listener,
+ new Object[]
+ { src, seq.getDisplayId(false), "" + (1 + i),
+ "" + seq.findPosition(i) });
} catch (Exception ex)
{
*
* You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
-package jalview.javascript;\r
-\r
-import java.awt.Color;\r
-import java.util.ArrayList;\r
-\r
-import jalview.api.AlignmentViewPanel;\r
-import jalview.api.FeatureRenderer;\r
-import jalview.api.SequenceRenderer;\r
-import jalview.appletgui.AlignFrame;\r
-import jalview.bin.JalviewLite;\r
-import jalview.datamodel.SequenceI;\r
-import jalview.ext.jmol.JmolCommands;\r
-import jalview.structure.StructureListener;\r
-import jalview.structure.StructureMapping;\r
-import jalview.structure.StructureMappingcommandSet;\r
-import jalview.structure.StructureSelectionManager;\r
-\r
-/**\r
- * Propagate events involving PDB structures associated with sequences to a\r
- * javascript function. Generally, the javascript handler is called with a\r
- * series of arguments like (eventname, ... ). As of Jalview 2.7, the following\r
- * different types of events are supported:\r
- * <ul>\r
- * <li>mouseover: javascript function called with arguments <pre>\r
+package jalview.javascript;
+
+import java.awt.Color;
+import java.util.ArrayList;
+
+import jalview.api.AlignmentViewPanel;
+import jalview.api.FeatureRenderer;
+import jalview.api.SequenceRenderer;
+import jalview.appletgui.AlignFrame;
+import jalview.bin.JalviewLite;
+import jalview.datamodel.SequenceI;
+import jalview.ext.jmol.JmolCommands;
+import jalview.structure.StructureListener;
+import jalview.structure.StructureMapping;
+import jalview.structure.StructureMappingcommandSet;
+import jalview.structure.StructureSelectionManager;
+
+/**
+ * Propagate events involving PDB structures associated with sequences to a
+ * javascript function. Generally, the javascript handler is called with a
+ * series of arguments like (eventname, ... ). As of Jalview 2.7, the following
+ * different types of events are supported:
+ * <ul>
+ * <li>mouseover: javascript function called with arguments
+ *
+ * <pre>
* ['mouseover',String(pdb file URI), String(pdb file chain ID), String(residue\r
- * number moused over), String(atom index corresponding to residue)]</pre></li>\r
- * <li>colourstruct: javascript function called with arguments <pre>\r
+ * number moused over), String(atom index corresponding to residue)]
+ * </pre>
+ *
+ * </li>
+ * <li>colourstruct: javascript function called with arguments
+ *
+ * <pre>
* ['colourstruct',String(alignment view id),String(number of javascript message\r
* chunks to collect),String(length of first chunk in set of messages - or zero\r
- * for null message)]</pre><br>\r
- * The message contains a series of Jmol script commands that will colour\r
- * structures according to their associated sequences in the current view. Use\r
- * jalview\r
- * .javascript.JalviewLiteJsApi.getJsMessage('colourstruct',String(alignment\r
- * view id)) to retrieve successive chunks of the message.</li>\r
- * </ul>\r
- * \r
- * @author Jim Procter (jprocter)\r
- * \r
- */\r
-public class MouseOverStructureListener extends JSFunctionExec implements\r
- JsCallBack, StructureListener\r
-{\r
-\r
- String _listenerfn;\r
-\r
- String[] modelSet;\r
-\r
- public MouseOverStructureListener(JalviewLite jalviewLite,\r
- String listener, String[] modelList)\r
- {\r
- super(jalviewLite);\r
- _listenerfn = listener;\r
- modelSet = modelList;\r
- if (modelSet != null)\r
- {\r
- for (int i = 0; i < modelSet.length; i++)\r
- {\r
- // resolve a real filename\r
- try\r
- {\r
- if (new java.net.URL(modelSet[i]).openConnection() != null)\r
- {\r
- continue;\r
- }\r
- } catch (Exception x)\r
- {\r
- }\r
- ;\r
- try\r
- {\r
- String db = jvlite.getDocumentBase().toString();\r
- db = db.substring(0, db.lastIndexOf("/"));\r
- if (new java.net.URL(db + "/" + modelSet[i]).openConnection() != null)\r
- {\r
- modelSet[i] = db + "/" + modelSet[i];\r
- continue;\r
- }\r
- } catch (Exception x)\r
- {\r
- }\r
- ;\r
- try\r
- {\r
- if (new java.net.URL(jvlite.getCodeBase() + modelSet[i])\r
- .openConnection() != null)\r
- {\r
- modelSet[i] = jvlite.getCodeBase() + modelSet[i];\r
- continue;\r
- }\r
- } catch (Exception x)\r
- {\r
- }\r
- ;\r
-\r
- }\r
- }\r
- }\r
-\r
- @Override\r
- public String[] getPdbFile()\r
- {\r
- return modelSet;\r
- }\r
-\r
- @Override\r
- public void mouseOverStructure(int atomIndex, String strInfo)\r
- {\r
-\r
- // StructureSelectionManager.getStructureSelectionManager().mouseOverStructure(atomIndex,\r
- // chain, pdbfile)\r
- // TODO Auto-generated method stub\r
-\r
- }\r
-\r
- @Override\r
- public void highlightAtom(int atomIndex, int pdbResNum, String chain,\r
- String pdbId)\r
- {\r
- String[] st = new String[0];\r
- try\r
- {\r
- executeJavascriptFunction(_listenerfn, st = new String[]\r
- { "mouseover", "" + pdbId, "" + chain, "" + (pdbResNum),\r
- "" + atomIndex });\r
- } catch (Exception ex)\r
- {\r
- System.err.println("Couldn't execute callback with " + _listenerfn\r
- + " using args { " + st[0] + ", " + st[1] + ", " + st[2]\r
- + "," + st[3] + "\n");\r
- ex.printStackTrace();\r
-\r
- }\r
-\r
- }\r
-\r
- @Override\r
- public synchronized void updateColours(Object srce)\r
- {\r
- final Object source = srce;\r
- StructureSelectionManager ssm = StructureSelectionManager\r
- .getStructureSelectionManager(jvlite);\r
- // if (jvlite.debug)\r
- // {\r
- // ssm.reportMapping();\r
- // }\r
- if (source instanceof jalview.api.AlignmentViewPanel)\r
- {\r
- SequenceI[][] sequence = new SequenceI[modelSet.length][];\r
- for (int m = 0; m < modelSet.length; m++)\r
- {\r
- StructureMapping[] sm = ssm.getMapping(modelSet[m]);\r
- if (sm != null && sm.length > 0)\r
- {\r
- sequence[m] = new SequenceI[sm.length];\r
- for (int i = 0; i < sm.length; i++)\r
- {\r
- sequence[m][i] = sm[i].getSequence();\r
- }\r
- }\r
- else\r
- {\r
- sequence[m] = new SequenceI[0];\r
- }\r
- // if (jvlite.debug)\r
- // {\r
- // System.err.println("Mapped '" + modelSet[m] + "' to "\r
- // + sequence[m].length + " sequences.");\r
- // }\r
- }\r
-\r
- SequenceRenderer sr = ((jalview.appletgui.AlignmentPanel) source)\r
- .getSequenceRenderer();\r
- FeatureRenderer fr = ((jalview.appletgui.AlignmentPanel) source).av\r
- .getShowSequenceFeatures() ? new jalview.appletgui.FeatureRenderer(\r
- ((jalview.appletgui.AlignmentPanel) source).av) : null;\r
- if (fr != null)\r
- {\r
- ((jalview.appletgui.FeatureRenderer) fr)\r
- .transferSettings(((jalview.appletgui.AlignmentPanel) source)\r
- .getFeatureRenderer());\r
- }\r
- ;\r
-\r
- \r
- // Form a colour command from the given alignment panel for each distinct structure \r
- ArrayList<String[]> ccomands=new ArrayList<String[]>();\r
- ArrayList<String> pdbfn=new ArrayList<String>();\r
- StructureMappingcommandSet[] colcommands=JmolCommands.getColourBySequenceCommand(\r
- ssm, modelSet, sequence, sr, fr,\r
- ((AlignmentViewPanel) source).getAlignment());\r
- if (colcommands==null) {\r
- return;\r
- }\r
- int sz=0;\r
- for (jalview.structure.StructureMappingcommandSet ccset: colcommands) {\r
- sz+=ccset.commands.length;\r
- ccomands.add(ccset.commands);\r
- pdbfn.add(ccset.mapping);\r
- }\r
- \r
- String mclass,mhandle;\r
- String ccomandset[] = new String[sz];\r
- sz=0;\r
- for (String[] ccset: ccomands) {\r
- System.arraycopy(ccset, 0, ccomandset, sz, ccset.length);\r
- sz+=ccset.length;\r
- }\r
- if (jvlite.isJsMessageSetChanged(mclass="colourstruct",mhandle=((jalview.appletgui.AlignmentPanel) source).av\r
- .getViewId(), ccomandset)) {\r
- jvlite.setJsMessageSet(mclass, mhandle , ccomandset);\r
- // and notify javascript handler\r
- String st[] = new String[]\r
- {\r
- "colourstruct",\r
- ""\r
- + ((jalview.appletgui.AlignmentPanel) source).av\r
- .getViewId(), ""+ccomandset.length, jvlite.arrayToSeparatorList(pdbfn.toArray(new String[pdbfn.size()]))\r
- };\r
- try\r
- {\r
- executeJavascriptFunction(\r
- true,\r
- _listenerfn,st\r
-);\r
- } catch (Exception ex)\r
- {\r
- System.err.println("Couldn't execute callback with "\r
- + _listenerfn + " using args { " + st[0] + ", "\r
- + st[1] + ", " + st[2] + "," + st[3]+"}"); // + ","+st[4]+"\n");\r
- ex.printStackTrace();\r
-\r
- }\r
- }\r
-/* new Thread(new Runnable()\r
- {\r
- public void run()\r
- {\r
- // and send to javascript handler\r
- String st[] = new String[0];\r
- int i = 0;\r
- for (String colcommand : colcommands)\r
- {\r
- // do sync execution for each chunk\r
- try\r
- {\r
- executeJavascriptFunction(\r
- false,\r
- _listenerfn,\r
- st = new String[]\r
- {\r
- "colourstruct",\r
- ""\r
- + ((jalview.appletgui.AlignmentPanel) source).av\r
- .getViewId(), handle, "" });\r
- } catch (Exception ex)\r
- {\r
- System.err.println("Couldn't execute callback with "\r
- + _listenerfn + " using args { " + st[0] + ", "\r
- + st[1] + ", " + st[2] + "," + st[3] + "\n");\r
- ex.printStackTrace();\r
-\r
- }\r
- }\r
- }\r
- }).start();\r
- */\r
- }\r
-\r
- }\r
-\r
- @Override\r
- public Color getColour(int atomIndex, int pdbResNum, String chain,\r
- String pdbId)\r
- {\r
- return null;\r
- }\r
-\r
- @Override\r
- public AlignFrame getAlignFrame()\r
- {\r
- // associated with all alignframes, always.\r
- return null;\r
- }\r
-\r
- @Override\r
- public String getListenerFunction()\r
- {\r
- return _listenerfn;\r
- }\r
-\r
- public void finalise()\r
- {\r
- jvlite=null;\r
- super.finalize();\r
- }\r
- @Override\r
- public void releaseReferences(Object svl)\r
- {\r
- \r
- // TODO Auto-generated method stub\r
-\r
- }\r
-\r
-}\r
+ * for null message)]
+ * </pre>
+ *
+ * <br>
+ * The message contains a series of Jmol script commands that will colour
+ * structures according to their associated sequences in the current view. Use
+ * jalview
+ * .javascript.JalviewLiteJsApi.getJsMessage('colourstruct',String(alignment
+ * view id)) to retrieve successive chunks of the message.</li>
+ * </ul>
+ *
+ * @author Jim Procter (jprocter)
+ *
+ */
+public class MouseOverStructureListener extends JSFunctionExec implements
+ JsCallBack, StructureListener
+{
+
+ String _listenerfn;
+
+ String[] modelSet;
+
+ public MouseOverStructureListener(JalviewLite jalviewLite,
+ String listener, String[] modelList)
+ {
+ super(jalviewLite);
+ _listenerfn = listener;
+ modelSet = modelList;
+ if (modelSet != null)
+ {
+ for (int i = 0; i < modelSet.length; i++)
+ {
+ // resolve a real filename
+ try
+ {
+ if (new java.net.URL(modelSet[i]).openConnection() != null)
+ {
+ continue;
+ }
+ } catch (Exception x)
+ {
+ }
+ ;
+ try
+ {
+ String db = jvlite.getDocumentBase().toString();
+ db = db.substring(0, db.lastIndexOf("/"));
+ if (new java.net.URL(db + "/" + modelSet[i]).openConnection() != null)
+ {
+ modelSet[i] = db + "/" + modelSet[i];
+ continue;
+ }
+ } catch (Exception x)
+ {
+ }
+ ;
+ try
+ {
+ if (new java.net.URL(jvlite.getCodeBase() + modelSet[i])
+ .openConnection() != null)
+ {
+ modelSet[i] = jvlite.getCodeBase() + modelSet[i];
+ continue;
+ }
+ } catch (Exception x)
+ {
+ }
+ ;
+
+ }
+ }
+ }
+
+ @Override
+ public String[] getPdbFile()
+ {
+ return modelSet;
+ }
+
+ @Override
+ public void mouseOverStructure(int atomIndex, String strInfo)
+ {
+
+ // StructureSelectionManager.getStructureSelectionManager().mouseOverStructure(atomIndex,
+ // chain, pdbfile)
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void highlightAtom(int atomIndex, int pdbResNum, String chain,
+ String pdbId)
+ {
+ String[] st = new String[0];
+ try
+ {
+ executeJavascriptFunction(_listenerfn, st = new String[]
+ { "mouseover", "" + pdbId, "" + chain, "" + (pdbResNum),
+ "" + atomIndex });
+ } catch (Exception ex)
+ {
+ System.err.println("Couldn't execute callback with " + _listenerfn
+ + " using args { " + st[0] + ", " + st[1] + ", " + st[2]
+ + "," + st[3] + "\n");
+ ex.printStackTrace();
+
+ }
+
+ }
+
+ @Override
+ public synchronized void updateColours(Object srce)
+ {
+ final Object source = srce;
+ StructureSelectionManager ssm = StructureSelectionManager
+ .getStructureSelectionManager(jvlite);
+ // if (jvlite.debug)
+ // {
+ // ssm.reportMapping();
+ // }
+ if (source instanceof jalview.api.AlignmentViewPanel)
+ {
+ SequenceI[][] sequence = new SequenceI[modelSet.length][];
+ for (int m = 0; m < modelSet.length; m++)
+ {
+ StructureMapping[] sm = ssm.getMapping(modelSet[m]);
+ if (sm != null && sm.length > 0)
+ {
+ sequence[m] = new SequenceI[sm.length];
+ for (int i = 0; i < sm.length; i++)
+ {
+ sequence[m][i] = sm[i].getSequence();
+ }
+ }
+ else
+ {
+ sequence[m] = new SequenceI[0];
+ }
+ // if (jvlite.debug)
+ // {
+ // System.err.println("Mapped '" + modelSet[m] + "' to "
+ // + sequence[m].length + " sequences.");
+ // }
+ }
+
+ SequenceRenderer sr = ((jalview.appletgui.AlignmentPanel) source)
+ .getSequenceRenderer();
+ FeatureRenderer fr = ((jalview.appletgui.AlignmentPanel) source).av
+ .getShowSequenceFeatures() ? new jalview.appletgui.FeatureRenderer(
+ ((jalview.appletgui.AlignmentPanel) source).av) : null;
+ if (fr != null)
+ {
+ ((jalview.appletgui.FeatureRenderer) fr)
+ .transferSettings(((jalview.appletgui.AlignmentPanel) source)
+ .getFeatureRenderer());
+ }
+ ;
+
+ // Form a colour command from the given alignment panel for each distinct
+ // structure
+ ArrayList<String[]> ccomands = new ArrayList<String[]>();
+ ArrayList<String> pdbfn = new ArrayList<String>();
+ StructureMappingcommandSet[] colcommands = JmolCommands
+ .getColourBySequenceCommand(ssm, modelSet, sequence, sr, fr,
+ ((AlignmentViewPanel) source).getAlignment());
+ if (colcommands == null)
+ {
+ return;
+ }
+ int sz = 0;
+ for (jalview.structure.StructureMappingcommandSet ccset : colcommands)
+ {
+ sz += ccset.commands.length;
+ ccomands.add(ccset.commands);
+ pdbfn.add(ccset.mapping);
+ }
+
+ String mclass, mhandle;
+ String ccomandset[] = new String[sz];
+ sz = 0;
+ for (String[] ccset : ccomands)
+ {
+ System.arraycopy(ccset, 0, ccomandset, sz, ccset.length);
+ sz += ccset.length;
+ }
+ if (jvlite.isJsMessageSetChanged(
+ mclass = "colourstruct",
+ mhandle = ((jalview.appletgui.AlignmentPanel) source).av
+ .getViewId(), ccomandset))
+ {
+ jvlite.setJsMessageSet(mclass, mhandle, ccomandset);
+ // and notify javascript handler
+ String st[] = new String[]
+ {
+ "colourstruct",
+ "" + ((jalview.appletgui.AlignmentPanel) source).av.getViewId(),
+ "" + ccomandset.length,
+ jvlite.arrayToSeparatorList(pdbfn.toArray(new String[pdbfn
+ .size()])) };
+ try
+ {
+ executeJavascriptFunction(true, _listenerfn, st);
+ } catch (Exception ex)
+ {
+ System.err.println("Couldn't execute callback with "
+ + _listenerfn + " using args { " + st[0] + ", " + st[1]
+ + ", " + st[2] + "," + st[3] + "}"); // + ","+st[4]+"\n");
+ ex.printStackTrace();
+
+ }
+ }
+ /*
+ * new Thread(new Runnable() { public void run() { // and send to
+ * javascript handler String st[] = new String[0]; int i = 0; for (String
+ * colcommand : colcommands) { // do sync execution for each chunk try {
+ * executeJavascriptFunction( false, _listenerfn, st = new String[] {
+ * "colourstruct", "" + ((jalview.appletgui.AlignmentPanel) source).av
+ * .getViewId(), handle, "" }); } catch (Exception ex) {
+ * System.err.println("Couldn't execute callback with " + _listenerfn +
+ * " using args { " + st[0] + ", " + st[1] + ", " + st[2] + "," + st[3] +
+ * "\n"); ex.printStackTrace();
+ *
+ * } } } }).start();
+ */
+ }
+
+ }
+
+ @Override
+ public Color getColour(int atomIndex, int pdbResNum, String chain,
+ String pdbId)
+ {
+ return null;
+ }
+
+ @Override
+ public AlignFrame getAlignFrame()
+ {
+ // associated with all alignframes, always.
+ return null;
+ }
+
+ @Override
+ public String getListenerFunction()
+ {
+ return _listenerfn;
+ }
+
+ public void finalise()
+ {
+ jvlite = null;
+ super.finalize();
+ }
+
+ @Override
+ public void releaseReferences(Object svl)
+ {
+
+ // TODO Auto-generated method stub
+
+ }
+
+}
// JRadioButtonMenuItem();
protected JRadioButtonMenuItem tcoffeeColour = new JRadioButtonMenuItem();
-
-
+
JMenuItem njTreeBlosumMenuItem = new JMenuItem();
JMenuItem avDistanceTreeBlosumMenuItem = new JMenuItem();
JMenuItem epsFile = new JMenuItem();
JMenuItem LoadtreeMenuItem = new JMenuItem();
-
+
public JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem();
public JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem();
nucleotideColour.setSelected(true);
break;
-
+
case ColourSchemeProperty.TCOFFEE:
- tcoffeeColour.setSelected(true);
- break;
+ tcoffeeColour.setSelected(true);
+ break;
case ColourSchemeProperty.PURINEPYRIMIDINE:
purinePyrimidineColour.setSelected(true);
nucleotideColour_actionPerformed(e);
}
});
-
+
tcoffeeColour.setText("T-Coffee scores");
tcoffeeColour.setEnabled(false);
- tcoffeeColour.addActionListener( new ActionListener() {
-
- @Override
- public void actionPerformed(ActionEvent e) {
- tcoffeeColorScheme_actionPerformed(e);
- }
- } );
-
-
+ tcoffeeColour.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ tcoffeeColorScheme_actionPerformed(e);
+ }
+ });
+
deleteGroups.setText("Undefine groups");
deleteGroups.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_U, Toolkit.getDefaultToolkit()
}
});
LoadtreeMenuItem.setActionCommand("Load a tree for this sequence set");
- LoadtreeMenuItem.setText("Load Associated Tree");
+ LoadtreeMenuItem.setText("Load Associated Tree");
LoadtreeMenuItem.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
LoadtreeMenuItem_actionPerformed(e);
}
});
-
+
scaleAbove.setVisible(false);
scaleAbove.setText("Scale Above");
scaleAbove.addActionListener(new java.awt.event.ActionListener()
}
});
sortByTree.setText("Sort Alignment With New Tree");
- sortByTree.setToolTipText("<html>Enable this to automatically sort<br>the alignment when you open<br> a new tree.");
- sortByTree.setState(jalview.bin.Cache.getDefault(
- "SORT_BY_TREE", false));
+ sortByTree
+ .setToolTipText("<html>Enable this to automatically sort<br>the alignment when you open<br> a new tree.");
+ sortByTree
+ .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false));
sortByTree.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
});
listenToViewSelections.setText("Listen for selections");
- listenToViewSelections.setToolTipText("<html>When selected, selections in this view will mirror<br>selections made on the same sequences in other views.");
- listenToViewSelections.setState(false);
+ listenToViewSelections
+ .setToolTipText("<html>When selected, selections in this view will mirror<br>selections made on the same sequences in other views.");
+ listenToViewSelections.setState(false);
listenToViewSelections.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
selectMenu.add(invertColSel);
selectMenu.add(deleteGroups);
selectMenu.add(grpsFromSelection);
- // TODO - determine if the listenToViewSelections button is needed : see bug JAL-574
- //selectMenu.addSeparator();
- //selectMenu.add(listenToViewSelections);
+ // TODO - determine if the listenToViewSelections button is needed : see bug
+ // JAL-574
+ // selectMenu.addSeparator();
+ // selectMenu.add(listenToViewSelections);
}
protected void normaliseSequenceLogo_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
-
+
}
protected void listenToViewSelections_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
-
+
}
protected void showAllhidden_actionPerformed(ActionEvent e)
{
}
-
+
/**
- * Template method to handle the 'load T-Coffee scores' menu event.
+ * Template method to handle the 'load T-Coffee scores' menu event.
* <p>
* Subclasses override this method to provide a custom action.
- *
- * @param event The raised event
+ *
+ * @param event
+ * The raised event
*/
- protected void loadScores_actionPerformed(ActionEvent event) {
-
+ protected void loadScores_actionPerformed(ActionEvent event)
+ {
+
}
-
/**
- * Template method to handle the 'Color T-Coffee scores' menu event.
+ * Template method to handle the 'Color T-Coffee scores' menu event.
* <p>
* Subclasses override this method to provide a custom action.
- *
- * @param event The raised event
+ *
+ * @param event
+ * The raised event
*/
- protected void tcoffeeColorScheme_actionPerformed(ActionEvent event) {
-
+ protected void tcoffeeColorScheme_actionPerformed(ActionEvent event)
+ {
+
}
-
protected void jpred_actionPerformed(ActionEvent e)
{
*/
public class GCutAndPasteHtmlTransfer extends JInternalFrame
{
- protected JEditorPane textarea = new JEditorPane("text/html","");
+ protected JEditorPane textarea = new JEditorPane("text/html", "");
protected JScrollPane scrollPane = new JScrollPane();
JMenu editMenu = new JMenu();
JMenuItem copyItem = new JMenuItem();
- protected JCheckBoxMenuItem displaySource=new JCheckBoxMenuItem();
+
+ protected JCheckBoxMenuItem displaySource = new JCheckBoxMenuItem();
BorderLayout borderLayout2 = new BorderLayout();
});
textarea.setBorder(null);
close.setText("Close");
- close.addActionListener(new ActionListener() {
+ close.addActionListener(new ActionListener()
+ {
public void actionPerformed(ActionEvent e)
{
cancel_actionPerformed(e);
});
close.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_W, Toolkit.getDefaultToolkit()
- .getMenuShortcutKeyMask(), false));
+ .getMenuShortcutKeyMask(), false));
selectAll.setText("Select All");
selectAll.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_A, Toolkit.getDefaultToolkit()
copyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_C, Toolkit.getDefaultToolkit()
.getMenuShortcutKeyMask(), false));
-
+
editMenubar.add(jMenu1);
editMenubar.add(editMenu);
textarea.setFont(new java.awt.Font("Monospaced", Font.PLAIN, 12));
}
});
displaySource.setText("Show HTML Source");
- displaySource.setToolTipText("Select this if you want to copy raw html");
+ displaySource
+ .setToolTipText("Select this if you want to copy raw html");
displaySource.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent arg0)
{
protected void toggleHtml_actionPerformed(ActionEvent arg0)
{
// TODO Auto-generated method stub
-
+
}
/**
{
}
-
/**
* DOCUMENT ME!
*
// TODO Auto-generated method stub
}
+
protected void showNews_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
}
+
protected void showMemusage_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
protected JComboBox yCombobox = new JComboBox();
protected JComboBox zCombobox = new JComboBox();
-
+
protected JButton resetButton = new JButton();
-
+
FlowLayout flowLayout1 = new FlowLayout();
BorderLayout borderLayout1 = new BorderLayout();
protected JMenu associateViewsMenu = new JMenu();
- protected JMenu calcSettings=new JMenu();
- protected JCheckBoxMenuItem nuclSetting=new JCheckBoxMenuItem();
- protected JCheckBoxMenuItem protSetting=new JCheckBoxMenuItem();
- protected JCheckBoxMenuItem jvVersionSetting=new JCheckBoxMenuItem();
-
+ protected JMenu calcSettings = new JMenu();
+
+ protected JCheckBoxMenuItem nuclSetting = new JCheckBoxMenuItem();
+
+ protected JCheckBoxMenuItem protSetting = new JCheckBoxMenuItem();
+
+ protected JCheckBoxMenuItem jvVersionSetting = new JCheckBoxMenuItem();
+
protected JLabel statusBar = new JLabel();
+
protected GridLayout statusPanelLayout = new GridLayout();
- protected JPanel statusPanel=new JPanel();
+
+ protected JPanel statusPanel = new JPanel();
+
public GPCAPanel()
{
try
xCombobox_actionPerformed(e);
}
});
- resetButton.setFont(new java.awt.Font("Verdana",0,12));
+ resetButton.setFont(new java.awt.Font("Verdana", 0, 12));
resetButton.setText("Reset");
resetButton.addActionListener(new java.awt.event.ActionListener()
{
protSetting.setText("Protein matrix");
nuclSetting.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent arg0)
{
});
protSetting.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent arg0)
{
calcSettings.add(nuclSetting);
calcSettings.add(protSetting);
statusPanel.setLayout(statusPanelLayout);
- statusBar.setFont(new java.awt.Font("Verdana",0,12));
- //statusPanel.setBackground(Color.lightGray);
- //statusBar.setBackground(Color.lightGray);
- //statusPanel.add(statusBar, null);
+ statusBar.setFont(new java.awt.Font("Verdana", 0, 12));
+ // statusPanel.setBackground(Color.lightGray);
+ // statusBar.setBackground(Color.lightGray);
+ // statusPanel.add(statusBar, null);
JPanel panelBar = new JPanel(new BorderLayout());
panelBar.add(jPanel2, BorderLayout.NORTH);
panelBar.add(statusPanel, BorderLayout.SOUTH);
protected void resetButton_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
-
+
}
protected void protSetting_actionPerfomed(ActionEvent arg0)
{
// TODO Auto-generated method stub
-
+
}
protected void nuclSetting_actionPerfomed(ActionEvent arg0)
{
// TODO Auto-generated method stub
-
+
}
protected void outputPoints_actionPerformed(ActionEvent e)
protected void jvVersionSetting_actionPerfomed(ActionEvent arg0)
{
// TODO Auto-generated method stub
-
+
}
}
protected JCheckBox quality = new JCheckBox();
JPanel visualTab = new JPanel();
+
JPanel visual2Tab = new JPanel();
protected JCheckBox fullScreen = new JCheckBox();
protected JCheckBox annotations = new JCheckBox();
protected JPanel minColour = new JPanel();
+
JLabel mincolourLabel = new JLabel();
protected JPanel maxColour = new JPanel();
+
JLabel maxcolourLabel = new JLabel();
JLabel gapLabel = new JLabel();
JLabel sortLabel = new JLabel();
JPanel jPanel2 = new JPanel();
+
JPanel visual2panel = new JPanel();
GridLayout gridLayout2 = new GridLayout();
JLabel epsLabel = new JLabel();
protected JComboBox epsRendering = new JComboBox();
-
+
protected JLabel userIdWidthlabel = new JLabel();
+
protected JCheckBox autoIdWidth = new JCheckBox();
- protected JTextField userIdWidth = new JTextField();
+ protected JTextField userIdWidth = new JTextField();
JLabel jLabel1 = new JLabel();
protected JCheckBox followHighlight = new JCheckBox();
- protected JCheckBox sortByTree= new JCheckBox();
+ protected JCheckBox sortByTree = new JCheckBox();
/**
* Creates a new GPreferences object.
{
public void mousePressed(MouseEvent e)
{
- minColour_actionPerformed();
+ minColour_actionPerformed();
}
});
maxcolourLabel.setFont(verdana11);
{
public void mousePressed(MouseEvent e)
{
- maxColour_actionPerformed();
+ maxColour_actionPerformed();
}
});
-
+
startupCheckbox.setText("Open file");
startupCheckbox.setFont(verdana11);
startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
padGaps.setBounds(new Rectangle(22, 94, 168, 23));
sortByTree.setFont(JvSwingUtils.getLabelFont());
sortByTree.setText("Sort With New Tree");
- sortByTree.setToolTipText("When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment.");
+ sortByTree
+ .setToolTipText("When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment.");
sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
-
+
autoIdWidth.setFont(JvSwingUtils.getLabelFont());
autoIdWidth.setText("Automatically set ID width");
- autoIdWidth.setToolTipText("<html>"+JvSwingUtils.wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")+"</html>");
- autoIdWidth.setBounds(new Rectangle(228, 96,188,23));
+ autoIdWidth
+ .setToolTipText("<html>"
+ + JvSwingUtils
+ .wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")
+ + "</html>");
+ autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
autoIdWidth.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
userIdWidthlabel.setText("Figure ID column width");
userIdWidth
- .setToolTipText("<html>"+JvSwingUtils
- .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")+"</html>");
+ .setToolTipText("<html>"
+ + JvSwingUtils
+ .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")
+ + "</html>");
userIdWidthlabel
- .setToolTipText("<html>"+JvSwingUtils
- .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")+"</html>");
- userIdWidthlabel.setBounds(new Rectangle(236, 120,168,23));
+ .setToolTipText("<html>"
+ + JvSwingUtils
+ .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")
+ + "</html>");
+ userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
userIdWidth.setText("");
- userIdWidth.setBounds(new Rectangle(232,144,84,23));
+ userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
userIdWidth.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
tooltipSettings.add(showNpTooltip);
visualTab.add(tooltipSettings);
visualTab.add(jPanel2);
- JvSwingUtils.addtoLayout(visual2Tab, "Default Colourscheme for alignment", colourLabel, colour);
- JPanel annotationShding=new JPanel();
- annotationShding.setBorder(new TitledBorder("Annotation Shading Default"));
- annotationShding.setLayout(new GridLayout(1,2));
- JvSwingUtils.addtoLayout(annotationShding, "Default Minimum Colour for annotation shading", mincolourLabel,minColour);
- JvSwingUtils.addtoLayout(annotationShding,"Default Maximum Colour for annotation shading", maxcolourLabel, maxColour);
+ JvSwingUtils.addtoLayout(visual2Tab,
+ "Default Colourscheme for alignment", colourLabel, colour);
+ JPanel annotationShding = new JPanel();
+ annotationShding.setBorder(new TitledBorder(
+ "Annotation Shading Default"));
+ annotationShding.setLayout(new GridLayout(1, 2));
+ JvSwingUtils.addtoLayout(annotationShding,
+ "Default Minimum Colour for annotation shading",
+ mincolourLabel, minColour);
+ JvSwingUtils.addtoLayout(annotationShding,
+ "Default Maximum Colour for annotation shading",
+ maxcolourLabel, maxColour);
visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
-// visual2panel.add(minColour);
-// visual2panel.add(maxColour);
-// visual2Tab.add(visual2panel);
+ // visual2panel.add(minColour);
+ // visual2panel.add(maxColour);
+ // visual2Tab.add(visual2panel);
linkPanel.add(editLinkButtons, BorderLayout.EAST);
editLinkButtons.add(newLink, null);
gapSymbolCB.setRenderer(dlcr);
tabbedPane.add(visualTab, "Visual");
- tabbedPane.add(visual2Tab,"Colours");
+ tabbedPane.add(visual2Tab, "Colours");
tabbedPane.add(connectTab, "Connections");
tabbedPane.add(exportTab, "Output");
jPanel11.add(jLabel1);
calcTab.add(autoCalculateConsCheck);
calcTab.add(padGaps);
calcTab.add(sortByTree);
-
+
tabbedPane.add(dasPanel, "DAS Settings");
tabbedPane.add(wsPanel, "Web Services");
protected void autoIdWidth_actionPerformed()
{
// TODO Auto-generated method stub
-
+
}
protected void userIdWidth_actionPerformed()
{
// TODO Auto-generated method stub
-
+
}
protected void maxColour_actionPerformed()
{
// TODO Auto-generated method stub
-
+
}
protected void minColour_actionPerformed()
{
// TODO Auto-generated method stub
-
+
}
protected void showunconserved_actionPerformed(ActionEvent e)
import net.miginfocom.swing.MigLayout;
-
public class GRestInputParamEditDialog
{
protected JPanel dpane;
+
protected JPanel okcancel;
+
protected JList typeList;
+
protected JTextField tok;
+
protected JPanel options;
+
protected JPanel optionsPanel;
- public GRestInputParamEditDialog()
+
+ public GRestInputParamEditDialog()
{
jbInit();
}
- protected void jbInit() {
- dpane = new JPanel(new MigLayout("","[][][fill]","[][fill][]"));
- dpane.setPreferredSize(new Dimension(110+100+OptsAndParamsPage.PARAM_WIDTH,400));
+
+ protected void jbInit()
+ {
+ dpane = new JPanel(new MigLayout("", "[][][fill]", "[][fill][]"));
+ dpane.setPreferredSize(new Dimension(
+ 110 + 100 + OptsAndParamsPage.PARAM_WIDTH, 400));
typeList = new JList();
typeList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- typeList.getSelectionModel().addListSelectionListener(new ListSelectionListener()
- {
-
- @Override
- public void valueChanged(ListSelectionEvent e)
- {
- type_SelectionChangedActionPerformed(e);
- };
- });
-
+ typeList.getSelectionModel().addListSelectionListener(
+ new ListSelectionListener()
+ {
+
+ @Override
+ public void valueChanged(ListSelectionEvent e)
+ {
+ type_SelectionChangedActionPerformed(e);
+ };
+ });
+
tok = new JTextField();
tok.addKeyListener(new KeyListener()
{
-
+
@Override
public void keyTyped(KeyEvent e)
{
}
-
+
@Override
public void keyReleased(KeyEvent e)
{
tokChanged_actionPerformed();
}
-
+
@Override
public void keyPressed(KeyEvent e)
{
-
+
}
});
- options = new JPanel(new MigLayout("","[grow 100,fill]",""));
- optionsPanel = new JPanel(new MigLayout("","[fill]","[fill]"));
+ options = new JPanel(new MigLayout("", "[grow 100,fill]", ""));
+ optionsPanel = new JPanel(new MigLayout("", "[fill]", "[fill]"));
JScrollPane optionView = new JScrollPane();
optionView.setViewportView(options);
- JvSwingUtils.mgAddtoLayout(dpane, "Input Parameter name", new JLabel("Name"), tok, "grow,spanx 3,wrap");
- JPanel paramsType = new JPanel(new MigLayout("","[grow 100,fill]","[grow 100,fill]"));
+ JvSwingUtils.mgAddtoLayout(dpane, "Input Parameter name", new JLabel(
+ "Name"), tok, "grow,spanx 3,wrap");
+ JPanel paramsType = new JPanel(new MigLayout("", "[grow 100,fill]",
+ "[grow 100,fill]"));
paramsType.setBorder(new TitledBorder("Select input type"));
- JScrollPane jlistScroller=new JScrollPane();
+ JScrollPane jlistScroller = new JScrollPane();
jlistScroller.setViewportView(typeList);
- paramsType.add(jlistScroller,"spanx 2,spany 2");
+ paramsType.add(jlistScroller, "spanx 2,spany 2");
dpane.add(paramsType);
optionsPanel.setBorder(new TitledBorder("Set options for type"));
optionsPanel.add(optionView);
- dpane.add(optionsPanel,"wrap");
- okcancel = new JPanel(new MigLayout("","[center][center]","[]"));
- dpane.add(okcancel,"spanx 3,wrap");
+ dpane.add(optionsPanel, "wrap");
+ okcancel = new JPanel(new MigLayout("", "[center][center]", "[]"));
+ dpane.add(okcancel, "spanx 3,wrap");
}
+
protected void tokChanged_actionPerformed()
{
-
+
}
+
protected void type_SelectionChangedActionPerformed(ListSelectionEvent e)
{
}
-
+
}
import net.miginfocom.swing.MigLayout;
-public class GRestServiceEditorPane extends JPanel {
+public class GRestServiceEditorPane extends JPanel
+{
protected JTabbedPane panels;
details.setLayout(new MigLayout());
inputs = new JPanel();
inputs.setName("Input/Output");
- inputs.setLayout(new MigLayout("","[grow 85,fill][]",""));
+ inputs.setLayout(new MigLayout("", "[grow 85,fill][]", ""));
paste = new JPanel();
paste.setName("Cut'n'Paste");
- paste.setLayout(new MigLayout("","[grow 100, fill]","[][grow 100,fill]"));
+ paste.setLayout(new MigLayout("", "[grow 100, fill]",
+ "[][grow 100,fill]"));
panels = new JTabbedPane();
panels.addTab(details.getName(), details);
cpanel = details;
name = new JTextArea(1, 12);
- JvSwingUtils
- .mgAddtoLayout(cpanel, "Short descriptive name for service",
- new JLabel("Name:"), name,"wrap");
+ JvSwingUtils.mgAddtoLayout(cpanel,
+ "Short descriptive name for service", new JLabel("Name:"),
+ name, "wrap");
action = new JComboBox();
JvSwingUtils
.mgAddtoLayout(
cpanel,
"What kind of function the service performs (e.g. alignment, analysis, search, etc).",
- new JLabel("Service Action:"), action,"wrap");
+ new JLabel("Service Action:"), action, "wrap");
descr = new JTextArea(4, 60);
descrVp = new JScrollPane();
descrVp.setViewportView(descr);
JvSwingUtils.mgAddtoLayout(cpanel, "Brief description of service",
- new JLabel("Description:"), descrVp,"wrap");
+ new JLabel("Description:"), descrVp, "wrap");
url = new JTextArea(2, 60);
urlVp = new JScrollPane();
.mgAddtoLayout(
cpanel,
"URL to post data to service. Include any special parameters needed here",
- new JLabel("POST URL:"), urlVp,"wrap");
+ new JLabel("POST URL:"), urlVp, "wrap");
urlsuff = new JTextArea();
urlsuff.setColumns(60);
.mgAddtoLayout(
cpanel,
"Optional suffix added to URL when retrieving results from service",
- new JLabel("URL Suffix:"), urlsuff,"wrap");
+ new JLabel("URL Suffix:"), urlsuff, "wrap");
// input options
// details.add(cpanel = new JPanel(), BorderLayout.CENTER);
}
});
gapChar = new JComboBox();
- JvSwingUtils
- .mgAddtoLayout(
- cpanel,
- "Which gap character does this service prefer ?",
- new JLabel("Gap Character:"), gapChar,"wrap");
-
+ JvSwingUtils.mgAddtoLayout(cpanel,
+ "Which gap character does this service prefer ?", new JLabel(
+ "Gap Character:"), gapChar, "wrap");
cpanel.add(hSeparable);
cpanel.add(vSeparable);
// Inputparams
JPanel iprmsList = new JPanel();
iprmsList.setBorder(new TitledBorder("Data input parameters"));
- iprmsList.setLayout(new MigLayout("","[grow 90, fill][]"));
+ iprmsList.setLayout(new MigLayout("", "[grow 90, fill][]"));
iprmVp = new JScrollPane();
iprmVp.getViewport().setView(iprms = new JList());
iprmsList.add(iprmVp);
iprms.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
iprms.addMouseListener(new MouseListener()
{
-
+
@Override
public void mouseReleased(MouseEvent e)
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
public void mousePressed(MouseEvent e)
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
public void mouseExited(MouseEvent e)
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
public void mouseEntered(MouseEvent e)
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
public void mouseClicked(MouseEvent e)
{
- if (e.getClickCount()>1) {
+ if (e.getClickCount() > 1)
+ {
iprmListSelection_doubleClicked();
}
-
+
}
});
JPanel iprmButs = new JPanel();
}
});
- iprmButs.add(iprmsAdd,"wrap");
- iprmButs.add(iprmsRem,"wrap");
+ iprmButs.add(iprmsAdd, "wrap");
+ iprmButs.add(iprmsRem, "wrap");
iprmsList.add(iprmButs, "wrap");
inputs.add(iprmsList, "wrap");
// Return Parameters
-
+
rdataAdd = JvSwingUtils.makeButton("+", "Add return datatype",
new ActionListener()
{
JPanel rparamList = new JPanel();
rparamList.setBorder(new TitledBorder("Data returned by service"));
- rparamList.setLayout(new MigLayout("","[grow 90, fill][]"));
+ rparamList.setLayout(new MigLayout("", "[grow 90, fill][]"));
rdata = new JList();
rdata.setToolTipText("Right click to edit currently selected parameter.");
rdata.addMouseListener(new MouseListener()
{
-
+
@Override
public void mouseReleased(MouseEvent arg0)
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
public void mousePressed(MouseEvent arg0)
{
-
+
}
-
+
@Override
public void mouseExited(MouseEvent arg0)
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
public void mouseEntered(MouseEvent arg0)
{
// TODO Auto-generated method stub
-
+
}
-
+
@Override
public void mouseClicked(MouseEvent arg0)
{
- if (arg0.getButton()==MouseEvent.BUTTON3)
+ if (arg0.getButton() == MouseEvent.BUTTON3)
{
rdata_rightClicked(arg0);
}
-
+
}
});
rdataVp = new JScrollPane();
rparamList.add(rdataVp);
JPanel rparamButs = new JPanel();
rparamButs.setLayout(new MigLayout());
- rparamButs.add(rdataAdd,"wrap");
- rparamButs.add(rdataRem,"wrap");
- rparamButs.add(rdataNup,"wrap");
- rparamButs.add(rdataNdown,"wrap");
- rparamList.add(rparamButs,"wrap");
- inputs.add(rparamList,"wrap");
-
+ rparamButs.add(rdataAdd, "wrap");
+ rparamButs.add(rdataRem, "wrap");
+ rparamButs.add(rdataNup, "wrap");
+ rparamButs.add(rdataNdown, "wrap");
+ rparamList.add(rparamButs, "wrap");
+ inputs.add(rparamList, "wrap");
+
// Parse flat-text to a service
-
- urldesc = new JTextArea(4,60);
+ urldesc = new JTextArea(4, 60);
urldesc.setEditable(true);
urldesc.setWrapStyleWord(true);
urldescVp = new JScrollPane();
urldescVp.setViewportView(urldesc);
JPanel urldescPane = new JPanel();
- urldescPane.setLayout(new MigLayout("","[grow 100, fill]", "[grow 100, fill]"));
+ urldescPane.setLayout(new MigLayout("", "[grow 100, fill]",
+ "[grow 100, fill]"));
urldescPane.setBorder(new TitledBorder("RSBS Encoded Service"));
urldescPane.add(urldescVp, "span");
- paste.add(urldescPane,"span");
- urldescPane.setToolTipText("<html>"+JvSwingUtils.wrapTooltip("Flat file representation of this rest service using the Really Simple Bioinformatics Service formalism"));
-
+ paste.add(urldescPane, "span");
+ urldescPane
+ .setToolTipText("<html>"
+ + JvSwingUtils
+ .wrapTooltip("Flat file representation of this rest service using the Really Simple Bioinformatics Service formalism"));
+
parseRes = new JTextArea();
parseResVp = new JScrollPane();
parseResVp.setViewportView(parseRes);
parseRes.setWrapStyleWord(true);
parseRes.setColumns(60);
- parseWarnings = new JPanel(new MigLayout("","[grow 100, fill]", "[grow 100, fill]"));
+ parseWarnings = new JPanel(new MigLayout("", "[grow 100, fill]",
+ "[grow 100, fill]"));
parseWarnings.setBorder(new TitledBorder("Parsing errors"));
- parseWarnings.setToolTipText("<html>"+JvSwingUtils.wrapTooltip("Results of parsing the RSBS representation")+"</html>");
+ parseWarnings
+ .setToolTipText("<html>"
+ + JvSwingUtils
+ .wrapTooltip("Results of parsing the RSBS representation")
+ + "</html>");
parseWarnings.add(parseResVp, "center");
parseRes.setEditable(false);
paste.add(parseWarnings, "span");
protected void rdata_rightClicked(MouseEvent arg0)
{
// TODO Auto-generated method stub
-
+
}
protected void iprmListSelection_doubleClicked()
{
// TODO Auto-generated method stub
-
+
}
protected void hSeparable_actionPerformed(ActionEvent arg0)
private void jbInit() throws Exception
{
-
+
}
-
+
}
{
public void actionPerformed(ActionEvent actionEvent)
{
- purinePyrimidineColour_actionPerformed(actionEvent);
+ purinePyrimidineColour_actionPerformed(actionEvent);
}
});
-
+
userColour.setText("User Defined ...");
userColour.addActionListener(new ActionListener()
{
{
jmolColour_actionPerformed(actionEvent);
}
- }
- );
+ });
helpMenu.setText("Help");
jmolHelp.setText("Jmol Help");
jmolHelp.addActionListener(new ActionListener()
protected JRadioButtonMenuItem turnColour = new JRadioButtonMenuItem();
protected JRadioButtonMenuItem buriedColour = new JRadioButtonMenuItem();
-
+
protected JRadioButtonMenuItem purinePyrimidineColour = new JRadioButtonMenuItem();
-
protected JRadioButtonMenuItem userColour = new JRadioButtonMenuItem();
{
}
-
+
public void purinePyrimidineColour_actionPerformed(ActionEvent actionEvent)
{
public void viewMenu_menuSelected()
{
}
+
public void sortByTree_actionPerformed(ActionEvent e)
{
public JButton mergeResults = new JButton();
GridBagLayout gridBagLayout1 = new GridBagLayout();
-
+
public JPanel statusPanel = new JPanel(new GridLayout());
+
public JLabel statusBar = new JLabel();
/**
protected JButton deleteSbrsUrl = new JButton();
// Web service status and url table
- protected JTable wsList=new JTable();
-
+ protected JTable wsList = new JTable();
+
protected TitledBorder wsListTitleBorder = new TitledBorder(
"Web Service Discovery URLS");
BorderLayout myBorderlayout = new BorderLayout();
BorderLayout wsListBorderlayout = new BorderLayout();
-
+
BorderLayout srbsListBorderlayout = new BorderLayout();
GridBagLayout wsPrefLayout = new GridBagLayout();
wsListUrlPanel.setLayout(new BorderLayout());
wsListPane.setBorder(BorderFactory.createEtchedBorder());
wsListPane.getViewport().add(wsList);
- wsList.setPreferredSize(new Dimension(482,202));
+ wsList.setPreferredSize(new Dimension(482, 202));
wsListPane.setPreferredSize(new Dimension(380, 80));
wsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
wsList.setColumnSelectionAllowed(false);
wsListButtons.add(newWsUrl);
wsListButtons.add(editWsUrl);
wsListButtons.add(deleteWsUrl);
- wsListButtons.setMinimumSize(new Dimension(350,80));
+ wsListButtons.setMinimumSize(new Dimension(350, 80));
wsListNavButs.setSize(new Dimension(80, 80));
wsListNavButs.setPreferredSize(new Dimension(80, 80));
wsListNavButs.setLayout(new FlowLayout());
wsMenuRefreshButs.add(resetWs, null);
wsMenuRefreshButs.add(progressBar, null);
myBorderlayout.setHgap(3);
- if (jalview.bin.Cache.getDefault("ENABLE_RSBS_EDITOR",false)) {
- JTabbedPane listPanels=new JTabbedPane();
- listPanels.addTab("JABAWS Servers",wsListPanel);
- listPanels.addTab("RSB Services", srbsListPanel);
- add(listPanels, BorderLayout.NORTH);
- } else {
- add(wsListPanel, BorderLayout.NORTH);
+ if (jalview.bin.Cache.getDefault("ENABLE_RSBS_EDITOR", false))
+ {
+ JTabbedPane listPanels = new JTabbedPane();
+ listPanels.addTab("JABAWS Servers", wsListPanel);
+ listPanels.addTab("RSB Services", srbsListPanel);
+ add(listPanels, BorderLayout.NORTH);
+ }
+ else
+ {
+ add(wsListPanel, BorderLayout.NORTH);
}
add(wsMenuButtons, BorderLayout.CENTER);
add(wsMenuRefreshButs, BorderLayout.SOUTH);
protected void deleteSbrsUrl_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
-
+
}
protected void editSbrsUrl_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
-
+
}
protected void newSbrsUrl_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
-
+
}
protected void displayWsWarning_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
-
+
}
protected void resetWs_actionPerformed(ActionEvent e)
/**
* Render the annotation rows associated with an alignment.
+ *
* @param annotPanel
* container frame
* @param av
* first column that will be drawn
* @param endRes
* last column that will be drawn
- * @return true if the fadedImage was used for any alignment annotation rows currently being calculated
+ * @return true if the fadedImage was used for any alignment annotation rows
+ * currently being calculated
*/
- public boolean drawComponent(AwtRenderPanelI annotPanel, AlignViewportI av,
- Graphics g, int activeRow, int startRes, int endRes)
+ public boolean drawComponent(AwtRenderPanelI annotPanel,
+ AlignViewportI av, Graphics g, int activeRow, int startRes,
+ int endRes)
{
- boolean usedFaded=false;
+ boolean usedFaded = false;
// NOTES:
// AnnotationPanel needs to implement: ImageObserver, access to
// AlignViewport
for (int i = 0; i < aa.length; i++)
{
AlignmentAnnotation row = aa[i];
- Annotation[] row_annotations=row.annotations;
+ Annotation[] row_annotations = row.annotations;
if (!row.visible)
{
continue;
if (row.autoCalculated && av.isCalculationInProgress(row))
{
y += charHeight;
- usedFaded=true;
+ usedFaded = true;
g.drawImage(fadedImage, 0, y - row.height, imgWidth, y, 0, y
- row.height, imgWidth, y, annotationPanel);
g.setColor(Color.black);
/*
* else if (annotationPanel.av.updatingConservation &&
* aa[i].label.equals("Conservation")) {
- *
+ *
* y += charHeight; g.drawImage(annotationPanel.fadedImage, 0, y -
* row.height, annotationPanel.imgWidth, y, 0, y - row.height,
* annotationPanel.imgWidth, y, annotationPanel);
- *
+ *
* g.setColor(Color.black); //
* g.drawString("Calculating Conservation.....",20, y-row.height/2);
- *
+ *
* continue; } else if (annotationPanel.av.updatingConservation &&
* aa[i].label.equals("Quality")) {
- *
+ *
* y += charHeight; g.drawImage(annotationPanel.fadedImage, 0, y -
* row.height, annotationPanel.imgWidth, y, 0, y - row.height,
* annotationPanel.imgWidth, y, annotationPanel); g.setColor(Color.black);
* // / g.drawString("Calculating Quality....",20, y-row.height/2);
- *
+ *
* continue; }
*/
// first pass sets up state for drawing continuation from left-hand column
switch (lastSS)
{
case 'H':
- drawHelixAnnot(g, row_annotations, lastSSX, x, y, iconOffset, startRes,
- column, validRes, validEnd);
+ drawHelixAnnot(g, row_annotations, lastSSX, x, y,
+ iconOffset, startRes, column, validRes, validEnd);
break;
case 'E':
- drawSheetAnnot(g, row_annotations, lastSSX, x, y, iconOffset, startRes,
- column, validRes, validEnd);
+ drawSheetAnnot(g, row_annotations, lastSSX, x, y,
+ iconOffset, startRes, column, validRes, validEnd);
break;
case 'S': // Stem case for RNA secondary structure
case 's': // and opposite direction
- drawStemAnnot(g, row_annotations, lastSSX, x, y, iconOffset, startRes,
- column, validRes, validEnd);
+ drawStemAnnot(g, row_annotations, lastSSX, x, y,
+ iconOffset, startRes, column, validRes, validEnd);
break;
default:
switch (lastSS)
{
case 'H':
- drawHelixAnnot(g, row_annotations, lastSSX, x, y, iconOffset, startRes,
- column, validRes, validEnd);
+ drawHelixAnnot(g, row_annotations, lastSSX, x, y, iconOffset,
+ startRes, column, validRes, validEnd);
break;
case 'E':
- drawSheetAnnot(g, row_annotations, lastSSX, x, y, iconOffset, startRes,
- column, validRes, validEnd);
+ drawSheetAnnot(g, row_annotations, lastSSX, x, y, iconOffset,
+ startRes, column, validRes, validEnd);
break;
case 's':
case 'S': // Stem case for RNA secondary structure
- drawStemAnnot(g, row_annotations, lastSSX, x, y, iconOffset, startRes,
- column, validRes, validEnd);
+ drawStemAnnot(g, row_annotations, lastSSX, x, y, iconOffset,
+ startRes, column, validRes, validEnd);
break;
default:
- drawGlyphLine(g, row_annotations, lastSSX, x, y, iconOffset, startRes,
- column, validRes, validEnd);
+ drawGlyphLine(g, row_annotations, lastSSX, x, y, iconOffset,
+ startRes, column, validRes, validEnd);
break;
}
}
{
if (aa[gg].graphGroup == row.graphGroup)
{
- drawLineGraph(g, aa[gg], aa[gg].annotations, startRes, endRes, y, groupmin,
- groupmax, row.graphHeight);
+ drawLineGraph(g, aa[gg], aa[gg].annotations, startRes,
+ endRes, y, groupmin, groupmax, row.graphHeight);
}
}
}
else
{
- drawLineGraph(g, row, row_annotations, startRes, endRes, y, row.graphMin,
- row.graphMax, row.graphHeight);
+ drawLineGraph(g, row, row_annotations, startRes, endRes, y,
+ row.graphMin, row.graphMax, row.graphHeight);
}
}
else if (row.graph == AlignmentAnnotation.BAR_GRAPH)
{
- drawBarGraph(g, row, row_annotations, startRes, endRes, row.graphMin,
- row.graphMax, y);
+ drawBarGraph(g, row, row_annotations, startRes, endRes,
+ row.graphMin, row.graphMax, y);
}
}
private final Color STEM_COLOUR = Color.blue;
- public void drawGlyphLine(Graphics g, Annotation[] row,
- int lastSSX, int x, int y, int iconOffset, int startRes,
- int column, boolean validRes, boolean validEnd)
+ public void drawGlyphLine(Graphics g, Annotation[] row, int lastSSX,
+ int x, int y, int iconOffset, int startRes, int column,
+ boolean validRes, boolean validEnd)
{
g.setColor(GLYPHLINE_COLOR);
g.fillRect(lastSSX, y + 6 + iconOffset, (x * charWidth) - lastSSX, 2);
}
- public void drawSheetAnnot(Graphics g, Annotation[] row,
- int lastSSX, int x, int y, int iconOffset, int startRes,
- int column, boolean validRes, boolean validEnd)
+ public void drawSheetAnnot(Graphics g, Annotation[] row, int lastSSX,
+ int x, int y, int iconOffset, int startRes, int column,
+ boolean validRes, boolean validEnd)
{
g.setColor(SHEET_COLOUR);
- if (!validEnd || !validRes || row==null || row[column] == null
+ if (!validEnd || !validRes || row == null || row[column] == null
|| row[column].secondaryStructure != 'E')
{
g.fillRect(lastSSX, y + 4 + iconOffset,
}
- public void drawHelixAnnot(Graphics g, Annotation[] row,
- int lastSSX, int x, int y, int iconOffset, int startRes,
- int column, boolean validRes, boolean validEnd)
+ public void drawHelixAnnot(Graphics g, Annotation[] row, int lastSSX,
+ int x, int y, int iconOffset, int startRes, int column,
+ boolean validRes, boolean validEnd)
{
g.setColor(HELIX_COLOUR);
g.fillRect(x1, y + 4 + iconOffset, x2 - x1, 8);
}
- public void drawLineGraph(Graphics g, AlignmentAnnotation _aa, Annotation[] aa_annotations, int sRes,
- int eRes, int y, float min, float max, int graphHeight)
+ public void drawLineGraph(Graphics g, AlignmentAnnotation _aa,
+ Annotation[] aa_annotations, int sRes, int eRes, int y,
+ float min, float max, int graphHeight)
{
if (sRes > aa_annotations.length)
{
}
}
- public void drawBarGraph(Graphics g, AlignmentAnnotation _aa, Annotation[] aa_annotations, int sRes,
- int eRes, float min, float max, int y)
+ public void drawBarGraph(Graphics g, AlignmentAnnotation _aa,
+ Annotation[] aa_annotations, int sRes, int eRes, float min,
+ float max, int y)
{
if (sRes > aa_annotations.length)
{
// g.drawRect(x*av.charWidth, (int)ht, av.charWidth,
// (int)(scl));
// g.setColor(profcolour.findColour(dc[0]).darker());
- g.setColor(profcolour.findColour(dc[0], column,null));
+ g.setColor(profcolour.findColour(dc[0], column, null));
hght = (ht + (scl - lm.getDescent() - lm.getBaselineOffsets()[lm
.getBaselineIndex()]));
BasicStroke.JOIN_ROUND, 3f, new float[]
{ 5f, 3f }, 0f));
- y2 = (int) (y - ((_aa.threshold.value - min) / range) * _aa.graphHeight);
+ y2 = (int) (y - ((_aa.threshold.value - min) / range)
+ * _aa.graphHeight);
g.drawLine(0, y2, (eRes - sRes) * charWidth, y2);
g2.setStroke(new BasicStroke());
}
}
// used by overview window
- public void drawGraph(Graphics g, AlignmentAnnotation _aa, Annotation[] aa_annotations, int width,
- int y, int sRes, int eRes)
+ public void drawGraph(Graphics g, AlignmentAnnotation _aa,
+ Annotation[] aa_annotations, int width, int y, int sRes, int eRes)
{
eRes = Math.min(eRes, aa_annotations.length);
g.setColor(Color.white);
public interface AwtRenderPanelI extends ImageObserver
{
/**
- * old image used when data is currently being calculated and cannot be rendered
+ * old image used when data is currently being calculated and cannot be
+ * rendered
*/
Image getFadedImage();
/**
* FontMetrics to use for rendering into Panel
+ *
* @return
*/
FontMetrics getFontMetrics();
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class AlcodMap implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * internal jalview id for the dnasq for this mapping.
- *
- */
- private java.lang.String _dnasq;
-
- /**
- * a Mapping entry and an associated protein sequence
- *
- */
- private jalview.schemabinding.version2.Mapping _mapping;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public AlcodMap() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'dnasq'. The field 'dnasq' has
- * the following description: internal jalview id for the dnasq
- * for this mapping.
- *
- *
- * @return the value of field 'Dnasq'.
- */
- public java.lang.String getDnasq(
- ) {
- return this._dnasq;
- }
-
- /**
- * Returns the value of field 'mapping'. The field 'mapping'
- * has the following description: a Mapping entry and an
- * associated protein sequence
- *
- *
- * @return the value of field 'Mapping'.
- */
- public jalview.schemabinding.version2.Mapping getMapping(
- ) {
- return this._mapping;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- * Sets the value of field 'dnasq'. The field 'dnasq' has the
- * following description: internal jalview id for the dnasq for
- * this mapping.
- *
- *
- * @param dnasq the value of field 'dnasq'.
- */
- public void setDnasq(
- final java.lang.String dnasq) {
- this._dnasq = dnasq;
- }
-
- /**
- * Sets the value of field 'mapping'. The field 'mapping' has
- * the following description: a Mapping entry and an associated
- * protein sequence
- *
- *
- * @param mapping the value of field 'mapping'.
- */
- public void setMapping(
- final jalview.schemabinding.version2.Mapping mapping) {
- this._mapping = mapping;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.AlcodMap
- */
- public static jalview.schemabinding.version2.AlcodMap unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.schemabinding.version2.AlcodMap) Unmarshaller.unmarshal(jalview.schemabinding.version2.AlcodMap.class, reader);
- }
-
- /**
- *
- *
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void validate(
- )
- throws org.exolab.castor.xml.ValidationException {
- org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
- validator.validate(this);
+public class AlcodMap implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * internal jalview id for the dnasq for this mapping.
+ *
+ */
+ private java.lang.String _dnasq;
+
+ /**
+ * a Mapping entry and an associated protein sequence
+ *
+ */
+ private jalview.schemabinding.version2.Mapping _mapping;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public AlcodMap()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'dnasq'. The field 'dnasq' has the following
+ * description: internal jalview id for the dnasq for this mapping.
+ *
+ *
+ * @return the value of field 'Dnasq'.
+ */
+ public java.lang.String getDnasq()
+ {
+ return this._dnasq;
+ }
+
+ /**
+ * Returns the value of field 'mapping'. The field 'mapping' has the following
+ * description: a Mapping entry and an associated protein sequence
+ *
+ *
+ * @return the value of field 'Mapping'.
+ */
+ public jalview.schemabinding.version2.Mapping getMapping()
+ {
+ return this._mapping;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Sets the value of field 'dnasq'. The field 'dnasq' has the following
+ * description: internal jalview id for the dnasq for this mapping.
+ *
+ *
+ * @param dnasq
+ * the value of field 'dnasq'.
+ */
+ public void setDnasq(final java.lang.String dnasq)
+ {
+ this._dnasq = dnasq;
+ }
+
+ /**
+ * Sets the value of field 'mapping'. The field 'mapping' has the following
+ * description: a Mapping entry and an associated protein sequence
+ *
+ *
+ * @param mapping
+ * the value of field 'mapping'.
+ */
+ public void setMapping(
+ final jalview.schemabinding.version2.Mapping mapping)
+ {
+ this._mapping = mapping;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.AlcodMap
+ */
+ public static jalview.schemabinding.version2.AlcodMap unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.schemabinding.version2.AlcodMap) Unmarshaller
+ .unmarshal(jalview.schemabinding.version2.AlcodMap.class,
+ reader);
+ }
+
+ /**
+ *
+ *
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void validate() throws org.exolab.castor.xml.ValidationException
+ {
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+ validator.validate(this);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Alcodon implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _pos1.
- */
- private long _pos1;
-
- /**
- * keeps track of state for field: _pos1
- */
- private boolean _has_pos1;
-
- /**
- * Field _pos2.
- */
- private long _pos2;
-
- /**
- * keeps track of state for field: _pos2
- */
- private boolean _has_pos2;
-
- /**
- * Field _pos3.
- */
- private long _pos3;
-
- /**
- * keeps track of state for field: _pos3
- */
- private boolean _has_pos3;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Alcodon() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deletePos1(
- ) {
- this._has_pos1= false;
- }
-
- /**
- */
- public void deletePos2(
- ) {
- this._has_pos2= false;
- }
-
- /**
- */
- public void deletePos3(
- ) {
- this._has_pos3= false;
- }
-
- /**
- * Returns the value of field 'pos1'.
- *
- * @return the value of field 'Pos1'.
- */
- public long getPos1(
- ) {
- return this._pos1;
- }
-
- /**
- * Returns the value of field 'pos2'.
- *
- * @return the value of field 'Pos2'.
+public class Alcodon implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _pos1.
+ */
+ private long _pos1;
+
+ /**
+ * keeps track of state for field: _pos1
+ */
+ private boolean _has_pos1;
+
+ /**
+ * Field _pos2.
+ */
+ private long _pos2;
+
+ /**
+ * keeps track of state for field: _pos2
+ */
+ private boolean _has_pos2;
+
+ /**
+ * Field _pos3.
+ */
+ private long _pos3;
+
+ /**
+ * keeps track of state for field: _pos3
+ */
+ private boolean _has_pos3;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Alcodon()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
*/
- public long getPos2(
- ) {
- return this._pos2;
- }
-
- /**
- * Returns the value of field 'pos3'.
- *
- * @return the value of field 'Pos3'.
- */
- public long getPos3(
- ) {
- return this._pos3;
- }
-
- /**
- * Method hasPos1.
- *
- * @return true if at least one Pos1 has been added
- */
- public boolean hasPos1(
- ) {
- return this._has_pos1;
- }
-
- /**
- * Method hasPos2.
- *
- * @return true if at least one Pos2 has been added
- */
- public boolean hasPos2(
- ) {
- return this._has_pos2;
- }
-
- /**
- * Method hasPos3.
- *
- * @return true if at least one Pos3 has been added
- */
- public boolean hasPos3(
- ) {
- return this._has_pos3;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
+ public void deletePos1()
+ {
+ this._has_pos1 = false;
+ }
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
+ /**
*/
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- * Sets the value of field 'pos1'.
- *
- * @param pos1 the value of field 'pos1'.
- */
- public void setPos1(
- final long pos1) {
- this._pos1 = pos1;
- this._has_pos1 = true;
- }
-
- /**
- * Sets the value of field 'pos2'.
- *
- * @param pos2 the value of field 'pos2'.
- */
- public void setPos2(
- final long pos2) {
- this._pos2 = pos2;
- this._has_pos2 = true;
- }
-
- /**
- * Sets the value of field 'pos3'.
- *
- * @param pos3 the value of field 'pos3'.
- */
- public void setPos3(
- final long pos3) {
- this._pos3 = pos3;
- this._has_pos3 = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.schemabinding.version2.Alcodo
- */
- public static jalview.schemabinding.version2.Alcodon unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(jalview.schemabinding.version2.Alcodon.class, reader);
- }
+ public void deletePos2()
+ {
+ this._has_pos2 = false;
+ }
- /**
- *
- *
- * @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);
+ public void deletePos3()
+ {
+ this._has_pos3 = false;
+ }
+
+ /**
+ * Returns the value of field 'pos1'.
+ *
+ * @return the value of field 'Pos1'.
+ */
+ public long getPos1()
+ {
+ return this._pos1;
+ }
+
+ /**
+ * Returns the value of field 'pos2'.
+ *
+ * @return the value of field 'Pos2'.
+ */
+ public long getPos2()
+ {
+ return this._pos2;
+ }
+
+ /**
+ * Returns the value of field 'pos3'.
+ *
+ * @return the value of field 'Pos3'.
+ */
+ public long getPos3()
+ {
+ return this._pos3;
+ }
+
+ /**
+ * Method hasPos1.
+ *
+ * @return true if at least one Pos1 has been added
+ */
+ public boolean hasPos1()
+ {
+ return this._has_pos1;
+ }
+
+ /**
+ * Method hasPos2.
+ *
+ * @return true if at least one Pos2 has been added
+ */
+ public boolean hasPos2()
+ {
+ return this._has_pos2;
+ }
+
+ /**
+ * Method hasPos3.
+ *
+ * @return true if at least one Pos3 has been added
+ */
+ public boolean hasPos3()
+ {
+ return this._has_pos3;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Sets the value of field 'pos1'.
+ *
+ * @param pos1
+ * the value of field 'pos1'.
+ */
+ public void setPos1(final long pos1)
+ {
+ this._pos1 = pos1;
+ this._has_pos1 = true;
+ }
+
+ /**
+ * Sets the value of field 'pos2'.
+ *
+ * @param pos2
+ * the value of field 'pos2'.
+ */
+ public void setPos2(final long pos2)
+ {
+ this._pos2 = pos2;
+ this._has_pos2 = true;
+ }
+
+ /**
+ * Sets the value of field 'pos3'.
+ *
+ * @param pos3
+ * the value of field 'pos3'.
+ */
+ public void setPos3(final long pos3)
+ {
+ this._pos3 = pos3;
+ this._has_pos3 = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.Alcodo
+ */
+ public static jalview.schemabinding.version2.Alcodon unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.schemabinding.version2.Alcodon) Unmarshaller.unmarshal(
+ jalview.schemabinding.version2.Alcodon.class, reader);
+ }
+
+ /**
+ *
+ *
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void validate() throws org.exolab.castor.xml.ValidationException
+ {
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+ validator.validate(this);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class AlcodonFrame implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _alcodonList.
- */
- private java.util.Vector _alcodonList;
-
- /**
- * Field _alcodMapList.
- */
- private java.util.Vector _alcodMapList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public AlcodonFrame() {
- super();
- this._alcodonList = new java.util.Vector();
- this._alcodMapList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vAlcodMap
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAlcodMap(
- final jalview.schemabinding.version2.AlcodMap vAlcodMap)
- throws java.lang.IndexOutOfBoundsException {
- this._alcodMapList.addElement(vAlcodMap);
- }
-
- /**
- *
- *
- * @param index
- * @param vAlcodMap
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAlcodMap(
- final int index,
- final jalview.schemabinding.version2.AlcodMap vAlcodMap)
- throws java.lang.IndexOutOfBoundsException {
- this._alcodMapList.add(index, vAlcodMap);
- }
-
- /**
- *
- *
- * @param vAlcodon
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAlcodon(
- final jalview.schemabinding.version2.Alcodon vAlcodon)
- throws java.lang.IndexOutOfBoundsException {
- this._alcodonList.addElement(vAlcodon);
- }
-
- /**
- *
- *
- * @param index
- * @param vAlcodon
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAlcodon(
- final int index,
- final jalview.schemabinding.version2.Alcodon vAlcodon)
- throws java.lang.IndexOutOfBoundsException {
- this._alcodonList.add(index, vAlcodon);
- }
-
- /**
- * Method enumerateAlcodMap.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.AlcodMap elements
- */
- public java.util.Enumeration enumerateAlcodMap(
- ) {
- return this._alcodMapList.elements();
- }
-
- /**
- * Method enumerateAlcodon.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.Alcodon elements
- */
- public java.util.Enumeration enumerateAlcodon(
- ) {
- return this._alcodonList.elements();
- }
-
- /**
- * Method getAlcodMap.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.AlcodMap at the given index
- */
- public jalview.schemabinding.version2.AlcodMap getAlcodMap(
- final int index)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._alcodMapList.size()) {
- throw new IndexOutOfBoundsException("getAlcodMap: Index value '" + index + "' not in range [0.." + (this._alcodMapList.size() - 1) + "]");
- }
-
- return (jalview.schemabinding.version2.AlcodMap) _alcodMapList.get(index);
- }
-
- /**
- * Method getAlcodMap.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.schemabinding.version2.AlcodMap[] getAlcodMap(
- ) {
- jalview.schemabinding.version2.AlcodMap[] array = new jalview.schemabinding.version2.AlcodMap[0];
- return (jalview.schemabinding.version2.AlcodMap[]) this._alcodMapList.toArray(array);
- }
-
- /**
- * Method getAlcodMapCount.
- *
- * @return the size of this collection
- */
- public int getAlcodMapCount(
- ) {
- return this._alcodMapList.size();
- }
-
- /**
- * Method getAlcodon.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.Alcodon at the given index
- */
- public jalview.schemabinding.version2.Alcodon getAlcodon(
- final int index)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._alcodonList.size()) {
- throw new IndexOutOfBoundsException("getAlcodon: Index value '" + index + "' not in range [0.." + (this._alcodonList.size() - 1) + "]");
- }
-
- return (jalview.schemabinding.version2.Alcodon) _alcodonList.get(index);
- }
-
- /**
- * Method getAlcodon.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.schemabinding.version2.Alcodon[] getAlcodon(
- ) {
- jalview.schemabinding.version2.Alcodon[] array = new jalview.schemabinding.version2.Alcodon[0];
- return (jalview.schemabinding.version2.Alcodon[]) this._alcodonList.toArray(array);
- }
-
- /**
- * Method getAlcodonCount.
- *
- * @return the size of this collection
- */
- public int getAlcodonCount(
- ) {
- return this._alcodonList.size();
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- * Method removeAlcodMap.
- *
- * @param vAlcodMap
- * @return true if the object was removed from the collection.
- */
- public boolean removeAlcodMap(
- final jalview.schemabinding.version2.AlcodMap vAlcodMap) {
- boolean removed = _alcodMapList.remove(vAlcodMap);
- return removed;
+public class AlcodonFrame implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _alcodonList.
+ */
+ private java.util.Vector _alcodonList;
+
+ /**
+ * Field _alcodMapList.
+ */
+ private java.util.Vector _alcodMapList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public AlcodonFrame()
+ {
+ super();
+ this._alcodonList = new java.util.Vector();
+ this._alcodMapList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vAlcodMap
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAlcodMap(
+ final jalview.schemabinding.version2.AlcodMap vAlcodMap)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._alcodMapList.addElement(vAlcodMap);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAlcodMap
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAlcodMap(final int index,
+ final jalview.schemabinding.version2.AlcodMap vAlcodMap)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._alcodMapList.add(index, vAlcodMap);
+ }
+
+ /**
+ *
+ *
+ * @param vAlcodon
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAlcodon(
+ final jalview.schemabinding.version2.Alcodon vAlcodon)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._alcodonList.addElement(vAlcodon);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAlcodon
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAlcodon(final int index,
+ final jalview.schemabinding.version2.Alcodon vAlcodon)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._alcodonList.add(index, vAlcodon);
+ }
+
+ /**
+ * Method enumerateAlcodMap.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.AlcodMap
+ * elements
+ */
+ public java.util.Enumeration enumerateAlcodMap()
+ {
+ return this._alcodMapList.elements();
+ }
+
+ /**
+ * Method enumerateAlcodon.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.Alcodon
+ * elements
+ */
+ public java.util.Enumeration enumerateAlcodon()
+ {
+ return this._alcodonList.elements();
+ }
+
+ /**
+ * Method getAlcodMap.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.AlcodMap at the
+ * given index
+ */
+ public jalview.schemabinding.version2.AlcodMap getAlcodMap(final int index)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._alcodMapList.size())
+ {
+ throw new IndexOutOfBoundsException("getAlcodMap: Index value '"
+ + index + "' not in range [0.."
+ + (this._alcodMapList.size() - 1) + "]");
}
- /**
- * Method removeAlcodMapAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.schemabinding.version2.AlcodMap removeAlcodMapAt(
- final int index) {
- java.lang.Object obj = this._alcodMapList.remove(index);
- return (jalview.schemabinding.version2.AlcodMap) obj;
- }
-
- /**
- * Method removeAlcodon.
- *
- * @param vAlcodon
- * @return true if the object was removed from the collection.
- */
- public boolean removeAlcodon(
- final jalview.schemabinding.version2.Alcodon vAlcodon) {
- boolean removed = _alcodonList.remove(vAlcodon);
- return removed;
- }
-
- /**
- * Method removeAlcodonAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.schemabinding.version2.Alcodon removeAlcodonAt(
- final int index) {
- java.lang.Object obj = this._alcodonList.remove(index);
- return (jalview.schemabinding.version2.Alcodon) obj;
- }
-
- /**
- */
- public void removeAllAlcodMap(
- ) {
- this._alcodMapList.clear();
+ return (jalview.schemabinding.version2.AlcodMap) _alcodMapList
+ .get(index);
+ }
+
+ /**
+ * Method getAlcodMap.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.schemabinding.version2.AlcodMap[] getAlcodMap()
+ {
+ jalview.schemabinding.version2.AlcodMap[] array = new jalview.schemabinding.version2.AlcodMap[0];
+ return (jalview.schemabinding.version2.AlcodMap[]) this._alcodMapList
+ .toArray(array);
+ }
+
+ /**
+ * Method getAlcodMapCount.
+ *
+ * @return the size of this collection
+ */
+ public int getAlcodMapCount()
+ {
+ return this._alcodMapList.size();
+ }
+
+ /**
+ * Method getAlcodon.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.Alcodon at the
+ * given index
+ */
+ public jalview.schemabinding.version2.Alcodon getAlcodon(final int index)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._alcodonList.size())
+ {
+ throw new IndexOutOfBoundsException("getAlcodon: Index value '"
+ + index + "' not in range [0.."
+ + (this._alcodonList.size() - 1) + "]");
}
- /**
- */
- public void removeAllAlcodon(
- ) {
- this._alcodonList.clear();
+ return (jalview.schemabinding.version2.Alcodon) _alcodonList.get(index);
+ }
+
+ /**
+ * Method getAlcodon.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.schemabinding.version2.Alcodon[] getAlcodon()
+ {
+ jalview.schemabinding.version2.Alcodon[] array = new jalview.schemabinding.version2.Alcodon[0];
+ return (jalview.schemabinding.version2.Alcodon[]) this._alcodonList
+ .toArray(array);
+ }
+
+ /**
+ * Method getAlcodonCount.
+ *
+ * @return the size of this collection
+ */
+ public int getAlcodonCount()
+ {
+ return this._alcodonList.size();
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
-
- /**
- *
- *
- * @param index
- * @param vAlcodMap
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setAlcodMap(
- final int index,
- final jalview.schemabinding.version2.AlcodMap vAlcodMap)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._alcodMapList.size()) {
- throw new IndexOutOfBoundsException("setAlcodMap: Index value '" + index + "' not in range [0.." + (this._alcodMapList.size() - 1) + "]");
- }
-
- this._alcodMapList.set(index, vAlcodMap);
- }
-
- /**
- *
- *
- * @param vAlcodMapArray
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Method removeAlcodMap.
+ *
+ * @param vAlcodMap
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAlcodMap(
+ final jalview.schemabinding.version2.AlcodMap vAlcodMap)
+ {
+ boolean removed = _alcodMapList.remove(vAlcodMap);
+ return removed;
+ }
+
+ /**
+ * Method removeAlcodMapAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.schemabinding.version2.AlcodMap removeAlcodMapAt(
+ final int index)
+ {
+ java.lang.Object obj = this._alcodMapList.remove(index);
+ return (jalview.schemabinding.version2.AlcodMap) obj;
+ }
+
+ /**
+ * Method removeAlcodon.
+ *
+ * @param vAlcodon
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAlcodon(
+ final jalview.schemabinding.version2.Alcodon vAlcodon)
+ {
+ boolean removed = _alcodonList.remove(vAlcodon);
+ return removed;
+ }
+
+ /**
+ * Method removeAlcodonAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.schemabinding.version2.Alcodon removeAlcodonAt(
+ final int index)
+ {
+ java.lang.Object obj = this._alcodonList.remove(index);
+ return (jalview.schemabinding.version2.Alcodon) obj;
+ }
+
+ /**
*/
- public void setAlcodMap(
- final jalview.schemabinding.version2.AlcodMap[] vAlcodMapArray) {
- //-- copy array
- _alcodMapList.clear();
-
- for (int i = 0; i < vAlcodMapArray.length; i++) {
- this._alcodMapList.add(vAlcodMapArray[i]);
- }
- }
+ public void removeAllAlcodMap()
+ {
+ this._alcodMapList.clear();
+ }
- /**
- *
- *
- * @param index
- * @param vAlcodon
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
+ /**
*/
- public void setAlcodon(
- final int index,
- final jalview.schemabinding.version2.Alcodon vAlcodon)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._alcodonList.size()) {
- throw new IndexOutOfBoundsException("setAlcodon: Index value '" + index + "' not in range [0.." + (this._alcodonList.size() - 1) + "]");
- }
-
- this._alcodonList.set(index, vAlcodon);
+ public void removeAllAlcodon()
+ {
+ this._alcodonList.clear();
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAlcodMap
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setAlcodMap(final int index,
+ final jalview.schemabinding.version2.AlcodMap vAlcodMap)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._alcodMapList.size())
+ {
+ throw new IndexOutOfBoundsException("setAlcodMap: Index value '"
+ + index + "' not in range [0.."
+ + (this._alcodMapList.size() - 1) + "]");
}
- /**
- *
- *
- * @param vAlcodonArray
- */
- public void setAlcodon(
- final jalview.schemabinding.version2.Alcodon[] vAlcodonArray) {
- //-- copy array
- _alcodonList.clear();
-
- for (int i = 0; i < vAlcodonArray.length; i++) {
- this._alcodonList.add(vAlcodonArray[i]);
- }
+ this._alcodMapList.set(index, vAlcodMap);
+ }
+
+ /**
+ *
+ *
+ * @param vAlcodMapArray
+ */
+ public void setAlcodMap(
+ final jalview.schemabinding.version2.AlcodMap[] vAlcodMapArray)
+ {
+ // -- copy array
+ _alcodMapList.clear();
+
+ for (int i = 0; i < vAlcodMapArray.length; i++)
+ {
+ this._alcodMapList.add(vAlcodMapArray[i]);
}
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.AlcodonFrame
- */
- public static jalview.schemabinding.version2.AlcodonFrame unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.schemabinding.version2.AlcodonFrame) Unmarshaller.unmarshal(jalview.schemabinding.version2.AlcodonFrame.class, reader);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAlcodon
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setAlcodon(final int index,
+ final jalview.schemabinding.version2.Alcodon vAlcodon)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._alcodonList.size())
+ {
+ throw new IndexOutOfBoundsException("setAlcodon: Index value '"
+ + index + "' not in range [0.."
+ + (this._alcodonList.size() - 1) + "]");
}
- /**
- *
- *
- * @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);
+ this._alcodonList.set(index, vAlcodon);
+ }
+
+ /**
+ *
+ *
+ * @param vAlcodonArray
+ */
+ public void setAlcodon(
+ final jalview.schemabinding.version2.Alcodon[] vAlcodonArray)
+ {
+ // -- copy array
+ _alcodonList.clear();
+
+ for (int i = 0; i < vAlcodonArray.length; i++)
+ {
+ this._alcodonList.add(vAlcodonArray[i]);
}
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.AlcodonFrame
+ */
+ public static jalview.schemabinding.version2.AlcodonFrame unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.schemabinding.version2.AlcodonFrame) Unmarshaller
+ .unmarshal(jalview.schemabinding.version2.AlcodonFrame.class,
+ reader);
+ }
+
+ /**
+ *
+ *
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void validate() throws org.exolab.castor.xml.ValidationException
+ {
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+ validator.validate(this);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Annotation implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _graph.
- */
- private boolean _graph;
-
- /**
- * keeps track of state for field: _graph
- */
- private boolean _has_graph;
-
- /**
- * Field _graphType.
- */
- private int _graphType;
-
- /**
- * keeps track of state for field: _graphType
- */
- private boolean _has_graphType;
-
- /**
- * Field _sequenceRef.
- */
- private java.lang.String _sequenceRef;
-
- /**
- * Field _groupRef.
- */
- private java.lang.String _groupRef;
-
- /**
- * Field _graphColour.
- */
- private int _graphColour;
-
- /**
- * keeps track of state for field: _graphColour
- */
- private boolean _has_graphColour;
-
- /**
- * Field _graphGroup.
- */
- private int _graphGroup;
-
- /**
- * keeps track of state for field: _graphGroup
- */
- private boolean _has_graphGroup;
-
- /**
- * height in pixels for the graph if this is a graph-type
- * annotation.
- */
- private int _graphHeight;
-
- /**
- * keeps track of state for field: _graphHeight
- */
- private boolean _has_graphHeight;
-
- /**
- * Field _id.
- */
- private java.lang.String _id;
-
- /**
- * Field _scoreOnly.
- */
- private boolean _scoreOnly = false;
-
- /**
- * keeps track of state for field: _scoreOnly
- */
- private boolean _has_scoreOnly;
-
- /**
- * Field _score.
- */
- private double _score;
-
- /**
- * keeps track of state for field: _score
- */
- private boolean _has_score;
-
- /**
- * Field _visible.
- */
- private boolean _visible;
-
- /**
- * keeps track of state for field: _visible
- */
- private boolean _has_visible;
-
- /**
- * Field _centreColLabels.
- */
- private boolean _centreColLabels;
-
- /**
- * keeps track of state for field: _centreColLabels
- */
- private boolean _has_centreColLabels;
-
- /**
- * Field _scaleColLabels.
- */
- private boolean _scaleColLabels;
-
- /**
- * keeps track of state for field: _scaleColLabels
- */
- private boolean _has_scaleColLabels;
-
- /**
- * Field _showAllColLabels.
- */
- private boolean _showAllColLabels;
-
- /**
- * keeps track of state for field: _showAllColLabels
- */
- private boolean _has_showAllColLabels;
-
- /**
- * is an autocalculated annotation row
- */
- private boolean _autoCalculated = false;
-
- /**
- * keeps track of state for field: _autoCalculated
- */
- private boolean _has_autoCalculated;
-
- /**
- * is to be shown below the alignment - introduced in Jalview
- * 2.8 for visualizing T-COFFEE alignment scores
- */
- private boolean _belowAlignment = true;
-
- /**
- * keeps track of state for field: _belowAlignment
- */
- private boolean _has_belowAlignment;
-
- /**
- * Optional string identifier used to group sets of annotation
- * produced by a particular calculation. Values are opaque
- * strings but have semantic meaning to Jalview's renderer,
- * data importer and calculation system.
- */
- private java.lang.String _calcId;
-
- /**
- * Field _annotationElementList.
- */
- private java.util.Vector _annotationElementList;
-
- /**
- * Field _label.
- */
- private java.lang.String _label;
-
- /**
- * Field _description.
- */
- private java.lang.String _description;
-
- /**
- * Field _thresholdLine.
- */
- private jalview.schemabinding.version2.ThresholdLine _thresholdLine;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Annotation() {
- super();
- this._annotationElementList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vAnnotationElement
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAnnotationElement(
- final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
- throws java.lang.IndexOutOfBoundsException {
- this._annotationElementList.addElement(vAnnotationElement);
- }
-
- /**
- *
- *
- * @param index
- * @param vAnnotationElement
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAnnotationElement(
- final int index,
- final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
- throws java.lang.IndexOutOfBoundsException {
- this._annotationElementList.add(index, vAnnotationElement);
- }
-
- /**
- */
- public void deleteAutoCalculated(
- ) {
- this._has_autoCalculated= false;
- }
-
- /**
- */
- public void deleteBelowAlignment(
- ) {
- this._has_belowAlignment= false;
- }
-
- /**
- */
- public void deleteCentreColLabels(
- ) {
- this._has_centreColLabels= false;
- }
-
- /**
- */
- public void deleteGraph(
- ) {
- this._has_graph= false;
- }
-
- /**
- */
- public void deleteGraphColour(
- ) {
- this._has_graphColour= false;
- }
-
- /**
- */
- public void deleteGraphGroup(
- ) {
- this._has_graphGroup= false;
- }
-
- /**
- */
- public void deleteGraphHeight(
- ) {
- this._has_graphHeight= false;
- }
-
- /**
- */
- public void deleteGraphType(
- ) {
- this._has_graphType= false;
- }
-
- /**
- */
- public void deleteScaleColLabels(
- ) {
- this._has_scaleColLabels= false;
- }
-
- /**
- */
- public void deleteScore(
- ) {
- this._has_score= false;
- }
-
- /**
- */
- public void deleteScoreOnly(
- ) {
- this._has_scoreOnly= false;
- }
-
- /**
- */
- public void deleteShowAllColLabels(
- ) {
- this._has_showAllColLabels= false;
- }
-
- /**
- */
- public void deleteVisible(
- ) {
- this._has_visible= false;
- }
-
- /**
- * Method enumerateAnnotationElement.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.AnnotationElement elements
- */
- public java.util.Enumeration enumerateAnnotationElement(
- ) {
- return this._annotationElementList.elements();
- }
-
- /**
- * Method getAnnotationElement.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.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.get(index);
- }
-
- /**
- * Method getAnnotationElement.Returns the contents of the
- * collection in an Array. <p>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 <i>know</i> that the Array returned is of
- * exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getAnnotationElementCount(
- ) {
- return this._annotationElementList.size();
- }
-
- /**
- * Returns the value of field 'autoCalculated'. The field
- * 'autoCalculated' has the following description: is an
- * autocalculated annotation row
- *
- * @return the value of field 'AutoCalculated'.
- */
- public boolean getAutoCalculated(
- ) {
- return this._autoCalculated;
- }
-
- /**
- * Returns the value of field 'belowAlignment'. The field
- * 'belowAlignment' has the following description: is to be
- * shown below the alignment - introduced in Jalview 2.8 for
- * visualizing T-COFFEE alignment scores
- *
- * @return the value of field 'BelowAlignment'.
- */
- public boolean getBelowAlignment(
- ) {
- return this._belowAlignment;
- }
-
- /**
- * Returns the value of field 'calcId'. The field 'calcId' has
- * the following description: Optional string identifier used
- * to group sets of annotation produced by a particular
- * calculation. Values are opaque strings but have semantic
- * meaning to Jalview's renderer, data importer and calculation
- * system.
- *
- * @return the value of field 'CalcId'.
- */
- public java.lang.String getCalcId(
- ) {
- return this._calcId;
- }
-
- /**
- * Returns the value of field 'centreColLabels'.
- *
- * @return the value of field 'CentreColLabels'.
- */
- public boolean getCentreColLabels(
- ) {
- return this._centreColLabels;
- }
-
- /**
- * Returns the value of field 'description'.
- *
- * @return the value of field 'Description'.
- */
- public java.lang.String getDescription(
- ) {
- return this._description;
- }
-
- /**
- * Returns the value of field 'graph'.
- *
- * @return the value of field 'Graph'.
- */
- public boolean getGraph(
- ) {
- return this._graph;
- }
-
- /**
- * Returns the value of field 'graphColour'.
- *
- * @return the value of field 'GraphColour'.
- */
- public int getGraphColour(
- ) {
- return this._graphColour;
- }
-
- /**
- * Returns the value of field 'graphGroup'.
- *
- * @return the value of field 'GraphGroup'.
- */
- public int getGraphGroup(
- ) {
- return this._graphGroup;
- }
-
- /**
- * Returns the value of field 'graphHeight'. The field
- * 'graphHeight' has the following description: height in
- * pixels for the graph if this is a graph-type annotation.
- *
- * @return the value of field 'GraphHeight'.
- */
- public int getGraphHeight(
- ) {
- return this._graphHeight;
- }
-
- /**
- * Returns the value of field 'graphType'.
- *
- * @return the value of field 'GraphType'.
- */
- public int getGraphType(
- ) {
- return this._graphType;
- }
-
- /**
- * Returns the value of field 'groupRef'.
- *
- * @return the value of field 'GroupRef'.
- */
- public java.lang.String getGroupRef(
- ) {
- return this._groupRef;
- }
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId(
- ) {
- return this._id;
- }
-
- /**
- * Returns the value of field 'label'.
- *
- * @return the value of field 'Label'.
- */
- public java.lang.String getLabel(
- ) {
- return this._label;
- }
-
- /**
- * Returns the value of field 'scaleColLabels'.
- *
- * @return the value of field 'ScaleColLabels'.
- */
- public boolean getScaleColLabels(
- ) {
- return this._scaleColLabels;
- }
-
- /**
- * Returns the value of field 'score'.
- *
- * @return the value of field 'Score'.
- */
- public double getScore(
- ) {
- return this._score;
- }
-
- /**
- * Returns the value of field 'scoreOnly'.
- *
- * @return the value of field 'ScoreOnly'.
- */
- public boolean getScoreOnly(
- ) {
- return this._scoreOnly;
- }
-
- /**
- * Returns the value of field 'sequenceRef'.
- *
- * @return the value of field 'SequenceRef'.
- */
- public java.lang.String getSequenceRef(
- ) {
- return this._sequenceRef;
- }
-
- /**
- * Returns the value of field 'showAllColLabels'.
- *
- * @return the value of field 'ShowAllColLabels'.
- */
- public boolean getShowAllColLabels(
- ) {
- return this._showAllColLabels;
- }
-
- /**
- * Returns the value of field 'thresholdLine'.
- *
- * @return the value of field 'ThresholdLine'.
- */
- public jalview.schemabinding.version2.ThresholdLine getThresholdLine(
- ) {
- return this._thresholdLine;
- }
-
- /**
- * Returns the value of field 'visible'.
- *
- * @return the value of field 'Visible'.
- */
- public boolean getVisible(
- ) {
- return this._visible;
- }
-
- /**
- * Method hasAutoCalculated.
- *
- * @return true if at least one AutoCalculated has been added
- */
- public boolean hasAutoCalculated(
- ) {
- return this._has_autoCalculated;
- }
-
- /**
- * Method hasBelowAlignment.
- *
- * @return true if at least one BelowAlignment has been added
- */
- public boolean hasBelowAlignment(
- ) {
- return this._has_belowAlignment;
- }
-
- /**
- * Method hasCentreColLabels.
- *
- * @return true if at least one CentreColLabels has been added
- */
- public boolean hasCentreColLabels(
- ) {
- return this._has_centreColLabels;
- }
-
- /**
- * Method hasGraph.
- *
- * @return true if at least one Graph has been added
- */
- public boolean hasGraph(
- ) {
- return this._has_graph;
- }
-
- /**
- * Method hasGraphColour.
- *
- * @return true if at least one GraphColour has been added
- */
- public boolean hasGraphColour(
- ) {
- return this._has_graphColour;
- }
-
- /**
- * Method hasGraphGroup.
- *
- * @return true if at least one GraphGroup has been added
- */
- public boolean hasGraphGroup(
- ) {
- return this._has_graphGroup;
- }
-
- /**
- * Method hasGraphHeight.
- *
- * @return true if at least one GraphHeight has been added
- */
- public boolean hasGraphHeight(
- ) {
- return this._has_graphHeight;
- }
-
- /**
- * Method hasGraphType.
- *
- * @return true if at least one GraphType has been added
- */
- public boolean hasGraphType(
- ) {
- return this._has_graphType;
- }
-
- /**
- * Method hasScaleColLabels.
- *
- * @return true if at least one ScaleColLabels has been added
- */
- public boolean hasScaleColLabels(
- ) {
- return this._has_scaleColLabels;
- }
-
- /**
- * Method hasScore.
- *
- * @return true if at least one Score has been added
- */
- public boolean hasScore(
- ) {
- return this._has_score;
- }
-
- /**
- * Method hasScoreOnly.
- *
- * @return true if at least one ScoreOnly has been added
- */
- public boolean hasScoreOnly(
- ) {
- return this._has_scoreOnly;
- }
-
- /**
- * Method hasShowAllColLabels.
- *
- * @return true if at least one ShowAllColLabels has been added
- */
- public boolean hasShowAllColLabels(
- ) {
- return this._has_showAllColLabels;
- }
-
- /**
- * Method hasVisible.
- *
- * @return true if at least one Visible has been added
- */
- public boolean hasVisible(
- ) {
- return this._has_visible;
- }
-
- /**
- * Returns the value of field 'autoCalculated'. The field
- * 'autoCalculated' has the following description: is an
- * autocalculated annotation row
- *
- * @return the value of field 'AutoCalculated'.
- */
- public boolean isAutoCalculated(
- ) {
- return this._autoCalculated;
- }
-
- /**
- * Returns the value of field 'belowAlignment'. The field
- * 'belowAlignment' has the following description: is to be
- * shown below the alignment - introduced in Jalview 2.8 for
- * visualizing T-COFFEE alignment scores
- *
- * @return the value of field 'BelowAlignment'.
- */
- public boolean isBelowAlignment(
- ) {
- return this._belowAlignment;
- }
-
- /**
- * Returns the value of field 'centreColLabels'.
- *
- * @return the value of field 'CentreColLabels'.
- */
- public boolean isCentreColLabels(
- ) {
- return this._centreColLabels;
- }
-
- /**
- * Returns the value of field 'graph'.
- *
- * @return the value of field 'Graph'.
- */
- public boolean isGraph(
- ) {
- return this._graph;
- }
-
- /**
- * Returns the value of field 'scaleColLabels'.
- *
- * @return the value of field 'ScaleColLabels'.
- */
- public boolean isScaleColLabels(
- ) {
- return this._scaleColLabels;
- }
-
- /**
- * Returns the value of field 'scoreOnly'.
- *
- * @return the value of field 'ScoreOnly'.
- */
- public boolean isScoreOnly(
- ) {
- return this._scoreOnly;
- }
-
- /**
- * Returns the value of field 'showAllColLabels'.
- *
- * @return the value of field 'ShowAllColLabels'.
- */
- public boolean isShowAllColLabels(
- ) {
- return this._showAllColLabels;
- }
-
- /**
- * 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;
- }
-
- /**
- * Returns the value of field 'visible'.
- *
- * @return the value of field 'Visible'.
- */
- public boolean isVisible(
- ) {
- return this._visible;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllAnnotationElement(
- ) {
- this._annotationElementList.clear();
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.AnnotationElement removeAnnotationElementAt(
- final int index) {
- java.lang.Object obj = this._annotationElementList.remove(index);
- return (jalview.schemabinding.version2.AnnotationElement) obj;
- }
-
- /**
- *
- *
- * @param index
- * @param vAnnotationElement
- * @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) + "]");
- }
-
- this._annotationElementList.set(index, vAnnotationElement);
- }
-
- /**
- *
- *
- * @param vAnnotationElementArray
- */
- public void setAnnotationElement(
- final jalview.schemabinding.version2.AnnotationElement[] vAnnotationElementArray) {
- //-- copy array
- _annotationElementList.clear();
-
- for (int i = 0; i < vAnnotationElementArray.length; i++) {
- this._annotationElementList.add(vAnnotationElementArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'autoCalculated'. The field
- * 'autoCalculated' has the following description: is an
- * autocalculated annotation row
- *
- * @param autoCalculated the value of field 'autoCalculated'.
- */
- public void setAutoCalculated(
- final boolean autoCalculated) {
- this._autoCalculated = autoCalculated;
- this._has_autoCalculated = true;
- }
-
- /**
- * Sets the value of field 'belowAlignment'. The field
- * 'belowAlignment' has the following description: is to be
- * shown below the alignment - introduced in Jalview 2.8 for
- * visualizing T-COFFEE alignment scores
- *
- * @param belowAlignment the value of field 'belowAlignment'.
- */
- public void setBelowAlignment(
- final boolean belowAlignment) {
- this._belowAlignment = belowAlignment;
- this._has_belowAlignment = true;
- }
-
- /**
- * Sets the value of field 'calcId'. The field 'calcId' has the
- * following description: Optional string identifier used to
- * group sets of annotation produced by a particular
- * calculation. Values are opaque strings but have semantic
- * meaning to Jalview's renderer, data importer and calculation
- * system.
- *
- * @param calcId the value of field 'calcId'.
- */
- public void setCalcId(
- final java.lang.String calcId) {
- this._calcId = calcId;
- }
-
- /**
- * Sets the value of field 'centreColLabels'.
- *
- * @param centreColLabels the value of field 'centreColLabels'.
- */
- public void setCentreColLabels(
- final boolean centreColLabels) {
- this._centreColLabels = centreColLabels;
- this._has_centreColLabels = true;
- }
-
- /**
- * Sets the value of field 'description'.
- *
- * @param description the value of field 'description'.
- */
- public void setDescription(
- final java.lang.String description) {
- this._description = description;
- }
-
- /**
- * Sets the value of field 'graph'.
- *
- * @param graph the value of field 'graph'.
- */
- public void setGraph(
- final boolean graph) {
- this._graph = graph;
- this._has_graph = true;
- }
-
- /**
- * Sets the value of field 'graphColour'.
- *
- * @param graphColour the value of field 'graphColour'.
- */
- public void setGraphColour(
- final int graphColour) {
- this._graphColour = graphColour;
- this._has_graphColour = true;
- }
-
- /**
- * Sets the value of field 'graphGroup'.
- *
- * @param graphGroup the value of field 'graphGroup'.
- */
- public void setGraphGroup(
- final int graphGroup) {
- this._graphGroup = graphGroup;
- this._has_graphGroup = true;
- }
-
- /**
- * Sets the value of field 'graphHeight'. The field
- * 'graphHeight' has the following description: height in
- * pixels for the graph if this is a graph-type annotation.
- *
- * @param graphHeight the value of field 'graphHeight'.
- */
- public void setGraphHeight(
- final int graphHeight) {
- this._graphHeight = graphHeight;
- this._has_graphHeight = true;
- }
-
- /**
- * Sets the value of field 'graphType'.
- *
- * @param graphType the value of field 'graphType'.
- */
- public void setGraphType(
- final int graphType) {
- this._graphType = graphType;
- this._has_graphType = true;
- }
-
- /**
- * Sets the value of field 'groupRef'.
- *
- * @param groupRef the value of field 'groupRef'.
- */
- public void setGroupRef(
- final java.lang.String groupRef) {
- this._groupRef = groupRef;
- }
-
- /**
- * Sets the value of field 'id'.
- *
- * @param id the value of field 'id'.
- */
- public void setId(
- final java.lang.String id) {
- this._id = id;
- }
-
- /**
- * Sets the value of field 'label'.
- *
- * @param label the value of field 'label'.
- */
- public void setLabel(
- final java.lang.String label) {
- this._label = label;
- }
-
- /**
- * Sets the value of field 'scaleColLabels'.
- *
- * @param scaleColLabels the value of field 'scaleColLabels'.
- */
- public void setScaleColLabels(
- final boolean scaleColLabels) {
- this._scaleColLabels = scaleColLabels;
- this._has_scaleColLabels = true;
- }
-
- /**
- * Sets the value of field 'score'.
- *
- * @param score the value of field 'score'.
- */
- public void setScore(
- final double score) {
- this._score = score;
- this._has_score = true;
- }
-
- /**
- * Sets the value of field 'scoreOnly'.
- *
- * @param scoreOnly the value of field 'scoreOnly'.
- */
- public void setScoreOnly(
- final boolean scoreOnly) {
- this._scoreOnly = scoreOnly;
- this._has_scoreOnly = true;
- }
-
- /**
- * Sets the value of field 'sequenceRef'.
- *
- * @param sequenceRef the value of field 'sequenceRef'.
- */
- public void setSequenceRef(
- final java.lang.String sequenceRef) {
- this._sequenceRef = sequenceRef;
- }
-
- /**
- * Sets the value of field 'showAllColLabels'.
- *
- * @param showAllColLabels the value of field 'showAllColLabels'
- */
- public void setShowAllColLabels(
- final boolean showAllColLabels) {
- this._showAllColLabels = showAllColLabels;
- this._has_showAllColLabels = true;
- }
-
- /**
- * Sets the value of field 'thresholdLine'.
- *
- * @param thresholdLine the value of field 'thresholdLine'.
- */
- public void setThresholdLine(
- final jalview.schemabinding.version2.ThresholdLine thresholdLine) {
- this._thresholdLine = thresholdLine;
- }
-
- /**
- * Sets the value of field 'visible'.
- *
- * @param visible the value of field 'visible'.
- */
- public void setVisible(
- final boolean visible) {
- this._visible = visible;
- this._has_visible = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
- }
+public class Annotation implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _graph.
+ */
+ private boolean _graph;
+
+ /**
+ * keeps track of state for field: _graph
+ */
+ private boolean _has_graph;
+
+ /**
+ * Field _graphType.
+ */
+ private int _graphType;
+
+ /**
+ * keeps track of state for field: _graphType
+ */
+ private boolean _has_graphType;
+
+ /**
+ * Field _sequenceRef.
+ */
+ private java.lang.String _sequenceRef;
+
+ /**
+ * Field _groupRef.
+ */
+ private java.lang.String _groupRef;
+
+ /**
+ * Field _graphColour.
+ */
+ private int _graphColour;
+
+ /**
+ * keeps track of state for field: _graphColour
+ */
+ private boolean _has_graphColour;
+
+ /**
+ * Field _graphGroup.
+ */
+ private int _graphGroup;
+
+ /**
+ * keeps track of state for field: _graphGroup
+ */
+ private boolean _has_graphGroup;
+
+ /**
+ * height in pixels for the graph if this is a graph-type annotation.
+ */
+ private int _graphHeight;
+
+ /**
+ * keeps track of state for field: _graphHeight
+ */
+ private boolean _has_graphHeight;
+
+ /**
+ * Field _id.
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _scoreOnly.
+ */
+ private boolean _scoreOnly = false;
+
+ /**
+ * keeps track of state for field: _scoreOnly
+ */
+ private boolean _has_scoreOnly;
+
+ /**
+ * Field _score.
+ */
+ private double _score;
+
+ /**
+ * keeps track of state for field: _score
+ */
+ private boolean _has_score;
+
+ /**
+ * Field _visible.
+ */
+ private boolean _visible;
+
+ /**
+ * keeps track of state for field: _visible
+ */
+ private boolean _has_visible;
+
+ /**
+ * Field _centreColLabels.
+ */
+ private boolean _centreColLabels;
+
+ /**
+ * keeps track of state for field: _centreColLabels
+ */
+ private boolean _has_centreColLabels;
+
+ /**
+ * Field _scaleColLabels.
+ */
+ private boolean _scaleColLabels;
+
+ /**
+ * keeps track of state for field: _scaleColLabels
+ */
+ private boolean _has_scaleColLabels;
+
+ /**
+ * Field _showAllColLabels.
+ */
+ private boolean _showAllColLabels;
+
+ /**
+ * keeps track of state for field: _showAllColLabels
+ */
+ private boolean _has_showAllColLabels;
+
+ /**
+ * is an autocalculated annotation row
+ */
+ private boolean _autoCalculated = false;
+
+ /**
+ * keeps track of state for field: _autoCalculated
+ */
+ private boolean _has_autoCalculated;
+
+ /**
+ * is to be shown below the alignment - introduced in Jalview 2.8 for
+ * visualizing T-COFFEE alignment scores
+ */
+ private boolean _belowAlignment = true;
+
+ /**
+ * keeps track of state for field: _belowAlignment
+ */
+ private boolean _has_belowAlignment;
+
+ /**
+ * Optional string identifier used to group sets of annotation produced by a
+ * particular calculation. Values are opaque strings but have semantic meaning
+ * to Jalview's renderer, data importer and calculation system.
+ */
+ private java.lang.String _calcId;
+
+ /**
+ * Field _annotationElementList.
+ */
+ private java.util.Vector _annotationElementList;
+
+ /**
+ * Field _label.
+ */
+ private java.lang.String _label;
+
+ /**
+ * Field _description.
+ */
+ private java.lang.String _description;
+
+ /**
+ * Field _thresholdLine.
+ */
+ private jalview.schemabinding.version2.ThresholdLine _thresholdLine;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Annotation()
+ {
+ super();
+ this._annotationElementList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vAnnotationElement
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAnnotationElement(
+ final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._annotationElementList.addElement(vAnnotationElement);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotationElement
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAnnotationElement(
+ final int index,
+ final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._annotationElementList.add(index, vAnnotationElement);
+ }
+
+ /**
+ */
+ public void deleteAutoCalculated()
+ {
+ this._has_autoCalculated = false;
+ }
+
+ /**
+ */
+ public void deleteBelowAlignment()
+ {
+ this._has_belowAlignment = false;
+ }
+
+ /**
+ */
+ public void deleteCentreColLabels()
+ {
+ this._has_centreColLabels = false;
+ }
+
+ /**
+ */
+ public void deleteGraph()
+ {
+ this._has_graph = false;
+ }
+
+ /**
+ */
+ public void deleteGraphColour()
+ {
+ this._has_graphColour = false;
+ }
+
+ /**
+ */
+ public void deleteGraphGroup()
+ {
+ this._has_graphGroup = false;
+ }
+
+ /**
+ */
+ public void deleteGraphHeight()
+ {
+ this._has_graphHeight = false;
+ }
+
+ /**
+ */
+ public void deleteGraphType()
+ {
+ this._has_graphType = false;
+ }
+
+ /**
+ */
+ public void deleteScaleColLabels()
+ {
+ this._has_scaleColLabels = false;
+ }
+
+ /**
+ */
+ public void deleteScore()
+ {
+ this._has_score = false;
+ }
+
+ /**
+ */
+ public void deleteScoreOnly()
+ {
+ this._has_scoreOnly = false;
+ }
+
+ /**
+ */
+ public void deleteShowAllColLabels()
+ {
+ this._has_showAllColLabels = false;
+ }
+
+ /**
+ */
+ public void deleteVisible()
+ {
+ this._has_visible = false;
+ }
+
+ /**
+ * Method enumerateAnnotationElement.
+ *
+ * @return an Enumeration over all
+ * jalview.schemabinding.version2.AnnotationElement elements
+ */
+ public java.util.Enumeration enumerateAnnotationElement()
+ {
+ return this._annotationElementList.elements();
+ }
+
+ /**
+ * Method getAnnotationElement.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.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
+ .get(index);
+ }
+
+ /**
+ * Method getAnnotationElement.Returns the contents of the collection in an
+ * Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getAnnotationElementCount()
+ {
+ return this._annotationElementList.size();
+ }
+
+ /**
+ * Returns the value of field 'autoCalculated'. The field 'autoCalculated' has
+ * the following description: is an autocalculated annotation row
+ *
+ * @return the value of field 'AutoCalculated'.
+ */
+ public boolean getAutoCalculated()
+ {
+ return this._autoCalculated;
+ }
+
+ /**
+ * Returns the value of field 'belowAlignment'. The field 'belowAlignment' has
+ * the following description: is to be shown below the alignment - introduced
+ * in Jalview 2.8 for visualizing T-COFFEE alignment scores
+ *
+ * @return the value of field 'BelowAlignment'.
+ */
+ public boolean getBelowAlignment()
+ {
+ return this._belowAlignment;
+ }
+
+ /**
+ * Returns the value of field 'calcId'. The field 'calcId' has the following
+ * description: Optional string identifier used to group sets of annotation
+ * produced by a particular calculation. Values are opaque strings but have
+ * semantic meaning to Jalview's renderer, data importer and calculation
+ * system.
+ *
+ * @return the value of field 'CalcId'.
+ */
+ public java.lang.String getCalcId()
+ {
+ return this._calcId;
+ }
+
+ /**
+ * Returns the value of field 'centreColLabels'.
+ *
+ * @return the value of field 'CentreColLabels'.
+ */
+ public boolean getCentreColLabels()
+ {
+ return this._centreColLabels;
+ }
+
+ /**
+ * Returns the value of field 'description'.
+ *
+ * @return the value of field 'Description'.
+ */
+ public java.lang.String getDescription()
+ {
+ return this._description;
+ }
+
+ /**
+ * Returns the value of field 'graph'.
+ *
+ * @return the value of field 'Graph'.
+ */
+ public boolean getGraph()
+ {
+ return this._graph;
+ }
+
+ /**
+ * Returns the value of field 'graphColour'.
+ *
+ * @return the value of field 'GraphColour'.
+ */
+ public int getGraphColour()
+ {
+ return this._graphColour;
+ }
+
+ /**
+ * Returns the value of field 'graphGroup'.
+ *
+ * @return the value of field 'GraphGroup'.
+ */
+ public int getGraphGroup()
+ {
+ return this._graphGroup;
+ }
+
+ /**
+ * Returns the value of field 'graphHeight'. The field 'graphHeight' has the
+ * following description: height in pixels for the graph if this is a
+ * graph-type annotation.
+ *
+ * @return the value of field 'GraphHeight'.
+ */
+ public int getGraphHeight()
+ {
+ return this._graphHeight;
+ }
+
+ /**
+ * Returns the value of field 'graphType'.
+ *
+ * @return the value of field 'GraphType'.
+ */
+ public int getGraphType()
+ {
+ return this._graphType;
+ }
+
+ /**
+ * Returns the value of field 'groupRef'.
+ *
+ * @return the value of field 'GroupRef'.
+ */
+ public java.lang.String getGroupRef()
+ {
+ return this._groupRef;
+ }
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId()
+ {
+ return this._id;
+ }
+
+ /**
+ * Returns the value of field 'label'.
+ *
+ * @return the value of field 'Label'.
+ */
+ public java.lang.String getLabel()
+ {
+ return this._label;
+ }
+
+ /**
+ * Returns the value of field 'scaleColLabels'.
+ *
+ * @return the value of field 'ScaleColLabels'.
+ */
+ public boolean getScaleColLabels()
+ {
+ return this._scaleColLabels;
+ }
+
+ /**
+ * Returns the value of field 'score'.
+ *
+ * @return the value of field 'Score'.
+ */
+ public double getScore()
+ {
+ return this._score;
+ }
+
+ /**
+ * Returns the value of field 'scoreOnly'.
+ *
+ * @return the value of field 'ScoreOnly'.
+ */
+ public boolean getScoreOnly()
+ {
+ return this._scoreOnly;
+ }
+
+ /**
+ * Returns the value of field 'sequenceRef'.
+ *
+ * @return the value of field 'SequenceRef'.
+ */
+ public java.lang.String getSequenceRef()
+ {
+ return this._sequenceRef;
+ }
+
+ /**
+ * Returns the value of field 'showAllColLabels'.
+ *
+ * @return the value of field 'ShowAllColLabels'.
+ */
+ public boolean getShowAllColLabels()
+ {
+ return this._showAllColLabels;
+ }
+
+ /**
+ * Returns the value of field 'thresholdLine'.
+ *
+ * @return the value of field 'ThresholdLine'.
+ */
+ public jalview.schemabinding.version2.ThresholdLine getThresholdLine()
+ {
+ return this._thresholdLine;
+ }
+
+ /**
+ * Returns the value of field 'visible'.
+ *
+ * @return the value of field 'Visible'.
+ */
+ public boolean getVisible()
+ {
+ return this._visible;
+ }
+
+ /**
+ * Method hasAutoCalculated.
+ *
+ * @return true if at least one AutoCalculated has been added
+ */
+ public boolean hasAutoCalculated()
+ {
+ return this._has_autoCalculated;
+ }
+
+ /**
+ * Method hasBelowAlignment.
+ *
+ * @return true if at least one BelowAlignment has been added
+ */
+ public boolean hasBelowAlignment()
+ {
+ return this._has_belowAlignment;
+ }
+
+ /**
+ * Method hasCentreColLabels.
+ *
+ * @return true if at least one CentreColLabels has been added
+ */
+ public boolean hasCentreColLabels()
+ {
+ return this._has_centreColLabels;
+ }
+
+ /**
+ * Method hasGraph.
+ *
+ * @return true if at least one Graph has been added
+ */
+ public boolean hasGraph()
+ {
+ return this._has_graph;
+ }
+
+ /**
+ * Method hasGraphColour.
+ *
+ * @return true if at least one GraphColour has been added
+ */
+ public boolean hasGraphColour()
+ {
+ return this._has_graphColour;
+ }
+
+ /**
+ * Method hasGraphGroup.
+ *
+ * @return true if at least one GraphGroup has been added
+ */
+ public boolean hasGraphGroup()
+ {
+ return this._has_graphGroup;
+ }
+
+ /**
+ * Method hasGraphHeight.
+ *
+ * @return true if at least one GraphHeight has been added
+ */
+ public boolean hasGraphHeight()
+ {
+ return this._has_graphHeight;
+ }
+
+ /**
+ * Method hasGraphType.
+ *
+ * @return true if at least one GraphType has been added
+ */
+ public boolean hasGraphType()
+ {
+ return this._has_graphType;
+ }
+
+ /**
+ * Method hasScaleColLabels.
+ *
+ * @return true if at least one ScaleColLabels has been added
+ */
+ public boolean hasScaleColLabels()
+ {
+ return this._has_scaleColLabels;
+ }
+
+ /**
+ * Method hasScore.
+ *
+ * @return true if at least one Score has been added
+ */
+ public boolean hasScore()
+ {
+ return this._has_score;
+ }
+
+ /**
+ * Method hasScoreOnly.
+ *
+ * @return true if at least one ScoreOnly has been added
+ */
+ public boolean hasScoreOnly()
+ {
+ return this._has_scoreOnly;
+ }
+
+ /**
+ * Method hasShowAllColLabels.
+ *
+ * @return true if at least one ShowAllColLabels has been added
+ */
+ public boolean hasShowAllColLabels()
+ {
+ return this._has_showAllColLabels;
+ }
+
+ /**
+ * Method hasVisible.
+ *
+ * @return true if at least one Visible has been added
+ */
+ public boolean hasVisible()
+ {
+ return this._has_visible;
+ }
+
+ /**
+ * Returns the value of field 'autoCalculated'. The field 'autoCalculated' has
+ * the following description: is an autocalculated annotation row
+ *
+ * @return the value of field 'AutoCalculated'.
+ */
+ public boolean isAutoCalculated()
+ {
+ return this._autoCalculated;
+ }
+
+ /**
+ * Returns the value of field 'belowAlignment'. The field 'belowAlignment' has
+ * the following description: is to be shown below the alignment - introduced
+ * in Jalview 2.8 for visualizing T-COFFEE alignment scores
+ *
+ * @return the value of field 'BelowAlignment'.
+ */
+ public boolean isBelowAlignment()
+ {
+ return this._belowAlignment;
+ }
+
+ /**
+ * Returns the value of field 'centreColLabels'.
+ *
+ * @return the value of field 'CentreColLabels'.
+ */
+ public boolean isCentreColLabels()
+ {
+ return this._centreColLabels;
+ }
+
+ /**
+ * Returns the value of field 'graph'.
+ *
+ * @return the value of field 'Graph'.
+ */
+ public boolean isGraph()
+ {
+ return this._graph;
+ }
+
+ /**
+ * Returns the value of field 'scaleColLabels'.
+ *
+ * @return the value of field 'ScaleColLabels'.
+ */
+ public boolean isScaleColLabels()
+ {
+ return this._scaleColLabels;
+ }
+
+ /**
+ * Returns the value of field 'scoreOnly'.
+ *
+ * @return the value of field 'ScoreOnly'.
+ */
+ public boolean isScoreOnly()
+ {
+ return this._scoreOnly;
+ }
+
+ /**
+ * Returns the value of field 'showAllColLabels'.
+ *
+ * @return the value of field 'ShowAllColLabels'.
+ */
+ public boolean isShowAllColLabels()
+ {
+ return this._showAllColLabels;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Returns the value of field 'visible'.
+ *
+ * @return the value of field 'Visible'.
+ */
+ public boolean isVisible()
+ {
+ return this._visible;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ */
+ public void removeAllAnnotationElement()
+ {
+ this._annotationElementList.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.AnnotationElement removeAnnotationElementAt(
+ final int index)
+ {
+ java.lang.Object obj = this._annotationElementList.remove(index);
+ return (jalview.schemabinding.version2.AnnotationElement) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotationElement
+ * @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) + "]");
+ }
+
+ this._annotationElementList.set(index, vAnnotationElement);
+ }
+
+ /**
+ *
+ *
+ * @param vAnnotationElementArray
+ */
+ public void setAnnotationElement(
+ final jalview.schemabinding.version2.AnnotationElement[] vAnnotationElementArray)
+ {
+ // -- copy array
+ _annotationElementList.clear();
+
+ for (int i = 0; i < vAnnotationElementArray.length; i++)
+ {
+ this._annotationElementList.add(vAnnotationElementArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'autoCalculated'. The field 'autoCalculated' has
+ * the following description: is an autocalculated annotation row
+ *
+ * @param autoCalculated
+ * the value of field 'autoCalculated'.
+ */
+ public void setAutoCalculated(final boolean autoCalculated)
+ {
+ this._autoCalculated = autoCalculated;
+ this._has_autoCalculated = true;
+ }
+
+ /**
+ * Sets the value of field 'belowAlignment'. The field 'belowAlignment' has
+ * the following description: is to be shown below the alignment - introduced
+ * in Jalview 2.8 for visualizing T-COFFEE alignment scores
+ *
+ * @param belowAlignment
+ * the value of field 'belowAlignment'.
+ */
+ public void setBelowAlignment(final boolean belowAlignment)
+ {
+ this._belowAlignment = belowAlignment;
+ this._has_belowAlignment = true;
+ }
+
+ /**
+ * Sets the value of field 'calcId'. The field 'calcId' has the following
+ * description: Optional string identifier used to group sets of annotation
+ * produced by a particular calculation. Values are opaque strings but have
+ * semantic meaning to Jalview's renderer, data importer and calculation
+ * system.
+ *
+ * @param calcId
+ * the value of field 'calcId'.
+ */
+ public void setCalcId(final java.lang.String calcId)
+ {
+ this._calcId = calcId;
+ }
+
+ /**
+ * Sets the value of field 'centreColLabels'.
+ *
+ * @param centreColLabels
+ * the value of field 'centreColLabels'.
+ */
+ public void setCentreColLabels(final boolean centreColLabels)
+ {
+ this._centreColLabels = centreColLabels;
+ this._has_centreColLabels = true;
+ }
+
+ /**
+ * Sets the value of field 'description'.
+ *
+ * @param description
+ * the value of field 'description'.
+ */
+ public void setDescription(final java.lang.String description)
+ {
+ this._description = description;
+ }
+
+ /**
+ * Sets the value of field 'graph'.
+ *
+ * @param graph
+ * the value of field 'graph'.
+ */
+ public void setGraph(final boolean graph)
+ {
+ this._graph = graph;
+ this._has_graph = true;
+ }
+
+ /**
+ * Sets the value of field 'graphColour'.
+ *
+ * @param graphColour
+ * the value of field 'graphColour'.
+ */
+ public void setGraphColour(final int graphColour)
+ {
+ this._graphColour = graphColour;
+ this._has_graphColour = true;
+ }
+
+ /**
+ * Sets the value of field 'graphGroup'.
+ *
+ * @param graphGroup
+ * the value of field 'graphGroup'.
+ */
+ public void setGraphGroup(final int graphGroup)
+ {
+ this._graphGroup = graphGroup;
+ this._has_graphGroup = true;
+ }
+
+ /**
+ * Sets the value of field 'graphHeight'. The field 'graphHeight' has the
+ * following description: height in pixels for the graph if this is a
+ * graph-type annotation.
+ *
+ * @param graphHeight
+ * the value of field 'graphHeight'.
+ */
+ public void setGraphHeight(final int graphHeight)
+ {
+ this._graphHeight = graphHeight;
+ this._has_graphHeight = true;
+ }
+
+ /**
+ * Sets the value of field 'graphType'.
+ *
+ * @param graphType
+ * the value of field 'graphType'.
+ */
+ public void setGraphType(final int graphType)
+ {
+ this._graphType = graphType;
+ this._has_graphType = true;
+ }
+
+ /**
+ * Sets the value of field 'groupRef'.
+ *
+ * @param groupRef
+ * the value of field 'groupRef'.
+ */
+ public void setGroupRef(final java.lang.String groupRef)
+ {
+ this._groupRef = groupRef;
+ }
+
+ /**
+ * Sets the value of field 'id'.
+ *
+ * @param id
+ * the value of field 'id'.
+ */
+ public void setId(final java.lang.String id)
+ {
+ this._id = id;
+ }
+
+ /**
+ * Sets the value of field 'label'.
+ *
+ * @param label
+ * the value of field 'label'.
+ */
+ public void setLabel(final java.lang.String label)
+ {
+ this._label = label;
+ }
+
+ /**
+ * Sets the value of field 'scaleColLabels'.
+ *
+ * @param scaleColLabels
+ * the value of field 'scaleColLabels'.
+ */
+ public void setScaleColLabels(final boolean scaleColLabels)
+ {
+ this._scaleColLabels = scaleColLabels;
+ this._has_scaleColLabels = true;
+ }
+
+ /**
+ * Sets the value of field 'score'.
+ *
+ * @param score
+ * the value of field 'score'.
+ */
+ public void setScore(final double score)
+ {
+ this._score = score;
+ this._has_score = true;
+ }
+
+ /**
+ * Sets the value of field 'scoreOnly'.
+ *
+ * @param scoreOnly
+ * the value of field 'scoreOnly'.
+ */
+ public void setScoreOnly(final boolean scoreOnly)
+ {
+ this._scoreOnly = scoreOnly;
+ this._has_scoreOnly = true;
+ }
+
+ /**
+ * Sets the value of field 'sequenceRef'.
+ *
+ * @param sequenceRef
+ * the value of field 'sequenceRef'.
+ */
+ public void setSequenceRef(final java.lang.String sequenceRef)
+ {
+ this._sequenceRef = sequenceRef;
+ }
+
+ /**
+ * Sets the value of field 'showAllColLabels'.
+ *
+ * @param showAllColLabels
+ * the value of field 'showAllColLabels'
+ */
+ public void setShowAllColLabels(final boolean showAllColLabels)
+ {
+ this._showAllColLabels = showAllColLabels;
+ this._has_showAllColLabels = true;
+ }
+
+ /**
+ * Sets the value of field 'thresholdLine'.
+ *
+ * @param thresholdLine
+ * the value of field 'thresholdLine'.
+ */
+ public void setThresholdLine(
+ final jalview.schemabinding.version2.ThresholdLine thresholdLine)
+ {
+ this._thresholdLine = thresholdLine;
+ }
+
+ /**
+ * Sets the value of field 'visible'.
+ *
+ * @param visible
+ * the value of field 'visible'.
+ */
+ public void setVisible(final boolean visible)
+ {
+ this._visible = visible;
+ this._has_visible = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class AnnotationColours implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _aboveThreshold.
- */
- private int _aboveThreshold;
-
- /**
- * keeps track of state for field: _aboveThreshold
- */
- private boolean _has_aboveThreshold;
-
- /**
- * Field _annotation.
- */
- private java.lang.String _annotation;
-
- /**
- * Field _minColour.
- */
- private int _minColour;
-
- /**
- * keeps track of state for field: _minColour
- */
- private boolean _has_minColour;
-
- /**
- * Field _maxColour.
- */
- private int _maxColour;
-
- /**
- * keeps track of state for field: _maxColour
- */
- private boolean _has_maxColour;
-
- /**
- * Field _colourScheme.
- */
- private java.lang.String _colourScheme;
-
- /**
- * Field _threshold.
- */
- private float _threshold;
-
- /**
- * keeps track of state for field: _threshold
- */
- private boolean _has_threshold;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public AnnotationColours() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteAboveThreshold(
- ) {
- this._has_aboveThreshold= false;
- }
-
- /**
- */
- public void deleteMaxColour(
- ) {
- this._has_maxColour= false;
- }
-
- /**
- */
- public void deleteMinColour(
- ) {
- this._has_minColour= false;
- }
-
- /**
- */
- public void deleteThreshold(
- ) {
- this._has_threshold= false;
- }
-
- /**
- * Returns the value of field 'aboveThreshold'.
- *
- * @return the value of field 'AboveThreshold'.
- */
- public int getAboveThreshold(
- ) {
- return this._aboveThreshold;
- }
-
- /**
- * Returns the value of field 'annotation'.
- *
- * @return the value of field 'Annotation'.
- */
- public java.lang.String getAnnotation(
- ) {
- return this._annotation;
- }
-
- /**
- * Returns the value of field 'colourScheme'.
- *
- * @return the value of field 'ColourScheme'.
- */
- public java.lang.String getColourScheme(
- ) {
- return this._colourScheme;
- }
-
- /**
- * Returns the value of field 'maxColour'.
- *
- * @return the value of field 'MaxColour'.
- */
- public int getMaxColour(
- ) {
- return this._maxColour;
- }
-
- /**
- * Returns the value of field 'minColour'.
- *
- * @return the value of field 'MinColour'.
- */
- public int getMinColour(
- ) {
- return this._minColour;
- }
-
- /**
- * Returns the value of field 'threshold'.
- *
- * @return the value of field 'Threshold'.
- */
- public float getThreshold(
- ) {
- return this._threshold;
- }
-
- /**
- * Method hasAboveThreshold.
- *
- * @return true if at least one AboveThreshold has been added
- */
- public boolean hasAboveThreshold(
- ) {
- return this._has_aboveThreshold;
- }
-
- /**
- * Method hasMaxColour.
- *
- * @return true if at least one MaxColour has been added
- */
- public boolean hasMaxColour(
- ) {
- return this._has_maxColour;
- }
-
- /**
- * Method hasMinColour.
- *
- * @return true if at least one MinColour has been added
- */
- public boolean hasMinColour(
- ) {
- return this._has_minColour;
- }
-
- /**
- * Method hasThreshold.
- *
- * @return true if at least one Threshold has been added
- */
- public boolean hasThreshold(
- ) {
- return this._has_threshold;
- }
-
- /**
- * 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 'aboveThreshold'.
- *
- * @param aboveThreshold the value of field 'aboveThreshold'.
- */
- public void setAboveThreshold(
- final int aboveThreshold) {
- this._aboveThreshold = aboveThreshold;
- this._has_aboveThreshold = true;
- }
-
- /**
- * Sets the value of field 'annotation'.
- *
- * @param annotation the value of field 'annotation'.
- */
- public void setAnnotation(
- final java.lang.String annotation) {
- this._annotation = annotation;
- }
-
- /**
- * Sets the value of field 'colourScheme'.
- *
- * @param colourScheme the value of field 'colourScheme'.
- */
- public void setColourScheme(
- final java.lang.String colourScheme) {
- this._colourScheme = colourScheme;
- }
-
- /**
- * Sets the value of field 'maxColour'.
- *
- * @param maxColour the value of field 'maxColour'.
- */
- public void setMaxColour(
- final int maxColour) {
- this._maxColour = maxColour;
- this._has_maxColour = true;
- }
-
- /**
- * Sets the value of field 'minColour'.
- *
- * @param minColour the value of field 'minColour'.
- */
- public void setMinColour(
- final int minColour) {
- this._minColour = minColour;
- this._has_minColour = true;
- }
-
- /**
- * Sets the value of field 'threshold'.
- *
- * @param threshold the value of field 'threshold'.
- */
- public void setThreshold(
- final float threshold) {
- this._threshold = threshold;
- this._has_threshold = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
+public class AnnotationColours implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _aboveThreshold.
+ */
+ private int _aboveThreshold;
+
+ /**
+ * keeps track of state for field: _aboveThreshold
+ */
+ private boolean _has_aboveThreshold;
+
+ /**
+ * Field _annotation.
+ */
+ private java.lang.String _annotation;
+
+ /**
+ * Field _minColour.
+ */
+ private int _minColour;
+
+ /**
+ * keeps track of state for field: _minColour
+ */
+ private boolean _has_minColour;
+
+ /**
+ * Field _maxColour.
+ */
+ private int _maxColour;
+
+ /**
+ * keeps track of state for field: _maxColour
+ */
+ private boolean _has_maxColour;
+
+ /**
+ * Field _colourScheme.
+ */
+ private java.lang.String _colourScheme;
+
+ /**
+ * Field _threshold.
+ */
+ private float _threshold;
+
+ /**
+ * keeps track of state for field: _threshold
+ */
+ private boolean _has_threshold;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public AnnotationColours()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ */
+ public void deleteAboveThreshold()
+ {
+ this._has_aboveThreshold = false;
+ }
+
+ /**
+ */
+ public void deleteMaxColour()
+ {
+ this._has_maxColour = false;
+ }
+
+ /**
+ */
+ public void deleteMinColour()
+ {
+ this._has_minColour = false;
+ }
+
+ /**
+ */
+ public void deleteThreshold()
+ {
+ this._has_threshold = false;
+ }
+
+ /**
+ * Returns the value of field 'aboveThreshold'.
+ *
+ * @return the value of field 'AboveThreshold'.
+ */
+ public int getAboveThreshold()
+ {
+ return this._aboveThreshold;
+ }
+
+ /**
+ * Returns the value of field 'annotation'.
+ *
+ * @return the value of field 'Annotation'.
+ */
+ public java.lang.String getAnnotation()
+ {
+ return this._annotation;
+ }
+
+ /**
+ * Returns the value of field 'colourScheme'.
+ *
+ * @return the value of field 'ColourScheme'.
+ */
+ public java.lang.String getColourScheme()
+ {
+ return this._colourScheme;
+ }
+
+ /**
+ * Returns the value of field 'maxColour'.
+ *
+ * @return the value of field 'MaxColour'.
+ */
+ public int getMaxColour()
+ {
+ return this._maxColour;
+ }
+
+ /**
+ * Returns the value of field 'minColour'.
+ *
+ * @return the value of field 'MinColour'.
+ */
+ public int getMinColour()
+ {
+ return this._minColour;
+ }
+
+ /**
+ * Returns the value of field 'threshold'.
+ *
+ * @return the value of field 'Threshold'.
+ */
+ public float getThreshold()
+ {
+ return this._threshold;
+ }
+
+ /**
+ * Method hasAboveThreshold.
+ *
+ * @return true if at least one AboveThreshold has been added
+ */
+ public boolean hasAboveThreshold()
+ {
+ return this._has_aboveThreshold;
+ }
+
+ /**
+ * Method hasMaxColour.
+ *
+ * @return true if at least one MaxColour has been added
+ */
+ public boolean hasMaxColour()
+ {
+ return this._has_maxColour;
+ }
+
+ /**
+ * Method hasMinColour.
+ *
+ * @return true if at least one MinColour has been added
+ */
+ public boolean hasMinColour()
+ {
+ return this._has_minColour;
+ }
+
+ /**
+ * Method hasThreshold.
+ *
+ * @return true if at least one Threshold has been added
+ */
+ public boolean hasThreshold()
+ {
+ return this._has_threshold;
+ }
+
+ /**
+ * 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 'aboveThreshold'.
+ *
+ * @param aboveThreshold
+ * the value of field 'aboveThreshold'.
+ */
+ public void setAboveThreshold(final int aboveThreshold)
+ {
+ this._aboveThreshold = aboveThreshold;
+ this._has_aboveThreshold = true;
+ }
+
+ /**
+ * Sets the value of field 'annotation'.
+ *
+ * @param annotation
+ * the value of field 'annotation'.
+ */
+ public void setAnnotation(final java.lang.String annotation)
+ {
+ this._annotation = annotation;
+ }
+
+ /**
+ * Sets the value of field 'colourScheme'.
+ *
+ * @param colourScheme
+ * the value of field 'colourScheme'.
+ */
+ public void setColourScheme(final java.lang.String colourScheme)
+ {
+ this._colourScheme = colourScheme;
+ }
+
+ /**
+ * Sets the value of field 'maxColour'.
+ *
+ * @param maxColour
+ * the value of field 'maxColour'.
+ */
+ public void setMaxColour(final int maxColour)
+ {
+ this._maxColour = maxColour;
+ this._has_maxColour = true;
+ }
+
+ /**
+ * Sets the value of field 'minColour'.
+ *
+ * @param minColour
+ * the value of field 'minColour'.
+ */
+ public void setMinColour(final int minColour)
+ {
+ this._minColour = minColour;
+ this._has_minColour = true;
+ }
+
+ /**
+ * Sets the value of field 'threshold'.
+ *
+ * @param threshold
+ * the value of field 'threshold'.
+ */
+ public void setThreshold(final float threshold)
+ {
+ this._threshold = threshold;
+ this._has_threshold = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class AnnotationElement implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _position.
- */
- private int _position;
-
- /**
- * keeps track of state for field: _position
- */
- private boolean _has_position;
-
- /**
- * Field _colour.
- */
- private int _colour;
-
- /**
- * keeps track of state for field: _colour
- */
- private boolean _has_colour;
-
- /**
- * Field _displayCharacter.
- */
- private java.lang.String _displayCharacter;
-
- /**
- * Field _description.
- */
- private java.lang.String _description;
-
- /**
- * Field _secondaryStructure.
- */
- private java.lang.String _secondaryStructure;
-
- /**
- * Field _value.
- */
- private float _value;
-
- /**
- * keeps track of state for field: _value
- */
- private boolean _has_value;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public AnnotationElement() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteColour(
- ) {
- this._has_colour= false;
- }
-
- /**
- */
- public void deletePosition(
- ) {
- this._has_position= false;
- }
-
- /**
- */
- public void deleteValue(
- ) {
- this._has_value= false;
- }
-
- /**
- * Returns the value of field 'colour'.
- *
- * @return the value of field 'Colour'.
- */
- public int getColour(
- ) {
- return this._colour;
- }
-
- /**
- * Returns the value of field 'description'.
- *
- * @return the value of field 'Description'.
- */
- public java.lang.String getDescription(
- ) {
- return this._description;
- }
-
- /**
- * Returns the value of field 'displayCharacter'.
- *
- * @return the value of field 'DisplayCharacter'.
- */
- public java.lang.String getDisplayCharacter(
- ) {
- return this._displayCharacter;
- }
-
- /**
- * Returns the value of field 'position'.
- *
- * @return the value of field 'Position'.
- */
- public int getPosition(
- ) {
- return this._position;
- }
-
- /**
- * Returns the value of field 'secondaryStructure'.
- *
- * @return the value of field 'SecondaryStructure'.
- */
- public java.lang.String getSecondaryStructure(
- ) {
- return this._secondaryStructure;
- }
-
- /**
- * Returns the value of field 'value'.
- *
- * @return the value of field 'Value'.
- */
- public float getValue(
- ) {
- return this._value;
- }
-
- /**
- * Method hasColour.
- *
- * @return true if at least one Colour has been added
- */
- public boolean hasColour(
- ) {
- return this._has_colour;
- }
-
- /**
- * Method hasPosition.
- *
- * @return true if at least one Position has been added
- */
- public boolean hasPosition(
- ) {
- return this._has_position;
- }
-
- /**
- * Method hasValue.
- *
- * @return true if at least one Value has been added
- */
- public boolean hasValue(
- ) {
- return this._has_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 'colour'.
- *
- * @param colour the value of field 'colour'.
- */
- public void setColour(
- final int colour) {
- this._colour = colour;
- this._has_colour = true;
- }
-
- /**
- * Sets the value of field 'description'.
- *
- * @param description the value of field 'description'.
- */
- public void setDescription(
- final java.lang.String description) {
- this._description = description;
- }
-
- /**
- * Sets the value of field 'displayCharacter'.
- *
- * @param displayCharacter the value of field 'displayCharacter'
- */
- public void setDisplayCharacter(
- final java.lang.String displayCharacter) {
- this._displayCharacter = displayCharacter;
- }
-
- /**
- * Sets the value of field 'position'.
- *
- * @param position the value of field 'position'.
- */
- public void setPosition(
- final int position) {
- this._position = position;
- this._has_position = true;
- }
-
- /**
- * Sets the value of field 'secondaryStructure'.
- *
- * @param secondaryStructure the value of field
- * 'secondaryStructure'.
- */
- public void setSecondaryStructure(
- final java.lang.String secondaryStructure) {
- this._secondaryStructure = secondaryStructure;
- }
-
- /**
- * Sets the value of field 'value'.
- *
- * @param value the value of field 'value'.
- */
- public void setValue(
- final float value) {
- this._value = value;
- this._has_value = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
+public class AnnotationElement implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _position.
+ */
+ private int _position;
+
+ /**
+ * keeps track of state for field: _position
+ */
+ private boolean _has_position;
+
+ /**
+ * Field _colour.
+ */
+ private int _colour;
+
+ /**
+ * keeps track of state for field: _colour
+ */
+ private boolean _has_colour;
+
+ /**
+ * Field _displayCharacter.
+ */
+ private java.lang.String _displayCharacter;
+
+ /**
+ * Field _description.
+ */
+ private java.lang.String _description;
+
+ /**
+ * Field _secondaryStructure.
+ */
+ private java.lang.String _secondaryStructure;
+
+ /**
+ * Field _value.
+ */
+ private float _value;
+
+ /**
+ * keeps track of state for field: _value
+ */
+ private boolean _has_value;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public AnnotationElement()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ */
+ public void deleteColour()
+ {
+ this._has_colour = false;
+ }
+
+ /**
+ */
+ public void deletePosition()
+ {
+ this._has_position = false;
+ }
+
+ /**
+ */
+ public void deleteValue()
+ {
+ this._has_value = false;
+ }
+
+ /**
+ * Returns the value of field 'colour'.
+ *
+ * @return the value of field 'Colour'.
+ */
+ public int getColour()
+ {
+ return this._colour;
+ }
+
+ /**
+ * Returns the value of field 'description'.
+ *
+ * @return the value of field 'Description'.
+ */
+ public java.lang.String getDescription()
+ {
+ return this._description;
+ }
+
+ /**
+ * Returns the value of field 'displayCharacter'.
+ *
+ * @return the value of field 'DisplayCharacter'.
+ */
+ public java.lang.String getDisplayCharacter()
+ {
+ return this._displayCharacter;
+ }
+
+ /**
+ * Returns the value of field 'position'.
+ *
+ * @return the value of field 'Position'.
+ */
+ public int getPosition()
+ {
+ return this._position;
+ }
+
+ /**
+ * Returns the value of field 'secondaryStructure'.
+ *
+ * @return the value of field 'SecondaryStructure'.
+ */
+ public java.lang.String getSecondaryStructure()
+ {
+ return this._secondaryStructure;
+ }
+
+ /**
+ * Returns the value of field 'value'.
+ *
+ * @return the value of field 'Value'.
+ */
+ public float getValue()
+ {
+ return this._value;
+ }
+
+ /**
+ * Method hasColour.
+ *
+ * @return true if at least one Colour has been added
+ */
+ public boolean hasColour()
+ {
+ return this._has_colour;
+ }
+
+ /**
+ * Method hasPosition.
+ *
+ * @return true if at least one Position has been added
+ */
+ public boolean hasPosition()
+ {
+ return this._has_position;
+ }
+
+ /**
+ * Method hasValue.
+ *
+ * @return true if at least one Value has been added
+ */
+ public boolean hasValue()
+ {
+ return this._has_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 'colour'.
+ *
+ * @param colour
+ * the value of field 'colour'.
+ */
+ public void setColour(final int colour)
+ {
+ this._colour = colour;
+ this._has_colour = true;
+ }
+
+ /**
+ * Sets the value of field 'description'.
+ *
+ * @param description
+ * the value of field 'description'.
+ */
+ public void setDescription(final java.lang.String description)
+ {
+ this._description = description;
+ }
+
+ /**
+ * Sets the value of field 'displayCharacter'.
+ *
+ * @param displayCharacter
+ * the value of field 'displayCharacter'
+ */
+ public void setDisplayCharacter(final java.lang.String displayCharacter)
+ {
+ this._displayCharacter = displayCharacter;
+ }
+
+ /**
+ * Sets the value of field 'position'.
+ *
+ * @param position
+ * the value of field 'position'.
+ */
+ public void setPosition(final int position)
+ {
+ this._position = position;
+ this._has_position = true;
+ }
+
+ /**
+ * Sets the value of field 'secondaryStructure'.
+ *
+ * @param secondaryStructure
+ * the value of field 'secondaryStructure'.
+ */
+ public void setSecondaryStructure(
+ final java.lang.String secondaryStructure)
+ {
+ this._secondaryStructure = secondaryStructure;
+ }
+
+ /**
+ * Sets the value of field 'value'.
+ *
+ * @param value
+ * the value of field 'value'.
+ */
+ public void setValue(final float value)
+ {
+ this._value = value;
+ this._has_value = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class CalcIdParam extends WebServiceParameterSet
-implements java.io.Serializable
+public class CalcIdParam extends WebServiceParameterSet implements
+ java.io.Serializable
{
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * handle for the calculation which uses this parameter set
- */
- private java.lang.String _calcId;
-
- /**
- * should the calculation be performed immediately after
- * loading in order to refresh results
- */
- private boolean _needsUpdate = false;
-
- /**
- * keeps track of state for field: _needsUpdate
- */
- private boolean _has_needsUpdate;
-
- /**
- * should the calculation be automatically performed on edits
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * handle for the calculation which uses this parameter set
+ */
+ private java.lang.String _calcId;
+
+ /**
+ * should the calculation be performed immediately after loading in order to
+ * refresh results
+ */
+ private boolean _needsUpdate = false;
+
+ /**
+ * keeps track of state for field: _needsUpdate
+ */
+ private boolean _has_needsUpdate;
+
+ /**
+ * should the calculation be automatically performed on edits
+ */
+ private boolean _autoUpdate;
+
+ /**
+ * keeps track of state for field: _autoUpdate
+ */
+ private boolean _has_autoUpdate;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public CalcIdParam()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
*/
- private boolean _autoUpdate;
-
- /**
- * keeps track of state for field: _autoUpdate
- */
- private boolean _has_autoUpdate;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public CalcIdParam() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteAutoUpdate(
- ) {
- this._has_autoUpdate= false;
- }
-
- /**
- */
- public void deleteNeedsUpdate(
- ) {
- this._has_needsUpdate= false;
- }
-
- /**
- * Returns the value of field 'autoUpdate'. The field
- * 'autoUpdate' has the following description: should the
- * calculation be automatically performed on edits
- *
- * @return the value of field 'AutoUpdate'.
- */
- public boolean getAutoUpdate(
- ) {
- return this._autoUpdate;
- }
-
- /**
- * Returns the value of field 'calcId'. The field 'calcId' has
- * the following description: handle for the calculation which
- * uses this parameter set
- *
- * @return the value of field 'CalcId'.
- */
- public java.lang.String getCalcId(
- ) {
- return this._calcId;
- }
-
- /**
- * Returns the value of field 'needsUpdate'. The field
- * 'needsUpdate' has the following description: should the
- * calculation be performed immediately after loading in order
- * to refresh results
- *
- * @return the value of field 'NeedsUpdate'.
- */
- public boolean getNeedsUpdate(
- ) {
- return this._needsUpdate;
- }
-
- /**
- * Method hasAutoUpdate.
- *
- * @return true if at least one AutoUpdate has been added
- */
- public boolean hasAutoUpdate(
- ) {
- return this._has_autoUpdate;
- }
-
- /**
- * Method hasNeedsUpdate.
- *
- * @return true if at least one NeedsUpdate has been added
- */
- public boolean hasNeedsUpdate(
- ) {
- return this._has_needsUpdate;
- }
-
- /**
- * Returns the value of field 'autoUpdate'. The field
- * 'autoUpdate' has the following description: should the
- * calculation be automatically performed on edits
- *
- * @return the value of field 'AutoUpdate'.
- */
- public boolean isAutoUpdate(
- ) {
- return this._autoUpdate;
- }
-
- /**
- * Returns the value of field 'needsUpdate'. The field
- * 'needsUpdate' has the following description: should the
- * calculation be performed immediately after loading in order
- * to refresh results
- *
- * @return the value of field 'NeedsUpdate'.
- */
- public boolean isNeedsUpdate(
- ) {
- return this._needsUpdate;
- }
-
- /**
- * 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 'autoUpdate'. The field 'autoUpdate'
- * has the following description: should the calculation be
- * automatically performed on edits
- *
- * @param autoUpdate the value of field 'autoUpdate'.
- */
- public void setAutoUpdate(
- final boolean autoUpdate) {
- this._autoUpdate = autoUpdate;
- this._has_autoUpdate = true;
- }
-
- /**
- * Sets the value of field 'calcId'. The field 'calcId' has the
- * following description: handle for the calculation which uses
- * this parameter set
- *
- * @param calcId the value of field 'calcId'.
- */
- public void setCalcId(
- final java.lang.String calcId) {
- this._calcId = calcId;
- }
-
- /**
- * Sets the value of field 'needsUpdate'. The field
- * 'needsUpdate' has the following description: should the
- * calculation be performed immediately after loading in order
- * to refresh results
- *
- * @param needsUpdate the value of field 'needsUpdate'.
- */
- public void setNeedsUpdate(
- final boolean needsUpdate) {
- this._needsUpdate = needsUpdate;
- this._has_needsUpdate = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.CalcIdParam
- */
- public static jalview.schemabinding.version2.CalcIdParam unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.schemabinding.version2.CalcIdParam) Unmarshaller.unmarshal(jalview.schemabinding.version2.CalcIdParam.class, reader);
- }
+ public void deleteAutoUpdate()
+ {
+ this._has_autoUpdate = false;
+ }
- /**
- *
- *
- * @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);
+ public void deleteNeedsUpdate()
+ {
+ this._has_needsUpdate = false;
+ }
+
+ /**
+ * Returns the value of field 'autoUpdate'. The field 'autoUpdate' has the
+ * following description: should the calculation be automatically performed on
+ * edits
+ *
+ * @return the value of field 'AutoUpdate'.
+ */
+ public boolean getAutoUpdate()
+ {
+ return this._autoUpdate;
+ }
+
+ /**
+ * Returns the value of field 'calcId'. The field 'calcId' has the following
+ * description: handle for the calculation which uses this parameter set
+ *
+ * @return the value of field 'CalcId'.
+ */
+ public java.lang.String getCalcId()
+ {
+ return this._calcId;
+ }
+
+ /**
+ * Returns the value of field 'needsUpdate'. The field 'needsUpdate' has the
+ * following description: should the calculation be performed immediately
+ * after loading in order to refresh results
+ *
+ * @return the value of field 'NeedsUpdate'.
+ */
+ public boolean getNeedsUpdate()
+ {
+ return this._needsUpdate;
+ }
+
+ /**
+ * Method hasAutoUpdate.
+ *
+ * @return true if at least one AutoUpdate has been added
+ */
+ public boolean hasAutoUpdate()
+ {
+ return this._has_autoUpdate;
+ }
+
+ /**
+ * Method hasNeedsUpdate.
+ *
+ * @return true if at least one NeedsUpdate has been added
+ */
+ public boolean hasNeedsUpdate()
+ {
+ return this._has_needsUpdate;
+ }
+
+ /**
+ * Returns the value of field 'autoUpdate'. The field 'autoUpdate' has the
+ * following description: should the calculation be automatically performed on
+ * edits
+ *
+ * @return the value of field 'AutoUpdate'.
+ */
+ public boolean isAutoUpdate()
+ {
+ return this._autoUpdate;
+ }
+
+ /**
+ * Returns the value of field 'needsUpdate'. The field 'needsUpdate' has the
+ * following description: should the calculation be performed immediately
+ * after loading in order to refresh results
+ *
+ * @return the value of field 'NeedsUpdate'.
+ */
+ public boolean isNeedsUpdate()
+ {
+ return this._needsUpdate;
+ }
+
+ /**
+ * 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 'autoUpdate'. The field 'autoUpdate' has the
+ * following description: should the calculation be automatically performed on
+ * edits
+ *
+ * @param autoUpdate
+ * the value of field 'autoUpdate'.
+ */
+ public void setAutoUpdate(final boolean autoUpdate)
+ {
+ this._autoUpdate = autoUpdate;
+ this._has_autoUpdate = true;
+ }
+
+ /**
+ * Sets the value of field 'calcId'. The field 'calcId' has the following
+ * description: handle for the calculation which uses this parameter set
+ *
+ * @param calcId
+ * the value of field 'calcId'.
+ */
+ public void setCalcId(final java.lang.String calcId)
+ {
+ this._calcId = calcId;
+ }
+
+ /**
+ * Sets the value of field 'needsUpdate'. The field 'needsUpdate' has the
+ * following description: should the calculation be performed immediately
+ * after loading in order to refresh results
+ *
+ * @param needsUpdate
+ * the value of field 'needsUpdate'.
+ */
+ public void setNeedsUpdate(final boolean needsUpdate)
+ {
+ this._needsUpdate = needsUpdate;
+ this._has_needsUpdate = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.CalcIdParam
+ */
+ public static jalview.schemabinding.version2.CalcIdParam unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.schemabinding.version2.CalcIdParam) Unmarshaller
+ .unmarshal(jalview.schemabinding.version2.CalcIdParam.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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Colour implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
- /**
- * Field _RGB.
- */
- private java.lang.String _RGB;
-
- /**
- * Field _minRGB.
- */
- private java.lang.String _minRGB;
-
- /**
- * loosely specified enumeration: NONE,ABOVE, or BELOW
- */
- private java.lang.String _threshType;
-
- /**
- * Field _threshold.
- */
- private float _threshold;
-
- /**
- * keeps track of state for field: _threshold
- */
- private boolean _has_threshold;
-
- /**
- * Field _max.
- */
- private float _max;
-
- /**
- * keeps track of state for field: _max
- */
- private boolean _has_max;
-
- /**
- * Field _min.
- */
- private float _min;
-
- /**
- * keeps track of state for field: _min
- */
- private boolean _has_min;
-
- /**
- * Field _colourByLabel.
- */
- private boolean _colourByLabel;
-
- /**
- * keeps track of state for field: _colourByLabel
- */
- private boolean _has_colourByLabel;
-
- /**
- * Field _autoScale.
- */
- private boolean _autoScale;
-
- /**
- * keeps track of state for field: _autoScale
- */
- private boolean _has_autoScale;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Colour() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteAutoScale(
- ) {
- this._has_autoScale= false;
- }
-
- /**
- */
- public void deleteColourByLabel(
- ) {
- this._has_colourByLabel= false;
- }
-
- /**
- */
- public void deleteMax(
- ) {
- this._has_max= false;
- }
-
- /**
- */
- public void deleteMin(
- ) {
- this._has_min= false;
- }
-
- /**
- */
- public void deleteThreshold(
- ) {
- this._has_threshold= false;
- }
-
- /**
- * Returns the value of field 'autoScale'.
- *
- * @return the value of field 'AutoScale'.
- */
- public boolean getAutoScale(
- ) {
- return this._autoScale;
- }
-
- /**
- * Returns the value of field 'colourByLabel'.
- *
- * @return the value of field 'ColourByLabel'.
- */
- public boolean getColourByLabel(
- ) {
- return this._colourByLabel;
- }
-
- /**
- * Returns the value of field 'max'.
- *
- * @return the value of field 'Max'.
- */
- public float getMax(
- ) {
- return this._max;
- }
-
- /**
- * Returns the value of field 'min'.
- *
- * @return the value of field 'Min'.
- */
- public float getMin(
- ) {
- return this._min;
- }
-
- /**
- * Returns the value of field 'minRGB'.
- *
- * @return the value of field 'MinRGB'.
- */
- public java.lang.String getMinRGB(
- ) {
- return this._minRGB;
- }
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName(
- ) {
- return this._name;
- }
-
- /**
- * Returns the value of field 'RGB'.
- *
- * @return the value of field 'RGB'.
- */
- public java.lang.String getRGB(
- ) {
- return this._RGB;
- }
-
- /**
- * Returns the value of field 'threshType'. The field
- * 'threshType' has the following description: loosely
- * specified enumeration: NONE,ABOVE, or BELOW
- *
- * @return the value of field 'ThreshType'.
- */
- public java.lang.String getThreshType(
- ) {
- return this._threshType;
- }
-
- /**
- * Returns the value of field 'threshold'.
- *
- * @return the value of field 'Threshold'.
- */
- public float getThreshold(
- ) {
- return this._threshold;
- }
-
- /**
- * Method hasAutoScale.
- *
- * @return true if at least one AutoScale has been added
- */
- public boolean hasAutoScale(
- ) {
- return this._has_autoScale;
- }
-
- /**
- * Method hasColourByLabel.
- *
- * @return true if at least one ColourByLabel has been added
- */
- public boolean hasColourByLabel(
- ) {
- return this._has_colourByLabel;
- }
-
- /**
- * Method hasMax.
- *
- * @return true if at least one Max has been added
- */
- public boolean hasMax(
- ) {
- return this._has_max;
- }
-
- /**
- * Method hasMin.
- *
- * @return true if at least one Min has been added
- */
- public boolean hasMin(
- ) {
- return this._has_min;
- }
-
- /**
- * Method hasThreshold.
- *
- * @return true if at least one Threshold has been added
- */
- public boolean hasThreshold(
- ) {
- return this._has_threshold;
- }
-
- /**
- * Returns the value of field 'autoScale'.
- *
- * @return the value of field 'AutoScale'.
- */
- public boolean isAutoScale(
- ) {
- return this._autoScale;
- }
-
- /**
- * Returns the value of field 'colourByLabel'.
- *
- * @return the value of field 'ColourByLabel'.
- */
- public boolean isColourByLabel(
- ) {
- return this._colourByLabel;
- }
-
- /**
- * 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 'autoScale'.
- *
- * @param autoScale the value of field 'autoScale'.
- */
- public void setAutoScale(
- final boolean autoScale) {
- this._autoScale = autoScale;
- this._has_autoScale = true;
- }
-
- /**
- * Sets the value of field 'colourByLabel'.
- *
- * @param colourByLabel the value of field 'colourByLabel'.
- */
- public void setColourByLabel(
- final boolean colourByLabel) {
- this._colourByLabel = colourByLabel;
- this._has_colourByLabel = true;
- }
-
- /**
- * Sets the value of field 'max'.
- *
- * @param max the value of field 'max'.
- */
- public void setMax(
- final float max) {
- this._max = max;
- this._has_max = true;
- }
-
- /**
- * Sets the value of field 'min'.
- *
- * @param min the value of field 'min'.
- */
- public void setMin(
- final float min) {
- this._min = min;
- this._has_min = true;
- }
-
- /**
- * Sets the value of field 'minRGB'.
- *
- * @param minRGB the value of field 'minRGB'.
- */
- public void setMinRGB(
- final java.lang.String minRGB) {
- this._minRGB = minRGB;
- }
-
- /**
- * Sets the value of field 'name'.
- *
- * @param name the value of field 'name'.
- */
- public void setName(
- final java.lang.String name) {
- this._name = name;
- }
-
- /**
- * Sets the value of field 'RGB'.
- *
- * @param RGB the value of field 'RGB'.
- */
- public void setRGB(
- final java.lang.String RGB) {
- this._RGB = RGB;
- }
-
- /**
- * Sets the value of field 'threshType'. The field 'threshType'
- * has the following description: loosely specified
- * enumeration: NONE,ABOVE, or BELOW
- *
- * @param threshType the value of field 'threshType'.
- */
- public void setThreshType(
- final java.lang.String threshType) {
- this._threshType = threshType;
- }
-
- /**
- * Sets the value of field 'threshold'.
- *
- * @param threshold the value of field 'threshold'.
- */
- public void setThreshold(
- final float threshold) {
- this._threshold = threshold;
- this._has_threshold = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.schemabinding.version2.Colour
- */
- 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);
- }
-
- /**
- *
- *
- * @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);
- }
+public class Colour implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _RGB.
+ */
+ private java.lang.String _RGB;
+
+ /**
+ * Field _minRGB.
+ */
+ private java.lang.String _minRGB;
+
+ /**
+ * loosely specified enumeration: NONE,ABOVE, or BELOW
+ */
+ private java.lang.String _threshType;
+
+ /**
+ * Field _threshold.
+ */
+ private float _threshold;
+
+ /**
+ * keeps track of state for field: _threshold
+ */
+ private boolean _has_threshold;
+
+ /**
+ * Field _max.
+ */
+ private float _max;
+
+ /**
+ * keeps track of state for field: _max
+ */
+ private boolean _has_max;
+
+ /**
+ * Field _min.
+ */
+ private float _min;
+
+ /**
+ * keeps track of state for field: _min
+ */
+ private boolean _has_min;
+
+ /**
+ * Field _colourByLabel.
+ */
+ private boolean _colourByLabel;
+
+ /**
+ * keeps track of state for field: _colourByLabel
+ */
+ private boolean _has_colourByLabel;
+
+ /**
+ * Field _autoScale.
+ */
+ private boolean _autoScale;
+
+ /**
+ * keeps track of state for field: _autoScale
+ */
+ private boolean _has_autoScale;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Colour()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ */
+ public void deleteAutoScale()
+ {
+ this._has_autoScale = false;
+ }
+
+ /**
+ */
+ public void deleteColourByLabel()
+ {
+ this._has_colourByLabel = false;
+ }
+
+ /**
+ */
+ public void deleteMax()
+ {
+ this._has_max = false;
+ }
+
+ /**
+ */
+ public void deleteMin()
+ {
+ this._has_min = false;
+ }
+
+ /**
+ */
+ public void deleteThreshold()
+ {
+ this._has_threshold = false;
+ }
+
+ /**
+ * Returns the value of field 'autoScale'.
+ *
+ * @return the value of field 'AutoScale'.
+ */
+ public boolean getAutoScale()
+ {
+ return this._autoScale;
+ }
+
+ /**
+ * Returns the value of field 'colourByLabel'.
+ *
+ * @return the value of field 'ColourByLabel'.
+ */
+ public boolean getColourByLabel()
+ {
+ return this._colourByLabel;
+ }
+
+ /**
+ * Returns the value of field 'max'.
+ *
+ * @return the value of field 'Max'.
+ */
+ public float getMax()
+ {
+ return this._max;
+ }
+
+ /**
+ * Returns the value of field 'min'.
+ *
+ * @return the value of field 'Min'.
+ */
+ public float getMin()
+ {
+ return this._min;
+ }
+
+ /**
+ * Returns the value of field 'minRGB'.
+ *
+ * @return the value of field 'MinRGB'.
+ */
+ public java.lang.String getMinRGB()
+ {
+ return this._minRGB;
+ }
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName()
+ {
+ return this._name;
+ }
+
+ /**
+ * Returns the value of field 'RGB'.
+ *
+ * @return the value of field 'RGB'.
+ */
+ public java.lang.String getRGB()
+ {
+ return this._RGB;
+ }
+
+ /**
+ * Returns the value of field 'threshType'. The field 'threshType' has the
+ * following description: loosely specified enumeration: NONE,ABOVE, or BELOW
+ *
+ * @return the value of field 'ThreshType'.
+ */
+ public java.lang.String getThreshType()
+ {
+ return this._threshType;
+ }
+
+ /**
+ * Returns the value of field 'threshold'.
+ *
+ * @return the value of field 'Threshold'.
+ */
+ public float getThreshold()
+ {
+ return this._threshold;
+ }
+
+ /**
+ * Method hasAutoScale.
+ *
+ * @return true if at least one AutoScale has been added
+ */
+ public boolean hasAutoScale()
+ {
+ return this._has_autoScale;
+ }
+
+ /**
+ * Method hasColourByLabel.
+ *
+ * @return true if at least one ColourByLabel has been added
+ */
+ public boolean hasColourByLabel()
+ {
+ return this._has_colourByLabel;
+ }
+
+ /**
+ * Method hasMax.
+ *
+ * @return true if at least one Max has been added
+ */
+ public boolean hasMax()
+ {
+ return this._has_max;
+ }
+
+ /**
+ * Method hasMin.
+ *
+ * @return true if at least one Min has been added
+ */
+ public boolean hasMin()
+ {
+ return this._has_min;
+ }
+
+ /**
+ * Method hasThreshold.
+ *
+ * @return true if at least one Threshold has been added
+ */
+ public boolean hasThreshold()
+ {
+ return this._has_threshold;
+ }
+
+ /**
+ * Returns the value of field 'autoScale'.
+ *
+ * @return the value of field 'AutoScale'.
+ */
+ public boolean isAutoScale()
+ {
+ return this._autoScale;
+ }
+
+ /**
+ * Returns the value of field 'colourByLabel'.
+ *
+ * @return the value of field 'ColourByLabel'.
+ */
+ public boolean isColourByLabel()
+ {
+ return this._colourByLabel;
+ }
+
+ /**
+ * 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 'autoScale'.
+ *
+ * @param autoScale
+ * the value of field 'autoScale'.
+ */
+ public void setAutoScale(final boolean autoScale)
+ {
+ this._autoScale = autoScale;
+ this._has_autoScale = true;
+ }
+
+ /**
+ * Sets the value of field 'colourByLabel'.
+ *
+ * @param colourByLabel
+ * the value of field 'colourByLabel'.
+ */
+ public void setColourByLabel(final boolean colourByLabel)
+ {
+ this._colourByLabel = colourByLabel;
+ this._has_colourByLabel = true;
+ }
+
+ /**
+ * Sets the value of field 'max'.
+ *
+ * @param max
+ * the value of field 'max'.
+ */
+ public void setMax(final float max)
+ {
+ this._max = max;
+ this._has_max = true;
+ }
+
+ /**
+ * Sets the value of field 'min'.
+ *
+ * @param min
+ * the value of field 'min'.
+ */
+ public void setMin(final float min)
+ {
+ this._min = min;
+ this._has_min = true;
+ }
+
+ /**
+ * Sets the value of field 'minRGB'.
+ *
+ * @param minRGB
+ * the value of field 'minRGB'.
+ */
+ public void setMinRGB(final java.lang.String minRGB)
+ {
+ this._minRGB = minRGB;
+ }
+
+ /**
+ * Sets the value of field 'name'.
+ *
+ * @param name
+ * the value of field 'name'.
+ */
+ public void setName(final java.lang.String name)
+ {
+ this._name = name;
+ }
+
+ /**
+ * Sets the value of field 'RGB'.
+ *
+ * @param RGB
+ * the value of field 'RGB'.
+ */
+ public void setRGB(final java.lang.String RGB)
+ {
+ this._RGB = RGB;
+ }
+
+ /**
+ * Sets the value of field 'threshType'. The field 'threshType' has the
+ * following description: loosely specified enumeration: NONE,ABOVE, or BELOW
+ *
+ * @param threshType
+ * the value of field 'threshType'.
+ */
+ public void setThreshType(final java.lang.String threshType)
+ {
+ this._threshType = threshType;
+ }
+
+ /**
+ * Sets the value of field 'threshold'.
+ *
+ * @param threshold
+ * the value of field 'threshold'.
+ */
+ public void setThreshold(final float threshold)
+ {
+ this._threshold = threshold;
+ this._has_threshold = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.Colour
+ */
+ 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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class DBRef implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _source.
- */
- private java.lang.String _source;
-
- /**
- * Field _version.
- */
- private java.lang.String _version;
-
- /**
- * Field _accessionId.
- */
- private java.lang.String _accessionId;
-
- /**
- * Field _mapping.
- */
- private jalview.schemabinding.version2.Mapping _mapping;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public DBRef() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'accessionId'.
- *
- * @return the value of field 'AccessionId'.
- */
- public java.lang.String getAccessionId(
- ) {
- return this._accessionId;
- }
-
- /**
- * Returns the value of field 'mapping'.
- *
- * @return the value of field 'Mapping'.
- */
- public jalview.schemabinding.version2.Mapping getMapping(
- ) {
- return this._mapping;
- }
-
- /**
- * Returns the value of field 'source'.
- *
- * @return the value of field 'Source'.
- */
- public java.lang.String getSource(
- ) {
- return this._source;
- }
-
- /**
- * Returns the value of field 'version'.
- *
- * @return the value of field 'Version'.
- */
- public java.lang.String getVersion(
- ) {
- return this._version;
- }
-
- /**
- * 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 'accessionId'.
- *
- * @param accessionId the value of field 'accessionId'.
- */
- public void setAccessionId(
- final java.lang.String accessionId) {
- this._accessionId = accessionId;
- }
-
- /**
- * Sets the value of field 'mapping'.
- *
- * @param mapping the value of field 'mapping'.
- */
- public void setMapping(
- final jalview.schemabinding.version2.Mapping mapping) {
- this._mapping = mapping;
- }
-
- /**
- * Sets the value of field 'source'.
- *
- * @param source the value of field 'source'.
- */
- public void setSource(
- final java.lang.String source) {
- this._source = source;
- }
-
- /**
- * Sets the value of field 'version'.
- *
- * @param version the value of field 'version'.
- */
- public void setVersion(
- final java.lang.String version) {
- this._version = version;
- }
-
- /**
- * 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.DBRef
- */
- 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);
- }
-
- /**
- *
- *
- * @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);
+public class DBRef implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _source.
+ */
+ private java.lang.String _source;
+
+ /**
+ * Field _version.
+ */
+ private java.lang.String _version;
+
+ /**
+ * Field _accessionId.
+ */
+ private java.lang.String _accessionId;
+
+ /**
+ * Field _mapping.
+ */
+ private jalview.schemabinding.version2.Mapping _mapping;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public DBRef()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'accessionId'.
+ *
+ * @return the value of field 'AccessionId'.
+ */
+ public java.lang.String getAccessionId()
+ {
+ return this._accessionId;
+ }
+
+ /**
+ * Returns the value of field 'mapping'.
+ *
+ * @return the value of field 'Mapping'.
+ */
+ public jalview.schemabinding.version2.Mapping getMapping()
+ {
+ return this._mapping;
+ }
+
+ /**
+ * Returns the value of field 'source'.
+ *
+ * @return the value of field 'Source'.
+ */
+ public java.lang.String getSource()
+ {
+ return this._source;
+ }
+
+ /**
+ * Returns the value of field 'version'.
+ *
+ * @return the value of field 'Version'.
+ */
+ public java.lang.String getVersion()
+ {
+ return this._version;
+ }
+
+ /**
+ * 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 'accessionId'.
+ *
+ * @param accessionId
+ * the value of field 'accessionId'.
+ */
+ public void setAccessionId(final java.lang.String accessionId)
+ {
+ this._accessionId = accessionId;
+ }
+
+ /**
+ * Sets the value of field 'mapping'.
+ *
+ * @param mapping
+ * the value of field 'mapping'.
+ */
+ public void setMapping(
+ final jalview.schemabinding.version2.Mapping mapping)
+ {
+ this._mapping = mapping;
+ }
+
+ /**
+ * Sets the value of field 'source'.
+ *
+ * @param source
+ * the value of field 'source'.
+ */
+ public void setSource(final java.lang.String source)
+ {
+ this._source = source;
+ }
+
+ /**
+ * Sets the value of field 'version'.
+ *
+ * @param version
+ * the value of field 'version'.
+ */
+ public void setVersion(final java.lang.String version)
+ {
+ this._version = version;
+ }
+
+ /**
+ * 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.DBRef
+ */
+ 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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Feature implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _begin.
- */
- private int _begin;
-
- /**
- * keeps track of state for field: _begin
- */
- private boolean _has_begin;
-
- /**
- * Field _end.
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
- /**
- * Field _type.
- */
- private java.lang.String _type;
-
- /**
- * Field _description.
- */
- private java.lang.String _description;
-
- /**
- * Field _status.
- */
- private java.lang.String _status;
-
- /**
- * Field _featureGroup.
- */
- private java.lang.String _featureGroup;
-
- /**
- * Field _score.
- */
- private float _score;
-
- /**
- * keeps track of state for field: _score
- */
- private boolean _has_score;
-
- /**
- * Field _otherDataList.
- */
- private java.util.Vector _otherDataList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Feature() {
- super();
- this._otherDataList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vOtherData
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addOtherData(
- final jalview.schemabinding.version2.OtherData vOtherData)
- throws java.lang.IndexOutOfBoundsException {
- this._otherDataList.addElement(vOtherData);
- }
-
- /**
- *
- *
- * @param index
- * @param vOtherData
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addOtherData(
- final int index,
- final jalview.schemabinding.version2.OtherData vOtherData)
- throws java.lang.IndexOutOfBoundsException {
- this._otherDataList.add(index, vOtherData);
- }
-
- /**
- */
- public void deleteBegin(
- ) {
- this._has_begin= false;
- }
-
- /**
- */
- public void deleteEnd(
- ) {
- this._has_end= false;
- }
-
- /**
- */
- public void deleteScore(
- ) {
- this._has_score= false;
- }
-
- /**
- * Method enumerateOtherData.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.OtherData elements
- */
- public java.util.Enumeration enumerateOtherData(
- ) {
- return this._otherDataList.elements();
- }
-
- /**
- * Returns the value of field 'begin'.
- *
- * @return the value of field 'Begin'.
- */
- public int getBegin(
- ) {
- return this._begin;
- }
-
- /**
- * Returns the value of field 'description'.
- *
- * @return the value of field 'Description'.
- */
- public java.lang.String getDescription(
- ) {
- return this._description;
- }
-
- /**
- * Returns the value of field 'end'.
- *
- * @return the value of field 'End'.
- */
- public int getEnd(
- ) {
- return this._end;
- }
-
- /**
- * Returns the value of field 'featureGroup'.
- *
- * @return the value of field 'FeatureGroup'.
- */
- public java.lang.String getFeatureGroup(
- ) {
- return this._featureGroup;
- }
-
- /**
- * Method getOtherData.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.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.get(index);
- }
-
- /**
- * Method getOtherData.Returns the contents of the collection
- * in an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getOtherDataCount(
- ) {
- return this._otherDataList.size();
- }
-
- /**
- * Returns the value of field 'score'.
- *
- * @return the value of field 'Score'.
- */
- public float getScore(
- ) {
- return this._score;
- }
-
- /**
- * Returns the value of field 'status'.
- *
- * @return the value of field 'Status'.
- */
- public java.lang.String getStatus(
- ) {
- return this._status;
- }
-
- /**
- * Returns the value of field 'type'.
- *
- * @return the value of field 'Type'.
- */
- public java.lang.String getType(
- ) {
- return this._type;
- }
-
- /**
- * Method hasBegin.
- *
- * @return true if at least one Begin has been added
- */
- public boolean hasBegin(
- ) {
- return this._has_begin;
- }
-
- /**
- * Method hasEnd.
- *
- * @return true if at least one End has been added
- */
- public boolean hasEnd(
- ) {
- return this._has_end;
- }
-
- /**
- * Method hasScore.
- *
- * @return true if at least one Score has been added
- */
- public boolean hasScore(
- ) {
- return this._has_score;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllOtherData(
- ) {
- this._otherDataList.clear();
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.OtherData removeOtherDataAt(
- final int index) {
- java.lang.Object obj = this._otherDataList.remove(index);
- return (jalview.schemabinding.version2.OtherData) obj;
- }
-
- /**
- * Sets the value of field 'begin'.
- *
- * @param begin the value of field 'begin'.
- */
- public void setBegin(
- final int begin) {
- this._begin = begin;
- this._has_begin = true;
- }
-
- /**
- * Sets the value of field 'description'.
- *
- * @param description the value of field 'description'.
- */
- public void setDescription(
- final java.lang.String description) {
- this._description = description;
- }
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end the value of field 'end'.
- */
- public void setEnd(
- final int end) {
- this._end = end;
- this._has_end = true;
- }
-
- /**
- * Sets the value of field 'featureGroup'.
- *
- * @param featureGroup the value of field 'featureGroup'.
- */
- public void setFeatureGroup(
- final java.lang.String featureGroup) {
- this._featureGroup = featureGroup;
- }
-
- /**
- *
- *
- * @param index
- * @param vOtherData
- * @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) + "]");
- }
-
- this._otherDataList.set(index, vOtherData);
- }
-
- /**
- *
- *
- * @param vOtherDataArray
- */
- public void setOtherData(
- final jalview.schemabinding.version2.OtherData[] vOtherDataArray) {
- //-- copy array
- _otherDataList.clear();
-
- for (int i = 0; i < vOtherDataArray.length; i++) {
- this._otherDataList.add(vOtherDataArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'score'.
- *
- * @param score the value of field 'score'.
- */
- public void setScore(
- final float score) {
- this._score = score;
- this._has_score = true;
- }
-
- /**
- * Sets the value of field 'status'.
- *
- * @param status the value of field 'status'.
- */
- public void setStatus(
- final java.lang.String status) {
- this._status = status;
- }
-
- /**
- * Sets the value of field 'type'.
- *
- * @param type the value of field 'type'.
- */
- public void setType(
- final java.lang.String type) {
- this._type = type;
- }
-
- /**
- * 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.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);
- }
-
- /**
- *
- *
- * @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);
- }
+public class Feature implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _begin.
+ */
+ private int _begin;
+
+ /**
+ * keeps track of state for field: _begin
+ */
+ private boolean _has_begin;
+
+ /**
+ * Field _end.
+ */
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
+
+ /**
+ * Field _type.
+ */
+ private java.lang.String _type;
+
+ /**
+ * Field _description.
+ */
+ private java.lang.String _description;
+
+ /**
+ * Field _status.
+ */
+ private java.lang.String _status;
+
+ /**
+ * Field _featureGroup.
+ */
+ private java.lang.String _featureGroup;
+
+ /**
+ * Field _score.
+ */
+ private float _score;
+
+ /**
+ * keeps track of state for field: _score
+ */
+ private boolean _has_score;
+
+ /**
+ * Field _otherDataList.
+ */
+ private java.util.Vector _otherDataList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Feature()
+ {
+ super();
+ this._otherDataList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vOtherData
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addOtherData(
+ final jalview.schemabinding.version2.OtherData vOtherData)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._otherDataList.addElement(vOtherData);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vOtherData
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addOtherData(final int index,
+ final jalview.schemabinding.version2.OtherData vOtherData)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._otherDataList.add(index, vOtherData);
+ }
+
+ /**
+ */
+ public void deleteBegin()
+ {
+ this._has_begin = false;
+ }
+
+ /**
+ */
+ public void deleteEnd()
+ {
+ this._has_end = false;
+ }
+
+ /**
+ */
+ public void deleteScore()
+ {
+ this._has_score = false;
+ }
+
+ /**
+ * Method enumerateOtherData.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.OtherData
+ * elements
+ */
+ public java.util.Enumeration enumerateOtherData()
+ {
+ return this._otherDataList.elements();
+ }
+
+ /**
+ * Returns the value of field 'begin'.
+ *
+ * @return the value of field 'Begin'.
+ */
+ public int getBegin()
+ {
+ return this._begin;
+ }
+
+ /**
+ * Returns the value of field 'description'.
+ *
+ * @return the value of field 'Description'.
+ */
+ public java.lang.String getDescription()
+ {
+ return this._description;
+ }
+
+ /**
+ * Returns the value of field 'end'.
+ *
+ * @return the value of field 'End'.
+ */
+ public int getEnd()
+ {
+ return this._end;
+ }
+
+ /**
+ * Returns the value of field 'featureGroup'.
+ *
+ * @return the value of field 'FeatureGroup'.
+ */
+ public java.lang.String getFeatureGroup()
+ {
+ return this._featureGroup;
+ }
+
+ /**
+ * Method getOtherData.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.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
+ .get(index);
+ }
+
+ /**
+ * Method getOtherData.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getOtherDataCount()
+ {
+ return this._otherDataList.size();
+ }
+
+ /**
+ * Returns the value of field 'score'.
+ *
+ * @return the value of field 'Score'.
+ */
+ public float getScore()
+ {
+ return this._score;
+ }
+
+ /**
+ * Returns the value of field 'status'.
+ *
+ * @return the value of field 'Status'.
+ */
+ public java.lang.String getStatus()
+ {
+ return this._status;
+ }
+
+ /**
+ * Returns the value of field 'type'.
+ *
+ * @return the value of field 'Type'.
+ */
+ public java.lang.String getType()
+ {
+ return this._type;
+ }
+
+ /**
+ * Method hasBegin.
+ *
+ * @return true if at least one Begin has been added
+ */
+ public boolean hasBegin()
+ {
+ return this._has_begin;
+ }
+
+ /**
+ * Method hasEnd.
+ *
+ * @return true if at least one End has been added
+ */
+ public boolean hasEnd()
+ {
+ return this._has_end;
+ }
+
+ /**
+ * Method hasScore.
+ *
+ * @return true if at least one Score has been added
+ */
+ public boolean hasScore()
+ {
+ return this._has_score;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ */
+ public void removeAllOtherData()
+ {
+ this._otherDataList.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.OtherData removeOtherDataAt(
+ final int index)
+ {
+ java.lang.Object obj = this._otherDataList.remove(index);
+ return (jalview.schemabinding.version2.OtherData) obj;
+ }
+
+ /**
+ * Sets the value of field 'begin'.
+ *
+ * @param begin
+ * the value of field 'begin'.
+ */
+ public void setBegin(final int begin)
+ {
+ this._begin = begin;
+ this._has_begin = true;
+ }
+
+ /**
+ * Sets the value of field 'description'.
+ *
+ * @param description
+ * the value of field 'description'.
+ */
+ public void setDescription(final java.lang.String description)
+ {
+ this._description = description;
+ }
+
+ /**
+ * Sets the value of field 'end'.
+ *
+ * @param end
+ * the value of field 'end'.
+ */
+ public void setEnd(final int end)
+ {
+ this._end = end;
+ this._has_end = true;
+ }
+
+ /**
+ * Sets the value of field 'featureGroup'.
+ *
+ * @param featureGroup
+ * the value of field 'featureGroup'.
+ */
+ public void setFeatureGroup(final java.lang.String featureGroup)
+ {
+ this._featureGroup = featureGroup;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vOtherData
+ * @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) + "]");
+ }
+
+ this._otherDataList.set(index, vOtherData);
+ }
+
+ /**
+ *
+ *
+ * @param vOtherDataArray
+ */
+ public void setOtherData(
+ final jalview.schemabinding.version2.OtherData[] vOtherDataArray)
+ {
+ // -- copy array
+ _otherDataList.clear();
+
+ for (int i = 0; i < vOtherDataArray.length; i++)
+ {
+ this._otherDataList.add(vOtherDataArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'score'.
+ *
+ * @param score
+ * the value of field 'score'.
+ */
+ public void setScore(final float score)
+ {
+ this._score = score;
+ this._has_score = true;
+ }
+
+ /**
+ * Sets the value of field 'status'.
+ *
+ * @param status
+ * the value of field 'status'.
+ */
+ public void setStatus(final java.lang.String status)
+ {
+ this._status = status;
+ }
+
+ /**
+ * Sets the value of field 'type'.
+ *
+ * @param type
+ * the value of field 'type'.
+ */
+ public void setType(final java.lang.String type)
+ {
+ this._type = type;
+ }
+
+ /**
+ * 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.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class FeatureSettings implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _settingList.
- */
- private java.util.Vector _settingList;
-
- /**
- * Field _groupList.
- */
- private java.util.Vector _groupList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public FeatureSettings() {
- super();
- this._settingList = new java.util.Vector();
- this._groupList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vGroup
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addGroup(
- final jalview.schemabinding.version2.Group vGroup)
- throws java.lang.IndexOutOfBoundsException {
- this._groupList.addElement(vGroup);
- }
-
- /**
- *
- *
- * @param index
- * @param vGroup
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addGroup(
- final int index,
- final jalview.schemabinding.version2.Group vGroup)
- throws java.lang.IndexOutOfBoundsException {
- this._groupList.add(index, vGroup);
- }
-
- /**
- *
- *
- * @param vSetting
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSetting(
- final jalview.schemabinding.version2.Setting vSetting)
- throws java.lang.IndexOutOfBoundsException {
- this._settingList.addElement(vSetting);
- }
-
- /**
- *
- *
- * @param index
- * @param vSetting
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSetting(
- final int index,
- final jalview.schemabinding.version2.Setting vSetting)
- throws java.lang.IndexOutOfBoundsException {
- this._settingList.add(index, vSetting);
- }
-
- /**
- * Method enumerateGroup.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.Group elements
- */
- public java.util.Enumeration enumerateGroup(
- ) {
- return this._groupList.elements();
- }
-
- /**
- * Method enumerateSetting.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.Setting elements
- */
- public java.util.Enumeration enumerateSetting(
- ) {
- return this._settingList.elements();
- }
-
- /**
- * Method getGroup.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.Group at the given index
- */
- 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.get(index);
- }
-
- /**
- * Method getGroup.Returns the contents of the collection in an
- * Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getGroupCount(
- ) {
- return this._groupList.size();
- }
-
- /**
- * Method getSetting.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.Setting at the given index
- */
- 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.get(index);
- }
-
- /**
- * Method getSetting.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getSettingCount(
- ) {
- return this._settingList.size();
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllGroup(
- ) {
- this._groupList.clear();
+public class FeatureSettings implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _settingList.
+ */
+ private java.util.Vector _settingList;
+
+ /**
+ * Field _groupList.
+ */
+ private java.util.Vector _groupList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public FeatureSettings()
+ {
+ super();
+ this._settingList = new java.util.Vector();
+ this._groupList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vGroup
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addGroup(final jalview.schemabinding.version2.Group vGroup)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._groupList.addElement(vGroup);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vGroup
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addGroup(final int index,
+ final jalview.schemabinding.version2.Group vGroup)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._groupList.add(index, vGroup);
+ }
+
+ /**
+ *
+ *
+ * @param vSetting
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSetting(
+ final jalview.schemabinding.version2.Setting vSetting)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._settingList.addElement(vSetting);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSetting
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSetting(final int index,
+ final jalview.schemabinding.version2.Setting vSetting)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._settingList.add(index, vSetting);
+ }
+
+ /**
+ * Method enumerateGroup.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.Group
+ * elements
+ */
+ public java.util.Enumeration enumerateGroup()
+ {
+ return this._groupList.elements();
+ }
+
+ /**
+ * Method enumerateSetting.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.Setting
+ * elements
+ */
+ public java.util.Enumeration enumerateSetting()
+ {
+ return this._settingList.elements();
+ }
+
+ /**
+ * Method getGroup.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.Group at the given
+ * index
+ */
+ 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) + "]");
}
- /**
- */
- public void removeAllSetting(
- ) {
- this._settingList.clear();
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.Group removeGroupAt(
- final int index) {
- java.lang.Object obj = this._groupList.remove(index);
- return (jalview.schemabinding.version2.Group) obj;
- }
-
- /**
- * 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;
+ return (jalview.schemabinding.version2.Group) _groupList.get(index);
+ }
+
+ /**
+ * Method getGroup.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getGroupCount()
+ {
+ return this._groupList.size();
+ }
+
+ /**
+ * Method getSetting.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.Setting at the
+ * given index
+ */
+ 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) + "]");
}
- /**
- * Method removeSettingAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.schemabinding.version2.Setting removeSettingAt(
- final int index) {
- java.lang.Object obj = this._settingList.remove(index);
- return (jalview.schemabinding.version2.Setting) obj;
+ return (jalview.schemabinding.version2.Setting) _settingList.get(index);
+ }
+
+ /**
+ * Method getSetting.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getSettingCount()
+ {
+ return this._settingList.size();
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
-
- /**
- *
- *
- * @param index
- * @param vGroup
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- 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) + "]");
- }
-
- this._groupList.set(index, vGroup);
- }
-
- /**
- *
- *
- * @param vGroupArray
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
*/
- public void setGroup(
- final jalview.schemabinding.version2.Group[] vGroupArray) {
- //-- copy array
- _groupList.clear();
-
- for (int i = 0; i < vGroupArray.length; i++) {
- this._groupList.add(vGroupArray[i]);
- }
- }
+ public void removeAllGroup()
+ {
+ this._groupList.clear();
+ }
- /**
- *
- *
- * @param index
- * @param vSetting
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
+ /**
*/
- 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) + "]");
- }
-
- this._settingList.set(index, vSetting);
+ public void removeAllSetting()
+ {
+ this._settingList.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.Group removeGroupAt(final int index)
+ {
+ java.lang.Object obj = this._groupList.remove(index);
+ return (jalview.schemabinding.version2.Group) obj;
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.Setting removeSettingAt(
+ final int index)
+ {
+ java.lang.Object obj = this._settingList.remove(index);
+ return (jalview.schemabinding.version2.Setting) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vGroup
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ 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) + "]");
}
- /**
- *
- *
- * @param vSettingArray
- */
- public void setSetting(
- final jalview.schemabinding.version2.Setting[] vSettingArray) {
- //-- copy array
- _settingList.clear();
-
- for (int i = 0; i < vSettingArray.length; i++) {
- this._settingList.add(vSettingArray[i]);
- }
+ this._groupList.set(index, vGroup);
+ }
+
+ /**
+ *
+ *
+ * @param vGroupArray
+ */
+ public void setGroup(
+ final jalview.schemabinding.version2.Group[] vGroupArray)
+ {
+ // -- copy array
+ _groupList.clear();
+
+ for (int i = 0; i < vGroupArray.length; i++)
+ {
+ this._groupList.add(vGroupArray[i]);
}
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.FeatureSettings
- */
- 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);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSetting
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ 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) + "]");
}
- /**
- *
- *
- * @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);
+ this._settingList.set(index, vSetting);
+ }
+
+ /**
+ *
+ *
+ * @param vSettingArray
+ */
+ public void setSetting(
+ final jalview.schemabinding.version2.Setting[] vSettingArray)
+ {
+ // -- copy array
+ _settingList.clear();
+
+ for (int i = 0; i < vSettingArray.length; i++)
+ {
+ this._settingList.add(vSettingArray[i]);
}
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.FeatureSettings
+ */
+ 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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Features extends Feature
-implements java.io.Serializable
+public class Features extends Feature implements java.io.Serializable
{
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Features() {
- super();
- }
-
+ public Features()
+ {
+ super();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * 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;
+ /**
+ * 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 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);
- }
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
- /**
- * Method 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.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.Features.class, reader);
- }
+ /**
+ * 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.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.Features.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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Group implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
- /**
- * Field _display.
- */
- private boolean _display;
-
- /**
- * keeps track of state for field: _display
- */
- private boolean _has_display;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Group() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteDisplay(
- ) {
- this._has_display= false;
- }
-
- /**
- * Returns the value of field 'display'.
- *
- * @return the value of field 'Display'.
- */
- public boolean getDisplay(
- ) {
- return this._display;
- }
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName(
- ) {
- return this._name;
- }
-
- /**
- * Method hasDisplay.
- *
- * @return true if at least one Display has been added
- */
- public boolean hasDisplay(
- ) {
- return this._has_display;
- }
-
- /**
- * Returns the value of field 'display'.
- *
- * @return the value of field 'Display'.
- */
- public boolean isDisplay(
- ) {
- return this._display;
- }
-
- /**
- * 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 'display'.
- *
- * @param display the value of field 'display'.
- */
- public void setDisplay(
- final boolean display) {
- this._display = display;
- this._has_display = true;
- }
-
- /**
- * Sets the value of field 'name'.
- *
- * @param name the value of field 'name'.
- */
- public void setName(
- final java.lang.String name) {
- this._name = name;
- }
-
- /**
- * 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.Group
- */
- 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);
- }
-
- /**
- *
- *
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
+public class Group implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _display.
+ */
+ private boolean _display;
+
+ /**
+ * keeps track of state for field: _display
+ */
+ private boolean _has_display;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Group()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
*/
- public void validate(
- )
- throws org.exolab.castor.xml.ValidationException {
- org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
- validator.validate(this);
+ public void deleteDisplay()
+ {
+ this._has_display = false;
+ }
+
+ /**
+ * Returns the value of field 'display'.
+ *
+ * @return the value of field 'Display'.
+ */
+ public boolean getDisplay()
+ {
+ return this._display;
+ }
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName()
+ {
+ return this._name;
+ }
+
+ /**
+ * Method hasDisplay.
+ *
+ * @return true if at least one Display has been added
+ */
+ public boolean hasDisplay()
+ {
+ return this._has_display;
+ }
+
+ /**
+ * Returns the value of field 'display'.
+ *
+ * @return the value of field 'Display'.
+ */
+ public boolean isDisplay()
+ {
+ return this._display;
+ }
+
+ /**
+ * 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 'display'.
+ *
+ * @param display
+ * the value of field 'display'.
+ */
+ public void setDisplay(final boolean display)
+ {
+ this._display = display;
+ this._has_display = true;
+ }
+
+ /**
+ * Sets the value of field 'name'.
+ *
+ * @param name
+ * the value of field 'name'.
+ */
+ public void setName(final java.lang.String name)
+ {
+ this._name = name;
+ }
+
+ /**
+ * 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.Group
+ */
+ 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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class HiddenColumns implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _start.
- */
- private int _start;
-
- /**
- * keeps track of state for field: _start
- */
- private boolean _has_start;
-
- /**
- * Field _end.
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public HiddenColumns() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteEnd(
- ) {
- this._has_end= false;
- }
-
- /**
- */
- public void deleteStart(
- ) {
- this._has_start= false;
- }
-
- /**
- * Returns the value of field 'end'.
- *
- * @return the value of field 'End'.
- */
- public int getEnd(
- ) {
- return this._end;
- }
-
- /**
- * Returns the value of field 'start'.
- *
- * @return the value of field 'Start'.
- */
- public int getStart(
- ) {
- return this._start;
- }
-
- /**
- * Method hasEnd.
- *
- * @return true if at least one End has been added
- */
- public boolean hasEnd(
- ) {
- return this._has_end;
- }
-
- /**
- * Method hasStart.
- *
- * @return true if at least one Start has been added
- */
- public boolean hasStart(
- ) {
- return this._has_start;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end the value of field 'end'.
- */
- public void setEnd(
- final int end) {
- this._end = end;
- this._has_end = true;
- }
-
- /**
- * Sets the value of field 'start'.
- *
- * @param start the value of field 'start'.
- */
- public void setStart(
- final int start) {
- this._start = start;
- this._has_start = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
+public class HiddenColumns implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _start.
+ */
+ private int _start;
+
+ /**
+ * keeps track of state for field: _start
+ */
+ private boolean _has_start;
+
+ /**
+ * Field _end.
+ */
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public HiddenColumns()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ */
+ public void deleteEnd()
+ {
+ this._has_end = false;
+ }
+
+ /**
+ */
+ public void deleteStart()
+ {
+ this._has_start = false;
+ }
+
+ /**
+ * Returns the value of field 'end'.
+ *
+ * @return the value of field 'End'.
+ */
+ public int getEnd()
+ {
+ return this._end;
+ }
+
+ /**
+ * Returns the value of field 'start'.
+ *
+ * @return the value of field 'Start'.
+ */
+ public int getStart()
+ {
+ return this._start;
+ }
+
+ /**
+ * Method hasEnd.
+ *
+ * @return true if at least one End has been added
+ */
+ public boolean hasEnd()
+ {
+ return this._has_end;
+ }
+
+ /**
+ * Method hasStart.
+ *
+ * @return true if at least one Start has been added
+ */
+ public boolean hasStart()
+ {
+ return this._has_start;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Sets the value of field 'end'.
+ *
+ * @param end
+ * the value of field 'end'.
+ */
+ public void setEnd(final int end)
+ {
+ this._end = end;
+ this._has_end = true;
+ }
+
+ /**
+ * Sets the value of field 'start'.
+ *
+ * @param start
+ * the value of field 'start'.
+ */
+ public void setStart(final int start)
+ {
+ this._start = start;
+ this._has_start = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class JGroup implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _start.
- */
- private int _start;
-
- /**
- * keeps track of state for field: _start
- */
- private boolean _has_start;
-
- /**
- * Field _end.
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
- /**
- * Field _colour.
- */
- private java.lang.String _colour;
-
- /**
- * Field _consThreshold.
- */
- private int _consThreshold;
-
- /**
- * keeps track of state for field: _consThreshold
- */
- private boolean _has_consThreshold;
-
- /**
- * Field _pidThreshold.
- */
- private int _pidThreshold;
-
- /**
- * keeps track of state for field: _pidThreshold
- */
- private boolean _has_pidThreshold;
-
- /**
- * Field _outlineColour.
- */
- private int _outlineColour;
-
- /**
- * keeps track of state for field: _outlineColour
- */
- private boolean _has_outlineColour;
-
- /**
- * Field _displayBoxes.
- */
- private boolean _displayBoxes;
-
- /**
- * keeps track of state for field: _displayBoxes
- */
- private boolean _has_displayBoxes;
-
- /**
- * Field _displayText.
- */
- private boolean _displayText;
-
- /**
- * keeps track of state for field: _displayText
- */
- private boolean _has_displayText;
-
- /**
- * Field _colourText.
- */
- private boolean _colourText;
-
- /**
- * keeps track of state for field: _colourText
- */
- private boolean _has_colourText;
-
- /**
- * Field _textCol1.
- */
- private int _textCol1;
-
- /**
- * keeps track of state for field: _textCol1
- */
- private boolean _has_textCol1;
-
- /**
- * Field _textCol2.
- */
- private int _textCol2;
-
- /**
- * keeps track of state for field: _textCol2
- */
- private boolean _has_textCol2;
-
- /**
- * Field _textColThreshold.
- */
- private int _textColThreshold;
-
- /**
- * keeps track of state for field: _textColThreshold
- */
- private boolean _has_textColThreshold;
-
- /**
- * Field _showUnconserved.
- */
- private boolean _showUnconserved;
-
- /**
- * keeps track of state for field: _showUnconserved
- */
- private boolean _has_showUnconserved;
-
- /**
- * Field _ignoreGapsinConsensus.
- */
- private boolean _ignoreGapsinConsensus = true;
-
- /**
- * keeps track of state for field: _ignoreGapsinConsensus
- */
- private boolean _has_ignoreGapsinConsensus;
-
- /**
- * Field _showConsensusHistogram.
- */
- private boolean _showConsensusHistogram = true;
-
- /**
- * keeps track of state for field: _showConsensusHistogram
- */
- private boolean _has_showConsensusHistogram;
-
- /**
- * Field _showSequenceLogo.
- */
- private boolean _showSequenceLogo = false;
-
- /**
- * keeps track of state for field: _showSequenceLogo
- */
- private boolean _has_showSequenceLogo;
-
- /**
- * Field _normaliseSequenceLogo.
- */
- private boolean _normaliseSequenceLogo = false;
-
- /**
- * keeps track of state for field: _normaliseSequenceLogo
- */
- private boolean _has_normaliseSequenceLogo;
-
- /**
- * Optional sequence group ID (only
- * needs to be unique for this
- * alignment)
- *
- */
- private java.lang.String _id;
-
- /**
- * Field _seqList.
- */
- private java.util.Vector _seqList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public JGroup() {
- super();
- this._seqList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vSeq
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSeq(
- final java.lang.String vSeq)
- throws java.lang.IndexOutOfBoundsException {
- this._seqList.addElement(vSeq);
- }
-
- /**
- *
- *
- * @param index
- * @param vSeq
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSeq(
- final int index,
- final java.lang.String vSeq)
- throws java.lang.IndexOutOfBoundsException {
- this._seqList.add(index, vSeq);
- }
-
- /**
- */
- public void deleteColourText(
- ) {
- this._has_colourText= false;
- }
-
- /**
- */
- public void deleteConsThreshold(
- ) {
- this._has_consThreshold= false;
- }
-
- /**
- */
- public void deleteDisplayBoxes(
- ) {
- this._has_displayBoxes= false;
- }
-
- /**
- */
- public void deleteDisplayText(
- ) {
- this._has_displayText= false;
- }
-
- /**
- */
- public void deleteEnd(
- ) {
- this._has_end= false;
- }
-
- /**
- */
- public void deleteIgnoreGapsinConsensus(
- ) {
- this._has_ignoreGapsinConsensus= false;
- }
-
- /**
- */
- public void deleteNormaliseSequenceLogo(
- ) {
- this._has_normaliseSequenceLogo= false;
- }
-
- /**
- */
- public void deleteOutlineColour(
- ) {
- this._has_outlineColour= false;
- }
-
- /**
- */
- public void deletePidThreshold(
- ) {
- this._has_pidThreshold= false;
- }
-
- /**
- */
- public void deleteShowConsensusHistogram(
- ) {
- this._has_showConsensusHistogram= false;
- }
-
- /**
- */
- public void deleteShowSequenceLogo(
- ) {
- this._has_showSequenceLogo= false;
- }
-
- /**
- */
- public void deleteShowUnconserved(
- ) {
- this._has_showUnconserved= false;
- }
-
- /**
- */
- public void deleteStart(
- ) {
- this._has_start= false;
- }
-
- /**
- */
- public void deleteTextCol1(
- ) {
- this._has_textCol1= false;
- }
-
- /**
- */
- public void deleteTextCol2(
- ) {
- this._has_textCol2= false;
- }
-
- /**
- */
- public void deleteTextColThreshold(
- ) {
- this._has_textColThreshold= false;
- }
-
- /**
- * Method enumerateSeq.
- *
- * @return an Enumeration over all java.lang.String elements
- */
- public java.util.Enumeration enumerateSeq(
- ) {
- return this._seqList.elements();
- }
-
- /**
- * Returns the value of field 'colour'.
- *
- * @return the value of field 'Colour'.
- */
- public java.lang.String getColour(
- ) {
- return this._colour;
- }
-
- /**
- * Returns the value of field 'colourText'.
- *
- * @return the value of field 'ColourText'.
- */
- public boolean getColourText(
- ) {
- return this._colourText;
- }
-
- /**
- * Returns the value of field 'consThreshold'.
- *
- * @return the value of field 'ConsThreshold'.
- */
- public int getConsThreshold(
- ) {
- return this._consThreshold;
- }
-
- /**
- * Returns the value of field 'displayBoxes'.
- *
- * @return the value of field 'DisplayBoxes'.
- */
- public boolean getDisplayBoxes(
- ) {
- return this._displayBoxes;
- }
-
- /**
- * Returns the value of field 'displayText'.
- *
- * @return the value of field 'DisplayText'.
- */
- public boolean getDisplayText(
- ) {
- return this._displayText;
- }
-
- /**
- * Returns the value of field 'end'.
- *
- * @return the value of field 'End'.
- */
- public int getEnd(
- ) {
- return this._end;
- }
-
- /**
- * Returns the value of field 'id'. The field 'id' has the
- * following description: Optional sequence group ID (only
- * needs to be unique for this
- * alignment)
- *
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId(
- ) {
- return this._id;
- }
-
- /**
- * Returns the value of field 'ignoreGapsinConsensus'.
- *
- * @return the value of field 'IgnoreGapsinConsensus'.
- */
- public boolean getIgnoreGapsinConsensus(
- ) {
- return this._ignoreGapsinConsensus;
- }
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName(
- ) {
- return this._name;
- }
-
- /**
- * Returns the value of field 'normaliseSequenceLogo'.
- *
- * @return the value of field 'NormaliseSequenceLogo'.
- */
- public boolean getNormaliseSequenceLogo(
- ) {
- return this._normaliseSequenceLogo;
- }
-
- /**
- * Returns the value of field 'outlineColour'.
- *
- * @return the value of field 'OutlineColour'.
- */
- public int getOutlineColour(
- ) {
- return this._outlineColour;
- }
-
- /**
- * Returns the value of field 'pidThreshold'.
- *
- * @return the value of field 'PidThreshold'.
- */
- public int getPidThreshold(
- ) {
- return this._pidThreshold;
- }
-
- /**
- * Method getSeq.
- *
- * @param index
- * @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 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.String) _seqList.get(index);
- }
-
- /**
- * Method getSeq.Returns the contents of the collection in an
- * Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public java.lang.String[] getSeq(
- ) {
- java.lang.String[] array = new java.lang.String[0];
- return (java.lang.String[]) this._seqList.toArray(array);
- }
-
- /**
- * Method getSeqCount.
- *
- * @return the size of this collection
- */
- public int getSeqCount(
- ) {
- return this._seqList.size();
- }
-
- /**
- * Returns the value of field 'showConsensusHistogram'.
- *
- * @return the value of field 'ShowConsensusHistogram'.
- */
- public boolean getShowConsensusHistogram(
- ) {
- return this._showConsensusHistogram;
- }
-
- /**
- * Returns the value of field 'showSequenceLogo'.
- *
- * @return the value of field 'ShowSequenceLogo'.
- */
- public boolean getShowSequenceLogo(
- ) {
- return this._showSequenceLogo;
- }
-
- /**
- * Returns the value of field 'showUnconserved'.
- *
- * @return the value of field 'ShowUnconserved'.
- */
- public boolean getShowUnconserved(
- ) {
- return this._showUnconserved;
- }
-
- /**
- * Returns the value of field 'start'.
- *
- * @return the value of field 'Start'.
- */
- public int getStart(
- ) {
- return this._start;
- }
-
- /**
- * Returns the value of field 'textCol1'.
- *
- * @return the value of field 'TextCol1'.
- */
- public int getTextCol1(
- ) {
- return this._textCol1;
- }
-
- /**
- * Returns the value of field 'textCol2'.
- *
- * @return the value of field 'TextCol2'.
- */
- public int getTextCol2(
- ) {
- return this._textCol2;
- }
-
- /**
- * Returns the value of field 'textColThreshold'.
- *
- * @return the value of field 'TextColThreshold'.
- */
- public int getTextColThreshold(
- ) {
- return this._textColThreshold;
- }
-
- /**
- * Method hasColourText.
- *
- * @return true if at least one ColourText has been added
- */
- public boolean hasColourText(
- ) {
- return this._has_colourText;
- }
-
- /**
- * Method hasConsThreshold.
- *
- * @return true if at least one ConsThreshold has been added
- */
- public boolean hasConsThreshold(
- ) {
- return this._has_consThreshold;
- }
-
- /**
- * Method hasDisplayBoxes.
- *
- * @return true if at least one DisplayBoxes has been added
- */
- public boolean hasDisplayBoxes(
- ) {
- return this._has_displayBoxes;
- }
-
- /**
- * Method hasDisplayText.
- *
- * @return true if at least one DisplayText has been added
- */
- public boolean hasDisplayText(
- ) {
- return this._has_displayText;
- }
-
- /**
- * Method hasEnd.
- *
- * @return true if at least one End has been added
- */
- public boolean hasEnd(
- ) {
- return this._has_end;
- }
-
- /**
- * Method hasIgnoreGapsinConsensus.
- *
- * @return true if at least one IgnoreGapsinConsensus has been
- * added
- */
- public boolean hasIgnoreGapsinConsensus(
- ) {
- return this._has_ignoreGapsinConsensus;
- }
-
- /**
- * Method hasNormaliseSequenceLogo.
- *
- * @return true if at least one NormaliseSequenceLogo has been
- * added
- */
- public boolean hasNormaliseSequenceLogo(
- ) {
- return this._has_normaliseSequenceLogo;
- }
-
- /**
- * Method hasOutlineColour.
- *
- * @return true if at least one OutlineColour has been added
- */
- public boolean hasOutlineColour(
- ) {
- return this._has_outlineColour;
- }
-
- /**
- * Method hasPidThreshold.
- *
- * @return true if at least one PidThreshold has been added
- */
- public boolean hasPidThreshold(
- ) {
- return this._has_pidThreshold;
- }
-
- /**
- * Method hasShowConsensusHistogram.
- *
- * @return true if at least one ShowConsensusHistogram has been
- * added
- */
- public boolean hasShowConsensusHistogram(
- ) {
- return this._has_showConsensusHistogram;
- }
-
- /**
- * Method hasShowSequenceLogo.
- *
- * @return true if at least one ShowSequenceLogo has been added
- */
- public boolean hasShowSequenceLogo(
- ) {
- return this._has_showSequenceLogo;
- }
-
- /**
- * Method hasShowUnconserved.
- *
- * @return true if at least one ShowUnconserved has been added
- */
- public boolean hasShowUnconserved(
- ) {
- return this._has_showUnconserved;
- }
-
- /**
- * Method hasStart.
- *
- * @return true if at least one Start has been added
- */
- public boolean hasStart(
- ) {
- return this._has_start;
- }
-
- /**
- * Method hasTextCol1.
- *
- * @return true if at least one TextCol1 has been added
- */
- public boolean hasTextCol1(
- ) {
- return this._has_textCol1;
- }
-
- /**
- * Method hasTextCol2.
- *
- * @return true if at least one TextCol2 has been added
- */
- public boolean hasTextCol2(
- ) {
- return this._has_textCol2;
- }
-
- /**
- * Method hasTextColThreshold.
- *
- * @return true if at least one TextColThreshold has been added
- */
- public boolean hasTextColThreshold(
- ) {
- return this._has_textColThreshold;
- }
-
- /**
- * Returns the value of field 'colourText'.
- *
- * @return the value of field 'ColourText'.
- */
- public boolean isColourText(
- ) {
- return this._colourText;
- }
-
- /**
- * 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;
- }
-
- /**
- * Returns the value of field 'ignoreGapsinConsensus'.
- *
- * @return the value of field 'IgnoreGapsinConsensus'.
- */
- public boolean isIgnoreGapsinConsensus(
- ) {
- return this._ignoreGapsinConsensus;
- }
-
- /**
- * Returns the value of field 'normaliseSequenceLogo'.
- *
- * @return the value of field 'NormaliseSequenceLogo'.
- */
- public boolean isNormaliseSequenceLogo(
- ) {
- return this._normaliseSequenceLogo;
- }
-
- /**
- * Returns the value of field 'showConsensusHistogram'.
- *
- * @return the value of field 'ShowConsensusHistogram'.
- */
- public boolean isShowConsensusHistogram(
- ) {
- return this._showConsensusHistogram;
- }
-
- /**
- * Returns the value of field 'showSequenceLogo'.
- *
- * @return the value of field 'ShowSequenceLogo'.
- */
- public boolean isShowSequenceLogo(
- ) {
- return this._showSequenceLogo;
- }
-
- /**
- * Returns the value of field 'showUnconserved'.
- *
- * @return the value of field 'ShowUnconserved'.
- */
- public boolean isShowUnconserved(
- ) {
- return this._showUnconserved;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllSeq(
- ) {
- this._seqList.clear();
- }
-
- /**
- * Method removeSeq.
- *
- * @param vSeq
- * @return true if the object was removed from the collection.
- */
- public boolean removeSeq(
- final java.lang.String vSeq) {
- boolean removed = _seqList.remove(vSeq);
- return removed;
- }
-
- /**
- * Method removeSeqAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public java.lang.String removeSeqAt(
- final int index) {
- java.lang.Object obj = this._seqList.remove(index);
- return (java.lang.String) obj;
- }
-
- /**
- * Sets the value of field 'colour'.
- *
- * @param colour the value of field 'colour'.
- */
- public void setColour(
- final java.lang.String colour) {
- this._colour = colour;
- }
-
- /**
- * Sets the value of field 'colourText'.
- *
- * @param colourText the value of field 'colourText'.
- */
- public void setColourText(
- final boolean colourText) {
- this._colourText = colourText;
- this._has_colourText = true;
- }
-
- /**
- * Sets the value of field 'consThreshold'.
- *
- * @param consThreshold the value of field 'consThreshold'.
- */
- public void setConsThreshold(
- final int consThreshold) {
- this._consThreshold = consThreshold;
- this._has_consThreshold = true;
- }
-
- /**
- * Sets the value of field 'displayBoxes'.
- *
- * @param displayBoxes the value of field 'displayBoxes'.
- */
- public void setDisplayBoxes(
- final boolean displayBoxes) {
- this._displayBoxes = displayBoxes;
- this._has_displayBoxes = true;
- }
-
- /**
- * Sets the value of field 'displayText'.
- *
- * @param displayText the value of field 'displayText'.
- */
- public void setDisplayText(
- final boolean displayText) {
- this._displayText = displayText;
- this._has_displayText = true;
- }
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end the value of field 'end'.
- */
- public void setEnd(
- final int end) {
- this._end = end;
- this._has_end = true;
- }
-
- /**
- * Sets the value of field 'id'. The field 'id' has the
- * following description: Optional sequence group ID (only
- * needs to be unique for this
- * alignment)
- *
- *
- * @param id the value of field 'id'.
- */
- public void setId(
- final java.lang.String id) {
- this._id = id;
- }
-
- /**
- * Sets the value of field 'ignoreGapsinConsensus'.
- *
- * @param ignoreGapsinConsensus the value of field
- * 'ignoreGapsinConsensus'.
- */
- public void setIgnoreGapsinConsensus(
- final boolean ignoreGapsinConsensus) {
- this._ignoreGapsinConsensus = ignoreGapsinConsensus;
- this._has_ignoreGapsinConsensus = true;
- }
-
- /**
- * Sets the value of field 'name'.
- *
- * @param name the value of field 'name'.
- */
- public void setName(
- final java.lang.String name) {
- this._name = name;
- }
-
- /**
- * Sets the value of field 'normaliseSequenceLogo'.
- *
- * @param normaliseSequenceLogo the value of field
- * 'normaliseSequenceLogo'.
- */
- public void setNormaliseSequenceLogo(
- final boolean normaliseSequenceLogo) {
- this._normaliseSequenceLogo = normaliseSequenceLogo;
- this._has_normaliseSequenceLogo = true;
- }
-
- /**
- * Sets the value of field 'outlineColour'.
- *
- * @param outlineColour the value of field 'outlineColour'.
- */
- public void setOutlineColour(
- final int outlineColour) {
- this._outlineColour = outlineColour;
- this._has_outlineColour = true;
- }
-
- /**
- * Sets the value of field 'pidThreshold'.
- *
- * @param pidThreshold the value of field 'pidThreshold'.
- */
- public void setPidThreshold(
- final int pidThreshold) {
- this._pidThreshold = pidThreshold;
- this._has_pidThreshold = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vSeq
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setSeq(
- final int index,
- final java.lang.String 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) + "]");
- }
-
- this._seqList.set(index, vSeq);
- }
-
- /**
- *
- *
- * @param vSeqArray
- */
- public void setSeq(
- final java.lang.String[] vSeqArray) {
- //-- copy array
- _seqList.clear();
-
- for (int i = 0; i < vSeqArray.length; i++) {
- this._seqList.add(vSeqArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'showConsensusHistogram'.
- *
- * @param showConsensusHistogram the value of field
- * 'showConsensusHistogram'.
- */
- public void setShowConsensusHistogram(
- final boolean showConsensusHistogram) {
- this._showConsensusHistogram = showConsensusHistogram;
- this._has_showConsensusHistogram = true;
- }
-
- /**
- * Sets the value of field 'showSequenceLogo'.
- *
- * @param showSequenceLogo the value of field 'showSequenceLogo'
- */
- public void setShowSequenceLogo(
- final boolean showSequenceLogo) {
- this._showSequenceLogo = showSequenceLogo;
- this._has_showSequenceLogo = true;
- }
-
- /**
- * Sets the value of field 'showUnconserved'.
- *
- * @param showUnconserved the value of field 'showUnconserved'.
- */
- public void setShowUnconserved(
- final boolean showUnconserved) {
- this._showUnconserved = showUnconserved;
- this._has_showUnconserved = true;
- }
-
- /**
- * Sets the value of field 'start'.
- *
- * @param start the value of field 'start'.
- */
- public void setStart(
- final int start) {
- this._start = start;
- this._has_start = true;
- }
-
- /**
- * Sets the value of field 'textCol1'.
- *
- * @param textCol1 the value of field 'textCol1'.
- */
- public void setTextCol1(
- final int textCol1) {
- this._textCol1 = textCol1;
- this._has_textCol1 = true;
- }
-
- /**
- * Sets the value of field 'textCol2'.
- *
- * @param textCol2 the value of field 'textCol2'.
- */
- public void setTextCol2(
- final int textCol2) {
- this._textCol2 = textCol2;
- this._has_textCol2 = true;
- }
-
- /**
- * Sets the value of field 'textColThreshold'.
- *
- * @param textColThreshold the value of field 'textColThreshold'
- */
- public void setTextColThreshold(
- final int textColThreshold) {
- this._textColThreshold = textColThreshold;
- this._has_textColThreshold = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
- }
+public class JGroup implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _start.
+ */
+ private int _start;
+
+ /**
+ * keeps track of state for field: _start
+ */
+ private boolean _has_start;
+
+ /**
+ * Field _end.
+ */
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _colour.
+ */
+ private java.lang.String _colour;
+
+ /**
+ * Field _consThreshold.
+ */
+ private int _consThreshold;
+
+ /**
+ * keeps track of state for field: _consThreshold
+ */
+ private boolean _has_consThreshold;
+
+ /**
+ * Field _pidThreshold.
+ */
+ private int _pidThreshold;
+
+ /**
+ * keeps track of state for field: _pidThreshold
+ */
+ private boolean _has_pidThreshold;
+
+ /**
+ * Field _outlineColour.
+ */
+ private int _outlineColour;
+
+ /**
+ * keeps track of state for field: _outlineColour
+ */
+ private boolean _has_outlineColour;
+
+ /**
+ * Field _displayBoxes.
+ */
+ private boolean _displayBoxes;
+
+ /**
+ * keeps track of state for field: _displayBoxes
+ */
+ private boolean _has_displayBoxes;
+
+ /**
+ * Field _displayText.
+ */
+ private boolean _displayText;
+
+ /**
+ * keeps track of state for field: _displayText
+ */
+ private boolean _has_displayText;
+
+ /**
+ * Field _colourText.
+ */
+ private boolean _colourText;
+
+ /**
+ * keeps track of state for field: _colourText
+ */
+ private boolean _has_colourText;
+
+ /**
+ * Field _textCol1.
+ */
+ private int _textCol1;
+
+ /**
+ * keeps track of state for field: _textCol1
+ */
+ private boolean _has_textCol1;
+
+ /**
+ * Field _textCol2.
+ */
+ private int _textCol2;
+
+ /**
+ * keeps track of state for field: _textCol2
+ */
+ private boolean _has_textCol2;
+
+ /**
+ * Field _textColThreshold.
+ */
+ private int _textColThreshold;
+
+ /**
+ * keeps track of state for field: _textColThreshold
+ */
+ private boolean _has_textColThreshold;
+
+ /**
+ * Field _showUnconserved.
+ */
+ private boolean _showUnconserved;
+
+ /**
+ * keeps track of state for field: _showUnconserved
+ */
+ private boolean _has_showUnconserved;
+
+ /**
+ * Field _ignoreGapsinConsensus.
+ */
+ private boolean _ignoreGapsinConsensus = true;
+
+ /**
+ * keeps track of state for field: _ignoreGapsinConsensus
+ */
+ private boolean _has_ignoreGapsinConsensus;
+
+ /**
+ * Field _showConsensusHistogram.
+ */
+ private boolean _showConsensusHistogram = true;
+
+ /**
+ * keeps track of state for field: _showConsensusHistogram
+ */
+ private boolean _has_showConsensusHistogram;
+
+ /**
+ * Field _showSequenceLogo.
+ */
+ private boolean _showSequenceLogo = false;
+
+ /**
+ * keeps track of state for field: _showSequenceLogo
+ */
+ private boolean _has_showSequenceLogo;
+
+ /**
+ * Field _normaliseSequenceLogo.
+ */
+ private boolean _normaliseSequenceLogo = false;
+
+ /**
+ * keeps track of state for field: _normaliseSequenceLogo
+ */
+ private boolean _has_normaliseSequenceLogo;
+
+ /**
+ * Optional sequence group ID (only needs to be unique for this alignment)
+ *
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _seqList.
+ */
+ private java.util.Vector _seqList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public JGroup()
+ {
+ super();
+ this._seqList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vSeq
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSeq(final java.lang.String vSeq)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._seqList.addElement(vSeq);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSeq
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSeq(final int index, final java.lang.String vSeq)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._seqList.add(index, vSeq);
+ }
+
+ /**
+ */
+ public void deleteColourText()
+ {
+ this._has_colourText = false;
+ }
+
+ /**
+ */
+ public void deleteConsThreshold()
+ {
+ this._has_consThreshold = false;
+ }
+
+ /**
+ */
+ public void deleteDisplayBoxes()
+ {
+ this._has_displayBoxes = false;
+ }
+
+ /**
+ */
+ public void deleteDisplayText()
+ {
+ this._has_displayText = false;
+ }
+
+ /**
+ */
+ public void deleteEnd()
+ {
+ this._has_end = false;
+ }
+
+ /**
+ */
+ public void deleteIgnoreGapsinConsensus()
+ {
+ this._has_ignoreGapsinConsensus = false;
+ }
+
+ /**
+ */
+ public void deleteNormaliseSequenceLogo()
+ {
+ this._has_normaliseSequenceLogo = false;
+ }
+
+ /**
+ */
+ public void deleteOutlineColour()
+ {
+ this._has_outlineColour = false;
+ }
+
+ /**
+ */
+ public void deletePidThreshold()
+ {
+ this._has_pidThreshold = false;
+ }
+
+ /**
+ */
+ public void deleteShowConsensusHistogram()
+ {
+ this._has_showConsensusHistogram = false;
+ }
+
+ /**
+ */
+ public void deleteShowSequenceLogo()
+ {
+ this._has_showSequenceLogo = false;
+ }
+
+ /**
+ */
+ public void deleteShowUnconserved()
+ {
+ this._has_showUnconserved = false;
+ }
+
+ /**
+ */
+ public void deleteStart()
+ {
+ this._has_start = false;
+ }
+
+ /**
+ */
+ public void deleteTextCol1()
+ {
+ this._has_textCol1 = false;
+ }
+
+ /**
+ */
+ public void deleteTextCol2()
+ {
+ this._has_textCol2 = false;
+ }
+
+ /**
+ */
+ public void deleteTextColThreshold()
+ {
+ this._has_textColThreshold = false;
+ }
+
+ /**
+ * Method enumerateSeq.
+ *
+ * @return an Enumeration over all java.lang.String elements
+ */
+ public java.util.Enumeration enumerateSeq()
+ {
+ return this._seqList.elements();
+ }
+
+ /**
+ * Returns the value of field 'colour'.
+ *
+ * @return the value of field 'Colour'.
+ */
+ public java.lang.String getColour()
+ {
+ return this._colour;
+ }
+
+ /**
+ * Returns the value of field 'colourText'.
+ *
+ * @return the value of field 'ColourText'.
+ */
+ public boolean getColourText()
+ {
+ return this._colourText;
+ }
+
+ /**
+ * Returns the value of field 'consThreshold'.
+ *
+ * @return the value of field 'ConsThreshold'.
+ */
+ public int getConsThreshold()
+ {
+ return this._consThreshold;
+ }
+
+ /**
+ * Returns the value of field 'displayBoxes'.
+ *
+ * @return the value of field 'DisplayBoxes'.
+ */
+ public boolean getDisplayBoxes()
+ {
+ return this._displayBoxes;
+ }
+
+ /**
+ * Returns the value of field 'displayText'.
+ *
+ * @return the value of field 'DisplayText'.
+ */
+ public boolean getDisplayText()
+ {
+ return this._displayText;
+ }
+
+ /**
+ * Returns the value of field 'end'.
+ *
+ * @return the value of field 'End'.
+ */
+ public int getEnd()
+ {
+ return this._end;
+ }
+
+ /**
+ * Returns the value of field 'id'. The field 'id' has the following
+ * description: Optional sequence group ID (only needs to be unique for this
+ * alignment)
+ *
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId()
+ {
+ return this._id;
+ }
+
+ /**
+ * Returns the value of field 'ignoreGapsinConsensus'.
+ *
+ * @return the value of field 'IgnoreGapsinConsensus'.
+ */
+ public boolean getIgnoreGapsinConsensus()
+ {
+ return this._ignoreGapsinConsensus;
+ }
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName()
+ {
+ return this._name;
+ }
+
+ /**
+ * Returns the value of field 'normaliseSequenceLogo'.
+ *
+ * @return the value of field 'NormaliseSequenceLogo'.
+ */
+ public boolean getNormaliseSequenceLogo()
+ {
+ return this._normaliseSequenceLogo;
+ }
+
+ /**
+ * Returns the value of field 'outlineColour'.
+ *
+ * @return the value of field 'OutlineColour'.
+ */
+ public int getOutlineColour()
+ {
+ return this._outlineColour;
+ }
+
+ /**
+ * Returns the value of field 'pidThreshold'.
+ *
+ * @return the value of field 'PidThreshold'.
+ */
+ public int getPidThreshold()
+ {
+ return this._pidThreshold;
+ }
+
+ /**
+ * Method getSeq.
+ *
+ * @param index
+ * @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 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.String) _seqList.get(index);
+ }
+
+ /**
+ * Method getSeq.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public java.lang.String[] getSeq()
+ {
+ java.lang.String[] array = new java.lang.String[0];
+ return (java.lang.String[]) this._seqList.toArray(array);
+ }
+
+ /**
+ * Method getSeqCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSeqCount()
+ {
+ return this._seqList.size();
+ }
+
+ /**
+ * Returns the value of field 'showConsensusHistogram'.
+ *
+ * @return the value of field 'ShowConsensusHistogram'.
+ */
+ public boolean getShowConsensusHistogram()
+ {
+ return this._showConsensusHistogram;
+ }
+
+ /**
+ * Returns the value of field 'showSequenceLogo'.
+ *
+ * @return the value of field 'ShowSequenceLogo'.
+ */
+ public boolean getShowSequenceLogo()
+ {
+ return this._showSequenceLogo;
+ }
+
+ /**
+ * Returns the value of field 'showUnconserved'.
+ *
+ * @return the value of field 'ShowUnconserved'.
+ */
+ public boolean getShowUnconserved()
+ {
+ return this._showUnconserved;
+ }
+
+ /**
+ * Returns the value of field 'start'.
+ *
+ * @return the value of field 'Start'.
+ */
+ public int getStart()
+ {
+ return this._start;
+ }
+
+ /**
+ * Returns the value of field 'textCol1'.
+ *
+ * @return the value of field 'TextCol1'.
+ */
+ public int getTextCol1()
+ {
+ return this._textCol1;
+ }
+
+ /**
+ * Returns the value of field 'textCol2'.
+ *
+ * @return the value of field 'TextCol2'.
+ */
+ public int getTextCol2()
+ {
+ return this._textCol2;
+ }
+
+ /**
+ * Returns the value of field 'textColThreshold'.
+ *
+ * @return the value of field 'TextColThreshold'.
+ */
+ public int getTextColThreshold()
+ {
+ return this._textColThreshold;
+ }
+
+ /**
+ * Method hasColourText.
+ *
+ * @return true if at least one ColourText has been added
+ */
+ public boolean hasColourText()
+ {
+ return this._has_colourText;
+ }
+
+ /**
+ * Method hasConsThreshold.
+ *
+ * @return true if at least one ConsThreshold has been added
+ */
+ public boolean hasConsThreshold()
+ {
+ return this._has_consThreshold;
+ }
+
+ /**
+ * Method hasDisplayBoxes.
+ *
+ * @return true if at least one DisplayBoxes has been added
+ */
+ public boolean hasDisplayBoxes()
+ {
+ return this._has_displayBoxes;
+ }
+
+ /**
+ * Method hasDisplayText.
+ *
+ * @return true if at least one DisplayText has been added
+ */
+ public boolean hasDisplayText()
+ {
+ return this._has_displayText;
+ }
+
+ /**
+ * Method hasEnd.
+ *
+ * @return true if at least one End has been added
+ */
+ public boolean hasEnd()
+ {
+ return this._has_end;
+ }
+
+ /**
+ * Method hasIgnoreGapsinConsensus.
+ *
+ * @return true if at least one IgnoreGapsinConsensus has been added
+ */
+ public boolean hasIgnoreGapsinConsensus()
+ {
+ return this._has_ignoreGapsinConsensus;
+ }
+
+ /**
+ * Method hasNormaliseSequenceLogo.
+ *
+ * @return true if at least one NormaliseSequenceLogo has been added
+ */
+ public boolean hasNormaliseSequenceLogo()
+ {
+ return this._has_normaliseSequenceLogo;
+ }
+
+ /**
+ * Method hasOutlineColour.
+ *
+ * @return true if at least one OutlineColour has been added
+ */
+ public boolean hasOutlineColour()
+ {
+ return this._has_outlineColour;
+ }
+
+ /**
+ * Method hasPidThreshold.
+ *
+ * @return true if at least one PidThreshold has been added
+ */
+ public boolean hasPidThreshold()
+ {
+ return this._has_pidThreshold;
+ }
+
+ /**
+ * Method hasShowConsensusHistogram.
+ *
+ * @return true if at least one ShowConsensusHistogram has been added
+ */
+ public boolean hasShowConsensusHistogram()
+ {
+ return this._has_showConsensusHistogram;
+ }
+
+ /**
+ * Method hasShowSequenceLogo.
+ *
+ * @return true if at least one ShowSequenceLogo has been added
+ */
+ public boolean hasShowSequenceLogo()
+ {
+ return this._has_showSequenceLogo;
+ }
+
+ /**
+ * Method hasShowUnconserved.
+ *
+ * @return true if at least one ShowUnconserved has been added
+ */
+ public boolean hasShowUnconserved()
+ {
+ return this._has_showUnconserved;
+ }
+
+ /**
+ * Method hasStart.
+ *
+ * @return true if at least one Start has been added
+ */
+ public boolean hasStart()
+ {
+ return this._has_start;
+ }
+
+ /**
+ * Method hasTextCol1.
+ *
+ * @return true if at least one TextCol1 has been added
+ */
+ public boolean hasTextCol1()
+ {
+ return this._has_textCol1;
+ }
+
+ /**
+ * Method hasTextCol2.
+ *
+ * @return true if at least one TextCol2 has been added
+ */
+ public boolean hasTextCol2()
+ {
+ return this._has_textCol2;
+ }
+
+ /**
+ * Method hasTextColThreshold.
+ *
+ * @return true if at least one TextColThreshold has been added
+ */
+ public boolean hasTextColThreshold()
+ {
+ return this._has_textColThreshold;
+ }
+
+ /**
+ * Returns the value of field 'colourText'.
+ *
+ * @return the value of field 'ColourText'.
+ */
+ public boolean isColourText()
+ {
+ return this._colourText;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Returns the value of field 'ignoreGapsinConsensus'.
+ *
+ * @return the value of field 'IgnoreGapsinConsensus'.
+ */
+ public boolean isIgnoreGapsinConsensus()
+ {
+ return this._ignoreGapsinConsensus;
+ }
+
+ /**
+ * Returns the value of field 'normaliseSequenceLogo'.
+ *
+ * @return the value of field 'NormaliseSequenceLogo'.
+ */
+ public boolean isNormaliseSequenceLogo()
+ {
+ return this._normaliseSequenceLogo;
+ }
+
+ /**
+ * Returns the value of field 'showConsensusHistogram'.
+ *
+ * @return the value of field 'ShowConsensusHistogram'.
+ */
+ public boolean isShowConsensusHistogram()
+ {
+ return this._showConsensusHistogram;
+ }
+
+ /**
+ * Returns the value of field 'showSequenceLogo'.
+ *
+ * @return the value of field 'ShowSequenceLogo'.
+ */
+ public boolean isShowSequenceLogo()
+ {
+ return this._showSequenceLogo;
+ }
+
+ /**
+ * Returns the value of field 'showUnconserved'.
+ *
+ * @return the value of field 'ShowUnconserved'.
+ */
+ public boolean isShowUnconserved()
+ {
+ return this._showUnconserved;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ */
+ public void removeAllSeq()
+ {
+ this._seqList.clear();
+ }
+
+ /**
+ * Method removeSeq.
+ *
+ * @param vSeq
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSeq(final java.lang.String vSeq)
+ {
+ boolean removed = _seqList.remove(vSeq);
+ return removed;
+ }
+
+ /**
+ * Method removeSeqAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public java.lang.String removeSeqAt(final int index)
+ {
+ java.lang.Object obj = this._seqList.remove(index);
+ return (java.lang.String) obj;
+ }
+
+ /**
+ * Sets the value of field 'colour'.
+ *
+ * @param colour
+ * the value of field 'colour'.
+ */
+ public void setColour(final java.lang.String colour)
+ {
+ this._colour = colour;
+ }
+
+ /**
+ * Sets the value of field 'colourText'.
+ *
+ * @param colourText
+ * the value of field 'colourText'.
+ */
+ public void setColourText(final boolean colourText)
+ {
+ this._colourText = colourText;
+ this._has_colourText = true;
+ }
+
+ /**
+ * Sets the value of field 'consThreshold'.
+ *
+ * @param consThreshold
+ * the value of field 'consThreshold'.
+ */
+ public void setConsThreshold(final int consThreshold)
+ {
+ this._consThreshold = consThreshold;
+ this._has_consThreshold = true;
+ }
+
+ /**
+ * Sets the value of field 'displayBoxes'.
+ *
+ * @param displayBoxes
+ * the value of field 'displayBoxes'.
+ */
+ public void setDisplayBoxes(final boolean displayBoxes)
+ {
+ this._displayBoxes = displayBoxes;
+ this._has_displayBoxes = true;
+ }
+
+ /**
+ * Sets the value of field 'displayText'.
+ *
+ * @param displayText
+ * the value of field 'displayText'.
+ */
+ public void setDisplayText(final boolean displayText)
+ {
+ this._displayText = displayText;
+ this._has_displayText = true;
+ }
+
+ /**
+ * Sets the value of field 'end'.
+ *
+ * @param end
+ * the value of field 'end'.
+ */
+ public void setEnd(final int end)
+ {
+ this._end = end;
+ this._has_end = true;
+ }
+
+ /**
+ * Sets the value of field 'id'. The field 'id' has the following description:
+ * Optional sequence group ID (only needs to be unique for this alignment)
+ *
+ *
+ * @param id
+ * the value of field 'id'.
+ */
+ public void setId(final java.lang.String id)
+ {
+ this._id = id;
+ }
+
+ /**
+ * Sets the value of field 'ignoreGapsinConsensus'.
+ *
+ * @param ignoreGapsinConsensus
+ * the value of field 'ignoreGapsinConsensus'.
+ */
+ public void setIgnoreGapsinConsensus(final boolean ignoreGapsinConsensus)
+ {
+ this._ignoreGapsinConsensus = ignoreGapsinConsensus;
+ this._has_ignoreGapsinConsensus = true;
+ }
+
+ /**
+ * Sets the value of field 'name'.
+ *
+ * @param name
+ * the value of field 'name'.
+ */
+ public void setName(final java.lang.String name)
+ {
+ this._name = name;
+ }
+
+ /**
+ * Sets the value of field 'normaliseSequenceLogo'.
+ *
+ * @param normaliseSequenceLogo
+ * the value of field 'normaliseSequenceLogo'.
+ */
+ public void setNormaliseSequenceLogo(final boolean normaliseSequenceLogo)
+ {
+ this._normaliseSequenceLogo = normaliseSequenceLogo;
+ this._has_normaliseSequenceLogo = true;
+ }
+
+ /**
+ * Sets the value of field 'outlineColour'.
+ *
+ * @param outlineColour
+ * the value of field 'outlineColour'.
+ */
+ public void setOutlineColour(final int outlineColour)
+ {
+ this._outlineColour = outlineColour;
+ this._has_outlineColour = true;
+ }
+
+ /**
+ * Sets the value of field 'pidThreshold'.
+ *
+ * @param pidThreshold
+ * the value of field 'pidThreshold'.
+ */
+ public void setPidThreshold(final int pidThreshold)
+ {
+ this._pidThreshold = pidThreshold;
+ this._has_pidThreshold = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSeq
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setSeq(final int index, final java.lang.String 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) + "]");
+ }
+
+ this._seqList.set(index, vSeq);
+ }
+
+ /**
+ *
+ *
+ * @param vSeqArray
+ */
+ public void setSeq(final java.lang.String[] vSeqArray)
+ {
+ // -- copy array
+ _seqList.clear();
+
+ for (int i = 0; i < vSeqArray.length; i++)
+ {
+ this._seqList.add(vSeqArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'showConsensusHistogram'.
+ *
+ * @param showConsensusHistogram
+ * the value of field 'showConsensusHistogram'.
+ */
+ public void setShowConsensusHistogram(final boolean showConsensusHistogram)
+ {
+ this._showConsensusHistogram = showConsensusHistogram;
+ this._has_showConsensusHistogram = true;
+ }
+
+ /**
+ * Sets the value of field 'showSequenceLogo'.
+ *
+ * @param showSequenceLogo
+ * the value of field 'showSequenceLogo'
+ */
+ public void setShowSequenceLogo(final boolean showSequenceLogo)
+ {
+ this._showSequenceLogo = showSequenceLogo;
+ this._has_showSequenceLogo = true;
+ }
+
+ /**
+ * Sets the value of field 'showUnconserved'.
+ *
+ * @param showUnconserved
+ * the value of field 'showUnconserved'.
+ */
+ public void setShowUnconserved(final boolean showUnconserved)
+ {
+ this._showUnconserved = showUnconserved;
+ this._has_showUnconserved = true;
+ }
+
+ /**
+ * Sets the value of field 'start'.
+ *
+ * @param start
+ * the value of field 'start'.
+ */
+ public void setStart(final int start)
+ {
+ this._start = start;
+ this._has_start = true;
+ }
+
+ /**
+ * Sets the value of field 'textCol1'.
+ *
+ * @param textCol1
+ * the value of field 'textCol1'.
+ */
+ public void setTextCol1(final int textCol1)
+ {
+ this._textCol1 = textCol1;
+ this._has_textCol1 = true;
+ }
+
+ /**
+ * Sets the value of field 'textCol2'.
+ *
+ * @param textCol2
+ * the value of field 'textCol2'.
+ */
+ public void setTextCol2(final int textCol2)
+ {
+ this._textCol2 = textCol2;
+ this._has_textCol2 = true;
+ }
+
+ /**
+ * Sets the value of field 'textColThreshold'.
+ *
+ * @param textColThreshold
+ * the value of field 'textColThreshold'
+ */
+ public void setTextColThreshold(final int textColThreshold)
+ {
+ this._textColThreshold = textColThreshold;
+ this._has_textColThreshold = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class JSeq implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _colour.
- */
- private int _colour;
-
- /**
- * keeps track of state for field: _colour
- */
- private boolean _has_colour;
-
- /**
- * Field _start.
- */
- private int _start;
-
- /**
- * keeps track of state for field: _start
- */
- private boolean _has_start;
-
- /**
- * Field _end.
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
- /**
- * Field _id.
- */
- private java.lang.String _id;
-
- /**
- * Field _hidden.
- */
- private boolean _hidden;
-
- /**
- * keeps track of state for field: _hidden
- */
- private boolean _has_hidden;
-
- /**
- * Field _featuresList.
- */
- private java.util.Vector _featuresList;
-
- /**
- * Field _pdbidsList.
- */
- private java.util.Vector _pdbidsList;
-
- /**
- * Field _hiddenSequencesList.
- */
- private java.util.Vector _hiddenSequencesList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public JSeq() {
- super();
- this._featuresList = new java.util.Vector();
- this._pdbidsList = new java.util.Vector();
- this._hiddenSequencesList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vFeatures
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addFeatures(
- final jalview.schemabinding.version2.Features vFeatures)
- throws java.lang.IndexOutOfBoundsException {
- this._featuresList.addElement(vFeatures);
- }
-
- /**
- *
- *
- * @param index
- * @param vFeatures
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addFeatures(
- final int index,
- final jalview.schemabinding.version2.Features vFeatures)
- throws java.lang.IndexOutOfBoundsException {
- this._featuresList.add(index, vFeatures);
- }
-
- /**
- *
- *
- * @param vHiddenSequences
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addHiddenSequences(
- final int vHiddenSequences)
- throws java.lang.IndexOutOfBoundsException {
- this._hiddenSequencesList.addElement(new java.lang.Integer(vHiddenSequences));
- }
-
- /**
- *
- *
- * @param index
- * @param vHiddenSequences
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addHiddenSequences(
- final int index,
- final int vHiddenSequences)
- throws java.lang.IndexOutOfBoundsException {
- this._hiddenSequencesList.add(index, new java.lang.Integer(vHiddenSequences));
- }
-
- /**
- *
- *
- * @param vPdbids
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addPdbids(
- final jalview.schemabinding.version2.Pdbids vPdbids)
- throws java.lang.IndexOutOfBoundsException {
- this._pdbidsList.addElement(vPdbids);
- }
-
- /**
- *
- *
- * @param index
- * @param vPdbids
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addPdbids(
- final int index,
- final jalview.schemabinding.version2.Pdbids vPdbids)
- throws java.lang.IndexOutOfBoundsException {
- this._pdbidsList.add(index, vPdbids);
- }
-
- /**
- */
- public void deleteColour(
- ) {
- this._has_colour= false;
- }
-
- /**
- */
- public void deleteEnd(
- ) {
- this._has_end= false;
- }
-
- /**
- */
- public void deleteHidden(
- ) {
- this._has_hidden= false;
- }
-
- /**
- */
- public void deleteStart(
- ) {
- this._has_start= false;
- }
-
- /**
- * Method enumerateFeatures.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.Features elements
- */
- public java.util.Enumeration enumerateFeatures(
- ) {
- return this._featuresList.elements();
- }
-
- /**
- * Method enumerateHiddenSequences.
- *
- * @return an Enumeration over all int elements
- */
- public java.util.Enumeration enumerateHiddenSequences(
- ) {
- return this._hiddenSequencesList.elements();
- }
-
- /**
- * Method enumeratePdbids.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.Pdbids elements
- */
- public java.util.Enumeration enumeratePdbids(
- ) {
- return this._pdbidsList.elements();
- }
-
- /**
- * Returns the value of field 'colour'.
- *
- * @return the value of field 'Colour'.
- */
- public int getColour(
- ) {
- return this._colour;
- }
-
- /**
- * Returns the value of field 'end'.
- *
- * @return the value of field 'End'.
- */
- public int getEnd(
- ) {
- return this._end;
- }
-
- /**
- * Method getFeatures.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.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.get(index);
- }
-
- /**
- * Method getFeatures.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getFeaturesCount(
- ) {
- return this._featuresList.size();
- }
-
- /**
- * Returns the value of field 'hidden'.
- *
- * @return the value of field 'Hidden'.
- */
- public boolean getHidden(
- ) {
- return this._hidden;
- }
-
- /**
- * Method getHiddenSequences.
- *
- * @param index
- * @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.get(index)).intValue();
- }
-
- /**
- * Method getHiddenSequences.Returns the contents of the
- * collection in an Array.
- *
- * @return this collection as an Array
- */
- 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++) {
- array[index] = ((java.lang.Integer) iter.next()).intValue();
- }
- return array;
- }
-
- /**
- * Method getHiddenSequencesCount.
- *
- * @return the size of this collection
- */
- public int getHiddenSequencesCount(
- ) {
- return this._hiddenSequencesList.size();
- }
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId(
- ) {
- return this._id;
- }
-
- /**
- * Method getPdbids.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.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.get(index);
- }
-
- /**
- * Method getPdbids.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getPdbidsCount(
- ) {
- return this._pdbidsList.size();
- }
-
- /**
- * Returns the value of field 'start'.
- *
- * @return the value of field 'Start'.
- */
- public int getStart(
- ) {
- return this._start;
- }
-
- /**
- * Method hasColour.
- *
- * @return true if at least one Colour has been added
- */
- public boolean hasColour(
- ) {
- return this._has_colour;
- }
-
- /**
- * Method hasEnd.
- *
- * @return true if at least one End has been added
- */
- public boolean hasEnd(
- ) {
- return this._has_end;
- }
-
- /**
- * Method hasHidden.
- *
- * @return true if at least one Hidden has been added
- */
- public boolean hasHidden(
- ) {
- return this._has_hidden;
- }
-
- /**
- * Method hasStart.
- *
- * @return true if at least one Start has been added
- */
- public boolean hasStart(
- ) {
- return this._has_start;
- }
-
- /**
- * Returns the value of field 'hidden'.
- *
- * @return the value of field 'Hidden'.
- */
- public boolean isHidden(
- ) {
- return this._hidden;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllFeatures(
- ) {
- this._featuresList.clear();
- }
-
- /**
- */
- public void removeAllHiddenSequences(
- ) {
- this._hiddenSequencesList.clear();
- }
-
- /**
- */
- public void removeAllPdbids(
- ) {
- this._pdbidsList.clear();
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.Features removeFeaturesAt(
- final int index) {
- java.lang.Object obj = this._featuresList.remove(index);
- return (jalview.schemabinding.version2.Features) obj;
- }
-
- /**
- * 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 the element removed from the collection
- */
- public int removeHiddenSequencesAt(
- final int index) {
- java.lang.Object obj = this._hiddenSequencesList.remove(index);
- return ((java.lang.Integer) obj).intValue();
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.Pdbids removePdbidsAt(
- final int index) {
- java.lang.Object obj = this._pdbidsList.remove(index);
- return (jalview.schemabinding.version2.Pdbids) obj;
- }
-
- /**
- * Sets the value of field 'colour'.
- *
- * @param colour the value of field 'colour'.
- */
- public void setColour(
- final int colour) {
- this._colour = colour;
- this._has_colour = true;
- }
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end the value of field 'end'.
- */
- public void setEnd(
- final int end) {
- this._end = end;
- this._has_end = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vFeatures
- * @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) + "]");
- }
-
- this._featuresList.set(index, vFeatures);
- }
-
- /**
- *
- *
- * @param vFeaturesArray
- */
- public void setFeatures(
- final jalview.schemabinding.version2.Features[] vFeaturesArray) {
- //-- copy array
- _featuresList.clear();
-
- for (int i = 0; i < vFeaturesArray.length; i++) {
- this._featuresList.add(vFeaturesArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'hidden'.
- *
- * @param hidden the value of field 'hidden'.
- */
- public void setHidden(
- final boolean hidden) {
- this._hidden = hidden;
- this._has_hidden = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vHiddenSequences
- * @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) + "]");
- }
-
- this._hiddenSequencesList.set(index, new java.lang.Integer(vHiddenSequences));
- }
-
- /**
- *
- *
- * @param vHiddenSequencesArray
- */
- public void setHiddenSequences(
- final int[] vHiddenSequencesArray) {
- //-- copy array
- _hiddenSequencesList.clear();
-
- for (int i = 0; i < vHiddenSequencesArray.length; i++) {
- this._hiddenSequencesList.add(new java.lang.Integer(vHiddenSequencesArray[i]));
- }
- }
-
- /**
- * Sets the value of field 'id'.
- *
- * @param id the value of field 'id'.
- */
- public void setId(
- final java.lang.String id) {
- this._id = id;
- }
-
- /**
- *
- *
- * @param index
- * @param vPdbids
- * @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) + "]");
- }
-
- this._pdbidsList.set(index, vPdbids);
- }
-
- /**
- *
- *
- * @param vPdbidsArray
- */
- public void setPdbids(
- final jalview.schemabinding.version2.Pdbids[] vPdbidsArray) {
- //-- copy array
- _pdbidsList.clear();
-
- for (int i = 0; i < vPdbidsArray.length; i++) {
- this._pdbidsList.add(vPdbidsArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'start'.
- *
- * @param start the value of field 'start'.
- */
- public void setStart(
- final int start) {
- this._start = start;
- this._has_start = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
- }
+public class JSeq implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _colour.
+ */
+ private int _colour;
+
+ /**
+ * keeps track of state for field: _colour
+ */
+ private boolean _has_colour;
+
+ /**
+ * Field _start.
+ */
+ private int _start;
+
+ /**
+ * keeps track of state for field: _start
+ */
+ private boolean _has_start;
+
+ /**
+ * Field _end.
+ */
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
+
+ /**
+ * Field _id.
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _hidden.
+ */
+ private boolean _hidden;
+
+ /**
+ * keeps track of state for field: _hidden
+ */
+ private boolean _has_hidden;
+
+ /**
+ * Field _featuresList.
+ */
+ private java.util.Vector _featuresList;
+
+ /**
+ * Field _pdbidsList.
+ */
+ private java.util.Vector _pdbidsList;
+
+ /**
+ * Field _hiddenSequencesList.
+ */
+ private java.util.Vector _hiddenSequencesList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public JSeq()
+ {
+ super();
+ this._featuresList = new java.util.Vector();
+ this._pdbidsList = new java.util.Vector();
+ this._hiddenSequencesList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vFeatures
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addFeatures(
+ final jalview.schemabinding.version2.Features vFeatures)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._featuresList.addElement(vFeatures);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vFeatures
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addFeatures(final int index,
+ final jalview.schemabinding.version2.Features vFeatures)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._featuresList.add(index, vFeatures);
+ }
+
+ /**
+ *
+ *
+ * @param vHiddenSequences
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addHiddenSequences(final int vHiddenSequences)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._hiddenSequencesList.addElement(new java.lang.Integer(
+ vHiddenSequences));
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vHiddenSequences
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addHiddenSequences(final int index, final int vHiddenSequences)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._hiddenSequencesList.add(index, new java.lang.Integer(
+ vHiddenSequences));
+ }
+
+ /**
+ *
+ *
+ * @param vPdbids
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addPdbids(final jalview.schemabinding.version2.Pdbids vPdbids)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._pdbidsList.addElement(vPdbids);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vPdbids
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addPdbids(final int index,
+ final jalview.schemabinding.version2.Pdbids vPdbids)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._pdbidsList.add(index, vPdbids);
+ }
+
+ /**
+ */
+ public void deleteColour()
+ {
+ this._has_colour = false;
+ }
+
+ /**
+ */
+ public void deleteEnd()
+ {
+ this._has_end = false;
+ }
+
+ /**
+ */
+ public void deleteHidden()
+ {
+ this._has_hidden = false;
+ }
+
+ /**
+ */
+ public void deleteStart()
+ {
+ this._has_start = false;
+ }
+
+ /**
+ * Method enumerateFeatures.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.Features
+ * elements
+ */
+ public java.util.Enumeration enumerateFeatures()
+ {
+ return this._featuresList.elements();
+ }
+
+ /**
+ * Method enumerateHiddenSequences.
+ *
+ * @return an Enumeration over all int elements
+ */
+ public java.util.Enumeration enumerateHiddenSequences()
+ {
+ return this._hiddenSequencesList.elements();
+ }
+
+ /**
+ * Method enumeratePdbids.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.Pdbids
+ * elements
+ */
+ public java.util.Enumeration enumeratePdbids()
+ {
+ return this._pdbidsList.elements();
+ }
+
+ /**
+ * Returns the value of field 'colour'.
+ *
+ * @return the value of field 'Colour'.
+ */
+ public int getColour()
+ {
+ return this._colour;
+ }
+
+ /**
+ * Returns the value of field 'end'.
+ *
+ * @return the value of field 'End'.
+ */
+ public int getEnd()
+ {
+ return this._end;
+ }
+
+ /**
+ * Method getFeatures.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.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
+ .get(index);
+ }
+
+ /**
+ * Method getFeatures.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getFeaturesCount()
+ {
+ return this._featuresList.size();
+ }
+
+ /**
+ * Returns the value of field 'hidden'.
+ *
+ * @return the value of field 'Hidden'.
+ */
+ public boolean getHidden()
+ {
+ return this._hidden;
+ }
+
+ /**
+ * Method getHiddenSequences.
+ *
+ * @param index
+ * @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.get(index)).intValue();
+ }
+
+ /**
+ * Method getHiddenSequences.Returns the contents of the collection in an
+ * Array.
+ *
+ * @return this collection as an Array
+ */
+ 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++)
+ {
+ array[index] = ((java.lang.Integer) iter.next()).intValue();
+ }
+ return array;
+ }
+
+ /**
+ * Method getHiddenSequencesCount.
+ *
+ * @return the size of this collection
+ */
+ public int getHiddenSequencesCount()
+ {
+ return this._hiddenSequencesList.size();
+ }
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId()
+ {
+ return this._id;
+ }
+
+ /**
+ * Method getPdbids.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.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.get(index);
+ }
+
+ /**
+ * Method getPdbids.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getPdbidsCount()
+ {
+ return this._pdbidsList.size();
+ }
+
+ /**
+ * Returns the value of field 'start'.
+ *
+ * @return the value of field 'Start'.
+ */
+ public int getStart()
+ {
+ return this._start;
+ }
+
+ /**
+ * Method hasColour.
+ *
+ * @return true if at least one Colour has been added
+ */
+ public boolean hasColour()
+ {
+ return this._has_colour;
+ }
+
+ /**
+ * Method hasEnd.
+ *
+ * @return true if at least one End has been added
+ */
+ public boolean hasEnd()
+ {
+ return this._has_end;
+ }
+
+ /**
+ * Method hasHidden.
+ *
+ * @return true if at least one Hidden has been added
+ */
+ public boolean hasHidden()
+ {
+ return this._has_hidden;
+ }
+
+ /**
+ * Method hasStart.
+ *
+ * @return true if at least one Start has been added
+ */
+ public boolean hasStart()
+ {
+ return this._has_start;
+ }
+
+ /**
+ * Returns the value of field 'hidden'.
+ *
+ * @return the value of field 'Hidden'.
+ */
+ public boolean isHidden()
+ {
+ return this._hidden;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ */
+ public void removeAllFeatures()
+ {
+ this._featuresList.clear();
+ }
+
+ /**
+ */
+ public void removeAllHiddenSequences()
+ {
+ this._hiddenSequencesList.clear();
+ }
+
+ /**
+ */
+ public void removeAllPdbids()
+ {
+ this._pdbidsList.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.Features removeFeaturesAt(
+ final int index)
+ {
+ java.lang.Object obj = this._featuresList.remove(index);
+ return (jalview.schemabinding.version2.Features) obj;
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public int removeHiddenSequencesAt(final int index)
+ {
+ java.lang.Object obj = this._hiddenSequencesList.remove(index);
+ return ((java.lang.Integer) obj).intValue();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.Pdbids removePdbidsAt(
+ final int index)
+ {
+ java.lang.Object obj = this._pdbidsList.remove(index);
+ return (jalview.schemabinding.version2.Pdbids) obj;
+ }
+
+ /**
+ * Sets the value of field 'colour'.
+ *
+ * @param colour
+ * the value of field 'colour'.
+ */
+ public void setColour(final int colour)
+ {
+ this._colour = colour;
+ this._has_colour = true;
+ }
+
+ /**
+ * Sets the value of field 'end'.
+ *
+ * @param end
+ * the value of field 'end'.
+ */
+ public void setEnd(final int end)
+ {
+ this._end = end;
+ this._has_end = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vFeatures
+ * @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) + "]");
+ }
+
+ this._featuresList.set(index, vFeatures);
+ }
+
+ /**
+ *
+ *
+ * @param vFeaturesArray
+ */
+ public void setFeatures(
+ final jalview.schemabinding.version2.Features[] vFeaturesArray)
+ {
+ // -- copy array
+ _featuresList.clear();
+
+ for (int i = 0; i < vFeaturesArray.length; i++)
+ {
+ this._featuresList.add(vFeaturesArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'hidden'.
+ *
+ * @param hidden
+ * the value of field 'hidden'.
+ */
+ public void setHidden(final boolean hidden)
+ {
+ this._hidden = hidden;
+ this._has_hidden = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vHiddenSequences
+ * @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) + "]");
+ }
+
+ this._hiddenSequencesList.set(index, new java.lang.Integer(
+ vHiddenSequences));
+ }
+
+ /**
+ *
+ *
+ * @param vHiddenSequencesArray
+ */
+ public void setHiddenSequences(final int[] vHiddenSequencesArray)
+ {
+ // -- copy array
+ _hiddenSequencesList.clear();
+
+ for (int i = 0; i < vHiddenSequencesArray.length; i++)
+ {
+ this._hiddenSequencesList.add(new java.lang.Integer(
+ vHiddenSequencesArray[i]));
+ }
+ }
+
+ /**
+ * Sets the value of field 'id'.
+ *
+ * @param id
+ * the value of field 'id'.
+ */
+ public void setId(final java.lang.String id)
+ {
+ this._id = id;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vPdbids
+ * @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) + "]");
+ }
+
+ this._pdbidsList.set(index, vPdbids);
+ }
+
+ /**
+ *
+ *
+ * @param vPdbidsArray
+ */
+ public void setPdbids(
+ final jalview.schemabinding.version2.Pdbids[] vPdbidsArray)
+ {
+ // -- copy array
+ _pdbidsList.clear();
+
+ for (int i = 0; i < vPdbidsArray.length; i++)
+ {
+ this._pdbidsList.add(vPdbidsArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'start'.
+ *
+ * @param start
+ * the value of field 'start'.
+ */
+ public void setStart(final int start)
+ {
+ this._start = start;
+ this._has_start = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class JalviewModel implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _creationDate.
- */
- private java.util.Date _creationDate;
-
- /**
- * Field _version.
- */
- private java.lang.String _version;
-
- /**
- * Field _vamsasModel.
- */
- private jalview.schemabinding.version2.VamsasModel _vamsasModel;
-
- /**
- * Field _jalviewModelSequence.
- */
- private jalview.schemabinding.version2.JalviewModelSequence _jalviewModelSequence;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public JalviewModel() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'creationDate'.
- *
- * @return the value of field 'CreationDate'.
- */
- public java.util.Date getCreationDate(
- ) {
- return this._creationDate;
- }
-
- /**
- * Returns the value of field 'jalviewModelSequence'.
- *
- * @return the value of field 'JalviewModelSequence'.
- */
- public jalview.schemabinding.version2.JalviewModelSequence getJalviewModelSequence(
- ) {
- return this._jalviewModelSequence;
- }
-
- /**
- * Returns the value of field 'vamsasModel'.
- *
- * @return the value of field 'VamsasModel'.
- */
- public jalview.schemabinding.version2.VamsasModel getVamsasModel(
- ) {
- return this._vamsasModel;
- }
-
- /**
- * Returns the value of field 'version'.
- *
- * @return the value of field 'Version'.
- */
- public java.lang.String getVersion(
- ) {
- return this._version;
- }
-
- /**
- * 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 'creationDate'.
- *
- * @param creationDate the value of field 'creationDate'.
- */
- public void setCreationDate(
- final java.util.Date creationDate) {
- this._creationDate = creationDate;
- }
-
- /**
- * Sets the value of field 'jalviewModelSequence'.
- *
- * @param jalviewModelSequence the value of field
- * 'jalviewModelSequence'.
- */
- public void setJalviewModelSequence(
- final jalview.schemabinding.version2.JalviewModelSequence jalviewModelSequence) {
- this._jalviewModelSequence = jalviewModelSequence;
- }
-
- /**
- * Sets the value of field 'vamsasModel'.
- *
- * @param vamsasModel the value of field 'vamsasModel'.
- */
- public void setVamsasModel(
- final jalview.schemabinding.version2.VamsasModel vamsasModel) {
- this._vamsasModel = vamsasModel;
- }
-
- /**
- * Sets the value of field 'version'.
- *
- * @param version the value of field 'version'.
- */
- public void setVersion(
- final java.lang.String version) {
- this._version = version;
- }
-
- /**
- * 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.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);
- }
-
- /**
- *
- *
- * @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);
+public class JalviewModel implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _creationDate.
+ */
+ private java.util.Date _creationDate;
+
+ /**
+ * Field _version.
+ */
+ private java.lang.String _version;
+
+ /**
+ * Field _vamsasModel.
+ */
+ private jalview.schemabinding.version2.VamsasModel _vamsasModel;
+
+ /**
+ * Field _jalviewModelSequence.
+ */
+ private jalview.schemabinding.version2.JalviewModelSequence _jalviewModelSequence;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public JalviewModel()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'creationDate'.
+ *
+ * @return the value of field 'CreationDate'.
+ */
+ public java.util.Date getCreationDate()
+ {
+ return this._creationDate;
+ }
+
+ /**
+ * Returns the value of field 'jalviewModelSequence'.
+ *
+ * @return the value of field 'JalviewModelSequence'.
+ */
+ public jalview.schemabinding.version2.JalviewModelSequence getJalviewModelSequence()
+ {
+ return this._jalviewModelSequence;
+ }
+
+ /**
+ * Returns the value of field 'vamsasModel'.
+ *
+ * @return the value of field 'VamsasModel'.
+ */
+ public jalview.schemabinding.version2.VamsasModel getVamsasModel()
+ {
+ return this._vamsasModel;
+ }
+
+ /**
+ * Returns the value of field 'version'.
+ *
+ * @return the value of field 'Version'.
+ */
+ public java.lang.String getVersion()
+ {
+ return this._version;
+ }
+
+ /**
+ * 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 'creationDate'.
+ *
+ * @param creationDate
+ * the value of field 'creationDate'.
+ */
+ public void setCreationDate(final java.util.Date creationDate)
+ {
+ this._creationDate = creationDate;
+ }
+
+ /**
+ * Sets the value of field 'jalviewModelSequence'.
+ *
+ * @param jalviewModelSequence
+ * the value of field 'jalviewModelSequence'.
+ */
+ public void setJalviewModelSequence(
+ final jalview.schemabinding.version2.JalviewModelSequence jalviewModelSequence)
+ {
+ this._jalviewModelSequence = jalviewModelSequence;
+ }
+
+ /**
+ * Sets the value of field 'vamsasModel'.
+ *
+ * @param vamsasModel
+ * the value of field 'vamsasModel'.
+ */
+ public void setVamsasModel(
+ final jalview.schemabinding.version2.VamsasModel vamsasModel)
+ {
+ this._vamsasModel = vamsasModel;
+ }
+
+ /**
+ * Sets the value of field 'version'.
+ *
+ * @param version
+ * the value of field 'version'.
+ */
+ public void setVersion(final java.lang.String version)
+ {
+ this._version = version;
+ }
+
+ /**
+ * 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.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class JalviewModelSequence implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _JSeqList.
- */
- private java.util.Vector _JSeqList;
-
- /**
- * Field _JGroupList.
- */
- private java.util.Vector _JGroupList;
-
- /**
- * Field _viewportList.
- */
- private java.util.Vector _viewportList;
-
- /**
- * Field _userColoursList.
- */
- private java.util.Vector _userColoursList;
-
- /**
- * Field _treeList.
- */
- private java.util.Vector _treeList;
-
- /**
- * Field _featureSettings.
- */
- private jalview.schemabinding.version2.FeatureSettings _featureSettings;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public JalviewModelSequence() {
- super();
- 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();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vJGroup
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addJGroup(
- final jalview.schemabinding.version2.JGroup vJGroup)
- throws java.lang.IndexOutOfBoundsException {
- this._JGroupList.addElement(vJGroup);
- }
-
- /**
- *
- *
- * @param index
- * @param vJGroup
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addJGroup(
- final int index,
- final jalview.schemabinding.version2.JGroup vJGroup)
- throws java.lang.IndexOutOfBoundsException {
- this._JGroupList.add(index, vJGroup);
- }
-
- /**
- *
- *
- * @param vJSeq
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addJSeq(
- final jalview.schemabinding.version2.JSeq vJSeq)
- throws java.lang.IndexOutOfBoundsException {
- this._JSeqList.addElement(vJSeq);
- }
-
- /**
- *
- *
- * @param index
- * @param vJSeq
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addJSeq(
- final int index,
- final jalview.schemabinding.version2.JSeq vJSeq)
- throws java.lang.IndexOutOfBoundsException {
- this._JSeqList.add(index, vJSeq);
- }
-
- /**
- *
- *
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addTree(
- final jalview.schemabinding.version2.Tree vTree)
- throws java.lang.IndexOutOfBoundsException {
- this._treeList.addElement(vTree);
- }
-
- /**
- *
- *
- * @param index
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addTree(
- final int index,
- final jalview.schemabinding.version2.Tree vTree)
- throws java.lang.IndexOutOfBoundsException {
- this._treeList.add(index, vTree);
- }
-
- /**
- *
- *
- * @param vUserColours
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addUserColours(
- final jalview.schemabinding.version2.UserColours vUserColours)
- throws java.lang.IndexOutOfBoundsException {
- this._userColoursList.addElement(vUserColours);
- }
-
- /**
- *
- *
- * @param index
- * @param vUserColours
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addUserColours(
- final int index,
- final jalview.schemabinding.version2.UserColours vUserColours)
- throws java.lang.IndexOutOfBoundsException {
- this._userColoursList.add(index, vUserColours);
- }
-
- /**
- *
- *
- * @param vViewport
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addViewport(
- final jalview.schemabinding.version2.Viewport vViewport)
- throws java.lang.IndexOutOfBoundsException {
- this._viewportList.addElement(vViewport);
- }
-
- /**
- *
- *
- * @param index
- * @param vViewport
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addViewport(
- final int index,
- final jalview.schemabinding.version2.Viewport vViewport)
- throws java.lang.IndexOutOfBoundsException {
- this._viewportList.add(index, vViewport);
- }
-
- /**
- * Method enumerateJGroup.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.JGroup elements
- */
- public java.util.Enumeration enumerateJGroup(
- ) {
- return this._JGroupList.elements();
- }
-
- /**
- * Method enumerateJSeq.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.JSeq elements
- */
- public java.util.Enumeration enumerateJSeq(
- ) {
- return this._JSeqList.elements();
- }
-
- /**
- * Method enumerateTree.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.Tree elements
- */
- public java.util.Enumeration enumerateTree(
- ) {
- return this._treeList.elements();
- }
-
- /**
- * Method enumerateUserColours.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.UserColours elements
- */
- public java.util.Enumeration enumerateUserColours(
- ) {
- return this._userColoursList.elements();
- }
-
- /**
- * Method enumerateViewport.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.Viewport elements
- */
- public java.util.Enumeration enumerateViewport(
- ) {
- return this._viewportList.elements();
- }
-
- /**
- * Returns the value of field 'featureSettings'.
- *
- * @return the value of field 'FeatureSettings'.
- */
- public jalview.schemabinding.version2.FeatureSettings getFeatureSettings(
- ) {
- return this._featureSettings;
- }
-
- /**
- * Method getJGroup.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.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.get(index);
- }
-
- /**
- * Method getJGroup.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getJGroupCount(
- ) {
- return this._JGroupList.size();
- }
-
- /**
- * Method getJSeq.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.schemabinding.version2.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.get(index);
- }
-
- /**
- * Method getJSeq.Returns the contents of the collection in an
- * Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getJSeqCount(
- ) {
- return this._JSeqList.size();
- }
-
- /**
- * Method getTree.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the jalview.schemabinding.version2.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.get(index);
- }
-
- /**
- * Method getTree.Returns the contents of the collection in an
- * Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getTreeCount(
- ) {
- return this._treeList.size();
- }
-
- /**
- * Method getUserColours.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.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.get(index);
- }
-
- /**
- * Method getUserColours.Returns the contents of the collection
- * in an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getUserColoursCount(
- ) {
- return this._userColoursList.size();
- }
-
- /**
- * Method getViewport.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.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.get(index);
- }
-
- /**
- * Method getViewport.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getViewportCount(
- ) {
- return this._viewportList.size();
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllJGroup(
- ) {
- this._JGroupList.clear();
- }
-
- /**
- */
- public void removeAllJSeq(
- ) {
- this._JSeqList.clear();
- }
-
- /**
- */
- public void removeAllTree(
- ) {
- this._treeList.clear();
- }
-
- /**
- */
- public void removeAllUserColours(
- ) {
- this._userColoursList.clear();
- }
-
- /**
- */
- public void removeAllViewport(
- ) {
- this._viewportList.clear();
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.JGroup removeJGroupAt(
- final int index) {
- java.lang.Object obj = this._JGroupList.remove(index);
- return (jalview.schemabinding.version2.JGroup) obj;
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.JSeq removeJSeqAt(
- final int index) {
- java.lang.Object obj = this._JSeqList.remove(index);
- return (jalview.schemabinding.version2.JSeq) obj;
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.Tree removeTreeAt(
- final int index) {
- java.lang.Object obj = this._treeList.remove(index);
- return (jalview.schemabinding.version2.Tree) obj;
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.UserColours removeUserColoursAt(
- final int index) {
- java.lang.Object obj = this._userColoursList.remove(index);
- return (jalview.schemabinding.version2.UserColours) obj;
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.Viewport removeViewportAt(
- final int index) {
- java.lang.Object obj = this._viewportList.remove(index);
- return (jalview.schemabinding.version2.Viewport) obj;
- }
-
- /**
- * Sets the value of field 'featureSettings'.
- *
- * @param featureSettings the value of field 'featureSettings'.
- */
- public void setFeatureSettings(
- final jalview.schemabinding.version2.FeatureSettings featureSettings) {
- this._featureSettings = featureSettings;
- }
-
- /**
- *
- *
- * @param index
- * @param vJGroup
- * @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) + "]");
- }
-
- this._JGroupList.set(index, vJGroup);
- }
-
- /**
- *
- *
- * @param vJGroupArray
- */
- public void setJGroup(
- final jalview.schemabinding.version2.JGroup[] vJGroupArray) {
- //-- copy array
- _JGroupList.clear();
-
- for (int i = 0; i < vJGroupArray.length; i++) {
- this._JGroupList.add(vJGroupArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vJSeq
- * @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) + "]");
- }
-
- this._JSeqList.set(index, vJSeq);
- }
-
- /**
- *
- *
- * @param vJSeqArray
- */
- public void setJSeq(
- final jalview.schemabinding.version2.JSeq[] vJSeqArray) {
- //-- copy array
- _JSeqList.clear();
-
- for (int i = 0; i < vJSeqArray.length; i++) {
- this._JSeqList.add(vJSeqArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vTree
- * @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) + "]");
- }
-
- this._treeList.set(index, vTree);
- }
-
- /**
- *
- *
- * @param vTreeArray
- */
- public void setTree(
- final jalview.schemabinding.version2.Tree[] vTreeArray) {
- //-- copy array
- _treeList.clear();
-
- for (int i = 0; i < vTreeArray.length; i++) {
- this._treeList.add(vTreeArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vUserColours
- * @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) + "]");
- }
-
- this._userColoursList.set(index, vUserColours);
- }
-
- /**
- *
- *
- * @param vUserColoursArray
- */
- public void setUserColours(
- final jalview.schemabinding.version2.UserColours[] vUserColoursArray) {
- //-- copy array
- _userColoursList.clear();
-
- for (int i = 0; i < vUserColoursArray.length; i++) {
- this._userColoursList.add(vUserColoursArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vViewport
- * @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) + "]");
- }
-
- this._viewportList.set(index, vViewport);
- }
-
- /**
- *
- *
- * @param vViewportArray
- */
- public void setViewport(
- final jalview.schemabinding.version2.Viewport[] vViewportArray) {
- //-- copy array
- _viewportList.clear();
-
- for (int i = 0; i < vViewportArray.length; i++) {
- this._viewportList.add(vViewportArray[i]);
- }
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
- }
+public class JalviewModelSequence implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _JSeqList.
+ */
+ private java.util.Vector _JSeqList;
+
+ /**
+ * Field _JGroupList.
+ */
+ private java.util.Vector _JGroupList;
+
+ /**
+ * Field _viewportList.
+ */
+ private java.util.Vector _viewportList;
+
+ /**
+ * Field _userColoursList.
+ */
+ private java.util.Vector _userColoursList;
+
+ /**
+ * Field _treeList.
+ */
+ private java.util.Vector _treeList;
+
+ /**
+ * Field _featureSettings.
+ */
+ private jalview.schemabinding.version2.FeatureSettings _featureSettings;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public JalviewModelSequence()
+ {
+ super();
+ 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();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vJGroup
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addJGroup(final jalview.schemabinding.version2.JGroup vJGroup)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._JGroupList.addElement(vJGroup);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vJGroup
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addJGroup(final int index,
+ final jalview.schemabinding.version2.JGroup vJGroup)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._JGroupList.add(index, vJGroup);
+ }
+
+ /**
+ *
+ *
+ * @param vJSeq
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addJSeq(final jalview.schemabinding.version2.JSeq vJSeq)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._JSeqList.addElement(vJSeq);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vJSeq
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addJSeq(final int index,
+ final jalview.schemabinding.version2.JSeq vJSeq)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._JSeqList.add(index, vJSeq);
+ }
+
+ /**
+ *
+ *
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addTree(final jalview.schemabinding.version2.Tree vTree)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._treeList.addElement(vTree);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addTree(final int index,
+ final jalview.schemabinding.version2.Tree vTree)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._treeList.add(index, vTree);
+ }
+
+ /**
+ *
+ *
+ * @param vUserColours
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addUserColours(
+ final jalview.schemabinding.version2.UserColours vUserColours)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._userColoursList.addElement(vUserColours);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vUserColours
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addUserColours(final int index,
+ final jalview.schemabinding.version2.UserColours vUserColours)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._userColoursList.add(index, vUserColours);
+ }
+
+ /**
+ *
+ *
+ * @param vViewport
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addViewport(
+ final jalview.schemabinding.version2.Viewport vViewport)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._viewportList.addElement(vViewport);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vViewport
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addViewport(final int index,
+ final jalview.schemabinding.version2.Viewport vViewport)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._viewportList.add(index, vViewport);
+ }
+
+ /**
+ * Method enumerateJGroup.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.JGroup
+ * elements
+ */
+ public java.util.Enumeration enumerateJGroup()
+ {
+ return this._JGroupList.elements();
+ }
+
+ /**
+ * Method enumerateJSeq.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.JSeq
+ * elements
+ */
+ public java.util.Enumeration enumerateJSeq()
+ {
+ return this._JSeqList.elements();
+ }
+
+ /**
+ * Method enumerateTree.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.Tree
+ * elements
+ */
+ public java.util.Enumeration enumerateTree()
+ {
+ return this._treeList.elements();
+ }
+
+ /**
+ * Method enumerateUserColours.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.UserColours
+ * elements
+ */
+ public java.util.Enumeration enumerateUserColours()
+ {
+ return this._userColoursList.elements();
+ }
+
+ /**
+ * Method enumerateViewport.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.Viewport
+ * elements
+ */
+ public java.util.Enumeration enumerateViewport()
+ {
+ return this._viewportList.elements();
+ }
+
+ /**
+ * Returns the value of field 'featureSettings'.
+ *
+ * @return the value of field 'FeatureSettings'.
+ */
+ public jalview.schemabinding.version2.FeatureSettings getFeatureSettings()
+ {
+ return this._featureSettings;
+ }
+
+ /**
+ * Method getJGroup.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.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.get(index);
+ }
+
+ /**
+ * Method getJGroup.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getJGroupCount()
+ {
+ return this._JGroupList.size();
+ }
+
+ /**
+ * Method getJSeq.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.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.get(index);
+ }
+
+ /**
+ * Method getJSeq.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getJSeqCount()
+ {
+ return this._JSeqList.size();
+ }
+
+ /**
+ * Method getTree.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.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.get(index);
+ }
+
+ /**
+ * Method getTree.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getTreeCount()
+ {
+ return this._treeList.size();
+ }
+
+ /**
+ * Method getUserColours.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.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
+ .get(index);
+ }
+
+ /**
+ * Method getUserColours.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getUserColoursCount()
+ {
+ return this._userColoursList.size();
+ }
+
+ /**
+ * Method getViewport.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.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
+ .get(index);
+ }
+
+ /**
+ * Method getViewport.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getViewportCount()
+ {
+ return this._viewportList.size();
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ */
+ public void removeAllJGroup()
+ {
+ this._JGroupList.clear();
+ }
+
+ /**
+ */
+ public void removeAllJSeq()
+ {
+ this._JSeqList.clear();
+ }
+
+ /**
+ */
+ public void removeAllTree()
+ {
+ this._treeList.clear();
+ }
+
+ /**
+ */
+ public void removeAllUserColours()
+ {
+ this._userColoursList.clear();
+ }
+
+ /**
+ */
+ public void removeAllViewport()
+ {
+ this._viewportList.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.JGroup removeJGroupAt(
+ final int index)
+ {
+ java.lang.Object obj = this._JGroupList.remove(index);
+ return (jalview.schemabinding.version2.JGroup) obj;
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.JSeq removeJSeqAt(final int index)
+ {
+ java.lang.Object obj = this._JSeqList.remove(index);
+ return (jalview.schemabinding.version2.JSeq) obj;
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.Tree removeTreeAt(final int index)
+ {
+ java.lang.Object obj = this._treeList.remove(index);
+ return (jalview.schemabinding.version2.Tree) obj;
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.UserColours removeUserColoursAt(
+ final int index)
+ {
+ java.lang.Object obj = this._userColoursList.remove(index);
+ return (jalview.schemabinding.version2.UserColours) obj;
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.Viewport removeViewportAt(
+ final int index)
+ {
+ java.lang.Object obj = this._viewportList.remove(index);
+ return (jalview.schemabinding.version2.Viewport) obj;
+ }
+
+ /**
+ * Sets the value of field 'featureSettings'.
+ *
+ * @param featureSettings
+ * the value of field 'featureSettings'.
+ */
+ public void setFeatureSettings(
+ final jalview.schemabinding.version2.FeatureSettings featureSettings)
+ {
+ this._featureSettings = featureSettings;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vJGroup
+ * @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) + "]");
+ }
+
+ this._JGroupList.set(index, vJGroup);
+ }
+
+ /**
+ *
+ *
+ * @param vJGroupArray
+ */
+ public void setJGroup(
+ final jalview.schemabinding.version2.JGroup[] vJGroupArray)
+ {
+ // -- copy array
+ _JGroupList.clear();
+
+ for (int i = 0; i < vJGroupArray.length; i++)
+ {
+ this._JGroupList.add(vJGroupArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vJSeq
+ * @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) + "]");
+ }
+
+ this._JSeqList.set(index, vJSeq);
+ }
+
+ /**
+ *
+ *
+ * @param vJSeqArray
+ */
+ public void setJSeq(final jalview.schemabinding.version2.JSeq[] vJSeqArray)
+ {
+ // -- copy array
+ _JSeqList.clear();
+
+ for (int i = 0; i < vJSeqArray.length; i++)
+ {
+ this._JSeqList.add(vJSeqArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTree
+ * @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) + "]");
+ }
+
+ this._treeList.set(index, vTree);
+ }
+
+ /**
+ *
+ *
+ * @param vTreeArray
+ */
+ public void setTree(final jalview.schemabinding.version2.Tree[] vTreeArray)
+ {
+ // -- copy array
+ _treeList.clear();
+
+ for (int i = 0; i < vTreeArray.length; i++)
+ {
+ this._treeList.add(vTreeArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vUserColours
+ * @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) + "]");
+ }
+
+ this._userColoursList.set(index, vUserColours);
+ }
+
+ /**
+ *
+ *
+ * @param vUserColoursArray
+ */
+ public void setUserColours(
+ final jalview.schemabinding.version2.UserColours[] vUserColoursArray)
+ {
+ // -- copy array
+ _userColoursList.clear();
+
+ for (int i = 0; i < vUserColoursArray.length; i++)
+ {
+ this._userColoursList.add(vUserColoursArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vViewport
+ * @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) + "]");
+ }
+
+ this._viewportList.set(index, vViewport);
+ }
+
+ /**
+ *
+ *
+ * @param vViewportArray
+ */
+ public void setViewport(
+ final jalview.schemabinding.version2.Viewport[] vViewportArray)
+ {
+ // -- copy array
+ _viewportList.clear();
+
+ for (int i = 0; i < vViewportArray.length; i++)
+ {
+ this._viewportList.add(vViewportArray[i]);
+ }
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class JalviewUserColours implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _schemeName.
- */
- private java.lang.String _schemeName;
-
- /**
- * Jalview colour scheme document version.
- *
- */
- private java.lang.String _version;
-
- /**
- * Field _colourList.
- */
- private java.util.Vector _colourList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public JalviewUserColours() {
- super();
- this._colourList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vColour
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addColour(
- final Colour vColour)
- throws java.lang.IndexOutOfBoundsException {
- this._colourList.addElement(vColour);
- }
-
- /**
- *
- *
- * @param index
- * @param vColour
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addColour(
- final int index,
- final Colour vColour)
- throws java.lang.IndexOutOfBoundsException {
- this._colourList.add(index, vColour);
- }
-
- /**
- * Method enumerateColour.
- *
- * @return an Enumeration over all Colour elements
- */
- public java.util.Enumeration enumerateColour(
- ) {
- return this._colourList.elements();
- }
-
- /**
- * Method getColour.
- *
- * @param index
- * @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 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 (Colour) _colourList.get(index);
- }
-
- /**
- * Method getColour.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public Colour[] getColour(
- ) {
- Colour[] array = new Colour[0];
- return (Colour[]) this._colourList.toArray(array);
- }
-
- /**
- * Method getColourCount.
- *
- * @return the size of this collection
- */
- public int getColourCount(
- ) {
- return this._colourList.size();
- }
-
- /**
- * Returns the value of field 'schemeName'.
- *
- * @return the value of field 'SchemeName'.
- */
- public java.lang.String getSchemeName(
- ) {
- return this._schemeName;
- }
-
- /**
- * Returns the value of field 'version'. The field 'version'
- * has the following description: Jalview colour scheme
- * document version.
- *
- *
- * @return the value of field 'Version'.
- */
- public java.lang.String getVersion(
- ) {
- return this._version;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllColour(
- ) {
- this._colourList.clear();
- }
-
- /**
- * 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;
+public class JalviewUserColours implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _schemeName.
+ */
+ private java.lang.String _schemeName;
+
+ /**
+ * Jalview colour scheme document version.
+ *
+ */
+ private java.lang.String _version;
+
+ /**
+ * Field _colourList.
+ */
+ private java.util.Vector _colourList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public JalviewUserColours()
+ {
+ super();
+ this._colourList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vColour
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addColour(final Colour vColour)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._colourList.addElement(vColour);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vColour
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addColour(final int index, final Colour vColour)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._colourList.add(index, vColour);
+ }
+
+ /**
+ * Method enumerateColour.
+ *
+ * @return an Enumeration over all Colour elements
+ */
+ public java.util.Enumeration enumerateColour()
+ {
+ return this._colourList.elements();
+ }
+
+ /**
+ * Method getColour.
+ *
+ * @param index
+ * @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 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) + "]");
}
- /**
- * Method removeColourAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public Colour removeColourAt(
- final int index) {
- java.lang.Object obj = this._colourList.remove(index);
- return (Colour) obj;
+ return (Colour) _colourList.get(index);
+ }
+
+ /**
+ * Method getColour.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public Colour[] getColour()
+ {
+ Colour[] array = new Colour[0];
+ return (Colour[]) this._colourList.toArray(array);
+ }
+
+ /**
+ * Method getColourCount.
+ *
+ * @return the size of this collection
+ */
+ public int getColourCount()
+ {
+ return this._colourList.size();
+ }
+
+ /**
+ * Returns the value of field 'schemeName'.
+ *
+ * @return the value of field 'SchemeName'.
+ */
+ public java.lang.String getSchemeName()
+ {
+ return this._schemeName;
+ }
+
+ /**
+ * Returns the value of field 'version'. The field 'version' has the following
+ * description: Jalview colour scheme document version.
+ *
+ *
+ * @return the value of field 'Version'.
+ */
+ public java.lang.String getVersion()
+ {
+ return this._version;
+ }
+
+ /**
+ * 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;
}
-
- /**
- *
- *
- * @param index
- * @param vColour
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
*/
- public void 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) + "]");
- }
-
- this._colourList.set(index, vColour);
+ public void removeAllColour()
+ {
+ this._colourList.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public Colour removeColourAt(final int index)
+ {
+ java.lang.Object obj = this._colourList.remove(index);
+ return (Colour) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vColour
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ 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) + "]");
}
- /**
- *
- *
- * @param vColourArray
- */
- public void setColour(
- final Colour[] vColourArray) {
- //-- copy array
- _colourList.clear();
-
- for (int i = 0; i < vColourArray.length; i++) {
- this._colourList.add(vColourArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'schemeName'.
- *
- * @param schemeName the value of field 'schemeName'.
- */
- public void setSchemeName(
- final java.lang.String schemeName) {
- this._schemeName = schemeName;
- }
-
- /**
- * Sets the value of field 'version'. The field 'version' has
- * the following description: Jalview colour scheme document
- * version.
- *
- *
- * @param version the value of field 'version'.
- */
- public void setVersion(
- final java.lang.String version) {
- this._version = version;
- }
-
- /**
- * 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.JalviewUserColours
- */
- 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);
- }
-
- /**
- *
- *
- * @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);
+ this._colourList.set(index, vColour);
+ }
+
+ /**
+ *
+ *
+ * @param vColourArray
+ */
+ public void setColour(final Colour[] vColourArray)
+ {
+ // -- copy array
+ _colourList.clear();
+
+ for (int i = 0; i < vColourArray.length; i++)
+ {
+ this._colourList.add(vColourArray[i]);
}
+ }
+
+ /**
+ * Sets the value of field 'schemeName'.
+ *
+ * @param schemeName
+ * the value of field 'schemeName'.
+ */
+ public void setSchemeName(final java.lang.String schemeName)
+ {
+ this._schemeName = schemeName;
+ }
+
+ /**
+ * Sets the value of field 'version'. The field 'version' has the following
+ * description: Jalview colour scheme document version.
+ *
+ *
+ * @param version
+ * the value of field 'version'.
+ */
+ public void setVersion(final java.lang.String version)
+ {
+ this._version = version;
+ }
+
+ /**
+ * 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.JalviewUserColours
+ */
+ 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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class MapListFrom implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _start.
- */
- private int _start;
-
- /**
- * keeps track of state for field: _start
- */
- private boolean _has_start;
-
- /**
- * Field _end.
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public MapListFrom() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteEnd(
- ) {
- this._has_end= false;
- }
-
- /**
- */
- public void deleteStart(
- ) {
- this._has_start= false;
- }
-
- /**
- * Returns the value of field 'end'.
- *
- * @return the value of field 'End'.
- */
- public int getEnd(
- ) {
- return this._end;
- }
-
- /**
- * Returns the value of field 'start'.
- *
- * @return the value of field 'Start'.
- */
- public int getStart(
- ) {
- return this._start;
- }
-
- /**
- * Method hasEnd.
- *
- * @return true if at least one End has been added
- */
- public boolean hasEnd(
- ) {
- return this._has_end;
- }
-
- /**
- * Method hasStart.
- *
- * @return true if at least one Start has been added
- */
- public boolean hasStart(
- ) {
- return this._has_start;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end the value of field 'end'.
- */
- public void setEnd(
- final int end) {
- this._end = end;
- this._has_end = true;
- }
-
- /**
- * Sets the value of field 'start'.
- *
- * @param start the value of field 'start'.
- */
- public void setStart(
- final int start) {
- this._start = start;
- this._has_start = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.MapListFrom
- */
- public static jalview.schemabinding.version2.MapListFrom unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.schemabinding.version2.MapListFrom) Unmarshaller.unmarshal(jalview.schemabinding.version2.MapListFrom.class, reader);
- }
-
- /**
- *
- *
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void validate(
- )
- throws org.exolab.castor.xml.ValidationException {
- org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
- validator.validate(this);
+public class MapListFrom implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _start.
+ */
+ private int _start;
+
+ /**
+ * keeps track of state for field: _start
+ */
+ private boolean _has_start;
+
+ /**
+ * Field _end.
+ */
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public MapListFrom()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ */
+ public void deleteEnd()
+ {
+ this._has_end = false;
+ }
+
+ /**
+ */
+ public void deleteStart()
+ {
+ this._has_start = false;
+ }
+
+ /**
+ * Returns the value of field 'end'.
+ *
+ * @return the value of field 'End'.
+ */
+ public int getEnd()
+ {
+ return this._end;
+ }
+
+ /**
+ * Returns the value of field 'start'.
+ *
+ * @return the value of field 'Start'.
+ */
+ public int getStart()
+ {
+ return this._start;
+ }
+
+ /**
+ * Method hasEnd.
+ *
+ * @return true if at least one End has been added
+ */
+ public boolean hasEnd()
+ {
+ return this._has_end;
+ }
+
+ /**
+ * Method hasStart.
+ *
+ * @return true if at least one Start has been added
+ */
+ public boolean hasStart()
+ {
+ return this._has_start;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Sets the value of field 'end'.
+ *
+ * @param end
+ * the value of field 'end'.
+ */
+ public void setEnd(final int end)
+ {
+ this._end = end;
+ this._has_end = true;
+ }
+
+ /**
+ * Sets the value of field 'start'.
+ *
+ * @param start
+ * the value of field 'start'.
+ */
+ public void setStart(final int start)
+ {
+ this._start = start;
+ this._has_start = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.MapListFrom
+ */
+ public static jalview.schemabinding.version2.MapListFrom unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.schemabinding.version2.MapListFrom) Unmarshaller
+ .unmarshal(jalview.schemabinding.version2.MapListFrom.class,
+ reader);
+ }
+
+ /**
+ *
+ *
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void validate() throws org.exolab.castor.xml.ValidationException
+ {
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+ validator.validate(this);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class MapListTo implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _start.
- */
- private int _start;
-
- /**
- * keeps track of state for field: _start
- */
- private boolean _has_start;
-
- /**
- * Field _end.
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public MapListTo() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteEnd(
- ) {
- this._has_end= false;
- }
-
- /**
- */
- public void deleteStart(
- ) {
- this._has_start= false;
- }
-
- /**
- * Returns the value of field 'end'.
- *
- * @return the value of field 'End'.
- */
- public int getEnd(
- ) {
- return this._end;
- }
-
- /**
- * Returns the value of field 'start'.
- *
- * @return the value of field 'Start'.
- */
- public int getStart(
- ) {
- return this._start;
- }
-
- /**
- * Method hasEnd.
- *
- * @return true if at least one End has been added
- */
- public boolean hasEnd(
- ) {
- return this._has_end;
- }
-
- /**
- * Method hasStart.
- *
- * @return true if at least one Start has been added
- */
- public boolean hasStart(
- ) {
- return this._has_start;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end the value of field 'end'.
- */
- public void setEnd(
- final int end) {
- this._end = end;
- this._has_end = true;
- }
-
- /**
- * Sets the value of field 'start'.
- *
- * @param start the value of field 'start'.
- */
- public void setStart(
- final int start) {
- this._start = start;
- this._has_start = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.MapListTo
- */
- public static jalview.schemabinding.version2.MapListTo unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.schemabinding.version2.MapListTo) Unmarshaller.unmarshal(jalview.schemabinding.version2.MapListTo.class, reader);
- }
-
- /**
- *
- *
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void validate(
- )
- throws org.exolab.castor.xml.ValidationException {
- org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
- validator.validate(this);
+public class MapListTo implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _start.
+ */
+ private int _start;
+
+ /**
+ * keeps track of state for field: _start
+ */
+ private boolean _has_start;
+
+ /**
+ * Field _end.
+ */
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public MapListTo()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ */
+ public void deleteEnd()
+ {
+ this._has_end = false;
+ }
+
+ /**
+ */
+ public void deleteStart()
+ {
+ this._has_start = false;
+ }
+
+ /**
+ * Returns the value of field 'end'.
+ *
+ * @return the value of field 'End'.
+ */
+ public int getEnd()
+ {
+ return this._end;
+ }
+
+ /**
+ * Returns the value of field 'start'.
+ *
+ * @return the value of field 'Start'.
+ */
+ public int getStart()
+ {
+ return this._start;
+ }
+
+ /**
+ * Method hasEnd.
+ *
+ * @return true if at least one End has been added
+ */
+ public boolean hasEnd()
+ {
+ return this._has_end;
+ }
+
+ /**
+ * Method hasStart.
+ *
+ * @return true if at least one Start has been added
+ */
+ public boolean hasStart()
+ {
+ return this._has_start;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Sets the value of field 'end'.
+ *
+ * @param end
+ * the value of field 'end'.
+ */
+ public void setEnd(final int end)
+ {
+ this._end = end;
+ this._has_end = true;
+ }
+
+ /**
+ * Sets the value of field 'start'.
+ *
+ * @param start
+ * the value of field 'start'.
+ */
+ public void setStart(final int start)
+ {
+ this._start = start;
+ this._has_start = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.MapListTo
+ */
+ public static jalview.schemabinding.version2.MapListTo unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.schemabinding.version2.MapListTo) Unmarshaller
+ .unmarshal(jalview.schemabinding.version2.MapListTo.class,
+ reader);
+ }
+
+ /**
+ *
+ *
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void validate() throws org.exolab.castor.xml.ValidationException
+ {
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+ validator.validate(this);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
/**
* developed after mapRangeType from
* http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes
- *
- * This effectively represents a java.util.MapList object
- *
+ *
+ * This effectively represents a java.util.MapList object
+ *
*
* @version $Revision$ $Date$
*/
-public class MapListType implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * number of dictionary symbol widths involved in each
- * mapped position on this sequence (for example, 3 for a dna
- * sequence exon
- * region that is being mapped to a protein sequence). This is
- * optional,
- * since the unit can be usually be inferred from the
- * dictionary type of
- * each sequence involved in the mapping.
- */
- private long _mapFromUnit;
-
- /**
- * keeps track of state for field: _mapFromUnit
- */
- private boolean _has_mapFromUnit;
-
- /**
- * number of dictionary symbol widths involved in each
- * mapped position on this sequence (for example, 3 for a dna
- * sequence exon
- * region that is being mapped to a protein sequence). This is
- * optional,
- * since the unit can be usually be inferred from the
- * dictionary type of
- * each sequence involved in the mapping.
- */
- private long _mapToUnit;
-
- /**
- * keeps track of state for field: _mapToUnit
- */
- private boolean _has_mapToUnit;
-
- /**
- * a region from start to end inclusive
- */
- private java.util.Vector _mapListFromList;
-
- /**
- * a region from start to end inclusive
- */
- private java.util.Vector _mapListToList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public MapListType() {
- super();
- this._mapListFromList = new java.util.Vector();
- this._mapListToList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vMapListFrom
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addMapListFrom(
- final jalview.schemabinding.version2.MapListFrom vMapListFrom)
- throws java.lang.IndexOutOfBoundsException {
- this._mapListFromList.addElement(vMapListFrom);
- }
-
- /**
- *
- *
- * @param index
- * @param vMapListFrom
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addMapListFrom(
- final int index,
- final jalview.schemabinding.version2.MapListFrom vMapListFrom)
- throws java.lang.IndexOutOfBoundsException {
- this._mapListFromList.add(index, vMapListFrom);
- }
-
- /**
- *
- *
- * @param vMapListTo
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addMapListTo(
- final jalview.schemabinding.version2.MapListTo vMapListTo)
- throws java.lang.IndexOutOfBoundsException {
- this._mapListToList.addElement(vMapListTo);
- }
-
- /**
- *
- *
- * @param index
- * @param vMapListTo
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addMapListTo(
- final int index,
- final jalview.schemabinding.version2.MapListTo vMapListTo)
- throws java.lang.IndexOutOfBoundsException {
- this._mapListToList.add(index, vMapListTo);
- }
-
- /**
- */
- public void deleteMapFromUnit(
- ) {
- this._has_mapFromUnit= false;
- }
-
- /**
- */
- public void deleteMapToUnit(
- ) {
- this._has_mapToUnit= false;
- }
-
- /**
- * Method enumerateMapListFrom.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.MapListFrom elements
- */
- public java.util.Enumeration enumerateMapListFrom(
- ) {
- return this._mapListFromList.elements();
- }
-
- /**
- * Method enumerateMapListTo.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.MapListTo elements
- */
- public java.util.Enumeration enumerateMapListTo(
- ) {
- return this._mapListToList.elements();
- }
-
- /**
- * Returns the value of field 'mapFromUnit'. The field
- * 'mapFromUnit' has the following description: number of
- * dictionary symbol widths involved in each
- * mapped position on this sequence (for example, 3 for a dna
- * sequence exon
- * region that is being mapped to a protein sequence). This is
- * optional,
- * since the unit can be usually be inferred from the
- * dictionary type of
- * each sequence involved in the mapping.
- *
- * @return the value of field 'MapFromUnit'.
- */
- public long getMapFromUnit(
- ) {
- return this._mapFromUnit;
- }
-
- /**
- * Method getMapListFrom.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.MapListFrom at the given index
- */
- public jalview.schemabinding.version2.MapListFrom getMapListFrom(
- final int index)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._mapListFromList.size()) {
- throw new IndexOutOfBoundsException("getMapListFrom: Index value '" + index + "' not in range [0.." + (this._mapListFromList.size() - 1) + "]");
- }
-
- return (jalview.schemabinding.version2.MapListFrom) _mapListFromList.get(index);
- }
-
- /**
- * Method getMapListFrom.Returns the contents of the collection
- * in an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.schemabinding.version2.MapListFrom[] getMapListFrom(
- ) {
- jalview.schemabinding.version2.MapListFrom[] array = new jalview.schemabinding.version2.MapListFrom[0];
- return (jalview.schemabinding.version2.MapListFrom[]) this._mapListFromList.toArray(array);
- }
-
- /**
- * Method getMapListFromCount.
- *
- * @return the size of this collection
- */
- public int getMapListFromCount(
- ) {
- return this._mapListFromList.size();
- }
-
- /**
- * Method getMapListTo.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.MapListTo at the given index
- */
- public jalview.schemabinding.version2.MapListTo getMapListTo(
- final int index)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._mapListToList.size()) {
- throw new IndexOutOfBoundsException("getMapListTo: Index value '" + index + "' not in range [0.." + (this._mapListToList.size() - 1) + "]");
- }
-
- return (jalview.schemabinding.version2.MapListTo) _mapListToList.get(index);
- }
-
- /**
- * Method getMapListTo.Returns the contents of the collection
- * in an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.schemabinding.version2.MapListTo[] getMapListTo(
- ) {
- jalview.schemabinding.version2.MapListTo[] array = new jalview.schemabinding.version2.MapListTo[0];
- return (jalview.schemabinding.version2.MapListTo[]) this._mapListToList.toArray(array);
- }
-
- /**
- * Method getMapListToCount.
- *
- * @return the size of this collection
- */
- public int getMapListToCount(
- ) {
- return this._mapListToList.size();
- }
-
- /**
- * Returns the value of field 'mapToUnit'. The field
- * 'mapToUnit' has the following description: number of
- * dictionary symbol widths involved in each
- * mapped position on this sequence (for example, 3 for a dna
- * sequence exon
- * region that is being mapped to a protein sequence). This is
- * optional,
- * since the unit can be usually be inferred from the
- * dictionary type of
- * each sequence involved in the mapping.
- *
- * @return the value of field 'MapToUnit'.
- */
- public long getMapToUnit(
- ) {
- return this._mapToUnit;
- }
-
- /**
- * Method hasMapFromUnit.
- *
- * @return true if at least one MapFromUnit has been added
- */
- public boolean hasMapFromUnit(
- ) {
- return this._has_mapFromUnit;
- }
-
- /**
- * Method hasMapToUnit.
- *
- * @return true if at least one MapToUnit has been added
- */
- public boolean hasMapToUnit(
- ) {
- return this._has_mapToUnit;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllMapListFrom(
- ) {
- this._mapListFromList.clear();
- }
-
- /**
- */
- public void removeAllMapListTo(
- ) {
- this._mapListToList.clear();
- }
-
- /**
- * Method removeMapListFrom.
- *
- * @param vMapListFrom
- * @return true if the object was removed from the collection.
- */
- public boolean removeMapListFrom(
- final jalview.schemabinding.version2.MapListFrom vMapListFrom) {
- boolean removed = _mapListFromList.remove(vMapListFrom);
- return removed;
- }
-
- /**
- * Method removeMapListFromAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.schemabinding.version2.MapListFrom removeMapListFromAt(
- final int index) {
- java.lang.Object obj = this._mapListFromList.remove(index);
- return (jalview.schemabinding.version2.MapListFrom) obj;
- }
-
- /**
- * Method removeMapListTo.
- *
- * @param vMapListTo
- * @return true if the object was removed from the collection.
- */
- public boolean removeMapListTo(
- final jalview.schemabinding.version2.MapListTo vMapListTo) {
- boolean removed = _mapListToList.remove(vMapListTo);
- return removed;
- }
-
- /**
- * Method removeMapListToAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.schemabinding.version2.MapListTo removeMapListToAt(
- final int index) {
- java.lang.Object obj = this._mapListToList.remove(index);
- return (jalview.schemabinding.version2.MapListTo) obj;
- }
-
- /**
- * Sets the value of field 'mapFromUnit'. The field
- * 'mapFromUnit' has the following description: number of
- * dictionary symbol widths involved in each
- * mapped position on this sequence (for example, 3 for a dna
- * sequence exon
- * region that is being mapped to a protein sequence). This is
- * optional,
- * since the unit can be usually be inferred from the
- * dictionary type of
- * each sequence involved in the mapping.
- *
- * @param mapFromUnit the value of field 'mapFromUnit'.
- */
- public void setMapFromUnit(
- final long mapFromUnit) {
- this._mapFromUnit = mapFromUnit;
- this._has_mapFromUnit = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vMapListFrom
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setMapListFrom(
- final int index,
- final jalview.schemabinding.version2.MapListFrom vMapListFrom)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._mapListFromList.size()) {
- throw new IndexOutOfBoundsException("setMapListFrom: Index value '" + index + "' not in range [0.." + (this._mapListFromList.size() - 1) + "]");
- }
-
- this._mapListFromList.set(index, vMapListFrom);
- }
-
- /**
- *
- *
- * @param vMapListFromArray
- */
- public void setMapListFrom(
- final jalview.schemabinding.version2.MapListFrom[] vMapListFromArray) {
- //-- copy array
- _mapListFromList.clear();
-
- for (int i = 0; i < vMapListFromArray.length; i++) {
- this._mapListFromList.add(vMapListFromArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vMapListTo
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setMapListTo(
- final int index,
- final jalview.schemabinding.version2.MapListTo vMapListTo)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._mapListToList.size()) {
- throw new IndexOutOfBoundsException("setMapListTo: Index value '" + index + "' not in range [0.." + (this._mapListToList.size() - 1) + "]");
- }
-
- this._mapListToList.set(index, vMapListTo);
- }
-
- /**
- *
- *
- * @param vMapListToArray
- */
- public void setMapListTo(
- final jalview.schemabinding.version2.MapListTo[] vMapListToArray) {
- //-- copy array
- _mapListToList.clear();
-
- for (int i = 0; i < vMapListToArray.length; i++) {
- this._mapListToList.add(vMapListToArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'mapToUnit'. The field 'mapToUnit'
- * has the following description: number of dictionary symbol
- * widths involved in each
- * mapped position on this sequence (for example, 3 for a dna
- * sequence exon
- * region that is being mapped to a protein sequence). This is
- * optional,
- * since the unit can be usually be inferred from the
- * dictionary type of
- * each sequence involved in the mapping.
- *
- * @param mapToUnit the value of field 'mapToUnit'.
- */
- public void setMapToUnit(
- final long mapToUnit) {
- this._mapToUnit = mapToUnit;
- this._has_mapToUnit = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.MapListType
- */
- public static jalview.schemabinding.version2.MapListType unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.schemabinding.version2.MapListType) Unmarshaller.unmarshal(jalview.schemabinding.version2.MapListType.class, reader);
- }
-
- /**
- *
- *
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void validate(
- )
- throws org.exolab.castor.xml.ValidationException {
- org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
- validator.validate(this);
- }
+public class MapListType implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * number of dictionary symbol widths involved in each mapped position on this
+ * sequence (for example, 3 for a dna sequence exon region that is being
+ * mapped to a protein sequence). This is optional, since the unit can be
+ * usually be inferred from the dictionary type of each sequence involved in
+ * the mapping.
+ */
+ private long _mapFromUnit;
+
+ /**
+ * keeps track of state for field: _mapFromUnit
+ */
+ private boolean _has_mapFromUnit;
+
+ /**
+ * number of dictionary symbol widths involved in each mapped position on this
+ * sequence (for example, 3 for a dna sequence exon region that is being
+ * mapped to a protein sequence). This is optional, since the unit can be
+ * usually be inferred from the dictionary type of each sequence involved in
+ * the mapping.
+ */
+ private long _mapToUnit;
+
+ /**
+ * keeps track of state for field: _mapToUnit
+ */
+ private boolean _has_mapToUnit;
+
+ /**
+ * a region from start to end inclusive
+ */
+ private java.util.Vector _mapListFromList;
+
+ /**
+ * a region from start to end inclusive
+ */
+ private java.util.Vector _mapListToList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public MapListType()
+ {
+ super();
+ this._mapListFromList = new java.util.Vector();
+ this._mapListToList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vMapListFrom
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addMapListFrom(
+ final jalview.schemabinding.version2.MapListFrom vMapListFrom)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._mapListFromList.addElement(vMapListFrom);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vMapListFrom
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addMapListFrom(final int index,
+ final jalview.schemabinding.version2.MapListFrom vMapListFrom)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._mapListFromList.add(index, vMapListFrom);
+ }
+
+ /**
+ *
+ *
+ * @param vMapListTo
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addMapListTo(
+ final jalview.schemabinding.version2.MapListTo vMapListTo)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._mapListToList.addElement(vMapListTo);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vMapListTo
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addMapListTo(final int index,
+ final jalview.schemabinding.version2.MapListTo vMapListTo)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._mapListToList.add(index, vMapListTo);
+ }
+
+ /**
+ */
+ public void deleteMapFromUnit()
+ {
+ this._has_mapFromUnit = false;
+ }
+
+ /**
+ */
+ public void deleteMapToUnit()
+ {
+ this._has_mapToUnit = false;
+ }
+
+ /**
+ * Method enumerateMapListFrom.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.MapListFrom
+ * elements
+ */
+ public java.util.Enumeration enumerateMapListFrom()
+ {
+ return this._mapListFromList.elements();
+ }
+
+ /**
+ * Method enumerateMapListTo.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.MapListTo
+ * elements
+ */
+ public java.util.Enumeration enumerateMapListTo()
+ {
+ return this._mapListToList.elements();
+ }
+
+ /**
+ * Returns the value of field 'mapFromUnit'. The field 'mapFromUnit' has the
+ * following description: number of dictionary symbol widths involved in each
+ * mapped position on this sequence (for example, 3 for a dna sequence exon
+ * region that is being mapped to a protein sequence). This is optional, since
+ * the unit can be usually be inferred from the dictionary type of each
+ * sequence involved in the mapping.
+ *
+ * @return the value of field 'MapFromUnit'.
+ */
+ public long getMapFromUnit()
+ {
+ return this._mapFromUnit;
+ }
+
+ /**
+ * Method getMapListFrom.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.MapListFrom at the
+ * given index
+ */
+ public jalview.schemabinding.version2.MapListFrom getMapListFrom(
+ final int index) throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._mapListFromList.size())
+ {
+ throw new IndexOutOfBoundsException("getMapListFrom: Index value '"
+ + index + "' not in range [0.."
+ + (this._mapListFromList.size() - 1) + "]");
+ }
+
+ return (jalview.schemabinding.version2.MapListFrom) _mapListFromList
+ .get(index);
+ }
+
+ /**
+ * Method getMapListFrom.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.schemabinding.version2.MapListFrom[] getMapListFrom()
+ {
+ jalview.schemabinding.version2.MapListFrom[] array = new jalview.schemabinding.version2.MapListFrom[0];
+ return (jalview.schemabinding.version2.MapListFrom[]) this._mapListFromList
+ .toArray(array);
+ }
+
+ /**
+ * Method getMapListFromCount.
+ *
+ * @return the size of this collection
+ */
+ public int getMapListFromCount()
+ {
+ return this._mapListFromList.size();
+ }
+
+ /**
+ * Method getMapListTo.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.MapListTo at the
+ * given index
+ */
+ public jalview.schemabinding.version2.MapListTo getMapListTo(
+ final int index) throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._mapListToList.size())
+ {
+ throw new IndexOutOfBoundsException("getMapListTo: Index value '"
+ + index + "' not in range [0.."
+ + (this._mapListToList.size() - 1) + "]");
+ }
+
+ return (jalview.schemabinding.version2.MapListTo) _mapListToList
+ .get(index);
+ }
+
+ /**
+ * Method getMapListTo.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.schemabinding.version2.MapListTo[] getMapListTo()
+ {
+ jalview.schemabinding.version2.MapListTo[] array = new jalview.schemabinding.version2.MapListTo[0];
+ return (jalview.schemabinding.version2.MapListTo[]) this._mapListToList
+ .toArray(array);
+ }
+
+ /**
+ * Method getMapListToCount.
+ *
+ * @return the size of this collection
+ */
+ public int getMapListToCount()
+ {
+ return this._mapListToList.size();
+ }
+
+ /**
+ * Returns the value of field 'mapToUnit'. The field 'mapToUnit' has the
+ * following description: number of dictionary symbol widths involved in each
+ * mapped position on this sequence (for example, 3 for a dna sequence exon
+ * region that is being mapped to a protein sequence). This is optional, since
+ * the unit can be usually be inferred from the dictionary type of each
+ * sequence involved in the mapping.
+ *
+ * @return the value of field 'MapToUnit'.
+ */
+ public long getMapToUnit()
+ {
+ return this._mapToUnit;
+ }
+
+ /**
+ * Method hasMapFromUnit.
+ *
+ * @return true if at least one MapFromUnit has been added
+ */
+ public boolean hasMapFromUnit()
+ {
+ return this._has_mapFromUnit;
+ }
+
+ /**
+ * Method hasMapToUnit.
+ *
+ * @return true if at least one MapToUnit has been added
+ */
+ public boolean hasMapToUnit()
+ {
+ return this._has_mapToUnit;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ */
+ public void removeAllMapListFrom()
+ {
+ this._mapListFromList.clear();
+ }
+
+ /**
+ */
+ public void removeAllMapListTo()
+ {
+ this._mapListToList.clear();
+ }
+
+ /**
+ * Method removeMapListFrom.
+ *
+ * @param vMapListFrom
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeMapListFrom(
+ final jalview.schemabinding.version2.MapListFrom vMapListFrom)
+ {
+ boolean removed = _mapListFromList.remove(vMapListFrom);
+ return removed;
+ }
+
+ /**
+ * Method removeMapListFromAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.schemabinding.version2.MapListFrom removeMapListFromAt(
+ final int index)
+ {
+ java.lang.Object obj = this._mapListFromList.remove(index);
+ return (jalview.schemabinding.version2.MapListFrom) obj;
+ }
+
+ /**
+ * Method removeMapListTo.
+ *
+ * @param vMapListTo
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeMapListTo(
+ final jalview.schemabinding.version2.MapListTo vMapListTo)
+ {
+ boolean removed = _mapListToList.remove(vMapListTo);
+ return removed;
+ }
+
+ /**
+ * Method removeMapListToAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.schemabinding.version2.MapListTo removeMapListToAt(
+ final int index)
+ {
+ java.lang.Object obj = this._mapListToList.remove(index);
+ return (jalview.schemabinding.version2.MapListTo) obj;
+ }
+
+ /**
+ * Sets the value of field 'mapFromUnit'. The field 'mapFromUnit' has the
+ * following description: number of dictionary symbol widths involved in each
+ * mapped position on this sequence (for example, 3 for a dna sequence exon
+ * region that is being mapped to a protein sequence). This is optional, since
+ * the unit can be usually be inferred from the dictionary type of each
+ * sequence involved in the mapping.
+ *
+ * @param mapFromUnit
+ * the value of field 'mapFromUnit'.
+ */
+ public void setMapFromUnit(final long mapFromUnit)
+ {
+ this._mapFromUnit = mapFromUnit;
+ this._has_mapFromUnit = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vMapListFrom
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setMapListFrom(final int index,
+ final jalview.schemabinding.version2.MapListFrom vMapListFrom)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._mapListFromList.size())
+ {
+ throw new IndexOutOfBoundsException("setMapListFrom: Index value '"
+ + index + "' not in range [0.."
+ + (this._mapListFromList.size() - 1) + "]");
+ }
+
+ this._mapListFromList.set(index, vMapListFrom);
+ }
+
+ /**
+ *
+ *
+ * @param vMapListFromArray
+ */
+ public void setMapListFrom(
+ final jalview.schemabinding.version2.MapListFrom[] vMapListFromArray)
+ {
+ // -- copy array
+ _mapListFromList.clear();
+
+ for (int i = 0; i < vMapListFromArray.length; i++)
+ {
+ this._mapListFromList.add(vMapListFromArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vMapListTo
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setMapListTo(final int index,
+ final jalview.schemabinding.version2.MapListTo vMapListTo)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._mapListToList.size())
+ {
+ throw new IndexOutOfBoundsException("setMapListTo: Index value '"
+ + index + "' not in range [0.."
+ + (this._mapListToList.size() - 1) + "]");
+ }
+
+ this._mapListToList.set(index, vMapListTo);
+ }
+
+ /**
+ *
+ *
+ * @param vMapListToArray
+ */
+ public void setMapListTo(
+ final jalview.schemabinding.version2.MapListTo[] vMapListToArray)
+ {
+ // -- copy array
+ _mapListToList.clear();
+
+ for (int i = 0; i < vMapListToArray.length; i++)
+ {
+ this._mapListToList.add(vMapListToArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'mapToUnit'. The field 'mapToUnit' has the
+ * following description: number of dictionary symbol widths involved in each
+ * mapped position on this sequence (for example, 3 for a dna sequence exon
+ * region that is being mapped to a protein sequence). This is optional, since
+ * the unit can be usually be inferred from the dictionary type of each
+ * sequence involved in the mapping.
+ *
+ * @param mapToUnit
+ * the value of field 'mapToUnit'.
+ */
+ public void setMapToUnit(final long mapToUnit)
+ {
+ this._mapToUnit = mapToUnit;
+ this._has_mapToUnit = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.MapListType
+ */
+ public static jalview.schemabinding.version2.MapListType unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.schemabinding.version2.MapListType) Unmarshaller
+ .unmarshal(jalview.schemabinding.version2.MapListType.class,
+ reader);
+ }
+
+ /**
+ *
+ *
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void validate() throws org.exolab.castor.xml.ValidationException
+ {
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+ validator.validate(this);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Mapping extends jalview.schemabinding.version2.MapListType
-implements java.io.Serializable
+public class Mapping extends jalview.schemabinding.version2.MapListType
+ implements java.io.Serializable
{
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Internal choice value storage
- */
- private java.lang.Object _choiceValue;
-
- /**
- * Field _mappingChoice.
- */
- private jalview.schemabinding.version2.MappingChoice _mappingChoice;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Mapping() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'choiceValue'. The field
- * 'choiceValue' has the following description: Internal choice
- * value storage
- *
- * @return the value of field 'ChoiceValue'.
- */
- public java.lang.Object getChoiceValue(
- ) {
- return this._choiceValue;
- }
-
- /**
- * Returns the value of field 'mappingChoice'.
- *
- * @return the value of field 'MappingChoice'.
- */
- public jalview.schemabinding.version2.MappingChoice getMappingChoice(
- ) {
- return this._mappingChoice;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- * Sets the value of field 'mappingChoice'.
- *
- * @param mappingChoice the value of field 'mappingChoice'.
- */
- public void setMappingChoice(
- final jalview.schemabinding.version2.MappingChoice mappingChoice) {
- this._mappingChoice = mappingChoice;
- this._choiceValue = mappingChoice;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.MapListType
- */
- public static jalview.schemabinding.version2.MapListType unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.schemabinding.version2.MapListType) Unmarshaller.unmarshal(jalview.schemabinding.version2.Mapping.class, reader);
- }
-
- /**
- *
- *
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void validate(
- )
- throws org.exolab.castor.xml.ValidationException {
- org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
- validator.validate(this);
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Internal choice value storage
+ */
+ private java.lang.Object _choiceValue;
+
+ /**
+ * Field _mappingChoice.
+ */
+ private jalview.schemabinding.version2.MappingChoice _mappingChoice;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Mapping()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'choiceValue'. The field 'choiceValue' has the
+ * following description: Internal choice value storage
+ *
+ * @return the value of field 'ChoiceValue'.
+ */
+ public java.lang.Object getChoiceValue()
+ {
+ return this._choiceValue;
+ }
+
+ /**
+ * Returns the value of field 'mappingChoice'.
+ *
+ * @return the value of field 'MappingChoice'.
+ */
+ public jalview.schemabinding.version2.MappingChoice getMappingChoice()
+ {
+ return this._mappingChoice;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Sets the value of field 'mappingChoice'.
+ *
+ * @param mappingChoice
+ * the value of field 'mappingChoice'.
+ */
+ public void setMappingChoice(
+ final jalview.schemabinding.version2.MappingChoice mappingChoice)
+ {
+ this._mappingChoice = mappingChoice;
+ this._choiceValue = mappingChoice;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.MapListType
+ */
+ public static jalview.schemabinding.version2.MapListType unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.schemabinding.version2.MapListType) Unmarshaller
+ .unmarshal(jalview.schemabinding.version2.Mapping.class, reader);
+ }
+
+ /**
+ *
+ *
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void validate() throws org.exolab.castor.xml.ValidationException
+ {
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+ validator.validate(this);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class MappingChoice implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _sequence.
- */
- private jalview.schemabinding.version2.Sequence _sequence;
-
- /**
- * Field _dseqFor.
- */
- private java.lang.String _dseqFor;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public MappingChoice() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'dseqFor'.
- *
- * @return the value of field 'DseqFor'.
- */
- public java.lang.String getDseqFor(
- ) {
- return this._dseqFor;
- }
-
- /**
- * Returns the value of field 'sequence'.
- *
- * @return the value of field 'Sequence'.
- */
- public jalview.schemabinding.version2.Sequence getSequence(
- ) {
- return this._sequence;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- * Sets the value of field 'dseqFor'.
- *
- * @param dseqFor the value of field 'dseqFor'.
- */
- public void setDseqFor(
- final java.lang.String dseqFor) {
- this._dseqFor = dseqFor;
- }
-
- /**
- * Sets the value of field 'sequence'.
- *
- * @param sequence the value of field 'sequence'.
- */
- public void setSequence(
- final jalview.schemabinding.version2.Sequence sequence) {
- this._sequence = sequence;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.MappingChoice
- */
- public static jalview.schemabinding.version2.MappingChoice unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.schemabinding.version2.MappingChoice) Unmarshaller.unmarshal(jalview.schemabinding.version2.MappingChoice.class, reader);
- }
-
- /**
- *
- *
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void validate(
- )
- throws org.exolab.castor.xml.ValidationException {
- org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
- validator.validate(this);
+public class MappingChoice implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _sequence.
+ */
+ private jalview.schemabinding.version2.Sequence _sequence;
+
+ /**
+ * Field _dseqFor.
+ */
+ private java.lang.String _dseqFor;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public MappingChoice()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'dseqFor'.
+ *
+ * @return the value of field 'DseqFor'.
+ */
+ public java.lang.String getDseqFor()
+ {
+ return this._dseqFor;
+ }
+
+ /**
+ * Returns the value of field 'sequence'.
+ *
+ * @return the value of field 'Sequence'.
+ */
+ public jalview.schemabinding.version2.Sequence getSequence()
+ {
+ return this._sequence;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Sets the value of field 'dseqFor'.
+ *
+ * @param dseqFor
+ * the value of field 'dseqFor'.
+ */
+ public void setDseqFor(final java.lang.String dseqFor)
+ {
+ this._dseqFor = dseqFor;
+ }
+
+ /**
+ * Sets the value of field 'sequence'.
+ *
+ * @param sequence
+ * the value of field 'sequence'.
+ */
+ public void setSequence(
+ final jalview.schemabinding.version2.Sequence sequence)
+ {
+ this._sequence = sequence;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.MappingChoice
+ */
+ public static jalview.schemabinding.version2.MappingChoice unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.schemabinding.version2.MappingChoice) Unmarshaller
+ .unmarshal(jalview.schemabinding.version2.MappingChoice.class,
+ reader);
+ }
+
+ /**
+ *
+ *
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void validate() throws org.exolab.castor.xml.ValidationException
+ {
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+ validator.validate(this);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class OtherData implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _key.
- */
- private java.lang.String _key;
-
- /**
- * Field _value.
- */
- private java.lang.String _value;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public OtherData() {
- super();
- }
-
-
- //-----------/
- //- 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.OtherData
- */
- 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);
- }
-
- /**
- *
- *
- * @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);
+public class OtherData implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _key.
+ */
+ private java.lang.String _key;
+
+ /**
+ * Field _value.
+ */
+ private java.lang.String _value;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public OtherData()
+ {
+ super();
+ }
+
+ // -----------/
+ // - 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.OtherData
+ */
+ 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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Pdbentry implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _id.
- */
- private java.lang.String _id;
-
- /**
- * Field _type.
- */
- private java.lang.String _type;
-
- /**
- * Field _file.
- */
- private java.lang.String _file;
-
- /**
- * Field _items.
- */
- private java.util.Vector _items;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Pdbentry() {
- super();
- this._items = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vPdbentryItem
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addPdbentryItem(
- final jalview.schemabinding.version2.PdbentryItem vPdbentryItem)
- throws java.lang.IndexOutOfBoundsException {
- this._items.addElement(vPdbentryItem);
- }
-
- /**
- *
- *
- * @param index
- * @param vPdbentryItem
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addPdbentryItem(
- final int index,
- final jalview.schemabinding.version2.PdbentryItem vPdbentryItem)
- throws java.lang.IndexOutOfBoundsException {
- this._items.add(index, vPdbentryItem);
- }
-
- /**
- * Method enumeratePdbentryItem.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.PdbentryItem elements
- */
- public java.util.Enumeration enumeratePdbentryItem(
- ) {
- return this._items.elements();
- }
-
- /**
- * Returns the value of field 'file'.
- *
- * @return the value of field 'File'.
- */
- public java.lang.String getFile(
- ) {
- return this._file;
- }
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId(
- ) {
- return this._id;
- }
-
- /**
- * Method getPdbentryItem.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.PdbentryItem at the given inde
- */
- 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.get(index);
- }
-
- /**
- * Method getPdbentryItem.Returns the contents of the
- * collection in an Array. <p>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 <i>know</i> that the Array returned is of
- * exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getPdbentryItemCount(
- ) {
- return this._items.size();
- }
-
- /**
- * Returns the value of field 'type'.
- *
- * @return the value of field 'Type'.
- */
- public java.lang.String getType(
- ) {
- return this._type;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllPdbentryItem(
- ) {
- this._items.clear();
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.PdbentryItem removePdbentryItemAt(
- final int index) {
- java.lang.Object obj = this._items.remove(index);
- return (jalview.schemabinding.version2.PdbentryItem) obj;
- }
-
- /**
- * Sets the value of field 'file'.
- *
- * @param file the value of field 'file'.
- */
- public void setFile(
- final java.lang.String file) {
- this._file = file;
+public class Pdbentry implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _id.
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _type.
+ */
+ private java.lang.String _type;
+
+ /**
+ * Field _file.
+ */
+ private java.lang.String _file;
+
+ /**
+ * Field _items.
+ */
+ private java.util.Vector _items;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Pdbentry()
+ {
+ super();
+ this._items = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vPdbentryItem
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addPdbentryItem(
+ final jalview.schemabinding.version2.PdbentryItem vPdbentryItem)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._items.addElement(vPdbentryItem);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vPdbentryItem
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addPdbentryItem(final int index,
+ final jalview.schemabinding.version2.PdbentryItem vPdbentryItem)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._items.add(index, vPdbentryItem);
+ }
+
+ /**
+ * Method enumeratePdbentryItem.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.PdbentryItem
+ * elements
+ */
+ public java.util.Enumeration enumeratePdbentryItem()
+ {
+ return this._items.elements();
+ }
+
+ /**
+ * Returns the value of field 'file'.
+ *
+ * @return the value of field 'File'.
+ */
+ public java.lang.String getFile()
+ {
+ return this._file;
+ }
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId()
+ {
+ return this._id;
+ }
+
+ /**
+ * Method getPdbentryItem.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.PdbentryItem at the
+ * given inde
+ */
+ 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)
+ + "]");
}
- /**
- * Sets the value of field 'id'.
- *
- * @param id the value of field 'id'.
- */
- public void setId(
- final java.lang.String id) {
- this._id = id;
+ return (jalview.schemabinding.version2.PdbentryItem) _items.get(index);
+ }
+
+ /**
+ * Method getPdbentryItem.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getPdbentryItemCount()
+ {
+ return this._items.size();
+ }
+
+ /**
+ * Returns the value of field 'type'.
+ *
+ * @return the value of field 'Type'.
+ */
+ public java.lang.String getType()
+ {
+ return this._type;
+ }
+
+ /**
+ * 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;
}
-
- /**
- *
- *
- * @param index
- * @param vPdbentryItem
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
*/
- public void 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) + "]");
- }
-
- this._items.set(index, vPdbentryItem);
+ public void removeAllPdbentryItem()
+ {
+ this._items.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.PdbentryItem removePdbentryItemAt(
+ final int index)
+ {
+ java.lang.Object obj = this._items.remove(index);
+ return (jalview.schemabinding.version2.PdbentryItem) obj;
+ }
+
+ /**
+ * Sets the value of field 'file'.
+ *
+ * @param file
+ * the value of field 'file'.
+ */
+ public void setFile(final java.lang.String file)
+ {
+ this._file = file;
+ }
+
+ /**
+ * Sets the value of field 'id'.
+ *
+ * @param id
+ * the value of field 'id'.
+ */
+ public void setId(final java.lang.String id)
+ {
+ this._id = id;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vPdbentryItem
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ 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)
+ + "]");
}
- /**
- *
- *
- * @param vPdbentryItemArray
- */
- public void setPdbentryItem(
- final jalview.schemabinding.version2.PdbentryItem[] vPdbentryItemArray) {
- //-- copy array
- _items.clear();
-
- for (int i = 0; i < vPdbentryItemArray.length; i++) {
- this._items.add(vPdbentryItemArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'type'.
- *
- * @param type the value of field 'type'.
- */
- public void setType(
- final java.lang.String type) {
- this._type = type;
- }
-
- /**
- * 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.Pdbentry
- */
- 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);
- }
-
- /**
- *
- *
- * @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);
+ this._items.set(index, vPdbentryItem);
+ }
+
+ /**
+ *
+ *
+ * @param vPdbentryItemArray
+ */
+ public void setPdbentryItem(
+ final jalview.schemabinding.version2.PdbentryItem[] vPdbentryItemArray)
+ {
+ // -- copy array
+ _items.clear();
+
+ for (int i = 0; i < vPdbentryItemArray.length; i++)
+ {
+ this._items.add(vPdbentryItemArray[i]);
}
+ }
+
+ /**
+ * Sets the value of field 'type'.
+ *
+ * @param type
+ * the value of field 'type'.
+ */
+ public void setType(final java.lang.String type)
+ {
+ this._type = type;
+ }
+
+ /**
+ * 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.Pdbentry
+ */
+ 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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
*
* @version $Revision$ $Date$
*/
-public class PdbentryItem implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _propertyList.
- */
- private java.util.Vector _propertyList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public PdbentryItem() {
- super();
- this._propertyList = new java.util.Vector();
+public class PdbentryItem implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _propertyList.
+ */
+ private java.util.Vector _propertyList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public PdbentryItem()
+ {
+ super();
+ this._propertyList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addProperty(
+ final jalview.schemabinding.version2.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._propertyList.addElement(vProperty);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addProperty(final int index,
+ final jalview.schemabinding.version2.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._propertyList.add(index, vProperty);
+ }
+
+ /**
+ * Method enumerateProperty.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.Property
+ * elements
+ */
+ public java.util.Enumeration enumerateProperty()
+ {
+ return this._propertyList.elements();
+ }
+
+ /**
+ * Method getProperty.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.Property at the
+ * given index
+ */
+ 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) + "]");
}
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vProperty
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
+ return (jalview.schemabinding.version2.Property) _propertyList
+ .get(index);
+ }
+
+ /**
+ * Method getProperty.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getPropertyCount()
+ {
+ return this._propertyList.size();
+ }
+
+ /**
*/
- public void addProperty(
- final jalview.schemabinding.version2.Property vProperty)
- throws java.lang.IndexOutOfBoundsException {
- this._propertyList.addElement(vProperty);
+ public void removeAllProperty()
+ {
+ this._propertyList.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.Property removePropertyAt(
+ final int index)
+ {
+ java.lang.Object obj = this._propertyList.remove(index);
+ return (jalview.schemabinding.version2.Property) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ 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) + "]");
}
- /**
- *
- *
- * @param index
- * @param vProperty
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addProperty(
- final int index,
- final jalview.schemabinding.version2.Property vProperty)
- throws java.lang.IndexOutOfBoundsException {
- this._propertyList.add(index, vProperty);
- }
-
- /**
- * Method enumerateProperty.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.Property elements
- */
- public java.util.Enumeration enumerateProperty(
- ) {
- return this._propertyList.elements();
- }
-
- /**
- * Method getProperty.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.Property at the given index
- */
- 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.get(index);
- }
-
- /**
- * Method getProperty.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getPropertyCount(
- ) {
- return this._propertyList.size();
- }
-
- /**
- */
- public void removeAllProperty(
- ) {
- this._propertyList.clear();
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.Property removePropertyAt(
- final int index) {
- java.lang.Object obj = this._propertyList.remove(index);
- return (jalview.schemabinding.version2.Property) obj;
- }
-
- /**
- *
- *
- * @param index
- * @param vProperty
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- 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) + "]");
- }
-
- this._propertyList.set(index, vProperty);
- }
-
- /**
- *
- *
- * @param vPropertyArray
- */
- public void setProperty(
- final jalview.schemabinding.version2.Property[] vPropertyArray) {
- //-- copy array
- _propertyList.clear();
-
- for (int i = 0; i < vPropertyArray.length; i++) {
- this._propertyList.add(vPropertyArray[i]);
- }
+ this._propertyList.set(index, vProperty);
+ }
+
+ /**
+ *
+ *
+ * @param vPropertyArray
+ */
+ public void setProperty(
+ final jalview.schemabinding.version2.Property[] vPropertyArray)
+ {
+ // -- copy array
+ _propertyList.clear();
+
+ for (int i = 0; i < vPropertyArray.length; i++)
+ {
+ this._propertyList.add(vPropertyArray[i]);
}
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Pdbids extends jalview.schemabinding.version2.Pdbentry
-implements java.io.Serializable
+public class Pdbids extends jalview.schemabinding.version2.Pdbentry
+ implements java.io.Serializable
{
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
+ /**
+ * Field _structureStateList.
+ */
+ private java.util.Vector _structureStateList;
- /**
- * Field _structureStateList.
- */
- private java.util.Vector _structureStateList;
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+ public Pdbids()
+ {
+ super();
+ this._structureStateList = new java.util.Vector();
+ }
- //----------------/
- //- Constructors -/
- //----------------/
+ // -----------/
+ // - Methods -/
+ // -----------/
- public Pdbids() {
- super();
- this._structureStateList = new java.util.Vector();
- }
+ /**
+ *
+ *
+ * @param vStructureState
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addStructureState(
+ final jalview.schemabinding.version2.StructureState vStructureState)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._structureStateList.addElement(vStructureState);
+ }
+ /**
+ *
+ *
+ * @param index
+ * @param vStructureState
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addStructureState(
+ final int index,
+ final jalview.schemabinding.version2.StructureState vStructureState)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._structureStateList.add(index, vStructureState);
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ /**
+ * Method enumerateStructureState.
+ *
+ * @return an Enumeration over all
+ * jalview.schemabinding.version2.StructureState elements
+ */
+ public java.util.Enumeration enumerateStructureState()
+ {
+ return this._structureStateList.elements();
+ }
- /**
- *
- *
- * @param vStructureState
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addStructureState(
- final jalview.schemabinding.version2.StructureState vStructureState)
- throws java.lang.IndexOutOfBoundsException {
- this._structureStateList.addElement(vStructureState);
+ /**
+ * Method getStructureState.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.StructureState at
+ * the given index
+ */
+ 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) + "]");
}
- /**
- *
- *
- * @param index
- * @param vStructureState
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addStructureState(
- final int index,
- final jalview.schemabinding.version2.StructureState vStructureState)
- throws java.lang.IndexOutOfBoundsException {
- this._structureStateList.add(index, vStructureState);
- }
+ return (jalview.schemabinding.version2.StructureState) _structureStateList
+ .get(index);
+ }
- /**
- * Method enumerateStructureState.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.StructureState elements
- */
- public java.util.Enumeration enumerateStructureState(
- ) {
- return this._structureStateList.elements();
- }
+ /**
+ * Method getStructureState.Returns the contents of the collection in an
+ * Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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 getStructureState.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.StructureState at the given
- * index
- */
- 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.get(index);
- }
+ /**
+ * Method getStructureStateCount.
+ *
+ * @return the size of this collection
+ */
+ public int getStructureStateCount()
+ {
+ return this._structureStateList.size();
+ }
- /**
- * Method getStructureState.Returns the contents of the
- * collection in an Array. <p>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 <i>know</i> that the Array returned is of
- * exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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 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;
+ }
- /**
- * Method getStructureStateCount.
- *
- * @return the size of this collection
- */
- public int getStructureStateCount(
- ) {
- return this._structureStateList.size();
- }
+ /**
+ *
+ *
+ * @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);
+ }
- /**
- * 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 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);
+ }
- /**
- *
- *
- * @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);
- }
+ public void removeAllStructureState()
+ {
+ this._structureStateList.clear();
+ }
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
+ /**
+ * Method 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;
+ }
- /**
- */
- public void removeAllStructureState(
- ) {
- this._structureStateList.clear();
- }
+ /**
+ * Method removeStructureStateAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.schemabinding.version2.StructureState removeStructureStateAt(
+ final int index)
+ {
+ java.lang.Object obj = this._structureStateList.remove(index);
+ return (jalview.schemabinding.version2.StructureState) obj;
+ }
- /**
- * 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;
+ /**
+ *
+ *
+ * @param index
+ * @param vStructureState
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ 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) + "]");
}
- /**
- * Method removeStructureStateAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.schemabinding.version2.StructureState removeStructureStateAt(
- final int index) {
- java.lang.Object obj = this._structureStateList.remove(index);
- return (jalview.schemabinding.version2.StructureState) obj;
- }
+ this._structureStateList.set(index, vStructureState);
+ }
- /**
- *
- *
- * @param index
- * @param vStructureState
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- 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) + "]");
- }
-
- this._structureStateList.set(index, vStructureState);
- }
+ /**
+ *
+ *
+ * @param vStructureStateArray
+ */
+ public void setStructureState(
+ final jalview.schemabinding.version2.StructureState[] vStructureStateArray)
+ {
+ // -- copy array
+ _structureStateList.clear();
- /**
- *
- *
- * @param vStructureStateArray
- */
- public void setStructureState(
- final jalview.schemabinding.version2.StructureState[] vStructureStateArray) {
- //-- copy array
- _structureStateList.clear();
-
- for (int i = 0; i < vStructureStateArray.length; i++) {
- this._structureStateList.add(vStructureStateArray[i]);
- }
+ for (int i = 0; i < vStructureStateArray.length; i++)
+ {
+ this._structureStateList.add(vStructureStateArray[i]);
}
+ }
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.Pdbentry
- */
- 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 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.Pdbentry
+ */
+ 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);
+ }
- /**
- *
- *
- * @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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Property implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
- /**
- * Field _value.
- */
- private java.lang.String _value;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Property() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName(
- ) {
- return this._name;
- }
-
- /**
- * 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 'name'.
- *
- * @param name the value of field 'name'.
- */
- public void setName(
- final java.lang.String name) {
- this._name = name;
- }
-
- /**
- * 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.Property
- */
- 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);
- }
-
- /**
- *
- *
- * @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);
+public class Property implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ /**
+ * Field _value.
+ */
+ private java.lang.String _value;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Property()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName()
+ {
+ return this._name;
+ }
+
+ /**
+ * 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 'name'.
+ *
+ * @param name
+ * the value of field 'name'.
+ */
+ public void setName(final java.lang.String name)
+ {
+ this._name = name;
+ }
+
+ /**
+ * 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.Property
+ */
+ 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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Sequence extends jalview.schemabinding.version2.SequenceType
-implements java.io.Serializable
+public class Sequence extends jalview.schemabinding.version2.SequenceType
+ implements java.io.Serializable
{
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * dataset sequence id for this sequence. Will be created as
- * union of sequences.
- *
- */
- private java.lang.String _dsseqid;
-
- /**
- * Field _DBRefList.
- */
- private java.util.Vector _DBRefList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Sequence() {
- super();
- this._DBRefList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vDBRef
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addDBRef(
- final jalview.schemabinding.version2.DBRef vDBRef)
- throws java.lang.IndexOutOfBoundsException {
- this._DBRefList.addElement(vDBRef);
- }
-
- /**
- *
- *
- * @param index
- * @param vDBRef
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addDBRef(
- final int index,
- final jalview.schemabinding.version2.DBRef vDBRef)
- throws java.lang.IndexOutOfBoundsException {
- this._DBRefList.add(index, vDBRef);
- }
-
- /**
- * Method enumerateDBRef.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.DBRef elements
- */
- public java.util.Enumeration enumerateDBRef(
- ) {
- return this._DBRefList.elements();
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * dataset sequence id for this sequence. Will be created as union of
+ * sequences.
+ *
+ */
+ private java.lang.String _dsseqid;
+
+ /**
+ * Field _DBRefList.
+ */
+ private java.util.Vector _DBRefList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Sequence()
+ {
+ super();
+ this._DBRefList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vDBRef
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addDBRef(final jalview.schemabinding.version2.DBRef vDBRef)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._DBRefList.addElement(vDBRef);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vDBRef
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addDBRef(final int index,
+ final jalview.schemabinding.version2.DBRef vDBRef)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._DBRefList.add(index, vDBRef);
+ }
+
+ /**
+ * Method enumerateDBRef.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.DBRef
+ * elements
+ */
+ public java.util.Enumeration enumerateDBRef()
+ {
+ return this._DBRefList.elements();
+ }
+
+ /**
+ * Method getDBRef.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.DBRef at the given
+ * index
+ */
+ 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) + "]");
}
- /**
- * Method getDBRef.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.DBRef at the given index
- */
- 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.get(index);
+ return (jalview.schemabinding.version2.DBRef) _DBRefList.get(index);
+ }
+
+ /**
+ * Method getDBRef.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getDBRefCount()
+ {
+ return this._DBRefList.size();
+ }
+
+ /**
+ * Returns the value of field 'dsseqid'. The field 'dsseqid' has the following
+ * description: dataset sequence id for this sequence. Will be created as
+ * union of sequences.
+ *
+ *
+ * @return the value of field 'Dsseqid'.
+ */
+ public java.lang.String getDsseqid()
+ {
+ return this._dsseqid;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
-
- /**
- * Method getDBRef.Returns the contents of the collection in an
- * Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
*/
- public 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);
+ public void removeAllDBRef()
+ {
+ this._DBRefList.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.DBRef removeDBRefAt(final int index)
+ {
+ java.lang.Object obj = this._DBRefList.remove(index);
+ return (jalview.schemabinding.version2.DBRef) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vDBRef
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ 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) + "]");
}
- /**
- * Method getDBRefCount.
- *
- * @return the size of this collection
- */
- public int getDBRefCount(
- ) {
- return this._DBRefList.size();
- }
-
- /**
- * Returns the value of field 'dsseqid'. The field 'dsseqid'
- * has the following description: dataset sequence id for this
- * sequence. Will be created as union of sequences.
- *
- *
- * @return the value of field 'Dsseqid'.
- */
- public java.lang.String getDsseqid(
- ) {
- return this._dsseqid;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllDBRef(
- ) {
- this._DBRefList.clear();
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.DBRef removeDBRefAt(
- final int index) {
- java.lang.Object obj = this._DBRefList.remove(index);
- return (jalview.schemabinding.version2.DBRef) obj;
- }
-
- /**
- *
- *
- * @param index
- * @param vDBRef
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- 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) + "]");
- }
-
- this._DBRefList.set(index, vDBRef);
- }
-
- /**
- *
- *
- * @param vDBRefArray
- */
- public void setDBRef(
- final jalview.schemabinding.version2.DBRef[] vDBRefArray) {
- //-- copy array
- _DBRefList.clear();
-
- for (int i = 0; i < vDBRefArray.length; i++) {
- this._DBRefList.add(vDBRefArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'dsseqid'. The field 'dsseqid' has
- * the following description: dataset sequence id for this
- * sequence. Will be created as union of sequences.
- *
- *
- * @param dsseqid the value of field 'dsseqid'.
- */
- public void setDsseqid(
- final java.lang.String dsseqid) {
- this._dsseqid = dsseqid;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @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.Sequence.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);
+ this._DBRefList.set(index, vDBRef);
+ }
+
+ /**
+ *
+ *
+ * @param vDBRefArray
+ */
+ public void setDBRef(
+ final jalview.schemabinding.version2.DBRef[] vDBRefArray)
+ {
+ // -- copy array
+ _DBRefList.clear();
+
+ for (int i = 0; i < vDBRefArray.length; i++)
+ {
+ this._DBRefList.add(vDBRefArray[i]);
}
+ }
+
+ /**
+ * Sets the value of field 'dsseqid'. The field 'dsseqid' has the following
+ * description: dataset sequence id for this sequence. Will be created as
+ * union of sequences.
+ *
+ *
+ * @param dsseqid
+ * the value of field 'dsseqid'.
+ */
+ public void setDsseqid(final java.lang.String dsseqid)
+ {
+ this._dsseqid = dsseqid;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @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.Sequence.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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class SequenceSet implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _gapChar.
- */
- private java.lang.String _gapChar;
-
- /**
- * reference to set where jalview will gather the dataset
- * sequences for all sequences in the set.
- *
- */
- private java.lang.String _datasetId;
-
- /**
- * Field _sequenceList.
- */
- private java.util.Vector _sequenceList;
-
- /**
- * Field _annotationList.
- */
- private java.util.Vector _annotationList;
-
- /**
- * Field _sequenceSetPropertiesList.
- */
- private java.util.Vector _sequenceSetPropertiesList;
-
- /**
- * Field _alcodonFrameList.
- */
- private java.util.Vector _alcodonFrameList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public SequenceSet() {
- super();
- this._sequenceList = new java.util.Vector();
- this._annotationList = new java.util.Vector();
- this._sequenceSetPropertiesList = new java.util.Vector();
- this._alcodonFrameList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vAlcodonFrame
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAlcodonFrame(
- final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
- throws java.lang.IndexOutOfBoundsException {
- this._alcodonFrameList.addElement(vAlcodonFrame);
- }
-
- /**
- *
- *
- * @param index
- * @param vAlcodonFrame
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAlcodonFrame(
- final int index,
- final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
- throws java.lang.IndexOutOfBoundsException {
- this._alcodonFrameList.add(index, vAlcodonFrame);
- }
-
- /**
- *
- *
- * @param vAnnotation
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAnnotation(
- final jalview.schemabinding.version2.Annotation vAnnotation)
- throws java.lang.IndexOutOfBoundsException {
- this._annotationList.addElement(vAnnotation);
- }
-
- /**
- *
- *
- * @param index
- * @param vAnnotation
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addAnnotation(
- final int index,
- final jalview.schemabinding.version2.Annotation vAnnotation)
- throws java.lang.IndexOutOfBoundsException {
- this._annotationList.add(index, vAnnotation);
- }
-
- /**
- *
- *
- * @param vSequence
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSequence(
- final jalview.schemabinding.version2.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException {
- this._sequenceList.addElement(vSequence);
- }
-
- /**
- *
- *
- * @param index
- * @param vSequence
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSequence(
- final int index,
- final jalview.schemabinding.version2.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException {
- this._sequenceList.add(index, vSequence);
- }
-
- /**
- *
- *
- * @param vSequenceSetProperties
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSequenceSetProperties(
- final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)
- throws java.lang.IndexOutOfBoundsException {
- this._sequenceSetPropertiesList.addElement(vSequenceSetProperties);
- }
-
- /**
- *
- *
- * @param index
- * @param vSequenceSetProperties
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSequenceSetProperties(
- final int index,
- final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)
- throws java.lang.IndexOutOfBoundsException {
- this._sequenceSetPropertiesList.add(index, vSequenceSetProperties);
- }
-
- /**
- * Method enumerateAlcodonFrame.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.AlcodonFrame elements
- */
- public java.util.Enumeration enumerateAlcodonFrame(
- ) {
- return this._alcodonFrameList.elements();
- }
-
- /**
- * Method enumerateAnnotation.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.Annotation elements
- */
- public java.util.Enumeration enumerateAnnotation(
- ) {
- return this._annotationList.elements();
- }
-
- /**
- * Method enumerateSequence.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.Sequence elements
- */
- public java.util.Enumeration enumerateSequence(
- ) {
- return this._sequenceList.elements();
- }
-
- /**
- * Method enumerateSequenceSetProperties.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.SequenceSetProperties elements
- */
- public java.util.Enumeration enumerateSequenceSetProperties(
- ) {
- return this._sequenceSetPropertiesList.elements();
- }
-
- /**
- * Method getAlcodonFrame.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.AlcodonFrame at the given inde
- */
- public jalview.schemabinding.version2.AlcodonFrame getAlcodonFrame(
- final int index)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._alcodonFrameList.size()) {
- throw new IndexOutOfBoundsException("getAlcodonFrame: Index value '" + index + "' not in range [0.." + (this._alcodonFrameList.size() - 1) + "]");
- }
-
- return (jalview.schemabinding.version2.AlcodonFrame) _alcodonFrameList.get(index);
- }
-
- /**
- * Method getAlcodonFrame.Returns the contents of the
- * collection in an Array. <p>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 <i>know</i> that the Array returned is of
- * exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.schemabinding.version2.AlcodonFrame[] getAlcodonFrame(
- ) {
- jalview.schemabinding.version2.AlcodonFrame[] array = new jalview.schemabinding.version2.AlcodonFrame[0];
- return (jalview.schemabinding.version2.AlcodonFrame[]) this._alcodonFrameList.toArray(array);
- }
-
- /**
- * Method getAlcodonFrameCount.
- *
- * @return the size of this collection
- */
- public int getAlcodonFrameCount(
- ) {
- return this._alcodonFrameList.size();
- }
-
- /**
- * Method getAnnotation.
- *
- * @param index
- * @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.get(index);
- }
-
- /**
- * Method getAnnotation.Returns the contents of the collection
- * in an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getAnnotationCount(
- ) {
- return this._annotationList.size();
- }
-
- /**
- * Returns the value of field 'datasetId'. The field
- * 'datasetId' has the following description: reference to set
- * where jalview will gather the dataset sequences for all
- * sequences in the set.
- *
- *
- * @return the value of field 'DatasetId'.
- */
- public java.lang.String getDatasetId(
- ) {
- return this._datasetId;
- }
-
- /**
- * Returns the value of field 'gapChar'.
- *
- * @return the value of field 'GapChar'.
- */
- public java.lang.String getGapChar(
- ) {
- return this._gapChar;
- }
-
- /**
- * Method getSequence.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.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.get(index);
- }
-
- /**
- * Method getSequence.Returns the contents of the collection in
- * an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getSequenceCount(
- ) {
- return this._sequenceList.size();
- }
-
- /**
- * Method getSequenceSetProperties.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.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.get(index);
- }
-
- /**
- * Method getSequenceSetProperties.Returns the contents of the
- * collection in an Array. <p>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 <i>know</i> that the Array returned is of
- * exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getSequenceSetPropertiesCount(
- ) {
- return this._sequenceSetPropertiesList.size();
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- * Method removeAlcodonFrame.
- *
- * @param vAlcodonFrame
- * @return true if the object was removed from the collection.
- */
- public boolean removeAlcodonFrame(
- final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame) {
- boolean removed = _alcodonFrameList.remove(vAlcodonFrame);
- return removed;
- }
-
- /**
- * Method removeAlcodonFrameAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.schemabinding.version2.AlcodonFrame removeAlcodonFrameAt(
- final int index) {
- java.lang.Object obj = this._alcodonFrameList.remove(index);
- return (jalview.schemabinding.version2.AlcodonFrame) obj;
- }
-
- /**
- */
- public void removeAllAlcodonFrame(
- ) {
- this._alcodonFrameList.clear();
- }
-
- /**
- */
- public void removeAllAnnotation(
- ) {
- this._annotationList.clear();
- }
-
- /**
- */
- public void removeAllSequence(
- ) {
- this._sequenceList.clear();
- }
-
- /**
- */
- public void removeAllSequenceSetProperties(
- ) {
- this._sequenceSetPropertiesList.clear();
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.Annotation removeAnnotationAt(
- final int index) {
- java.lang.Object obj = this._annotationList.remove(index);
- return (jalview.schemabinding.version2.Annotation) obj;
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.Sequence removeSequenceAt(
- final int index) {
- java.lang.Object obj = this._sequenceList.remove(index);
- return (jalview.schemabinding.version2.Sequence) obj;
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.SequenceSetProperties removeSequenceSetPropertiesAt(
- final int index) {
- java.lang.Object obj = this._sequenceSetPropertiesList.remove(index);
- return (jalview.schemabinding.version2.SequenceSetProperties) obj;
- }
-
- /**
- *
- *
- * @param index
- * @param vAlcodonFrame
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setAlcodonFrame(
- final int index,
- final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._alcodonFrameList.size()) {
- throw new IndexOutOfBoundsException("setAlcodonFrame: Index value '" + index + "' not in range [0.." + (this._alcodonFrameList.size() - 1) + "]");
- }
-
- this._alcodonFrameList.set(index, vAlcodonFrame);
- }
-
- /**
- *
- *
- * @param vAlcodonFrameArray
- */
- public void setAlcodonFrame(
- final jalview.schemabinding.version2.AlcodonFrame[] vAlcodonFrameArray) {
- //-- copy array
- _alcodonFrameList.clear();
-
- for (int i = 0; i < vAlcodonFrameArray.length; i++) {
- this._alcodonFrameList.add(vAlcodonFrameArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vAnnotation
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- 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) + "]");
- }
-
- this._annotationList.set(index, vAnnotation);
- }
-
- /**
- *
- *
- * @param vAnnotationArray
- */
- public void setAnnotation(
- final jalview.schemabinding.version2.Annotation[] vAnnotationArray) {
- //-- copy array
- _annotationList.clear();
-
- for (int i = 0; i < vAnnotationArray.length; i++) {
- this._annotationList.add(vAnnotationArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'datasetId'. The field 'datasetId'
- * has the following description: reference to set where
- * jalview will gather the dataset sequences for all sequences
- * in the set.
- *
- *
- * @param datasetId the value of field 'datasetId'.
- */
- public void setDatasetId(
- final java.lang.String datasetId) {
- this._datasetId = datasetId;
- }
-
- /**
- * Sets the value of field 'gapChar'.
- *
- * @param gapChar the value of field 'gapChar'.
- */
- public void setGapChar(
- final java.lang.String gapChar) {
- this._gapChar = gapChar;
- }
-
- /**
- *
- *
- * @param index
- * @param vSequence
- * @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) + "]");
- }
-
- this._sequenceList.set(index, vSequence);
- }
-
- /**
- *
- *
- * @param vSequenceArray
- */
- public void setSequence(
- final jalview.schemabinding.version2.Sequence[] vSequenceArray) {
- //-- copy array
- _sequenceList.clear();
-
- for (int i = 0; i < vSequenceArray.length; i++) {
- this._sequenceList.add(vSequenceArray[i]);
- }
- }
-
- /**
- *
- *
- * @param index
- * @param vSequenceSetProperties
- * @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) + "]");
- }
-
- this._sequenceSetPropertiesList.set(index, vSequenceSetProperties);
- }
-
- /**
- *
- *
- * @param vSequenceSetPropertiesArray
- */
- public void setSequenceSetProperties(
- final jalview.schemabinding.version2.SequenceSetProperties[] vSequenceSetPropertiesArray) {
- //-- copy array
- _sequenceSetPropertiesList.clear();
-
- for (int i = 0; i < vSequenceSetPropertiesArray.length; i++) {
- this._sequenceSetPropertiesList.add(vSequenceSetPropertiesArray[i]);
- }
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
- }
+public class SequenceSet implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _gapChar.
+ */
+ private java.lang.String _gapChar;
+
+ /**
+ * reference to set where jalview will gather the dataset sequences for all
+ * sequences in the set.
+ *
+ */
+ private java.lang.String _datasetId;
+
+ /**
+ * Field _sequenceList.
+ */
+ private java.util.Vector _sequenceList;
+
+ /**
+ * Field _annotationList.
+ */
+ private java.util.Vector _annotationList;
+
+ /**
+ * Field _sequenceSetPropertiesList.
+ */
+ private java.util.Vector _sequenceSetPropertiesList;
+
+ /**
+ * Field _alcodonFrameList.
+ */
+ private java.util.Vector _alcodonFrameList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public SequenceSet()
+ {
+ super();
+ this._sequenceList = new java.util.Vector();
+ this._annotationList = new java.util.Vector();
+ this._sequenceSetPropertiesList = new java.util.Vector();
+ this._alcodonFrameList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vAlcodonFrame
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAlcodonFrame(
+ final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._alcodonFrameList.addElement(vAlcodonFrame);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAlcodonFrame
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAlcodonFrame(final int index,
+ final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._alcodonFrameList.add(index, vAlcodonFrame);
+ }
+
+ /**
+ *
+ *
+ * @param vAnnotation
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAnnotation(
+ final jalview.schemabinding.version2.Annotation vAnnotation)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._annotationList.addElement(vAnnotation);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotation
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addAnnotation(final int index,
+ final jalview.schemabinding.version2.Annotation vAnnotation)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._annotationList.add(index, vAnnotation);
+ }
+
+ /**
+ *
+ *
+ * @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSequence(
+ final jalview.schemabinding.version2.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._sequenceList.addElement(vSequence);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSequence(final int index,
+ final jalview.schemabinding.version2.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._sequenceList.add(index, vSequence);
+ }
+
+ /**
+ *
+ *
+ * @param vSequenceSetProperties
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSequenceSetProperties(
+ final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._sequenceSetPropertiesList.addElement(vSequenceSetProperties);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequenceSetProperties
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSequenceSetProperties(
+ final int index,
+ final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._sequenceSetPropertiesList.add(index, vSequenceSetProperties);
+ }
+
+ /**
+ * Method enumerateAlcodonFrame.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.AlcodonFrame
+ * elements
+ */
+ public java.util.Enumeration enumerateAlcodonFrame()
+ {
+ return this._alcodonFrameList.elements();
+ }
+
+ /**
+ * Method enumerateAnnotation.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.Annotation
+ * elements
+ */
+ public java.util.Enumeration enumerateAnnotation()
+ {
+ return this._annotationList.elements();
+ }
+
+ /**
+ * Method enumerateSequence.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.Sequence
+ * elements
+ */
+ public java.util.Enumeration enumerateSequence()
+ {
+ return this._sequenceList.elements();
+ }
+
+ /**
+ * Method enumerateSequenceSetProperties.
+ *
+ * @return an Enumeration over all
+ * jalview.schemabinding.version2.SequenceSetProperties elements
+ */
+ public java.util.Enumeration enumerateSequenceSetProperties()
+ {
+ return this._sequenceSetPropertiesList.elements();
+ }
+
+ /**
+ * Method getAlcodonFrame.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.AlcodonFrame at the
+ * given inde
+ */
+ public jalview.schemabinding.version2.AlcodonFrame getAlcodonFrame(
+ final int index) throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._alcodonFrameList.size())
+ {
+ throw new IndexOutOfBoundsException("getAlcodonFrame: Index value '"
+ + index + "' not in range [0.."
+ + (this._alcodonFrameList.size() - 1) + "]");
+ }
+
+ return (jalview.schemabinding.version2.AlcodonFrame) _alcodonFrameList
+ .get(index);
+ }
+
+ /**
+ * Method getAlcodonFrame.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.schemabinding.version2.AlcodonFrame[] getAlcodonFrame()
+ {
+ jalview.schemabinding.version2.AlcodonFrame[] array = new jalview.schemabinding.version2.AlcodonFrame[0];
+ return (jalview.schemabinding.version2.AlcodonFrame[]) this._alcodonFrameList
+ .toArray(array);
+ }
+
+ /**
+ * Method getAlcodonFrameCount.
+ *
+ * @return the size of this collection
+ */
+ public int getAlcodonFrameCount()
+ {
+ return this._alcodonFrameList.size();
+ }
+
+ /**
+ * Method getAnnotation.
+ *
+ * @param index
+ * @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
+ .get(index);
+ }
+
+ /**
+ * Method getAnnotation.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getAnnotationCount()
+ {
+ return this._annotationList.size();
+ }
+
+ /**
+ * Returns the value of field 'datasetId'. The field 'datasetId' has the
+ * following description: reference to set where jalview will gather the
+ * dataset sequences for all sequences in the set.
+ *
+ *
+ * @return the value of field 'DatasetId'.
+ */
+ public java.lang.String getDatasetId()
+ {
+ return this._datasetId;
+ }
+
+ /**
+ * Returns the value of field 'gapChar'.
+ *
+ * @return the value of field 'GapChar'.
+ */
+ public java.lang.String getGapChar()
+ {
+ return this._gapChar;
+ }
+
+ /**
+ * Method getSequence.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.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
+ .get(index);
+ }
+
+ /**
+ * Method getSequence.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getSequenceCount()
+ {
+ return this._sequenceList.size();
+ }
+
+ /**
+ * Method getSequenceSetProperties.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the
+ * jalview.schemabinding.version2.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
+ .get(index);
+ }
+
+ /**
+ * Method getSequenceSetProperties.Returns the contents of the collection in
+ * an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getSequenceSetPropertiesCount()
+ {
+ return this._sequenceSetPropertiesList.size();
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Method removeAlcodonFrame.
+ *
+ * @param vAlcodonFrame
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAlcodonFrame(
+ final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
+ {
+ boolean removed = _alcodonFrameList.remove(vAlcodonFrame);
+ return removed;
+ }
+
+ /**
+ * Method removeAlcodonFrameAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.schemabinding.version2.AlcodonFrame removeAlcodonFrameAt(
+ final int index)
+ {
+ java.lang.Object obj = this._alcodonFrameList.remove(index);
+ return (jalview.schemabinding.version2.AlcodonFrame) obj;
+ }
+
+ /**
+ */
+ public void removeAllAlcodonFrame()
+ {
+ this._alcodonFrameList.clear();
+ }
+
+ /**
+ */
+ public void removeAllAnnotation()
+ {
+ this._annotationList.clear();
+ }
+
+ /**
+ */
+ public void removeAllSequence()
+ {
+ this._sequenceList.clear();
+ }
+
+ /**
+ */
+ public void removeAllSequenceSetProperties()
+ {
+ this._sequenceSetPropertiesList.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.Annotation removeAnnotationAt(
+ final int index)
+ {
+ java.lang.Object obj = this._annotationList.remove(index);
+ return (jalview.schemabinding.version2.Annotation) obj;
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.Sequence removeSequenceAt(
+ final int index)
+ {
+ java.lang.Object obj = this._sequenceList.remove(index);
+ return (jalview.schemabinding.version2.Sequence) obj;
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.SequenceSetProperties removeSequenceSetPropertiesAt(
+ final int index)
+ {
+ java.lang.Object obj = this._sequenceSetPropertiesList.remove(index);
+ return (jalview.schemabinding.version2.SequenceSetProperties) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAlcodonFrame
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setAlcodonFrame(final int index,
+ final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._alcodonFrameList.size())
+ {
+ throw new IndexOutOfBoundsException("setAlcodonFrame: Index value '"
+ + index + "' not in range [0.."
+ + (this._alcodonFrameList.size() - 1) + "]");
+ }
+
+ this._alcodonFrameList.set(index, vAlcodonFrame);
+ }
+
+ /**
+ *
+ *
+ * @param vAlcodonFrameArray
+ */
+ public void setAlcodonFrame(
+ final jalview.schemabinding.version2.AlcodonFrame[] vAlcodonFrameArray)
+ {
+ // -- copy array
+ _alcodonFrameList.clear();
+
+ for (int i = 0; i < vAlcodonFrameArray.length; i++)
+ {
+ this._alcodonFrameList.add(vAlcodonFrameArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotation
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ 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) + "]");
+ }
+
+ this._annotationList.set(index, vAnnotation);
+ }
+
+ /**
+ *
+ *
+ * @param vAnnotationArray
+ */
+ public void setAnnotation(
+ final jalview.schemabinding.version2.Annotation[] vAnnotationArray)
+ {
+ // -- copy array
+ _annotationList.clear();
+
+ for (int i = 0; i < vAnnotationArray.length; i++)
+ {
+ this._annotationList.add(vAnnotationArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'datasetId'. The field 'datasetId' has the
+ * following description: reference to set where jalview will gather the
+ * dataset sequences for all sequences in the set.
+ *
+ *
+ * @param datasetId
+ * the value of field 'datasetId'.
+ */
+ public void setDatasetId(final java.lang.String datasetId)
+ {
+ this._datasetId = datasetId;
+ }
+
+ /**
+ * Sets the value of field 'gapChar'.
+ *
+ * @param gapChar
+ * the value of field 'gapChar'.
+ */
+ public void setGapChar(final java.lang.String gapChar)
+ {
+ this._gapChar = gapChar;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequence
+ * @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) + "]");
+ }
+
+ this._sequenceList.set(index, vSequence);
+ }
+
+ /**
+ *
+ *
+ * @param vSequenceArray
+ */
+ public void setSequence(
+ final jalview.schemabinding.version2.Sequence[] vSequenceArray)
+ {
+ // -- copy array
+ _sequenceList.clear();
+
+ for (int i = 0; i < vSequenceArray.length; i++)
+ {
+ this._sequenceList.add(vSequenceArray[i]);
+ }
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequenceSetProperties
+ * @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) + "]");
+ }
+
+ this._sequenceSetPropertiesList.set(index, vSequenceSetProperties);
+ }
+
+ /**
+ *
+ *
+ * @param vSequenceSetPropertiesArray
+ */
+ public void setSequenceSetProperties(
+ final jalview.schemabinding.version2.SequenceSetProperties[] vSequenceSetPropertiesArray)
+ {
+ // -- copy array
+ _sequenceSetPropertiesList.clear();
+
+ for (int i = 0; i < vSequenceSetPropertiesArray.length; i++)
+ {
+ this._sequenceSetPropertiesList.add(vSequenceSetPropertiesArray[i]);
+ }
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @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);
+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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class SequenceType implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _id.
- */
- private java.lang.String _id;
-
- /**
- * Field _description.
- */
- private java.lang.String _description;
-
- /**
- * Field _sequence.
- */
- private java.lang.String _sequence;
-
- /**
- * Field _name.
- */
- private java.lang.String _name;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public SequenceType() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'description'.
- *
- * @return the value of field 'Description'.
- */
- public java.lang.String getDescription(
- ) {
- return this._description;
- }
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId(
- ) {
- return this._id;
- }
-
- /**
- * Returns the value of field 'name'.
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName(
- ) {
- return this._name;
- }
-
- /**
- * Returns the value of field 'sequence'.
- *
- * @return the value of field 'Sequence'.
- */
- public java.lang.String getSequence(
- ) {
- return this._sequence;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- * Sets the value of field 'description'.
- *
- * @param description the value of field 'description'.
- */
- public void setDescription(
- final java.lang.String description) {
- this._description = description;
- }
-
- /**
- * Sets the value of field 'id'.
- *
- * @param id the value of field 'id'.
- */
- public void setId(
- final java.lang.String id) {
- this._id = id;
- }
-
- /**
- * Sets the value of field 'name'.
- *
- * @param name the value of field 'name'.
- */
- public void setName(
- final java.lang.String name) {
- this._name = name;
- }
-
- /**
- * Sets the value of field 'sequence'.
- *
- * @param sequence the value of field 'sequence'.
- */
- public void setSequence(
- final java.lang.String sequence) {
- this._sequence = sequence;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
+public class SequenceType implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _id.
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _description.
+ */
+ private java.lang.String _description;
+
+ /**
+ * Field _sequence.
+ */
+ private java.lang.String _sequence;
+
+ /**
+ * Field _name.
+ */
+ private java.lang.String _name;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public SequenceType()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'description'.
+ *
+ * @return the value of field 'Description'.
+ */
+ public java.lang.String getDescription()
+ {
+ return this._description;
+ }
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId()
+ {
+ return this._id;
+ }
+
+ /**
+ * Returns the value of field 'name'.
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName()
+ {
+ return this._name;
+ }
+
+ /**
+ * Returns the value of field 'sequence'.
+ *
+ * @return the value of field 'Sequence'.
+ */
+ public java.lang.String getSequence()
+ {
+ return this._sequence;
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Sets the value of field 'description'.
+ *
+ * @param description
+ * the value of field 'description'.
+ */
+ public void setDescription(final java.lang.String description)
+ {
+ this._description = description;
+ }
+
+ /**
+ * Sets the value of field 'id'.
+ *
+ * @param id
+ * the value of field 'id'.
+ */
+ public void setId(final java.lang.String id)
+ {
+ this._id = id;
+ }
+
+ /**
+ * Sets the value of field 'name'.
+ *
+ * @param name
+ * the value of field 'name'.
+ */
+ public void setName(final java.lang.String name)
+ {
+ this._name = name;
+ }
+
+ /**
+ * Sets the value of field 'sequence'.
+ *
+ * @param sequence
+ * the value of field 'sequence'.
+ */
+ public void setSequence(final java.lang.String sequence)
+ {
+ this._sequence = sequence;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Setting implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _type.
- */
- private java.lang.String _type;
-
- /**
- * Field _colour.
- */
- private int _colour;
-
- /**
- * keeps track of state for field: _colour
- */
- private boolean _has_colour;
-
- /**
- * Field _display.
- */
- private boolean _display;
-
- /**
- * keeps track of state for field: _display
- */
- private boolean _has_display;
-
- /**
- * Field _order.
- */
- private float _order;
-
- /**
- * keeps track of state for field: _order
- */
- private boolean _has_order;
-
- /**
- * Optional minimum colour
- * for graduated feature
- * colour
- *
- */
- private int _mincolour;
-
- /**
- * keeps track of state for field: _mincolour
- */
- private boolean _has_mincolour;
-
- /**
- * threshold value for
- * graduated feature colour
- *
- */
- private float _threshold;
-
- /**
- * keeps track of state for field: _threshold
- */
- private boolean _has_threshold;
-
- /**
- * threshold type for
- * graduated feature colour
- *
- */
- private int _threshstate;
-
- /**
- * keeps track of state for field: _threshstate
- */
- private boolean _has_threshstate;
-
- /**
- * Field _max.
- */
- private float _max;
-
- /**
- * keeps track of state for field: _max
- */
- private boolean _has_max;
-
- /**
- * Field _min.
- */
- private float _min;
-
- /**
- * keeps track of state for field: _min
- */
- private boolean _has_min;
-
- /**
- * Field _colourByLabel.
- */
- private boolean _colourByLabel;
-
- /**
- * keeps track of state for field: _colourByLabel
- */
- private boolean _has_colourByLabel;
-
- /**
- * Field _autoScale.
- */
- private boolean _autoScale;
-
- /**
- * keeps track of state for field: _autoScale
- */
- private boolean _has_autoScale;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Setting() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteAutoScale(
- ) {
- this._has_autoScale= false;
- }
-
- /**
- */
- public void deleteColour(
- ) {
- this._has_colour= false;
- }
-
- /**
- */
- public void deleteColourByLabel(
- ) {
- this._has_colourByLabel= false;
- }
-
- /**
- */
- public void deleteDisplay(
- ) {
- this._has_display= false;
- }
-
- /**
- */
- public void deleteMax(
- ) {
- this._has_max= false;
- }
-
- /**
- */
- public void deleteMin(
- ) {
- this._has_min= false;
- }
-
- /**
- */
- public void deleteMincolour(
- ) {
- this._has_mincolour= false;
- }
-
- /**
- */
- public void deleteOrder(
- ) {
- this._has_order= false;
- }
-
- /**
- */
- public void deleteThreshold(
- ) {
- this._has_threshold= false;
- }
-
- /**
- */
- public void deleteThreshstate(
- ) {
- this._has_threshstate= false;
- }
-
- /**
- * Returns the value of field 'autoScale'.
- *
- * @return the value of field 'AutoScale'.
- */
- public boolean getAutoScale(
- ) {
- return this._autoScale;
- }
-
- /**
- * Returns the value of field 'colour'.
- *
- * @return the value of field 'Colour'.
- */
- public int getColour(
- ) {
- return this._colour;
- }
-
- /**
- * Returns the value of field 'colourByLabel'.
- *
- * @return the value of field 'ColourByLabel'.
- */
- public boolean getColourByLabel(
- ) {
- return this._colourByLabel;
- }
-
- /**
- * Returns the value of field 'display'.
- *
- * @return the value of field 'Display'.
- */
- public boolean getDisplay(
- ) {
- return this._display;
- }
-
- /**
- * Returns the value of field 'max'.
- *
- * @return the value of field 'Max'.
- */
- public float getMax(
- ) {
- return this._max;
- }
-
- /**
- * Returns the value of field 'min'.
- *
- * @return the value of field 'Min'.
- */
- public float getMin(
- ) {
- return this._min;
- }
-
- /**
- * Returns the value of field 'mincolour'. The field
- * 'mincolour' has the following description: Optional minimum
- * colour
- * for graduated feature
- * colour
- *
- *
- * @return the value of field 'Mincolour'.
- */
- public int getMincolour(
- ) {
- return this._mincolour;
- }
-
- /**
- * Returns the value of field 'order'.
- *
- * @return the value of field 'Order'.
- */
- public float getOrder(
- ) {
- return this._order;
- }
-
- /**
- * Returns the value of field 'threshold'. The field
- * 'threshold' has the following description: threshold value
- * for
- * graduated feature colour
- *
- *
- * @return the value of field 'Threshold'.
- */
- public float getThreshold(
- ) {
- return this._threshold;
- }
-
- /**
- * Returns the value of field 'threshstate'. The field
- * 'threshstate' has the following description: threshold type
- * for
- * graduated feature colour
- *
- *
- * @return the value of field 'Threshstate'.
- */
- public int getThreshstate(
- ) {
- return this._threshstate;
- }
-
- /**
- * Returns the value of field 'type'.
- *
- * @return the value of field 'Type'.
- */
- public java.lang.String getType(
- ) {
- return this._type;
- }
-
- /**
- * Method hasAutoScale.
- *
- * @return true if at least one AutoScale has been added
- */
- public boolean hasAutoScale(
- ) {
- return this._has_autoScale;
- }
-
- /**
- * Method hasColour.
- *
- * @return true if at least one Colour has been added
- */
- public boolean hasColour(
- ) {
- return this._has_colour;
- }
-
- /**
- * Method hasColourByLabel.
- *
- * @return true if at least one ColourByLabel has been added
- */
- public boolean hasColourByLabel(
- ) {
- return this._has_colourByLabel;
- }
-
- /**
- * Method hasDisplay.
- *
- * @return true if at least one Display has been added
- */
- public boolean hasDisplay(
- ) {
- return this._has_display;
- }
-
- /**
- * Method hasMax.
- *
- * @return true if at least one Max has been added
- */
- public boolean hasMax(
- ) {
- return this._has_max;
- }
-
- /**
- * Method hasMin.
- *
- * @return true if at least one Min has been added
- */
- public boolean hasMin(
- ) {
- return this._has_min;
- }
-
- /**
- * Method hasMincolour.
- *
- * @return true if at least one Mincolour has been added
- */
- public boolean hasMincolour(
- ) {
- return this._has_mincolour;
- }
-
- /**
- * Method hasOrder.
- *
- * @return true if at least one Order has been added
- */
- public boolean hasOrder(
- ) {
- return this._has_order;
- }
-
- /**
- * Method hasThreshold.
- *
- * @return true if at least one Threshold has been added
- */
- public boolean hasThreshold(
- ) {
- return this._has_threshold;
- }
-
- /**
- * Method hasThreshstate.
- *
- * @return true if at least one Threshstate has been added
- */
- public boolean hasThreshstate(
- ) {
- return this._has_threshstate;
- }
-
- /**
- * Returns the value of field 'autoScale'.
- *
- * @return the value of field 'AutoScale'.
- */
- public boolean isAutoScale(
- ) {
- return this._autoScale;
- }
-
- /**
- * Returns the value of field 'colourByLabel'.
- *
- * @return the value of field 'ColourByLabel'.
- */
- public boolean isColourByLabel(
- ) {
- return this._colourByLabel;
- }
-
- /**
- * Returns the value of field 'display'.
- *
- * @return the value of field 'Display'.
- */
- public boolean isDisplay(
- ) {
- return this._display;
- }
-
- /**
- * 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 'autoScale'.
- *
- * @param autoScale the value of field 'autoScale'.
- */
- public void setAutoScale(
- final boolean autoScale) {
- this._autoScale = autoScale;
- this._has_autoScale = true;
- }
-
- /**
- * Sets the value of field 'colour'.
- *
- * @param colour the value of field 'colour'.
- */
- public void setColour(
- final int colour) {
- this._colour = colour;
- this._has_colour = true;
- }
-
- /**
- * Sets the value of field 'colourByLabel'.
- *
- * @param colourByLabel the value of field 'colourByLabel'.
- */
- public void setColourByLabel(
- final boolean colourByLabel) {
- this._colourByLabel = colourByLabel;
- this._has_colourByLabel = true;
- }
-
- /**
- * Sets the value of field 'display'.
- *
- * @param display the value of field 'display'.
- */
- public void setDisplay(
- final boolean display) {
- this._display = display;
- this._has_display = true;
- }
-
- /**
- * Sets the value of field 'max'.
- *
- * @param max the value of field 'max'.
- */
- public void setMax(
- final float max) {
- this._max = max;
- this._has_max = true;
- }
-
- /**
- * Sets the value of field 'min'.
- *
- * @param min the value of field 'min'.
- */
- public void setMin(
- final float min) {
- this._min = min;
- this._has_min = true;
- }
-
- /**
- * Sets the value of field 'mincolour'. The field 'mincolour'
- * has the following description: Optional minimum colour
- * for graduated feature
- * colour
- *
- *
- * @param mincolour the value of field 'mincolour'.
- */
- public void setMincolour(
- final int mincolour) {
- this._mincolour = mincolour;
- this._has_mincolour = true;
- }
-
- /**
- * Sets the value of field 'order'.
- *
- * @param order the value of field 'order'.
- */
- public void setOrder(
- final float order) {
- this._order = order;
- this._has_order = true;
- }
-
- /**
- * Sets the value of field 'threshold'. The field 'threshold'
- * has the following description: threshold value for
- * graduated feature colour
- *
- *
- * @param threshold the value of field 'threshold'.
- */
- public void setThreshold(
- final float threshold) {
- this._threshold = threshold;
- this._has_threshold = true;
- }
-
- /**
- * Sets the value of field 'threshstate'. The field
- * 'threshstate' has the following description: threshold type
- * for
- * graduated feature colour
- *
- *
- * @param threshstate the value of field 'threshstate'.
- */
- public void setThreshstate(
- final int threshstate) {
- this._threshstate = threshstate;
- this._has_threshstate = true;
- }
-
- /**
- * Sets the value of field 'type'.
- *
- * @param type the value of field 'type'.
- */
- public void setType(
- final java.lang.String type) {
- this._type = type;
- }
-
- /**
- * 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.Settin
- */
- 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);
- }
-
- /**
- *
- *
- * @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);
- }
+public class Setting implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _type.
+ */
+ private java.lang.String _type;
+
+ /**
+ * Field _colour.
+ */
+ private int _colour;
+
+ /**
+ * keeps track of state for field: _colour
+ */
+ private boolean _has_colour;
+
+ /**
+ * Field _display.
+ */
+ private boolean _display;
+
+ /**
+ * keeps track of state for field: _display
+ */
+ private boolean _has_display;
+
+ /**
+ * Field _order.
+ */
+ private float _order;
+
+ /**
+ * keeps track of state for field: _order
+ */
+ private boolean _has_order;
+
+ /**
+ * Optional minimum colour for graduated feature colour
+ *
+ */
+ private int _mincolour;
+
+ /**
+ * keeps track of state for field: _mincolour
+ */
+ private boolean _has_mincolour;
+
+ /**
+ * threshold value for graduated feature colour
+ *
+ */
+ private float _threshold;
+
+ /**
+ * keeps track of state for field: _threshold
+ */
+ private boolean _has_threshold;
+
+ /**
+ * threshold type for graduated feature colour
+ *
+ */
+ private int _threshstate;
+
+ /**
+ * keeps track of state for field: _threshstate
+ */
+ private boolean _has_threshstate;
+
+ /**
+ * Field _max.
+ */
+ private float _max;
+
+ /**
+ * keeps track of state for field: _max
+ */
+ private boolean _has_max;
+
+ /**
+ * Field _min.
+ */
+ private float _min;
+
+ /**
+ * keeps track of state for field: _min
+ */
+ private boolean _has_min;
+
+ /**
+ * Field _colourByLabel.
+ */
+ private boolean _colourByLabel;
+
+ /**
+ * keeps track of state for field: _colourByLabel
+ */
+ private boolean _has_colourByLabel;
+
+ /**
+ * Field _autoScale.
+ */
+ private boolean _autoScale;
+
+ /**
+ * keeps track of state for field: _autoScale
+ */
+ private boolean _has_autoScale;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Setting()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ */
+ public void deleteAutoScale()
+ {
+ this._has_autoScale = false;
+ }
+
+ /**
+ */
+ public void deleteColour()
+ {
+ this._has_colour = false;
+ }
+
+ /**
+ */
+ public void deleteColourByLabel()
+ {
+ this._has_colourByLabel = false;
+ }
+
+ /**
+ */
+ public void deleteDisplay()
+ {
+ this._has_display = false;
+ }
+
+ /**
+ */
+ public void deleteMax()
+ {
+ this._has_max = false;
+ }
+
+ /**
+ */
+ public void deleteMin()
+ {
+ this._has_min = false;
+ }
+
+ /**
+ */
+ public void deleteMincolour()
+ {
+ this._has_mincolour = false;
+ }
+
+ /**
+ */
+ public void deleteOrder()
+ {
+ this._has_order = false;
+ }
+
+ /**
+ */
+ public void deleteThreshold()
+ {
+ this._has_threshold = false;
+ }
+
+ /**
+ */
+ public void deleteThreshstate()
+ {
+ this._has_threshstate = false;
+ }
+
+ /**
+ * Returns the value of field 'autoScale'.
+ *
+ * @return the value of field 'AutoScale'.
+ */
+ public boolean getAutoScale()
+ {
+ return this._autoScale;
+ }
+
+ /**
+ * Returns the value of field 'colour'.
+ *
+ * @return the value of field 'Colour'.
+ */
+ public int getColour()
+ {
+ return this._colour;
+ }
+
+ /**
+ * Returns the value of field 'colourByLabel'.
+ *
+ * @return the value of field 'ColourByLabel'.
+ */
+ public boolean getColourByLabel()
+ {
+ return this._colourByLabel;
+ }
+
+ /**
+ * Returns the value of field 'display'.
+ *
+ * @return the value of field 'Display'.
+ */
+ public boolean getDisplay()
+ {
+ return this._display;
+ }
+
+ /**
+ * Returns the value of field 'max'.
+ *
+ * @return the value of field 'Max'.
+ */
+ public float getMax()
+ {
+ return this._max;
+ }
+
+ /**
+ * Returns the value of field 'min'.
+ *
+ * @return the value of field 'Min'.
+ */
+ public float getMin()
+ {
+ return this._min;
+ }
+
+ /**
+ * Returns the value of field 'mincolour'. The field 'mincolour' has the
+ * following description: Optional minimum colour for graduated feature colour
+ *
+ *
+ * @return the value of field 'Mincolour'.
+ */
+ public int getMincolour()
+ {
+ return this._mincolour;
+ }
+
+ /**
+ * Returns the value of field 'order'.
+ *
+ * @return the value of field 'Order'.
+ */
+ public float getOrder()
+ {
+ return this._order;
+ }
+
+ /**
+ * Returns the value of field 'threshold'. The field 'threshold' has the
+ * following description: threshold value for graduated feature colour
+ *
+ *
+ * @return the value of field 'Threshold'.
+ */
+ public float getThreshold()
+ {
+ return this._threshold;
+ }
+
+ /**
+ * Returns the value of field 'threshstate'. The field 'threshstate' has the
+ * following description: threshold type for graduated feature colour
+ *
+ *
+ * @return the value of field 'Threshstate'.
+ */
+ public int getThreshstate()
+ {
+ return this._threshstate;
+ }
+
+ /**
+ * Returns the value of field 'type'.
+ *
+ * @return the value of field 'Type'.
+ */
+ public java.lang.String getType()
+ {
+ return this._type;
+ }
+
+ /**
+ * Method hasAutoScale.
+ *
+ * @return true if at least one AutoScale has been added
+ */
+ public boolean hasAutoScale()
+ {
+ return this._has_autoScale;
+ }
+
+ /**
+ * Method hasColour.
+ *
+ * @return true if at least one Colour has been added
+ */
+ public boolean hasColour()
+ {
+ return this._has_colour;
+ }
+
+ /**
+ * Method hasColourByLabel.
+ *
+ * @return true if at least one ColourByLabel has been added
+ */
+ public boolean hasColourByLabel()
+ {
+ return this._has_colourByLabel;
+ }
+
+ /**
+ * Method hasDisplay.
+ *
+ * @return true if at least one Display has been added
+ */
+ public boolean hasDisplay()
+ {
+ return this._has_display;
+ }
+
+ /**
+ * Method hasMax.
+ *
+ * @return true if at least one Max has been added
+ */
+ public boolean hasMax()
+ {
+ return this._has_max;
+ }
+
+ /**
+ * Method hasMin.
+ *
+ * @return true if at least one Min has been added
+ */
+ public boolean hasMin()
+ {
+ return this._has_min;
+ }
+
+ /**
+ * Method hasMincolour.
+ *
+ * @return true if at least one Mincolour has been added
+ */
+ public boolean hasMincolour()
+ {
+ return this._has_mincolour;
+ }
+
+ /**
+ * Method hasOrder.
+ *
+ * @return true if at least one Order has been added
+ */
+ public boolean hasOrder()
+ {
+ return this._has_order;
+ }
+
+ /**
+ * Method hasThreshold.
+ *
+ * @return true if at least one Threshold has been added
+ */
+ public boolean hasThreshold()
+ {
+ return this._has_threshold;
+ }
+
+ /**
+ * Method hasThreshstate.
+ *
+ * @return true if at least one Threshstate has been added
+ */
+ public boolean hasThreshstate()
+ {
+ return this._has_threshstate;
+ }
+
+ /**
+ * Returns the value of field 'autoScale'.
+ *
+ * @return the value of field 'AutoScale'.
+ */
+ public boolean isAutoScale()
+ {
+ return this._autoScale;
+ }
+
+ /**
+ * Returns the value of field 'colourByLabel'.
+ *
+ * @return the value of field 'ColourByLabel'.
+ */
+ public boolean isColourByLabel()
+ {
+ return this._colourByLabel;
+ }
+
+ /**
+ * Returns the value of field 'display'.
+ *
+ * @return the value of field 'Display'.
+ */
+ public boolean isDisplay()
+ {
+ return this._display;
+ }
+
+ /**
+ * 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 'autoScale'.
+ *
+ * @param autoScale
+ * the value of field 'autoScale'.
+ */
+ public void setAutoScale(final boolean autoScale)
+ {
+ this._autoScale = autoScale;
+ this._has_autoScale = true;
+ }
+
+ /**
+ * Sets the value of field 'colour'.
+ *
+ * @param colour
+ * the value of field 'colour'.
+ */
+ public void setColour(final int colour)
+ {
+ this._colour = colour;
+ this._has_colour = true;
+ }
+
+ /**
+ * Sets the value of field 'colourByLabel'.
+ *
+ * @param colourByLabel
+ * the value of field 'colourByLabel'.
+ */
+ public void setColourByLabel(final boolean colourByLabel)
+ {
+ this._colourByLabel = colourByLabel;
+ this._has_colourByLabel = true;
+ }
+
+ /**
+ * Sets the value of field 'display'.
+ *
+ * @param display
+ * the value of field 'display'.
+ */
+ public void setDisplay(final boolean display)
+ {
+ this._display = display;
+ this._has_display = true;
+ }
+
+ /**
+ * Sets the value of field 'max'.
+ *
+ * @param max
+ * the value of field 'max'.
+ */
+ public void setMax(final float max)
+ {
+ this._max = max;
+ this._has_max = true;
+ }
+
+ /**
+ * Sets the value of field 'min'.
+ *
+ * @param min
+ * the value of field 'min'.
+ */
+ public void setMin(final float min)
+ {
+ this._min = min;
+ this._has_min = true;
+ }
+
+ /**
+ * Sets the value of field 'mincolour'. The field 'mincolour' has the
+ * following description: Optional minimum colour for graduated feature colour
+ *
+ *
+ * @param mincolour
+ * the value of field 'mincolour'.
+ */
+ public void setMincolour(final int mincolour)
+ {
+ this._mincolour = mincolour;
+ this._has_mincolour = true;
+ }
+
+ /**
+ * Sets the value of field 'order'.
+ *
+ * @param order
+ * the value of field 'order'.
+ */
+ public void setOrder(final float order)
+ {
+ this._order = order;
+ this._has_order = true;
+ }
+
+ /**
+ * Sets the value of field 'threshold'. The field 'threshold' has the
+ * following description: threshold value for graduated feature colour
+ *
+ *
+ * @param threshold
+ * the value of field 'threshold'.
+ */
+ public void setThreshold(final float threshold)
+ {
+ this._threshold = threshold;
+ this._has_threshold = true;
+ }
+
+ /**
+ * Sets the value of field 'threshstate'. The field 'threshstate' has the
+ * following description: threshold type for graduated feature colour
+ *
+ *
+ * @param threshstate
+ * the value of field 'threshstate'.
+ */
+ public void setThreshstate(final int threshstate)
+ {
+ this._threshstate = threshstate;
+ this._has_threshstate = true;
+ }
+
+ /**
+ * Sets the value of field 'type'.
+ *
+ * @param type
+ * the value of field 'type'.
+ */
+ public void setType(final java.lang.String type)
+ {
+ this._type = type;
+ }
+
+ /**
+ * 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.Settin
+ */
+ 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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class StructureState implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * internal content storage
- */
- private java.lang.String _content = "";
-
- /**
- * Field _visible.
- */
- private boolean _visible;
-
- /**
- * keeps track of state for field: _visible
- */
- private boolean _has_visible;
-
- /**
- * additional
- * identifier
- * which
- * properly
- * disambiguates
- * the
- * structure
- * view
- * from
- * any
- * other
- * view
- * with
- * the
- * same
- * attributes.
- * This
- * is
- * not
- * an
- * ID,
- * because
- * it
- * is
- * possible
- * to
- * have
- * many
- * references
- * to
- * the
- * same
- * physical
- * structure
- * view
- * from
- * different
- * sequences
- * in
- * an
- * alignment.
- * A
- * structureState
- * element
- * citing
- * the
- * same
- * viewId
- * will
- * appear
- * for
- * each
- * instance.
- *
- */
- private java.lang.String _viewId;
-
- /**
- * Flag
- * set
- * if
- * the
- * alignment
- * panel
- * containing
- * this
- * JSeq
- * should
- * be
- * included
- * in
- * those
- * used
- * to
- * perform
- * a
- * structure
- * superposition
- * (since
- * Jalview
- * 2.7).
- *
- */
- private boolean _alignwithAlignPanel = true;
-
- /**
- * keeps track of state for field: _alignwithAlignPanel
- */
- private boolean _has_alignwithAlignPanel;
-
- /**
- * Flag
- * set
- * if
- * the
- * alignment
- * panel
- * containing
- * this
- * JSeq
- * should
- * be
- * included
- * in
- * those
- * used
- * to
- * colour
- * its
- * associated
- * sequences
- * in
- * this
- * structureState(since
- * Jalview
- * 2.7).
- *
- */
- private boolean _colourwithAlignPanel = false;
-
- /**
- * keeps track of state for field: _colourwithAlignPanel
- */
- private boolean _has_colourwithAlignPanel;
-
- /**
- * Flag
- * set
- * if
- * the
- * structure
- * display
- * is
- * coloured
- * by
- * the
- * Jmol
- * state,
- * rather
- * than
- * by
- * one
- * or
- * more
- * linked
- * alignment
- * views.
- *
- */
- private boolean _colourByJmol = true;
-
- /**
- * keeps track of state for field: _colourByJmol
- */
- private boolean _has_colourByJmol;
-
- /**
- * Field _width.
- */
- private int _width;
-
- /**
- * keeps track of state for field: _width
- */
- private boolean _has_width;
-
- /**
- * Field _height.
- */
- private int _height;
-
- /**
- * keeps track of state for field: _height
- */
- private boolean _has_height;
-
- /**
- * Field _xpos.
- */
- private int _xpos;
-
- /**
- * keeps track of state for field: _xpos
- */
- private boolean _has_xpos;
-
- /**
- * Field _ypos.
- */
- private int _ypos;
-
- /**
- * keeps track of state for field: _ypos
- */
- private boolean _has_ypos;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public StructureState() {
- super();
- setContent("");
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteAlignwithAlignPanel(
- ) {
- this._has_alignwithAlignPanel= false;
- }
-
- /**
- */
- public void deleteColourByJmol(
- ) {
- this._has_colourByJmol= false;
- }
-
- /**
- */
- public void deleteColourwithAlignPanel(
- ) {
- this._has_colourwithAlignPanel= false;
- }
-
- /**
- */
- public void deleteHeight(
- ) {
- this._has_height= false;
- }
-
- /**
- */
- public void deleteVisible(
- ) {
- this._has_visible= false;
- }
-
- /**
- */
- public void deleteWidth(
- ) {
- this._has_width= false;
- }
-
- /**
- */
- public void deleteXpos(
- ) {
- this._has_xpos= false;
- }
-
- /**
- */
- public void deleteYpos(
- ) {
- this._has_ypos= false;
- }
-
- /**
- * Returns the value of field 'alignwithAlignPanel'. The field
- * 'alignwithAlignPanel' has the following description: Flag
- * set
- * if
- * the
- * alignment
- * panel
- * containing
- * this
- * JSeq
- * should
- * be
- * included
- * in
- * those
- * used
- * to
- * perform
- * a
- * structure
- * superposition
- * (since
- * Jalview
- * 2.7).
- *
- *
- * @return the value of field 'AlignwithAlignPanel'.
- */
- public boolean getAlignwithAlignPanel(
- ) {
- return this._alignwithAlignPanel;
- }
-
- /**
- * Returns the value of field 'colourByJmol'. The field
- * 'colourByJmol' has the following description: Flag
- * set
- * if
- * the
- * structure
- * display
- * is
- * coloured
- * by
- * the
- * Jmol
- * state,
- * rather
- * than
- * by
- * one
- * or
- * more
- * linked
- * alignment
- * views.
- *
- *
- * @return the value of field 'ColourByJmol'.
- */
- public boolean getColourByJmol(
- ) {
- return this._colourByJmol;
- }
-
- /**
- * Returns the value of field 'colourwithAlignPanel'. The field
- * 'colourwithAlignPanel' has the following description: Flag
- * set
- * if
- * the
- * alignment
- * panel
- * containing
- * this
- * JSeq
- * should
- * be
- * included
- * in
- * those
- * used
- * to
- * colour
- * its
- * associated
- * sequences
- * in
- * this
- * structureState(since
- * Jalview
- * 2.7).
- *
- *
- * @return the value of field 'ColourwithAlignPanel'.
- */
- public boolean getColourwithAlignPanel(
- ) {
- return this._colourwithAlignPanel;
- }
-
- /**
- * Returns the value of field 'content'. The field 'content'
- * has the following description: internal content storage
- *
- * @return the value of field 'Content'.
- */
- public java.lang.String getContent(
- ) {
- return this._content;
- }
-
- /**
- * Returns the value of field 'height'.
- *
- * @return the value of field 'Height'.
- */
- public int getHeight(
- ) {
- return this._height;
- }
-
- /**
- * Returns the value of field 'viewId'. The field 'viewId' has
- * the following description: additional
- * identifier
- * which
- * properly
- * disambiguates
- * the
- * structure
- * view
- * from
- * any
- * other
- * view
- * with
- * the
- * same
- * attributes.
- * This
- * is
- * not
- * an
- * ID,
- * because
- * it
- * is
- * possible
- * to
- * have
- * many
- * references
- * to
- * the
- * same
- * physical
- * structure
- * view
- * from
- * different
- * sequences
- * in
- * an
- * alignment.
- * A
- * structureState
- * element
- * citing
- * the
- * same
- * viewId
- * will
- * appear
- * for
- * each
- * instance.
- *
- *
- * @return the value of field 'ViewId'.
- */
- public java.lang.String getViewId(
- ) {
- return this._viewId;
- }
-
- /**
- * Returns the value of field 'visible'.
- *
- * @return the value of field 'Visible'.
- */
- public boolean getVisible(
- ) {
- return this._visible;
- }
-
- /**
- * Returns the value of field 'width'.
- *
- * @return the value of field 'Width'.
- */
- public int getWidth(
- ) {
- return this._width;
- }
-
- /**
- * Returns the value of field 'xpos'.
- *
- * @return the value of field 'Xpos'.
- */
- public int getXpos(
- ) {
- return this._xpos;
- }
-
- /**
- * Returns the value of field 'ypos'.
- *
- * @return the value of field 'Ypos'.
- */
- public int getYpos(
- ) {
- return this._ypos;
- }
-
- /**
- * Method hasAlignwithAlignPanel.
- *
- * @return true if at least one AlignwithAlignPanel has been
- * added
- */
- public boolean hasAlignwithAlignPanel(
- ) {
- return this._has_alignwithAlignPanel;
- }
-
- /**
- * Method hasColourByJmol.
- *
- * @return true if at least one ColourByJmol has been added
- */
- public boolean hasColourByJmol(
- ) {
- return this._has_colourByJmol;
- }
-
- /**
- * Method hasColourwithAlignPanel.
- *
- * @return true if at least one ColourwithAlignPanel has been
- * added
- */
- public boolean hasColourwithAlignPanel(
- ) {
- return this._has_colourwithAlignPanel;
- }
-
- /**
- * Method hasHeight.
- *
- * @return true if at least one Height has been added
- */
- public boolean hasHeight(
- ) {
- return this._has_height;
- }
-
- /**
- * Method hasVisible.
- *
- * @return true if at least one Visible has been added
- */
- public boolean hasVisible(
- ) {
- return this._has_visible;
- }
-
- /**
- * Method hasWidth.
- *
- * @return true if at least one Width has been added
- */
- public boolean hasWidth(
- ) {
- return this._has_width;
- }
-
- /**
- * Method hasXpos.
- *
- * @return true if at least one Xpos has been added
- */
- public boolean hasXpos(
- ) {
- return this._has_xpos;
- }
-
- /**
- * Method hasYpos.
- *
- * @return true if at least one Ypos has been added
- */
- public boolean hasYpos(
- ) {
- return this._has_ypos;
- }
-
- /**
- * Returns the value of field 'alignwithAlignPanel'. The field
- * 'alignwithAlignPanel' has the following description: Flag
- * set
- * if
- * the
- * alignment
- * panel
- * containing
- * this
- * JSeq
- * should
- * be
- * included
- * in
- * those
- * used
- * to
- * perform
- * a
- * structure
- * superposition
- * (since
- * Jalview
- * 2.7).
- *
- *
- * @return the value of field 'AlignwithAlignPanel'.
- */
- public boolean isAlignwithAlignPanel(
- ) {
- return this._alignwithAlignPanel;
- }
-
- /**
- * Returns the value of field 'colourByJmol'. The field
- * 'colourByJmol' has the following description: Flag
- * set
- * if
- * the
- * structure
- * display
- * is
- * coloured
- * by
- * the
- * Jmol
- * state,
- * rather
- * than
- * by
- * one
- * or
- * more
- * linked
- * alignment
- * views.
- *
- *
- * @return the value of field 'ColourByJmol'.
- */
- public boolean isColourByJmol(
- ) {
- return this._colourByJmol;
- }
-
- /**
- * Returns the value of field 'colourwithAlignPanel'. The field
- * 'colourwithAlignPanel' has the following description: Flag
- * set
- * if
- * the
- * alignment
- * panel
- * containing
- * this
- * JSeq
- * should
- * be
- * included
- * in
- * those
- * used
- * to
- * colour
- * its
- * associated
- * sequences
- * in
- * this
- * structureState(since
- * Jalview
- * 2.7).
- *
- *
- * @return the value of field 'ColourwithAlignPanel'.
- */
- public boolean isColourwithAlignPanel(
- ) {
- return this._colourwithAlignPanel;
- }
-
- /**
- * 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;
- }
-
- /**
- * Returns the value of field 'visible'.
- *
- * @return the value of field 'Visible'.
- */
- public boolean isVisible(
- ) {
- return this._visible;
- }
-
- /**
- *
- *
- * @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 'alignwithAlignPanel'. The field
- * 'alignwithAlignPanel' has the following description: Flag
- * set
- * if
- * the
- * alignment
- * panel
- * containing
- * this
- * JSeq
- * should
- * be
- * included
- * in
- * those
- * used
- * to
- * perform
- * a
- * structure
- * superposition
- * (since
- * Jalview
- * 2.7).
- *
- *
- * @param alignwithAlignPanel the value of field
- * 'alignwithAlignPanel'.
- */
- public void setAlignwithAlignPanel(
- final boolean alignwithAlignPanel) {
- this._alignwithAlignPanel = alignwithAlignPanel;
- this._has_alignwithAlignPanel = true;
- }
-
- /**
- * Sets the value of field 'colourByJmol'. The field
- * 'colourByJmol' has the following description: Flag
- * set
- * if
- * the
- * structure
- * display
- * is
- * coloured
- * by
- * the
- * Jmol
- * state,
- * rather
- * than
- * by
- * one
- * or
- * more
- * linked
- * alignment
- * views.
- *
- *
- * @param colourByJmol the value of field 'colourByJmol'.
- */
- public void setColourByJmol(
- final boolean colourByJmol) {
- this._colourByJmol = colourByJmol;
- this._has_colourByJmol = true;
- }
-
- /**
- * Sets the value of field 'colourwithAlignPanel'. The field
- * 'colourwithAlignPanel' has the following description: Flag
- * set
- * if
- * the
- * alignment
- * panel
- * containing
- * this
- * JSeq
- * should
- * be
- * included
- * in
- * those
- * used
- * to
- * colour
- * its
- * associated
- * sequences
- * in
- * this
- * structureState(since
- * Jalview
- * 2.7).
- *
- *
- * @param colourwithAlignPanel the value of field
- * 'colourwithAlignPanel'.
- */
- public void setColourwithAlignPanel(
- final boolean colourwithAlignPanel) {
- this._colourwithAlignPanel = colourwithAlignPanel;
- this._has_colourwithAlignPanel = true;
- }
-
- /**
- * Sets the value of field 'content'. The field 'content' has
- * the following description: internal content storage
- *
- * @param content the value of field 'content'.
- */
- public void setContent(
- final java.lang.String content) {
- this._content = content;
- }
-
- /**
- * Sets the value of field 'height'.
- *
- * @param height the value of field 'height'.
- */
- public void setHeight(
- final int height) {
- this._height = height;
- this._has_height = true;
- }
-
- /**
- * Sets the value of field 'viewId'. The field 'viewId' has the
- * following description: additional
- * identifier
- * which
- * properly
- * disambiguates
- * the
- * structure
- * view
- * from
- * any
- * other
- * view
- * with
- * the
- * same
- * attributes.
- * This
- * is
- * not
- * an
- * ID,
- * because
- * it
- * is
- * possible
- * to
- * have
- * many
- * references
- * to
- * the
- * same
- * physical
- * structure
- * view
- * from
- * different
- * sequences
- * in
- * an
- * alignment.
- * A
- * structureState
- * element
- * citing
- * the
- * same
- * viewId
- * will
- * appear
- * for
- * each
- * instance.
- *
- *
- * @param viewId the value of field 'viewId'.
- */
- public void setViewId(
- final java.lang.String viewId) {
- this._viewId = viewId;
- }
-
- /**
- * Sets the value of field 'visible'.
- *
- * @param visible the value of field 'visible'.
- */
- public void setVisible(
- final boolean visible) {
- this._visible = visible;
- this._has_visible = true;
- }
-
- /**
- * Sets the value of field 'width'.
- *
- * @param width the value of field 'width'.
- */
- public void setWidth(
- final int width) {
- this._width = width;
- this._has_width = true;
- }
-
- /**
- * Sets the value of field 'xpos'.
- *
- * @param xpos the value of field 'xpos'.
- */
- public void setXpos(
- final int xpos) {
- this._xpos = xpos;
- this._has_xpos = true;
- }
-
- /**
- * Sets the value of field 'ypos'.
- *
- * @param ypos the value of field 'ypos'.
- */
- public void setYpos(
- final int ypos) {
- this._ypos = ypos;
- this._has_ypos = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
- }
+public class StructureState implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * internal content storage
+ */
+ private java.lang.String _content = "";
+
+ /**
+ * Field _visible.
+ */
+ private boolean _visible;
+
+ /**
+ * keeps track of state for field: _visible
+ */
+ private boolean _has_visible;
+
+ /**
+ * additional identifier which properly disambiguates the structure view from
+ * any other view with the same attributes. This is not an ID, because it is
+ * possible to have many references to the same physical structure view from
+ * different sequences in an alignment. A structureState element citing the
+ * same viewId will appear for each instance.
+ *
+ */
+ private java.lang.String _viewId;
+
+ /**
+ * Flag set if the alignment panel containing this JSeq should be included in
+ * those used to perform a structure superposition (since Jalview 2.7).
+ *
+ */
+ private boolean _alignwithAlignPanel = true;
+
+ /**
+ * keeps track of state for field: _alignwithAlignPanel
+ */
+ private boolean _has_alignwithAlignPanel;
+
+ /**
+ * Flag set if the alignment panel containing this JSeq should be included in
+ * those used to colour its associated sequences in this structureState(since
+ * Jalview 2.7).
+ *
+ */
+ private boolean _colourwithAlignPanel = false;
+
+ /**
+ * keeps track of state for field: _colourwithAlignPanel
+ */
+ private boolean _has_colourwithAlignPanel;
+
+ /**
+ * Flag set if the structure display is coloured by the Jmol state, rather
+ * than by one or more linked alignment views.
+ *
+ */
+ private boolean _colourByJmol = true;
+
+ /**
+ * keeps track of state for field: _colourByJmol
+ */
+ private boolean _has_colourByJmol;
+
+ /**
+ * Field _width.
+ */
+ private int _width;
+
+ /**
+ * keeps track of state for field: _width
+ */
+ private boolean _has_width;
+
+ /**
+ * Field _height.
+ */
+ private int _height;
+
+ /**
+ * keeps track of state for field: _height
+ */
+ private boolean _has_height;
+
+ /**
+ * Field _xpos.
+ */
+ private int _xpos;
+
+ /**
+ * keeps track of state for field: _xpos
+ */
+ private boolean _has_xpos;
+
+ /**
+ * Field _ypos.
+ */
+ private int _ypos;
+
+ /**
+ * keeps track of state for field: _ypos
+ */
+ private boolean _has_ypos;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public StructureState()
+ {
+ super();
+ setContent("");
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ */
+ public void deleteAlignwithAlignPanel()
+ {
+ this._has_alignwithAlignPanel = false;
+ }
+
+ /**
+ */
+ public void deleteColourByJmol()
+ {
+ this._has_colourByJmol = false;
+ }
+
+ /**
+ */
+ public void deleteColourwithAlignPanel()
+ {
+ this._has_colourwithAlignPanel = false;
+ }
+
+ /**
+ */
+ public void deleteHeight()
+ {
+ this._has_height = false;
+ }
+
+ /**
+ */
+ public void deleteVisible()
+ {
+ this._has_visible = false;
+ }
+
+ /**
+ */
+ public void deleteWidth()
+ {
+ this._has_width = false;
+ }
+
+ /**
+ */
+ public void deleteXpos()
+ {
+ this._has_xpos = false;
+ }
+
+ /**
+ */
+ public void deleteYpos()
+ {
+ this._has_ypos = false;
+ }
+
+ /**
+ * Returns the value of field 'alignwithAlignPanel'. The field
+ * 'alignwithAlignPanel' has the following description: Flag set if the
+ * alignment panel containing this JSeq should be included in those used to
+ * perform a structure superposition (since Jalview 2.7).
+ *
+ *
+ * @return the value of field 'AlignwithAlignPanel'.
+ */
+ public boolean getAlignwithAlignPanel()
+ {
+ return this._alignwithAlignPanel;
+ }
+
+ /**
+ * Returns the value of field 'colourByJmol'. The field 'colourByJmol' has the
+ * following description: Flag set if the structure display is coloured by the
+ * Jmol state, rather than by one or more linked alignment views.
+ *
+ *
+ * @return the value of field 'ColourByJmol'.
+ */
+ public boolean getColourByJmol()
+ {
+ return this._colourByJmol;
+ }
+
+ /**
+ * Returns the value of field 'colourwithAlignPanel'. The field
+ * 'colourwithAlignPanel' has the following description: Flag set if the
+ * alignment panel containing this JSeq should be included in those used to
+ * colour its associated sequences in this structureState(since Jalview 2.7).
+ *
+ *
+ * @return the value of field 'ColourwithAlignPanel'.
+ */
+ public boolean getColourwithAlignPanel()
+ {
+ return this._colourwithAlignPanel;
+ }
+
+ /**
+ * Returns the value of field 'content'. The field 'content' has the following
+ * description: internal content storage
+ *
+ * @return the value of field 'Content'.
+ */
+ public java.lang.String getContent()
+ {
+ return this._content;
+ }
+
+ /**
+ * Returns the value of field 'height'.
+ *
+ * @return the value of field 'Height'.
+ */
+ public int getHeight()
+ {
+ return this._height;
+ }
+
+ /**
+ * Returns the value of field 'viewId'. The field 'viewId' has the following
+ * description: additional identifier which properly disambiguates the
+ * structure view from any other view with the same attributes. This is not an
+ * ID, because it is possible to have many references to the same physical
+ * structure view from different sequences in an alignment. A structureState
+ * element citing the same viewId will appear for each instance.
+ *
+ *
+ * @return the value of field 'ViewId'.
+ */
+ public java.lang.String getViewId()
+ {
+ return this._viewId;
+ }
+
+ /**
+ * Returns the value of field 'visible'.
+ *
+ * @return the value of field 'Visible'.
+ */
+ public boolean getVisible()
+ {
+ return this._visible;
+ }
+
+ /**
+ * Returns the value of field 'width'.
+ *
+ * @return the value of field 'Width'.
+ */
+ public int getWidth()
+ {
+ return this._width;
+ }
+
+ /**
+ * Returns the value of field 'xpos'.
+ *
+ * @return the value of field 'Xpos'.
+ */
+ public int getXpos()
+ {
+ return this._xpos;
+ }
+
+ /**
+ * Returns the value of field 'ypos'.
+ *
+ * @return the value of field 'Ypos'.
+ */
+ public int getYpos()
+ {
+ return this._ypos;
+ }
+
+ /**
+ * Method hasAlignwithAlignPanel.
+ *
+ * @return true if at least one AlignwithAlignPanel has been added
+ */
+ public boolean hasAlignwithAlignPanel()
+ {
+ return this._has_alignwithAlignPanel;
+ }
+
+ /**
+ * Method hasColourByJmol.
+ *
+ * @return true if at least one ColourByJmol has been added
+ */
+ public boolean hasColourByJmol()
+ {
+ return this._has_colourByJmol;
+ }
+
+ /**
+ * Method hasColourwithAlignPanel.
+ *
+ * @return true if at least one ColourwithAlignPanel has been added
+ */
+ public boolean hasColourwithAlignPanel()
+ {
+ return this._has_colourwithAlignPanel;
+ }
+
+ /**
+ * Method hasHeight.
+ *
+ * @return true if at least one Height has been added
+ */
+ public boolean hasHeight()
+ {
+ return this._has_height;
+ }
+
+ /**
+ * Method hasVisible.
+ *
+ * @return true if at least one Visible has been added
+ */
+ public boolean hasVisible()
+ {
+ return this._has_visible;
+ }
+
+ /**
+ * Method hasWidth.
+ *
+ * @return true if at least one Width has been added
+ */
+ public boolean hasWidth()
+ {
+ return this._has_width;
+ }
+
+ /**
+ * Method hasXpos.
+ *
+ * @return true if at least one Xpos has been added
+ */
+ public boolean hasXpos()
+ {
+ return this._has_xpos;
+ }
+
+ /**
+ * Method hasYpos.
+ *
+ * @return true if at least one Ypos has been added
+ */
+ public boolean hasYpos()
+ {
+ return this._has_ypos;
+ }
+
+ /**
+ * Returns the value of field 'alignwithAlignPanel'. The field
+ * 'alignwithAlignPanel' has the following description: Flag set if the
+ * alignment panel containing this JSeq should be included in those used to
+ * perform a structure superposition (since Jalview 2.7).
+ *
+ *
+ * @return the value of field 'AlignwithAlignPanel'.
+ */
+ public boolean isAlignwithAlignPanel()
+ {
+ return this._alignwithAlignPanel;
+ }
+
+ /**
+ * Returns the value of field 'colourByJmol'. The field 'colourByJmol' has the
+ * following description: Flag set if the structure display is coloured by the
+ * Jmol state, rather than by one or more linked alignment views.
+ *
+ *
+ * @return the value of field 'ColourByJmol'.
+ */
+ public boolean isColourByJmol()
+ {
+ return this._colourByJmol;
+ }
+
+ /**
+ * Returns the value of field 'colourwithAlignPanel'. The field
+ * 'colourwithAlignPanel' has the following description: Flag set if the
+ * alignment panel containing this JSeq should be included in those used to
+ * colour its associated sequences in this structureState(since Jalview 2.7).
+ *
+ *
+ * @return the value of field 'ColourwithAlignPanel'.
+ */
+ public boolean isColourwithAlignPanel()
+ {
+ return this._colourwithAlignPanel;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Returns the value of field 'visible'.
+ *
+ * @return the value of field 'Visible'.
+ */
+ public boolean isVisible()
+ {
+ return this._visible;
+ }
+
+ /**
+ *
+ *
+ * @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 'alignwithAlignPanel'. The field
+ * 'alignwithAlignPanel' has the following description: Flag set if the
+ * alignment panel containing this JSeq should be included in those used to
+ * perform a structure superposition (since Jalview 2.7).
+ *
+ *
+ * @param alignwithAlignPanel
+ * the value of field 'alignwithAlignPanel'.
+ */
+ public void setAlignwithAlignPanel(final boolean alignwithAlignPanel)
+ {
+ this._alignwithAlignPanel = alignwithAlignPanel;
+ this._has_alignwithAlignPanel = true;
+ }
+
+ /**
+ * Sets the value of field 'colourByJmol'. The field 'colourByJmol' has the
+ * following description: Flag set if the structure display is coloured by the
+ * Jmol state, rather than by one or more linked alignment views.
+ *
+ *
+ * @param colourByJmol
+ * the value of field 'colourByJmol'.
+ */
+ public void setColourByJmol(final boolean colourByJmol)
+ {
+ this._colourByJmol = colourByJmol;
+ this._has_colourByJmol = true;
+ }
+
+ /**
+ * Sets the value of field 'colourwithAlignPanel'. The field
+ * 'colourwithAlignPanel' has the following description: Flag set if the
+ * alignment panel containing this JSeq should be included in those used to
+ * colour its associated sequences in this structureState(since Jalview 2.7).
+ *
+ *
+ * @param colourwithAlignPanel
+ * the value of field 'colourwithAlignPanel'.
+ */
+ public void setColourwithAlignPanel(final boolean colourwithAlignPanel)
+ {
+ this._colourwithAlignPanel = colourwithAlignPanel;
+ this._has_colourwithAlignPanel = true;
+ }
+
+ /**
+ * Sets the value of field 'content'. The field 'content' has the following
+ * description: internal content storage
+ *
+ * @param content
+ * the value of field 'content'.
+ */
+ public void setContent(final java.lang.String content)
+ {
+ this._content = content;
+ }
+
+ /**
+ * Sets the value of field 'height'.
+ *
+ * @param height
+ * the value of field 'height'.
+ */
+ public void setHeight(final int height)
+ {
+ this._height = height;
+ this._has_height = true;
+ }
+
+ /**
+ * Sets the value of field 'viewId'. The field 'viewId' has the following
+ * description: additional identifier which properly disambiguates the
+ * structure view from any other view with the same attributes. This is not an
+ * ID, because it is possible to have many references to the same physical
+ * structure view from different sequences in an alignment. A structureState
+ * element citing the same viewId will appear for each instance.
+ *
+ *
+ * @param viewId
+ * the value of field 'viewId'.
+ */
+ public void setViewId(final java.lang.String viewId)
+ {
+ this._viewId = viewId;
+ }
+
+ /**
+ * Sets the value of field 'visible'.
+ *
+ * @param visible
+ * the value of field 'visible'.
+ */
+ public void setVisible(final boolean visible)
+ {
+ this._visible = visible;
+ this._has_visible = true;
+ }
+
+ /**
+ * Sets the value of field 'width'.
+ *
+ * @param width
+ * the value of field 'width'.
+ */
+ public void setWidth(final int width)
+ {
+ this._width = width;
+ this._has_width = true;
+ }
+
+ /**
+ * Sets the value of field 'xpos'.
+ *
+ * @param xpos
+ * the value of field 'xpos'.
+ */
+ public void setXpos(final int xpos)
+ {
+ this._xpos = xpos;
+ this._has_xpos = true;
+ }
+
+ /**
+ * Sets the value of field 'ypos'.
+ *
+ * @param ypos
+ * the value of field 'ypos'.
+ */
+ public void setYpos(final int ypos)
+ {
+ this._ypos = ypos;
+ this._has_ypos = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class ThresholdLine implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _label.
- */
- private java.lang.String _label;
-
- /**
- * Field _value.
- */
- private float _value;
-
- /**
- * keeps track of state for field: _value
- */
- private boolean _has_value;
-
- /**
- * Field _colour.
- */
- private int _colour;
-
- /**
- * keeps track of state for field: _colour
- */
- private boolean _has_colour;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public ThresholdLine() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteColour(
- ) {
- this._has_colour= false;
- }
-
- /**
- */
- public void deleteValue(
- ) {
- this._has_value= false;
- }
-
- /**
- * Returns the value of field 'colour'.
- *
- * @return the value of field 'Colour'.
- */
- public int getColour(
- ) {
- return this._colour;
- }
-
- /**
- * Returns the value of field 'label'.
- *
- * @return the value of field 'Label'.
- */
- public java.lang.String getLabel(
- ) {
- return this._label;
- }
-
- /**
- * Returns the value of field 'value'.
- *
- * @return the value of field 'Value'.
- */
- public float getValue(
- ) {
- return this._value;
- }
-
- /**
- * Method hasColour.
- *
- * @return true if at least one Colour has been added
- */
- public boolean hasColour(
- ) {
- return this._has_colour;
- }
-
- /**
- * Method hasValue.
- *
- * @return true if at least one Value has been added
- */
- public boolean hasValue(
- ) {
- return this._has_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 'colour'.
- *
- * @param colour the value of field 'colour'.
- */
- public void setColour(
- final int colour) {
- this._colour = colour;
- this._has_colour = true;
- }
-
- /**
- * Sets the value of field 'label'.
- *
- * @param label the value of field 'label'.
- */
- public void setLabel(
- final java.lang.String label) {
- this._label = label;
- }
-
- /**
- * Sets the value of field 'value'.
- *
- * @param value the value of field 'value'.
- */
- public void setValue(
- final float value) {
- this._value = value;
- this._has_value = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
- }
+public class ThresholdLine implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _label.
+ */
+ private java.lang.String _label;
+
+ /**
+ * Field _value.
+ */
+ private float _value;
+
+ /**
+ * keeps track of state for field: _value
+ */
+ private boolean _has_value;
+
+ /**
+ * Field _colour.
+ */
+ private int _colour;
+
+ /**
+ * keeps track of state for field: _colour
+ */
+ private boolean _has_colour;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public ThresholdLine()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ */
+ public void deleteColour()
+ {
+ this._has_colour = false;
+ }
+
+ /**
+ */
+ public void deleteValue()
+ {
+ this._has_value = false;
+ }
+
+ /**
+ * Returns the value of field 'colour'.
+ *
+ * @return the value of field 'Colour'.
+ */
+ public int getColour()
+ {
+ return this._colour;
+ }
+
+ /**
+ * Returns the value of field 'label'.
+ *
+ * @return the value of field 'Label'.
+ */
+ public java.lang.String getLabel()
+ {
+ return this._label;
+ }
+
+ /**
+ * Returns the value of field 'value'.
+ *
+ * @return the value of field 'Value'.
+ */
+ public float getValue()
+ {
+ return this._value;
+ }
+
+ /**
+ * Method hasColour.
+ *
+ * @return true if at least one Colour has been added
+ */
+ public boolean hasColour()
+ {
+ return this._has_colour;
+ }
+
+ /**
+ * Method hasValue.
+ *
+ * @return true if at least one Value has been added
+ */
+ public boolean hasValue()
+ {
+ return this._has_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 'colour'.
+ *
+ * @param colour
+ * the value of field 'colour'.
+ */
+ public void setColour(final int colour)
+ {
+ this._colour = colour;
+ this._has_colour = true;
+ }
+
+ /**
+ * Sets the value of field 'label'.
+ *
+ * @param label
+ * the value of field 'label'.
+ */
+ public void setLabel(final java.lang.String label)
+ {
+ this._label = label;
+ }
+
+ /**
+ * Sets the value of field 'value'.
+ *
+ * @param value
+ * the value of field 'value'.
+ */
+ public void setValue(final float value)
+ {
+ this._value = value;
+ this._has_value = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Tree implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _fontName.
- */
- private java.lang.String _fontName;
-
- /**
- * Field _fontSize.
- */
- private int _fontSize;
-
- /**
- * keeps track of state for field: _fontSize
- */
- private boolean _has_fontSize;
-
- /**
- * Field _fontStyle.
- */
- private int _fontStyle;
-
- /**
- * keeps track of state for field: _fontStyle
- */
- private boolean _has_fontStyle;
-
- /**
- * Field _threshold.
- */
- private float _threshold;
-
- /**
- * keeps track of state for field: _threshold
- */
- private boolean _has_threshold;
-
- /**
- * Field _showBootstrap.
- */
- private boolean _showBootstrap;
-
- /**
- * keeps track of state for field: _showBootstrap
- */
- private boolean _has_showBootstrap;
-
- /**
- * Field _showDistances.
- */
- private boolean _showDistances;
-
- /**
- * keeps track of state for field: _showDistances
- */
- private boolean _has_showDistances;
-
- /**
- * Field _markUnlinked.
- */
- private boolean _markUnlinked;
-
- /**
- * keeps track of state for field: _markUnlinked
- */
- private boolean _has_markUnlinked;
-
- /**
- * Field _fitToWindow.
- */
- private boolean _fitToWindow;
-
- /**
- * keeps track of state for field: _fitToWindow
- */
- private boolean _has_fitToWindow;
-
- /**
- * Field _currentTree.
- */
- private boolean _currentTree;
-
- /**
- * keeps track of state for field: _currentTree
- */
- private boolean _has_currentTree;
-
- /**
- * Tree ID added for binding tree
- * visualization settings to vamsas
- * document trees in jalview 2.4.1
- *
- */
- private java.lang.String _id;
-
- /**
- * Field _width.
- */
- private int _width;
-
- /**
- * keeps track of state for field: _width
- */
- private boolean _has_width;
-
- /**
- * Field _height.
- */
- private int _height;
-
- /**
- * keeps track of state for field: _height
- */
- private boolean _has_height;
-
- /**
- * Field _xpos.
- */
- private int _xpos;
-
- /**
- * keeps track of state for field: _xpos
- */
- private boolean _has_xpos;
-
- /**
- * Field _ypos.
- */
- private int _ypos;
-
- /**
- * keeps track of state for field: _ypos
- */
- private boolean _has_ypos;
-
- /**
- * Field _title.
- */
- private java.lang.String _title;
-
- /**
- * Field _newick.
- */
- private java.lang.String _newick;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Tree() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- */
- public void deleteCurrentTree(
- ) {
- this._has_currentTree= false;
- }
-
- /**
- */
- public void deleteFitToWindow(
- ) {
- this._has_fitToWindow= false;
- }
-
- /**
- */
- public void deleteFontSize(
- ) {
- this._has_fontSize= false;
- }
-
- /**
- */
- public void deleteFontStyle(
- ) {
- this._has_fontStyle= false;
- }
-
- /**
- */
- public void deleteHeight(
- ) {
- this._has_height= false;
- }
-
- /**
- */
- public void deleteMarkUnlinked(
- ) {
- this._has_markUnlinked= false;
- }
-
- /**
- */
- public void deleteShowBootstrap(
- ) {
- this._has_showBootstrap= false;
- }
-
- /**
- */
- public void deleteShowDistances(
- ) {
- this._has_showDistances= false;
- }
-
- /**
- */
- public void deleteThreshold(
- ) {
- this._has_threshold= false;
- }
-
- /**
- */
- public void deleteWidth(
- ) {
- this._has_width= false;
- }
-
- /**
- */
- public void deleteXpos(
- ) {
- this._has_xpos= false;
- }
-
- /**
- */
- public void deleteYpos(
- ) {
- this._has_ypos= false;
- }
-
- /**
- * Returns the value of field 'currentTree'.
- *
- * @return the value of field 'CurrentTree'.
- */
- public boolean getCurrentTree(
- ) {
- return this._currentTree;
- }
-
- /**
- * Returns the value of field 'fitToWindow'.
- *
- * @return the value of field 'FitToWindow'.
- */
- public boolean getFitToWindow(
- ) {
- return this._fitToWindow;
- }
-
- /**
- * Returns the value of field 'fontName'.
- *
- * @return the value of field 'FontName'.
- */
- public java.lang.String getFontName(
- ) {
- return this._fontName;
- }
-
- /**
- * Returns the value of field 'fontSize'.
- *
- * @return the value of field 'FontSize'.
- */
- public int getFontSize(
- ) {
- return this._fontSize;
- }
-
- /**
- * Returns the value of field 'fontStyle'.
- *
- * @return the value of field 'FontStyle'.
- */
- public int getFontStyle(
- ) {
- return this._fontStyle;
- }
-
- /**
- * Returns the value of field 'height'.
- *
- * @return the value of field 'Height'.
- */
- public int getHeight(
- ) {
- return this._height;
- }
-
- /**
- * Returns the value of field 'id'. The field 'id' has the
- * following description: Tree ID added for binding tree
- * visualization settings to vamsas
- * document trees in jalview 2.4.1
- *
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId(
- ) {
- return this._id;
- }
-
- /**
- * Returns the value of field 'markUnlinked'.
- *
- * @return the value of field 'MarkUnlinked'.
- */
- public boolean getMarkUnlinked(
- ) {
- return this._markUnlinked;
- }
-
- /**
- * Returns the value of field 'newick'.
- *
- * @return the value of field 'Newick'.
- */
- public java.lang.String getNewick(
- ) {
- return this._newick;
- }
-
- /**
- * Returns the value of field 'showBootstrap'.
- *
- * @return the value of field 'ShowBootstrap'.
- */
- public boolean getShowBootstrap(
- ) {
- return this._showBootstrap;
- }
-
- /**
- * Returns the value of field 'showDistances'.
- *
- * @return the value of field 'ShowDistances'.
- */
- public boolean getShowDistances(
- ) {
- return this._showDistances;
- }
-
- /**
- * Returns the value of field 'threshold'.
- *
- * @return the value of field 'Threshold'.
- */
- public float getThreshold(
- ) {
- return this._threshold;
- }
-
- /**
- * Returns the value of field 'title'.
- *
- * @return the value of field 'Title'.
- */
- public java.lang.String getTitle(
- ) {
- return this._title;
- }
-
- /**
- * Returns the value of field 'width'.
- *
- * @return the value of field 'Width'.
- */
- public int getWidth(
- ) {
- return this._width;
- }
-
- /**
- * Returns the value of field 'xpos'.
- *
- * @return the value of field 'Xpos'.
- */
- public int getXpos(
- ) {
- return this._xpos;
- }
-
- /**
- * Returns the value of field 'ypos'.
- *
- * @return the value of field 'Ypos'.
- */
- public int getYpos(
- ) {
- return this._ypos;
- }
-
- /**
- * Method hasCurrentTree.
- *
- * @return true if at least one CurrentTree has been added
- */
- public boolean hasCurrentTree(
- ) {
- return this._has_currentTree;
- }
-
- /**
- * Method hasFitToWindow.
- *
- * @return true if at least one FitToWindow has been added
- */
- public boolean hasFitToWindow(
- ) {
- return this._has_fitToWindow;
- }
-
- /**
- * Method hasFontSize.
- *
- * @return true if at least one FontSize has been added
- */
- public boolean hasFontSize(
- ) {
- return this._has_fontSize;
- }
-
- /**
- * Method hasFontStyle.
- *
- * @return true if at least one FontStyle has been added
- */
- public boolean hasFontStyle(
- ) {
- return this._has_fontStyle;
- }
-
- /**
- * Method hasHeight.
- *
- * @return true if at least one Height has been added
- */
- public boolean hasHeight(
- ) {
- return this._has_height;
- }
-
- /**
- * Method hasMarkUnlinked.
- *
- * @return true if at least one MarkUnlinked has been added
- */
- public boolean hasMarkUnlinked(
- ) {
- return this._has_markUnlinked;
- }
-
- /**
- * Method hasShowBootstrap.
- *
- * @return true if at least one ShowBootstrap has been added
- */
- public boolean hasShowBootstrap(
- ) {
- return this._has_showBootstrap;
- }
-
- /**
- * Method hasShowDistances.
- *
- * @return true if at least one ShowDistances has been added
- */
- public boolean hasShowDistances(
- ) {
- return this._has_showDistances;
- }
-
- /**
- * Method hasThreshold.
- *
- * @return true if at least one Threshold has been added
- */
- public boolean hasThreshold(
- ) {
- return this._has_threshold;
- }
-
- /**
- * Method hasWidth.
- *
- * @return true if at least one Width has been added
- */
- public boolean hasWidth(
- ) {
- return this._has_width;
- }
-
- /**
- * Method hasXpos.
- *
- * @return true if at least one Xpos has been added
- */
- public boolean hasXpos(
- ) {
- return this._has_xpos;
- }
-
- /**
- * 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 the value of field 'FitToWindow'.
- */
- public boolean isFitToWindow(
- ) {
- return this._fitToWindow;
- }
-
- /**
- * 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 the value of field 'ShowDistances'.
- */
- 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) {
- 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 'currentTree'.
- *
- * @param currentTree the value of field 'currentTree'.
- */
- public void setCurrentTree(
- final boolean currentTree) {
- this._currentTree = currentTree;
- this._has_currentTree = true;
- }
-
- /**
- * Sets the value of field 'fitToWindow'.
- *
- * @param fitToWindow the value of field 'fitToWindow'.
- */
- public void setFitToWindow(
- final boolean fitToWindow) {
- this._fitToWindow = fitToWindow;
- this._has_fitToWindow = true;
- }
-
- /**
- * Sets the value of field 'fontName'.
- *
- * @param fontName the value of field 'fontName'.
- */
- public void setFontName(
- final java.lang.String fontName) {
- this._fontName = fontName;
- }
-
- /**
- * Sets the value of field 'fontSize'.
- *
- * @param fontSize the value of field 'fontSize'.
- */
- public void setFontSize(
- final int fontSize) {
- this._fontSize = fontSize;
- this._has_fontSize = true;
- }
-
- /**
- * Sets the value of field 'fontStyle'.
- *
- * @param fontStyle the value of field 'fontStyle'.
- */
- public void setFontStyle(
- final int fontStyle) {
- this._fontStyle = fontStyle;
- this._has_fontStyle = true;
- }
-
- /**
- * Sets the value of field 'height'.
- *
- * @param height the value of field 'height'.
- */
- public void setHeight(
- final int height) {
- this._height = height;
- this._has_height = true;
- }
-
- /**
- * Sets the value of field 'id'. The field 'id' has the
- * following description: Tree ID added for binding tree
- * visualization settings to vamsas
- * document trees in jalview 2.4.1
- *
- *
- * @param id the value of field 'id'.
- */
- public void setId(
- final java.lang.String id) {
- this._id = id;
- }
-
- /**
- * Sets the value of field 'markUnlinked'.
- *
- * @param markUnlinked the value of field 'markUnlinked'.
- */
- public void setMarkUnlinked(
- final boolean markUnlinked) {
- this._markUnlinked = markUnlinked;
- this._has_markUnlinked = true;
- }
-
- /**
- * Sets the value of field 'newick'.
- *
- * @param newick the value of field 'newick'.
- */
- public void setNewick(
- final java.lang.String newick) {
- this._newick = newick;
- }
-
- /**
- * Sets the value of field 'showBootstrap'.
- *
- * @param showBootstrap the value of field 'showBootstrap'.
- */
- public void setShowBootstrap(
- final boolean showBootstrap) {
- this._showBootstrap = showBootstrap;
- this._has_showBootstrap = true;
- }
-
- /**
- * Sets the value of field 'showDistances'.
- *
- * @param showDistances the value of field 'showDistances'.
- */
- public void setShowDistances(
- final boolean showDistances) {
- this._showDistances = showDistances;
- this._has_showDistances = true;
- }
-
- /**
- * Sets the value of field 'threshold'.
- *
- * @param threshold the value of field 'threshold'.
- */
- public void setThreshold(
- final float threshold) {
- this._threshold = threshold;
- this._has_threshold = true;
- }
-
- /**
- * Sets the value of field 'title'.
- *
- * @param title the value of field 'title'.
- */
- public void setTitle(
- final java.lang.String title) {
- this._title = title;
- }
-
- /**
- * Sets the value of field 'width'.
- *
- * @param width the value of field 'width'.
- */
- public void setWidth(
- final int width) {
- this._width = width;
- this._has_width = true;
- }
-
- /**
- * Sets the value of field 'xpos'.
- *
- * @param xpos the value of field 'xpos'.
- */
- public void setXpos(
- final int xpos) {
- this._xpos = xpos;
- this._has_xpos = true;
- }
-
- /**
- * Sets the value of field 'ypos'.
- *
- * @param ypos the value of field 'ypos'.
- */
- public void setYpos(
- final int ypos) {
- this._ypos = ypos;
- this._has_ypos = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
- }
+public class Tree implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _fontName.
+ */
+ private java.lang.String _fontName;
+
+ /**
+ * Field _fontSize.
+ */
+ private int _fontSize;
+
+ /**
+ * keeps track of state for field: _fontSize
+ */
+ private boolean _has_fontSize;
+
+ /**
+ * Field _fontStyle.
+ */
+ private int _fontStyle;
+
+ /**
+ * keeps track of state for field: _fontStyle
+ */
+ private boolean _has_fontStyle;
+
+ /**
+ * Field _threshold.
+ */
+ private float _threshold;
+
+ /**
+ * keeps track of state for field: _threshold
+ */
+ private boolean _has_threshold;
+
+ /**
+ * Field _showBootstrap.
+ */
+ private boolean _showBootstrap;
+
+ /**
+ * keeps track of state for field: _showBootstrap
+ */
+ private boolean _has_showBootstrap;
+
+ /**
+ * Field _showDistances.
+ */
+ private boolean _showDistances;
+
+ /**
+ * keeps track of state for field: _showDistances
+ */
+ private boolean _has_showDistances;
+
+ /**
+ * Field _markUnlinked.
+ */
+ private boolean _markUnlinked;
+
+ /**
+ * keeps track of state for field: _markUnlinked
+ */
+ private boolean _has_markUnlinked;
+
+ /**
+ * Field _fitToWindow.
+ */
+ private boolean _fitToWindow;
+
+ /**
+ * keeps track of state for field: _fitToWindow
+ */
+ private boolean _has_fitToWindow;
+
+ /**
+ * Field _currentTree.
+ */
+ private boolean _currentTree;
+
+ /**
+ * keeps track of state for field: _currentTree
+ */
+ private boolean _has_currentTree;
+
+ /**
+ * Tree ID added for binding tree visualization settings to vamsas document
+ * trees in jalview 2.4.1
+ *
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _width.
+ */
+ private int _width;
+
+ /**
+ * keeps track of state for field: _width
+ */
+ private boolean _has_width;
+
+ /**
+ * Field _height.
+ */
+ private int _height;
+
+ /**
+ * keeps track of state for field: _height
+ */
+ private boolean _has_height;
+
+ /**
+ * Field _xpos.
+ */
+ private int _xpos;
+
+ /**
+ * keeps track of state for field: _xpos
+ */
+ private boolean _has_xpos;
+
+ /**
+ * Field _ypos.
+ */
+ private int _ypos;
+
+ /**
+ * keeps track of state for field: _ypos
+ */
+ private boolean _has_ypos;
+
+ /**
+ * Field _title.
+ */
+ private java.lang.String _title;
+
+ /**
+ * Field _newick.
+ */
+ private java.lang.String _newick;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Tree()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ */
+ public void deleteCurrentTree()
+ {
+ this._has_currentTree = false;
+ }
+
+ /**
+ */
+ public void deleteFitToWindow()
+ {
+ this._has_fitToWindow = false;
+ }
+
+ /**
+ */
+ public void deleteFontSize()
+ {
+ this._has_fontSize = false;
+ }
+
+ /**
+ */
+ public void deleteFontStyle()
+ {
+ this._has_fontStyle = false;
+ }
+
+ /**
+ */
+ public void deleteHeight()
+ {
+ this._has_height = false;
+ }
+
+ /**
+ */
+ public void deleteMarkUnlinked()
+ {
+ this._has_markUnlinked = false;
+ }
+
+ /**
+ */
+ public void deleteShowBootstrap()
+ {
+ this._has_showBootstrap = false;
+ }
+
+ /**
+ */
+ public void deleteShowDistances()
+ {
+ this._has_showDistances = false;
+ }
+
+ /**
+ */
+ public void deleteThreshold()
+ {
+ this._has_threshold = false;
+ }
+
+ /**
+ */
+ public void deleteWidth()
+ {
+ this._has_width = false;
+ }
+
+ /**
+ */
+ public void deleteXpos()
+ {
+ this._has_xpos = false;
+ }
+
+ /**
+ */
+ public void deleteYpos()
+ {
+ this._has_ypos = false;
+ }
+
+ /**
+ * Returns the value of field 'currentTree'.
+ *
+ * @return the value of field 'CurrentTree'.
+ */
+ public boolean getCurrentTree()
+ {
+ return this._currentTree;
+ }
+
+ /**
+ * Returns the value of field 'fitToWindow'.
+ *
+ * @return the value of field 'FitToWindow'.
+ */
+ public boolean getFitToWindow()
+ {
+ return this._fitToWindow;
+ }
+
+ /**
+ * Returns the value of field 'fontName'.
+ *
+ * @return the value of field 'FontName'.
+ */
+ public java.lang.String getFontName()
+ {
+ return this._fontName;
+ }
+
+ /**
+ * Returns the value of field 'fontSize'.
+ *
+ * @return the value of field 'FontSize'.
+ */
+ public int getFontSize()
+ {
+ return this._fontSize;
+ }
+
+ /**
+ * Returns the value of field 'fontStyle'.
+ *
+ * @return the value of field 'FontStyle'.
+ */
+ public int getFontStyle()
+ {
+ return this._fontStyle;
+ }
+
+ /**
+ * Returns the value of field 'height'.
+ *
+ * @return the value of field 'Height'.
+ */
+ public int getHeight()
+ {
+ return this._height;
+ }
+
+ /**
+ * Returns the value of field 'id'. The field 'id' has the following
+ * description: Tree ID added for binding tree visualization settings to
+ * vamsas document trees in jalview 2.4.1
+ *
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId()
+ {
+ return this._id;
+ }
+
+ /**
+ * Returns the value of field 'markUnlinked'.
+ *
+ * @return the value of field 'MarkUnlinked'.
+ */
+ public boolean getMarkUnlinked()
+ {
+ return this._markUnlinked;
+ }
+
+ /**
+ * Returns the value of field 'newick'.
+ *
+ * @return the value of field 'Newick'.
+ */
+ public java.lang.String getNewick()
+ {
+ return this._newick;
+ }
+
+ /**
+ * Returns the value of field 'showBootstrap'.
+ *
+ * @return the value of field 'ShowBootstrap'.
+ */
+ public boolean getShowBootstrap()
+ {
+ return this._showBootstrap;
+ }
+
+ /**
+ * Returns the value of field 'showDistances'.
+ *
+ * @return the value of field 'ShowDistances'.
+ */
+ public boolean getShowDistances()
+ {
+ return this._showDistances;
+ }
+
+ /**
+ * Returns the value of field 'threshold'.
+ *
+ * @return the value of field 'Threshold'.
+ */
+ public float getThreshold()
+ {
+ return this._threshold;
+ }
+
+ /**
+ * Returns the value of field 'title'.
+ *
+ * @return the value of field 'Title'.
+ */
+ public java.lang.String getTitle()
+ {
+ return this._title;
+ }
+
+ /**
+ * Returns the value of field 'width'.
+ *
+ * @return the value of field 'Width'.
+ */
+ public int getWidth()
+ {
+ return this._width;
+ }
+
+ /**
+ * Returns the value of field 'xpos'.
+ *
+ * @return the value of field 'Xpos'.
+ */
+ public int getXpos()
+ {
+ return this._xpos;
+ }
+
+ /**
+ * Returns the value of field 'ypos'.
+ *
+ * @return the value of field 'Ypos'.
+ */
+ public int getYpos()
+ {
+ return this._ypos;
+ }
+
+ /**
+ * Method hasCurrentTree.
+ *
+ * @return true if at least one CurrentTree has been added
+ */
+ public boolean hasCurrentTree()
+ {
+ return this._has_currentTree;
+ }
+
+ /**
+ * Method hasFitToWindow.
+ *
+ * @return true if at least one FitToWindow has been added
+ */
+ public boolean hasFitToWindow()
+ {
+ return this._has_fitToWindow;
+ }
+
+ /**
+ * Method hasFontSize.
+ *
+ * @return true if at least one FontSize has been added
+ */
+ public boolean hasFontSize()
+ {
+ return this._has_fontSize;
+ }
+
+ /**
+ * Method hasFontStyle.
+ *
+ * @return true if at least one FontStyle has been added
+ */
+ public boolean hasFontStyle()
+ {
+ return this._has_fontStyle;
+ }
+
+ /**
+ * Method hasHeight.
+ *
+ * @return true if at least one Height has been added
+ */
+ public boolean hasHeight()
+ {
+ return this._has_height;
+ }
+
+ /**
+ * Method hasMarkUnlinked.
+ *
+ * @return true if at least one MarkUnlinked has been added
+ */
+ public boolean hasMarkUnlinked()
+ {
+ return this._has_markUnlinked;
+ }
+
+ /**
+ * Method hasShowBootstrap.
+ *
+ * @return true if at least one ShowBootstrap has been added
+ */
+ public boolean hasShowBootstrap()
+ {
+ return this._has_showBootstrap;
+ }
+
+ /**
+ * Method hasShowDistances.
+ *
+ * @return true if at least one ShowDistances has been added
+ */
+ public boolean hasShowDistances()
+ {
+ return this._has_showDistances;
+ }
+
+ /**
+ * Method hasThreshold.
+ *
+ * @return true if at least one Threshold has been added
+ */
+ public boolean hasThreshold()
+ {
+ return this._has_threshold;
+ }
+
+ /**
+ * Method hasWidth.
+ *
+ * @return true if at least one Width has been added
+ */
+ public boolean hasWidth()
+ {
+ return this._has_width;
+ }
+
+ /**
+ * Method hasXpos.
+ *
+ * @return true if at least one Xpos has been added
+ */
+ public boolean hasXpos()
+ {
+ return this._has_xpos;
+ }
+
+ /**
+ * 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 the value of field 'FitToWindow'.
+ */
+ public boolean isFitToWindow()
+ {
+ return this._fitToWindow;
+ }
+
+ /**
+ * 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 the value of field 'ShowDistances'.
+ */
+ 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)
+ {
+ 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 'currentTree'.
+ *
+ * @param currentTree
+ * the value of field 'currentTree'.
+ */
+ public void setCurrentTree(final boolean currentTree)
+ {
+ this._currentTree = currentTree;
+ this._has_currentTree = true;
+ }
+
+ /**
+ * Sets the value of field 'fitToWindow'.
+ *
+ * @param fitToWindow
+ * the value of field 'fitToWindow'.
+ */
+ public void setFitToWindow(final boolean fitToWindow)
+ {
+ this._fitToWindow = fitToWindow;
+ this._has_fitToWindow = true;
+ }
+
+ /**
+ * Sets the value of field 'fontName'.
+ *
+ * @param fontName
+ * the value of field 'fontName'.
+ */
+ public void setFontName(final java.lang.String fontName)
+ {
+ this._fontName = fontName;
+ }
+
+ /**
+ * Sets the value of field 'fontSize'.
+ *
+ * @param fontSize
+ * the value of field 'fontSize'.
+ */
+ public void setFontSize(final int fontSize)
+ {
+ this._fontSize = fontSize;
+ this._has_fontSize = true;
+ }
+
+ /**
+ * Sets the value of field 'fontStyle'.
+ *
+ * @param fontStyle
+ * the value of field 'fontStyle'.
+ */
+ public void setFontStyle(final int fontStyle)
+ {
+ this._fontStyle = fontStyle;
+ this._has_fontStyle = true;
+ }
+
+ /**
+ * Sets the value of field 'height'.
+ *
+ * @param height
+ * the value of field 'height'.
+ */
+ public void setHeight(final int height)
+ {
+ this._height = height;
+ this._has_height = true;
+ }
+
+ /**
+ * Sets the value of field 'id'. The field 'id' has the following description:
+ * Tree ID added for binding tree visualization settings to vamsas document
+ * trees in jalview 2.4.1
+ *
+ *
+ * @param id
+ * the value of field 'id'.
+ */
+ public void setId(final java.lang.String id)
+ {
+ this._id = id;
+ }
+
+ /**
+ * Sets the value of field 'markUnlinked'.
+ *
+ * @param markUnlinked
+ * the value of field 'markUnlinked'.
+ */
+ public void setMarkUnlinked(final boolean markUnlinked)
+ {
+ this._markUnlinked = markUnlinked;
+ this._has_markUnlinked = true;
+ }
+
+ /**
+ * Sets the value of field 'newick'.
+ *
+ * @param newick
+ * the value of field 'newick'.
+ */
+ public void setNewick(final java.lang.String newick)
+ {
+ this._newick = newick;
+ }
+
+ /**
+ * Sets the value of field 'showBootstrap'.
+ *
+ * @param showBootstrap
+ * the value of field 'showBootstrap'.
+ */
+ public void setShowBootstrap(final boolean showBootstrap)
+ {
+ this._showBootstrap = showBootstrap;
+ this._has_showBootstrap = true;
+ }
+
+ /**
+ * Sets the value of field 'showDistances'.
+ *
+ * @param showDistances
+ * the value of field 'showDistances'.
+ */
+ public void setShowDistances(final boolean showDistances)
+ {
+ this._showDistances = showDistances;
+ this._has_showDistances = true;
+ }
+
+ /**
+ * Sets the value of field 'threshold'.
+ *
+ * @param threshold
+ * the value of field 'threshold'.
+ */
+ public void setThreshold(final float threshold)
+ {
+ this._threshold = threshold;
+ this._has_threshold = true;
+ }
+
+ /**
+ * Sets the value of field 'title'.
+ *
+ * @param title
+ * the value of field 'title'.
+ */
+ public void setTitle(final java.lang.String title)
+ {
+ this._title = title;
+ }
+
+ /**
+ * Sets the value of field 'width'.
+ *
+ * @param width
+ * the value of field 'width'.
+ */
+ public void setWidth(final int width)
+ {
+ this._width = width;
+ this._has_width = true;
+ }
+
+ /**
+ * Sets the value of field 'xpos'.
+ *
+ * @param xpos
+ * the value of field 'xpos'.
+ */
+ public void setXpos(final int xpos)
+ {
+ this._xpos = xpos;
+ this._has_xpos = true;
+ }
+
+ /**
+ * Sets the value of field 'ypos'.
+ *
+ * @param ypos
+ * the value of field 'ypos'.
+ */
+ public void setYpos(final int ypos)
+ {
+ this._ypos = ypos;
+ this._has_ypos = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class UserColourScheme extends JalviewUserColours
-implements java.io.Serializable
+public class UserColourScheme extends JalviewUserColours implements
+ java.io.Serializable
{
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
- //----------------/
- //- Constructors -/
- //----------------/
-
- public UserColourScheme() {
- super();
- }
-
+ public UserColourScheme()
+ {
+ super();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * 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;
+ /**
+ * 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 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);
- }
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
- /**
- * Method 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.JalviewUserColours
- */
- 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 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.JalviewUserColours
+ */
+ 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);
+ }
- /**
- *
- *
- * @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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class UserColours implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _id.
- */
- private java.lang.String _id;
-
- /**
- * Field _userColourScheme.
- */
- private jalview.schemabinding.version2.UserColourScheme _userColourScheme;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public UserColours() {
- super();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Returns the value of field 'id'.
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId(
- ) {
- return this._id;
- }
-
- /**
- * Returns the value of field 'userColourScheme'.
- *
- * @return the value of field 'UserColourScheme'.
- */
- public jalview.schemabinding.version2.UserColourScheme getUserColourScheme(
- ) {
- return this._userColourScheme;
- }
-
- /**
- * 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 'id'.
- *
- * @param id the value of field 'id'.
- */
- public void setId(
- final java.lang.String id) {
- this._id = id;
- }
-
- /**
- * Sets the value of field 'userColourScheme'.
- *
- * @param userColourScheme the value of field 'userColourScheme'
- */
- public void setUserColourScheme(
- final jalview.schemabinding.version2.UserColourScheme userColourScheme) {
- this._userColourScheme = userColourScheme;
- }
-
- /**
- * 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.UserColours
- */
- 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);
- }
-
- /**
- *
- *
- * @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);
+public class UserColours implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _id.
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _userColourScheme.
+ */
+ private jalview.schemabinding.version2.UserColourScheme _userColourScheme;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public UserColours()
+ {
+ super();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Returns the value of field 'id'.
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId()
+ {
+ return this._id;
+ }
+
+ /**
+ * Returns the value of field 'userColourScheme'.
+ *
+ * @return the value of field 'UserColourScheme'.
+ */
+ public jalview.schemabinding.version2.UserColourScheme getUserColourScheme()
+ {
+ return this._userColourScheme;
+ }
+
+ /**
+ * 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 'id'.
+ *
+ * @param id
+ * the value of field 'id'.
+ */
+ public void setId(final java.lang.String id)
+ {
+ this._id = id;
+ }
+
+ /**
+ * Sets the value of field 'userColourScheme'.
+ *
+ * @param userColourScheme
+ * the value of field 'userColourScheme'
+ */
+ public void setUserColourScheme(
+ final jalview.schemabinding.version2.UserColourScheme userColourScheme)
+ {
+ this._userColourScheme = userColourScheme;
+ }
+
+ /**
+ * 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.UserColours
+ */
+ 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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class VAMSAS implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _treeList.
- */
- private java.util.Vector _treeList;
-
- /**
- * Field _sequenceSetList.
- */
- private java.util.Vector _sequenceSetList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public VAMSAS() {
- super();
- this._treeList = new java.util.Vector();
- this._sequenceSetList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vSequenceSet
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSequenceSet(
- final jalview.schemabinding.version2.SequenceSet vSequenceSet)
- throws java.lang.IndexOutOfBoundsException {
- this._sequenceSetList.addElement(vSequenceSet);
- }
-
- /**
- *
- *
- * @param index
- * @param vSequenceSet
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addSequenceSet(
- final int index,
- final jalview.schemabinding.version2.SequenceSet vSequenceSet)
- throws java.lang.IndexOutOfBoundsException {
- this._sequenceSetList.add(index, vSequenceSet);
- }
-
- /**
- *
- *
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addTree(
- final java.lang.String vTree)
- throws java.lang.IndexOutOfBoundsException {
- this._treeList.addElement(vTree);
- }
-
- /**
- *
- *
- * @param index
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addTree(
- final int index,
- final java.lang.String vTree)
- throws java.lang.IndexOutOfBoundsException {
- this._treeList.add(index, vTree);
- }
-
- /**
- * Method enumerateSequenceSet.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.SequenceSet elements
- */
- public java.util.Enumeration enumerateSequenceSet(
- ) {
- return this._sequenceSetList.elements();
- }
-
- /**
- * Method enumerateTree.
- *
- * @return an Enumeration over all java.lang.String elements
- */
- public java.util.Enumeration enumerateTree(
- ) {
- return this._treeList.elements();
- }
-
- /**
- * Method getSequenceSet.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.SequenceSet at the given index
- */
- 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.get(index);
- }
-
- /**
- * Method getSequenceSet.Returns the contents of the collection
- * in an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getSequenceSetCount(
- ) {
- return this._sequenceSetList.size();
- }
-
- /**
- * Method getTree.
- *
- * @param index
- * @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(
- 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 (java.lang.String) _treeList.get(index);
- }
-
- /**
- * Method getTree.Returns the contents of the collection in an
- * Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public java.lang.String[] getTree(
- ) {
- java.lang.String[] array = new java.lang.String[0];
- return (java.lang.String[]) this._treeList.toArray(array);
- }
-
- /**
- * Method getTreeCount.
- *
- * @return the size of this collection
- */
- public int getTreeCount(
- ) {
- return this._treeList.size();
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllSequenceSet(
- ) {
- this._sequenceSetList.clear();
+public class VAMSAS implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _treeList.
+ */
+ private java.util.Vector _treeList;
+
+ /**
+ * Field _sequenceSetList.
+ */
+ private java.util.Vector _sequenceSetList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public VAMSAS()
+ {
+ super();
+ this._treeList = new java.util.Vector();
+ this._sequenceSetList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vSequenceSet
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSequenceSet(
+ final jalview.schemabinding.version2.SequenceSet vSequenceSet)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._sequenceSetList.addElement(vSequenceSet);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequenceSet
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addSequenceSet(final int index,
+ final jalview.schemabinding.version2.SequenceSet vSequenceSet)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._sequenceSetList.add(index, vSequenceSet);
+ }
+
+ /**
+ *
+ *
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addTree(final java.lang.String vTree)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._treeList.addElement(vTree);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addTree(final int index, final java.lang.String vTree)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._treeList.add(index, vTree);
+ }
+
+ /**
+ * Method enumerateSequenceSet.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.SequenceSet
+ * elements
+ */
+ public java.util.Enumeration enumerateSequenceSet()
+ {
+ return this._sequenceSetList.elements();
+ }
+
+ /**
+ * Method enumerateTree.
+ *
+ * @return an Enumeration over all java.lang.String elements
+ */
+ public java.util.Enumeration enumerateTree()
+ {
+ return this._treeList.elements();
+ }
+
+ /**
+ * Method getSequenceSet.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.SequenceSet at the
+ * given index
+ */
+ 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) + "]");
}
- /**
- */
- public void removeAllTree(
- ) {
- this._treeList.clear();
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.SequenceSet removeSequenceSetAt(
- final int index) {
- java.lang.Object obj = this._sequenceSetList.remove(index);
- return (jalview.schemabinding.version2.SequenceSet) obj;
- }
-
- /**
- * 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;
+ return (jalview.schemabinding.version2.SequenceSet) _sequenceSetList
+ .get(index);
+ }
+
+ /**
+ * Method getSequenceSet.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getSequenceSetCount()
+ {
+ return this._sequenceSetList.size();
+ }
+
+ /**
+ * Method getTree.
+ *
+ * @param index
+ * @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(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) + "]");
}
- /**
- * Method removeTreeAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public java.lang.String removeTreeAt(
- final int index) {
- java.lang.Object obj = this._treeList.remove(index);
- return (java.lang.String) obj;
+ return (java.lang.String) _treeList.get(index);
+ }
+
+ /**
+ * Method getTree.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public java.lang.String[] getTree()
+ {
+ java.lang.String[] array = new java.lang.String[0];
+ return (java.lang.String[]) this._treeList.toArray(array);
+ }
+
+ /**
+ * Method getTreeCount.
+ *
+ * @return the size of this collection
+ */
+ public int getTreeCount()
+ {
+ return this._treeList.size();
+ }
+
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid()
+ {
+ try
+ {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex)
+ {
+ return false;
}
-
- /**
- *
- *
- * @param index
- * @param vSequenceSet
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- 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) + "]");
- }
-
- this._sequenceSetList.set(index, vSequenceSet);
- }
-
- /**
- *
- *
- * @param vSequenceSetArray
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
*/
- public void setSequenceSet(
- final jalview.schemabinding.version2.SequenceSet[] vSequenceSetArray) {
- //-- copy array
- _sequenceSetList.clear();
-
- for (int i = 0; i < vSequenceSetArray.length; i++) {
- this._sequenceSetList.add(vSequenceSetArray[i]);
- }
- }
+ public void removeAllSequenceSet()
+ {
+ this._sequenceSetList.clear();
+ }
- /**
- *
- *
- * @param index
- * @param vTree
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
+ /**
*/
- 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) + "]");
- }
-
- this._treeList.set(index, vTree);
+ public void removeAllTree()
+ {
+ this._treeList.clear();
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.SequenceSet removeSequenceSetAt(
+ final int index)
+ {
+ java.lang.Object obj = this._sequenceSetList.remove(index);
+ return (jalview.schemabinding.version2.SequenceSet) obj;
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public java.lang.String removeTreeAt(final int index)
+ {
+ java.lang.Object obj = this._treeList.remove(index);
+ return (java.lang.String) obj;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequenceSet
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ 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) + "]");
}
- /**
- *
- *
- * @param vTreeArray
- */
- public void setTree(
- final java.lang.String[] vTreeArray) {
- //-- copy array
- _treeList.clear();
-
- for (int i = 0; i < vTreeArray.length; i++) {
- this._treeList.add(vTreeArray[i]);
- }
+ this._sequenceSetList.set(index, vSequenceSet);
+ }
+
+ /**
+ *
+ *
+ * @param vSequenceSetArray
+ */
+ public void setSequenceSet(
+ final jalview.schemabinding.version2.SequenceSet[] vSequenceSetArray)
+ {
+ // -- copy array
+ _sequenceSetList.clear();
+
+ for (int i = 0; i < vSequenceSetArray.length; i++)
+ {
+ this._sequenceSetList.add(vSequenceSetArray[i]);
}
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled jalview.schemabinding.version2.VAMSAS
- */
- 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);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTree
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ 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) + "]");
}
- /**
- *
- *
- * @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);
+ this._treeList.set(index, vTree);
+ }
+
+ /**
+ *
+ *
+ * @param vTreeArray
+ */
+ public void setTree(final java.lang.String[] vTreeArray)
+ {
+ // -- copy array
+ _treeList.clear();
+
+ for (int i = 0; i < vTreeArray.length; i++)
+ {
+ this._treeList.add(vTreeArray[i]);
}
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.VAMSAS
+ */
+ 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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class VamsasModel extends VAMSAS
-implements java.io.Serializable
+public class VamsasModel extends VAMSAS implements java.io.Serializable
{
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
- //----------------/
- //- Constructors -/
- //----------------/
-
- public VamsasModel() {
- super();
- }
-
+ public VamsasModel()
+ {
+ super();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * 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;
+ /**
+ * 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 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);
- }
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
- /**
- * Method 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.VAMSAS
- */
- 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 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.VAMSAS
+ */
+ 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);
+ }
- /**
- *
- *
- * @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);
- }
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class Viewport implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _conservationSelected.
- */
- private boolean _conservationSelected;
-
- /**
- * keeps track of state for field: _conservationSelected
- */
- private boolean _has_conservationSelected;
-
- /**
- * Field _pidSelected.
- */
- private boolean _pidSelected;
-
- /**
- * keeps track of state for field: _pidSelected
- */
- private boolean _has_pidSelected;
-
- /**
- * Field _bgColour.
- */
- private java.lang.String _bgColour;
-
- /**
- * Field _consThreshold.
- */
- private int _consThreshold;
-
- /**
- * keeps track of state for field: _consThreshold
- */
- private boolean _has_consThreshold;
-
- /**
- * Field _pidThreshold.
- */
- private int _pidThreshold;
-
- /**
- * keeps track of state for field: _pidThreshold
- */
- private boolean _has_pidThreshold;
-
- /**
- * Field _title.
- */
- private java.lang.String _title;
-
- /**
- * Field _showFullId.
- */
- private boolean _showFullId;
-
- /**
- * keeps track of state for field: _showFullId
- */
- private boolean _has_showFullId;
-
- /**
- * Field _rightAlignIds.
- */
- private boolean _rightAlignIds;
-
- /**
- * keeps track of state for field: _rightAlignIds
- */
- private boolean _has_rightAlignIds;
-
- /**
- * Field _showText.
- */
- private boolean _showText;
-
- /**
- * keeps track of state for field: _showText
- */
- private boolean _has_showText;
-
- /**
- * Field _showColourText.
- */
- private boolean _showColourText;
-
- /**
- * keeps track of state for field: _showColourText
- */
- private boolean _has_showColourText;
-
- /**
- * Field _showUnconserved.
- */
- private boolean _showUnconserved = false;
-
- /**
- * keeps track of state for field: _showUnconserved
- */
- private boolean _has_showUnconserved;
-
- /**
- * Field _showBoxes.
- */
- private boolean _showBoxes;
-
- /**
- * keeps track of state for field: _showBoxes
- */
- private boolean _has_showBoxes;
-
- /**
- * Field _wrapAlignment.
- */
- private boolean _wrapAlignment;
-
- /**
- * keeps track of state for field: _wrapAlignment
- */
- private boolean _has_wrapAlignment;
-
- /**
- * Field _renderGaps.
- */
- private boolean _renderGaps;
-
- /**
- * keeps track of state for field: _renderGaps
- */
- private boolean _has_renderGaps;
-
- /**
- * Field _showSequenceFeatures.
- */
- private boolean _showSequenceFeatures;
-
- /**
- * keeps track of state for field: _showSequenceFeatures
- */
- private boolean _has_showSequenceFeatures;
-
- /**
- * Field _showNPfeatureTooltip.
- */
- private boolean _showNPfeatureTooltip;
-
- /**
- * keeps track of state for field: _showNPfeatureTooltip
- */
- private boolean _has_showNPfeatureTooltip;
-
- /**
- * Field _showDbRefTooltip.
- */
- private boolean _showDbRefTooltip;
-
- /**
- * keeps track of state for field: _showDbRefTooltip
- */
- private boolean _has_showDbRefTooltip;
-
- /**
- * Field _followHighlight.
- */
- private boolean _followHighlight = true;
-
- /**
- * keeps track of state for field: _followHighlight
- */
- private boolean _has_followHighlight;
-
- /**
- * Field _followSelection.
- */
- private boolean _followSelection = true;
-
- /**
- * keeps track of state for field: _followSelection
- */
- private boolean _has_followSelection;
-
- /**
- * Field _showAnnotation.
- */
- private boolean _showAnnotation;
-
- /**
- * keeps track of state for field: _showAnnotation
- */
- private boolean _has_showAnnotation;
-
- /**
- * Field _centreColumnLabels.
- */
- private boolean _centreColumnLabels = false;
-
- /**
- * keeps track of state for field: _centreColumnLabels
- */
- private boolean _has_centreColumnLabels;
-
- /**
- * Field _showGroupConservation.
- */
- private boolean _showGroupConservation = false;
-
- /**
- * keeps track of state for field: _showGroupConservation
- */
- private boolean _has_showGroupConservation;
-
- /**
- * Field _showGroupConsensus.
- */
- private boolean _showGroupConsensus = false;
-
- /**
- * keeps track of state for field: _showGroupConsensus
- */
- private boolean _has_showGroupConsensus;
-
- /**
- * Field _showConsensusHistogram.
- */
- private boolean _showConsensusHistogram = true;
-
- /**
- * keeps track of state for field: _showConsensusHistogram
- */
- private boolean _has_showConsensusHistogram;
-
- /**
- * Field _showSequenceLogo.
- */
- private boolean _showSequenceLogo = false;
-
- /**
- * keeps track of state for field: _showSequenceLogo
- */
- private boolean _has_showSequenceLogo;
-
- /**
- * Field _normaliseSequenceLogo.
- */
- private boolean _normaliseSequenceLogo = false;
-
- /**
- * keeps track of state for field: _normaliseSequenceLogo
- */
- private boolean _has_normaliseSequenceLogo;
-
- /**
- * Field _ignoreGapsinConsensus.
- */
- private boolean _ignoreGapsinConsensus = true;
-
- /**
- * keeps track of state for field: _ignoreGapsinConsensus
- */
- private boolean _has_ignoreGapsinConsensus;
-
- /**
- * Field _startRes.
- */
- private int _startRes;
-
- /**
- * keeps track of state for field: _startRes
- */
- private boolean _has_startRes;
-
- /**
- * Field _startSeq.
- */
- private int _startSeq;
-
- /**
- * keeps track of state for field: _startSeq
- */
- private boolean _has_startSeq;
-
- /**
- * Field _fontName.
- */
- private java.lang.String _fontName;
-
- /**
- * Field _fontSize.
- */
- private int _fontSize;
-
- /**
- * keeps track of state for field: _fontSize
- */
- private boolean _has_fontSize;
-
- /**
- * Field _fontStyle.
- */
- private int _fontStyle;
-
- /**
- * keeps track of state for field: _fontStyle
- */
- private boolean _has_fontStyle;
-
- /**
- * Field _viewName.
- */
- private java.lang.String _viewName;
-
- /**
- * Field _sequenceSetId.
- */
- private java.lang.String _sequenceSetId;
-
- /**
- * Field _gatheredViews.
- */
- private boolean _gatheredViews;
-
- /**
- * keeps track of state for field: _gatheredViews
- */
- private boolean _has_gatheredViews;
-
- /**
- * Field _textCol1.
- */
- private int _textCol1;
-
- /**
- * keeps track of state for field: _textCol1
- */
- private boolean _has_textCol1;
-
- /**
- * Field _textCol2.
- */
- private int _textCol2;
-
- /**
- * keeps track of state for field: _textCol2
- */
- private boolean _has_textCol2;
-
- /**
- * Field _textColThreshold.
- */
- private int _textColThreshold;
-
- /**
- * keeps track of state for field: _textColThreshold
- */
- private boolean _has_textColThreshold;
-
- /**
- * unique id used by jalview to
- * synchronize between stored and
- * instantiated views
- *
- */
- private java.lang.String _id;
-
- /**
- * Field _width.
- */
- private int _width;
-
- /**
- * keeps track of state for field: _width
- */
- private boolean _has_width;
-
- /**
- * Field _height.
- */
- private int _height;
-
- /**
- * keeps track of state for field: _height
- */
- private boolean _has_height;
-
- /**
- * Field _xpos.
- */
- private int _xpos;
-
- /**
- * keeps track of state for field: _xpos
- */
- private boolean _has_xpos;
-
- /**
- * Field _ypos.
- */
- private int _ypos;
-
- /**
- * keeps track of state for field: _ypos
- */
- private boolean _has_ypos;
-
- /**
- * Field _annotationColours.
- */
- private jalview.schemabinding.version2.AnnotationColours _annotationColours;
-
- /**
- * Field _hiddenColumnsList.
- */
- private java.util.Vector _hiddenColumnsList;
-
- /**
- * Field _calcIdParamList.
- */
- private java.util.Vector _calcIdParamList;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Viewport() {
- super();
- this._hiddenColumnsList = new java.util.Vector();
- this._calcIdParamList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vCalcIdParam
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addCalcIdParam(
- final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
- throws java.lang.IndexOutOfBoundsException {
- this._calcIdParamList.addElement(vCalcIdParam);
- }
-
- /**
- *
- *
- * @param index
- * @param vCalcIdParam
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addCalcIdParam(
- final int index,
- final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
- throws java.lang.IndexOutOfBoundsException {
- this._calcIdParamList.add(index, vCalcIdParam);
- }
-
- /**
- *
- *
- * @param vHiddenColumns
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addHiddenColumns(
- final jalview.schemabinding.version2.HiddenColumns vHiddenColumns)
- throws java.lang.IndexOutOfBoundsException {
- this._hiddenColumnsList.addElement(vHiddenColumns);
- }
-
- /**
- *
- *
- * @param index
- * @param vHiddenColumns
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addHiddenColumns(
- final int index,
- final jalview.schemabinding.version2.HiddenColumns vHiddenColumns)
- throws java.lang.IndexOutOfBoundsException {
- this._hiddenColumnsList.add(index, vHiddenColumns);
- }
-
- /**
- */
- public void deleteCentreColumnLabels(
- ) {
- this._has_centreColumnLabels= false;
- }
-
- /**
- */
- public void deleteConsThreshold(
- ) {
- this._has_consThreshold= false;
- }
-
- /**
- */
- public void deleteConservationSelected(
- ) {
- this._has_conservationSelected= false;
- }
-
- /**
- */
- public void deleteFollowHighlight(
- ) {
- this._has_followHighlight= false;
- }
-
- /**
- */
- public void deleteFollowSelection(
- ) {
- this._has_followSelection= false;
- }
-
- /**
- */
- public void deleteFontSize(
- ) {
- this._has_fontSize= false;
- }
-
- /**
- */
- public void deleteFontStyle(
- ) {
- this._has_fontStyle= false;
- }
-
- /**
- */
- public void deleteGatheredViews(
- ) {
- this._has_gatheredViews= false;
- }
-
- /**
- */
- public void deleteHeight(
- ) {
- this._has_height= false;
- }
-
- /**
- */
- public void deleteIgnoreGapsinConsensus(
- ) {
- this._has_ignoreGapsinConsensus= false;
- }
-
- /**
- */
- public void deleteNormaliseSequenceLogo(
- ) {
- this._has_normaliseSequenceLogo= false;
- }
-
- /**
- */
- public void deletePidSelected(
- ) {
- this._has_pidSelected= false;
- }
-
- /**
- */
- public void deletePidThreshold(
- ) {
- this._has_pidThreshold= false;
- }
-
- /**
- */
- public void deleteRenderGaps(
- ) {
- this._has_renderGaps= false;
- }
-
- /**
- */
- public void deleteRightAlignIds(
- ) {
- this._has_rightAlignIds= false;
- }
+public class Viewport implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _conservationSelected.
+ */
+ private boolean _conservationSelected;
+
+ /**
+ * keeps track of state for field: _conservationSelected
+ */
+ private boolean _has_conservationSelected;
+
+ /**
+ * Field _pidSelected.
+ */
+ private boolean _pidSelected;
+
+ /**
+ * keeps track of state for field: _pidSelected
+ */
+ private boolean _has_pidSelected;
+
+ /**
+ * Field _bgColour.
+ */
+ private java.lang.String _bgColour;
+
+ /**
+ * Field _consThreshold.
+ */
+ private int _consThreshold;
+
+ /**
+ * keeps track of state for field: _consThreshold
+ */
+ private boolean _has_consThreshold;
+
+ /**
+ * Field _pidThreshold.
+ */
+ private int _pidThreshold;
+
+ /**
+ * keeps track of state for field: _pidThreshold
+ */
+ private boolean _has_pidThreshold;
+
+ /**
+ * Field _title.
+ */
+ private java.lang.String _title;
+
+ /**
+ * Field _showFullId.
+ */
+ private boolean _showFullId;
+
+ /**
+ * keeps track of state for field: _showFullId
+ */
+ private boolean _has_showFullId;
+
+ /**
+ * Field _rightAlignIds.
+ */
+ private boolean _rightAlignIds;
+
+ /**
+ * keeps track of state for field: _rightAlignIds
+ */
+ private boolean _has_rightAlignIds;
+
+ /**
+ * Field _showText.
+ */
+ private boolean _showText;
+
+ /**
+ * keeps track of state for field: _showText
+ */
+ private boolean _has_showText;
+
+ /**
+ * Field _showColourText.
+ */
+ private boolean _showColourText;
+
+ /**
+ * keeps track of state for field: _showColourText
+ */
+ private boolean _has_showColourText;
+
+ /**
+ * Field _showUnconserved.
+ */
+ private boolean _showUnconserved = false;
+
+ /**
+ * keeps track of state for field: _showUnconserved
+ */
+ private boolean _has_showUnconserved;
+
+ /**
+ * Field _showBoxes.
+ */
+ private boolean _showBoxes;
+
+ /**
+ * keeps track of state for field: _showBoxes
+ */
+ private boolean _has_showBoxes;
+
+ /**
+ * Field _wrapAlignment.
+ */
+ private boolean _wrapAlignment;
+
+ /**
+ * keeps track of state for field: _wrapAlignment
+ */
+ private boolean _has_wrapAlignment;
+
+ /**
+ * Field _renderGaps.
+ */
+ private boolean _renderGaps;
+
+ /**
+ * keeps track of state for field: _renderGaps
+ */
+ private boolean _has_renderGaps;
+
+ /**
+ * Field _showSequenceFeatures.
+ */
+ private boolean _showSequenceFeatures;
+
+ /**
+ * keeps track of state for field: _showSequenceFeatures
+ */
+ private boolean _has_showSequenceFeatures;
+
+ /**
+ * Field _showNPfeatureTooltip.
+ */
+ private boolean _showNPfeatureTooltip;
+
+ /**
+ * keeps track of state for field: _showNPfeatureTooltip
+ */
+ private boolean _has_showNPfeatureTooltip;
+
+ /**
+ * Field _showDbRefTooltip.
+ */
+ private boolean _showDbRefTooltip;
+
+ /**
+ * keeps track of state for field: _showDbRefTooltip
+ */
+ private boolean _has_showDbRefTooltip;
+
+ /**
+ * Field _followHighlight.
+ */
+ private boolean _followHighlight = true;
+
+ /**
+ * keeps track of state for field: _followHighlight
+ */
+ private boolean _has_followHighlight;
+
+ /**
+ * Field _followSelection.
+ */
+ private boolean _followSelection = true;
+
+ /**
+ * keeps track of state for field: _followSelection
+ */
+ private boolean _has_followSelection;
+
+ /**
+ * Field _showAnnotation.
+ */
+ private boolean _showAnnotation;
+
+ /**
+ * keeps track of state for field: _showAnnotation
+ */
+ private boolean _has_showAnnotation;
+
+ /**
+ * Field _centreColumnLabels.
+ */
+ private boolean _centreColumnLabels = false;
+
+ /**
+ * keeps track of state for field: _centreColumnLabels
+ */
+ private boolean _has_centreColumnLabels;
+
+ /**
+ * Field _showGroupConservation.
+ */
+ private boolean _showGroupConservation = false;
+
+ /**
+ * keeps track of state for field: _showGroupConservation
+ */
+ private boolean _has_showGroupConservation;
+
+ /**
+ * Field _showGroupConsensus.
+ */
+ private boolean _showGroupConsensus = false;
+
+ /**
+ * keeps track of state for field: _showGroupConsensus
+ */
+ private boolean _has_showGroupConsensus;
+
+ /**
+ * Field _showConsensusHistogram.
+ */
+ private boolean _showConsensusHistogram = true;
+
+ /**
+ * keeps track of state for field: _showConsensusHistogram
+ */
+ private boolean _has_showConsensusHistogram;
+
+ /**
+ * Field _showSequenceLogo.
+ */
+ private boolean _showSequenceLogo = false;
+
+ /**
+ * keeps track of state for field: _showSequenceLogo
+ */
+ private boolean _has_showSequenceLogo;
+
+ /**
+ * Field _normaliseSequenceLogo.
+ */
+ private boolean _normaliseSequenceLogo = false;
+
+ /**
+ * keeps track of state for field: _normaliseSequenceLogo
+ */
+ private boolean _has_normaliseSequenceLogo;
+
+ /**
+ * Field _ignoreGapsinConsensus.
+ */
+ private boolean _ignoreGapsinConsensus = true;
+
+ /**
+ * keeps track of state for field: _ignoreGapsinConsensus
+ */
+ private boolean _has_ignoreGapsinConsensus;
+
+ /**
+ * Field _startRes.
+ */
+ private int _startRes;
+
+ /**
+ * keeps track of state for field: _startRes
+ */
+ private boolean _has_startRes;
+
+ /**
+ * Field _startSeq.
+ */
+ private int _startSeq;
+
+ /**
+ * keeps track of state for field: _startSeq
+ */
+ private boolean _has_startSeq;
+
+ /**
+ * Field _fontName.
+ */
+ private java.lang.String _fontName;
+
+ /**
+ * Field _fontSize.
+ */
+ private int _fontSize;
+
+ /**
+ * keeps track of state for field: _fontSize
+ */
+ private boolean _has_fontSize;
+
+ /**
+ * Field _fontStyle.
+ */
+ private int _fontStyle;
+
+ /**
+ * keeps track of state for field: _fontStyle
+ */
+ private boolean _has_fontStyle;
+
+ /**
+ * Field _viewName.
+ */
+ private java.lang.String _viewName;
+
+ /**
+ * Field _sequenceSetId.
+ */
+ private java.lang.String _sequenceSetId;
+
+ /**
+ * Field _gatheredViews.
+ */
+ private boolean _gatheredViews;
+
+ /**
+ * keeps track of state for field: _gatheredViews
+ */
+ private boolean _has_gatheredViews;
+
+ /**
+ * Field _textCol1.
+ */
+ private int _textCol1;
+
+ /**
+ * keeps track of state for field: _textCol1
+ */
+ private boolean _has_textCol1;
+
+ /**
+ * Field _textCol2.
+ */
+ private int _textCol2;
+
+ /**
+ * keeps track of state for field: _textCol2
+ */
+ private boolean _has_textCol2;
+
+ /**
+ * Field _textColThreshold.
+ */
+ private int _textColThreshold;
+
+ /**
+ * keeps track of state for field: _textColThreshold
+ */
+ private boolean _has_textColThreshold;
+
+ /**
+ * unique id used by jalview to synchronize between stored and instantiated
+ * views
+ *
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _width.
+ */
+ private int _width;
+
+ /**
+ * keeps track of state for field: _width
+ */
+ private boolean _has_width;
+
+ /**
+ * Field _height.
+ */
+ private int _height;
+
+ /**
+ * keeps track of state for field: _height
+ */
+ private boolean _has_height;
+
+ /**
+ * Field _xpos.
+ */
+ private int _xpos;
+
+ /**
+ * keeps track of state for field: _xpos
+ */
+ private boolean _has_xpos;
+
+ /**
+ * Field _ypos.
+ */
+ private int _ypos;
+
+ /**
+ * keeps track of state for field: _ypos
+ */
+ private boolean _has_ypos;
+
+ /**
+ * Field _annotationColours.
+ */
+ private jalview.schemabinding.version2.AnnotationColours _annotationColours;
+
+ /**
+ * Field _hiddenColumnsList.
+ */
+ private java.util.Vector _hiddenColumnsList;
+
+ /**
+ * Field _calcIdParamList.
+ */
+ private java.util.Vector _calcIdParamList;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public Viewport()
+ {
+ super();
+ this._hiddenColumnsList = new java.util.Vector();
+ this._calcIdParamList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vCalcIdParam
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addCalcIdParam(
+ final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._calcIdParamList.addElement(vCalcIdParam);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vCalcIdParam
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addCalcIdParam(final int index,
+ final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._calcIdParamList.add(index, vCalcIdParam);
+ }
+
+ /**
+ *
+ *
+ * @param vHiddenColumns
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addHiddenColumns(
+ final jalview.schemabinding.version2.HiddenColumns vHiddenColumns)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._hiddenColumnsList.addElement(vHiddenColumns);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vHiddenColumns
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addHiddenColumns(final int index,
+ final jalview.schemabinding.version2.HiddenColumns vHiddenColumns)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._hiddenColumnsList.add(index, vHiddenColumns);
+ }
+
+ /**
+ */
+ public void deleteCentreColumnLabels()
+ {
+ this._has_centreColumnLabels = false;
+ }
+
+ /**
+ */
+ public void deleteConsThreshold()
+ {
+ this._has_consThreshold = false;
+ }
+
+ /**
+ */
+ public void deleteConservationSelected()
+ {
+ this._has_conservationSelected = false;
+ }
+
+ /**
+ */
+ public void deleteFollowHighlight()
+ {
+ this._has_followHighlight = false;
+ }
+
+ /**
+ */
+ public void deleteFollowSelection()
+ {
+ this._has_followSelection = false;
+ }
+
+ /**
+ */
+ public void deleteFontSize()
+ {
+ this._has_fontSize = false;
+ }
+
+ /**
+ */
+ public void deleteFontStyle()
+ {
+ this._has_fontStyle = false;
+ }
+
+ /**
+ */
+ public void deleteGatheredViews()
+ {
+ this._has_gatheredViews = false;
+ }
+
+ /**
+ */
+ public void deleteHeight()
+ {
+ this._has_height = false;
+ }
- /**
+ /**
*/
- public void deleteShowAnnotation(
- ) {
- this._has_showAnnotation= false;
- }
-
- /**
- */
- public void deleteShowBoxes(
- ) {
- this._has_showBoxes= false;
- }
+ public void deleteIgnoreGapsinConsensus()
+ {
+ this._has_ignoreGapsinConsensus = false;
+ }
- /**
+ /**
*/
- public void deleteShowColourText(
- ) {
- this._has_showColourText= false;
- }
+ public void deleteNormaliseSequenceLogo()
+ {
+ this._has_normaliseSequenceLogo = false;
+ }
- /**
+ /**
*/
- public void deleteShowConsensusHistogram(
- ) {
- this._has_showConsensusHistogram= false;
- }
+ public void deletePidSelected()
+ {
+ this._has_pidSelected = false;
+ }
- /**
+ /**
*/
- public void deleteShowDbRefTooltip(
- ) {
- this._has_showDbRefTooltip= false;
- }
+ public void deletePidThreshold()
+ {
+ this._has_pidThreshold = false;
+ }
- /**
+ /**
*/
- public void deleteShowFullId(
- ) {
- this._has_showFullId= false;
- }
+ public void deleteRenderGaps()
+ {
+ this._has_renderGaps = false;
+ }
- /**
+ /**
*/
- public void deleteShowGroupConsensus(
- ) {
- this._has_showGroupConsensus= false;
- }
+ public void deleteRightAlignIds()
+ {
+ this._has_rightAlignIds = false;
+ }
- /**
+ /**
*/
- public void deleteShowGroupConservation(
- ) {
- this._has_showGroupConservation= false;
- }
+ public void deleteShowAnnotation()
+ {
+ this._has_showAnnotation = false;
+ }
- /**
+ /**
*/
- public void deleteShowNPfeatureTooltip(
- ) {
- this._has_showNPfeatureTooltip= false;
- }
+ public void deleteShowBoxes()
+ {
+ this._has_showBoxes = false;
+ }
- /**
+ /**
*/
- public void deleteShowSequenceFeatures(
- ) {
- this._has_showSequenceFeatures= false;
- }
+ public void deleteShowColourText()
+ {
+ this._has_showColourText = false;
+ }
- /**
+ /**
*/
- public void deleteShowSequenceLogo(
- ) {
- this._has_showSequenceLogo= false;
- }
+ public void deleteShowConsensusHistogram()
+ {
+ this._has_showConsensusHistogram = false;
+ }
- /**
+ /**
*/
- public void deleteShowText(
- ) {
- this._has_showText= false;
- }
+ public void deleteShowDbRefTooltip()
+ {
+ this._has_showDbRefTooltip = false;
+ }
- /**
+ /**
*/
- public void deleteShowUnconserved(
- ) {
- this._has_showUnconserved= false;
- }
+ public void deleteShowFullId()
+ {
+ this._has_showFullId = false;
+ }
- /**
+ /**
*/
- public void deleteStartRes(
- ) {
- this._has_startRes= false;
- }
+ public void deleteShowGroupConsensus()
+ {
+ this._has_showGroupConsensus = false;
+ }
- /**
+ /**
*/
- public void deleteStartSeq(
- ) {
- this._has_startSeq= false;
- }
+ public void deleteShowGroupConservation()
+ {
+ this._has_showGroupConservation = false;
+ }
- /**
+ /**
*/
- public void deleteTextCol1(
- ) {
- this._has_textCol1= false;
- }
+ public void deleteShowNPfeatureTooltip()
+ {
+ this._has_showNPfeatureTooltip = false;
+ }
- /**
+ /**
*/
- public void deleteTextCol2(
- ) {
- this._has_textCol2= false;
- }
+ public void deleteShowSequenceFeatures()
+ {
+ this._has_showSequenceFeatures = false;
+ }
- /**
+ /**
*/
- public void deleteTextColThreshold(
- ) {
- this._has_textColThreshold= false;
- }
+ public void deleteShowSequenceLogo()
+ {
+ this._has_showSequenceLogo = false;
+ }
- /**
+ /**
*/
- public void deleteWidth(
- ) {
- this._has_width= false;
- }
+ public void deleteShowText()
+ {
+ this._has_showText = false;
+ }
- /**
+ /**
*/
- public void deleteWrapAlignment(
- ) {
- this._has_wrapAlignment= false;
- }
+ public void deleteShowUnconserved()
+ {
+ this._has_showUnconserved = false;
+ }
- /**
+ /**
*/
- public void deleteXpos(
- ) {
- this._has_xpos= false;
- }
-
- /**
- */
- public void deleteYpos(
- ) {
- this._has_ypos= false;
- }
-
- /**
- * Method enumerateCalcIdParam.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.CalcIdParam elements
- */
- public java.util.Enumeration enumerateCalcIdParam(
- ) {
- return this._calcIdParamList.elements();
- }
-
- /**
- * Method enumerateHiddenColumns.
- *
- * @return an Enumeration over all
- * jalview.schemabinding.version2.HiddenColumns elements
- */
- public java.util.Enumeration enumerateHiddenColumns(
- ) {
- return this._hiddenColumnsList.elements();
- }
-
- /**
- * Returns the value of field 'annotationColours'.
- *
- * @return the value of field 'AnnotationColours'.
- */
- public jalview.schemabinding.version2.AnnotationColours getAnnotationColours(
- ) {
- return this._annotationColours;
- }
-
- /**
- * Returns the value of field 'bgColour'.
- *
- * @return the value of field 'BgColour'.
- */
- public java.lang.String getBgColour(
- ) {
- return this._bgColour;
- }
-
- /**
- * Method getCalcIdParam.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.CalcIdParam at the given index
- */
- public jalview.schemabinding.version2.CalcIdParam getCalcIdParam(
- final int index)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._calcIdParamList.size()) {
- throw new IndexOutOfBoundsException("getCalcIdParam: Index value '" + index + "' not in range [0.." + (this._calcIdParamList.size() - 1) + "]");
- }
-
- return (jalview.schemabinding.version2.CalcIdParam) _calcIdParamList.get(index);
- }
-
- /**
- * Method getCalcIdParam.Returns the contents of the collection
- * in an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public jalview.schemabinding.version2.CalcIdParam[] getCalcIdParam(
- ) {
- jalview.schemabinding.version2.CalcIdParam[] array = new jalview.schemabinding.version2.CalcIdParam[0];
- return (jalview.schemabinding.version2.CalcIdParam[]) this._calcIdParamList.toArray(array);
- }
-
- /**
- * Method getCalcIdParamCount.
- *
- * @return the size of this collection
- */
- public int getCalcIdParamCount(
- ) {
- return this._calcIdParamList.size();
- }
-
- /**
- * Returns the value of field 'centreColumnLabels'.
- *
- * @return the value of field 'CentreColumnLabels'.
- */
- public boolean getCentreColumnLabels(
- ) {
- return this._centreColumnLabels;
- }
-
- /**
- * Returns the value of field 'consThreshold'.
- *
- * @return the value of field 'ConsThreshold'.
- */
- public int getConsThreshold(
- ) {
- return this._consThreshold;
- }
-
- /**
- * Returns the value of field 'conservationSelected'.
- *
- * @return the value of field 'ConservationSelected'.
- */
- public boolean getConservationSelected(
- ) {
- return this._conservationSelected;
- }
-
- /**
- * Returns the value of field 'followHighlight'.
- *
- * @return the value of field 'FollowHighlight'.
- */
- public boolean getFollowHighlight(
- ) {
- return this._followHighlight;
- }
-
- /**
- * Returns the value of field 'followSelection'.
- *
- * @return the value of field 'FollowSelection'.
- */
- public boolean getFollowSelection(
- ) {
- return this._followSelection;
- }
-
- /**
- * Returns the value of field 'fontName'.
- *
- * @return the value of field 'FontName'.
- */
- public java.lang.String getFontName(
- ) {
- return this._fontName;
- }
-
- /**
- * Returns the value of field 'fontSize'.
- *
- * @return the value of field 'FontSize'.
- */
- public int getFontSize(
- ) {
- return this._fontSize;
- }
-
- /**
- * Returns the value of field 'fontStyle'.
- *
- * @return the value of field 'FontStyle'.
- */
- public int getFontStyle(
- ) {
- return this._fontStyle;
- }
-
- /**
- * Returns the value of field 'gatheredViews'.
- *
- * @return the value of field 'GatheredViews'.
- */
- public boolean getGatheredViews(
- ) {
- return this._gatheredViews;
- }
-
- /**
- * Returns the value of field 'height'.
- *
- * @return the value of field 'Height'.
- */
- public int getHeight(
- ) {
- return this._height;
- }
-
- /**
- * Method getHiddenColumns.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the
- * jalview.schemabinding.version2.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.get(index);
- }
-
- /**
- * Method getHiddenColumns.Returns the contents of the
- * collection in an Array. <p>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 <i>know</i> that the Array returned is of
- * exactly the correct length.
- *
- * @return this collection as an Array
- */
- 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.
- *
- * @return the size of this collection
- */
- public int getHiddenColumnsCount(
- ) {
- return this._hiddenColumnsList.size();
- }
-
- /**
- * Returns the value of field 'id'. The field 'id' has the
- * following description: unique id used by jalview to
- * synchronize between stored and
- * instantiated views
- *
- *
- * @return the value of field 'Id'.
- */
- public java.lang.String getId(
- ) {
- return this._id;
- }
-
- /**
- * Returns the value of field 'ignoreGapsinConsensus'.
- *
- * @return the value of field 'IgnoreGapsinConsensus'.
- */
- public boolean getIgnoreGapsinConsensus(
- ) {
- return this._ignoreGapsinConsensus;
- }
-
- /**
- * Returns the value of field 'normaliseSequenceLogo'.
- *
- * @return the value of field 'NormaliseSequenceLogo'.
- */
- public boolean getNormaliseSequenceLogo(
- ) {
- return this._normaliseSequenceLogo;
- }
-
- /**
- * Returns the value of field 'pidSelected'.
- *
- * @return the value of field 'PidSelected'.
- */
- public boolean getPidSelected(
- ) {
- return this._pidSelected;
- }
-
- /**
- * Returns the value of field 'pidThreshold'.
- *
- * @return the value of field 'PidThreshold'.
- */
- public int getPidThreshold(
- ) {
- return this._pidThreshold;
- }
-
- /**
- * Returns the value of field 'renderGaps'.
- *
- * @return the value of field 'RenderGaps'.
- */
- public boolean getRenderGaps(
- ) {
- return this._renderGaps;
- }
-
- /**
- * Returns the value of field 'rightAlignIds'.
- *
- * @return the value of field 'RightAlignIds'.
- */
- public boolean getRightAlignIds(
- ) {
- return this._rightAlignIds;
- }
-
- /**
- * Returns the value of field 'sequenceSetId'.
- *
- * @return the value of field 'SequenceSetId'.
- */
- public java.lang.String getSequenceSetId(
- ) {
- return this._sequenceSetId;
- }
-
- /**
- * Returns the value of field 'showAnnotation'.
- *
- * @return the value of field 'ShowAnnotation'.
- */
- public boolean getShowAnnotation(
- ) {
- return this._showAnnotation;
- }
-
- /**
- * Returns the value of field 'showBoxes'.
- *
- * @return the value of field 'ShowBoxes'.
- */
- public boolean getShowBoxes(
- ) {
- return this._showBoxes;
- }
-
- /**
- * Returns the value of field 'showColourText'.
- *
- * @return the value of field 'ShowColourText'.
- */
- public boolean getShowColourText(
- ) {
- return this._showColourText;
- }
-
- /**
- * Returns the value of field 'showConsensusHistogram'.
- *
- * @return the value of field 'ShowConsensusHistogram'.
- */
- public boolean getShowConsensusHistogram(
- ) {
- return this._showConsensusHistogram;
- }
-
- /**
- * Returns the value of field 'showDbRefTooltip'.
- *
- * @return the value of field 'ShowDbRefTooltip'.
- */
- public boolean getShowDbRefTooltip(
- ) {
- return this._showDbRefTooltip;
- }
-
- /**
- * Returns the value of field 'showFullId'.
- *
- * @return the value of field 'ShowFullId'.
- */
- public boolean getShowFullId(
- ) {
- return this._showFullId;
- }
-
- /**
- * Returns the value of field 'showGroupConsensus'.
- *
- * @return the value of field 'ShowGroupConsensus'.
- */
- public boolean getShowGroupConsensus(
- ) {
- return this._showGroupConsensus;
- }
-
- /**
- * Returns the value of field 'showGroupConservation'.
- *
- * @return the value of field 'ShowGroupConservation'.
- */
- public boolean getShowGroupConservation(
- ) {
- return this._showGroupConservation;
- }
-
- /**
- * Returns the value of field 'showNPfeatureTooltip'.
- *
- * @return the value of field 'ShowNPfeatureTooltip'.
- */
- public boolean getShowNPfeatureTooltip(
- ) {
- return this._showNPfeatureTooltip;
- }
-
- /**
- * Returns the value of field 'showSequenceFeatures'.
- *
- * @return the value of field 'ShowSequenceFeatures'.
- */
- public boolean getShowSequenceFeatures(
- ) {
- return this._showSequenceFeatures;
- }
-
- /**
- * Returns the value of field 'showSequenceLogo'.
- *
- * @return the value of field 'ShowSequenceLogo'.
- */
- public boolean getShowSequenceLogo(
- ) {
- return this._showSequenceLogo;
- }
-
- /**
- * Returns the value of field 'showText'.
- *
- * @return the value of field 'ShowText'.
- */
- public boolean getShowText(
- ) {
- return this._showText;
- }
-
- /**
- * Returns the value of field 'showUnconserved'.
- *
- * @return the value of field 'ShowUnconserved'.
- */
- public boolean getShowUnconserved(
- ) {
- return this._showUnconserved;
- }
-
- /**
- * Returns the value of field 'startRes'.
- *
- * @return the value of field 'StartRes'.
- */
- public int getStartRes(
- ) {
- return this._startRes;
- }
-
- /**
- * Returns the value of field 'startSeq'.
- *
- * @return the value of field 'StartSeq'.
- */
- public int getStartSeq(
- ) {
- return this._startSeq;
- }
-
- /**
- * Returns the value of field 'textCol1'.
- *
- * @return the value of field 'TextCol1'.
- */
- public int getTextCol1(
- ) {
- return this._textCol1;
- }
-
- /**
- * Returns the value of field 'textCol2'.
- *
- * @return the value of field 'TextCol2'.
- */
- public int getTextCol2(
- ) {
- return this._textCol2;
- }
-
- /**
- * Returns the value of field 'textColThreshold'.
- *
- * @return the value of field 'TextColThreshold'.
- */
- public int getTextColThreshold(
- ) {
- return this._textColThreshold;
- }
-
- /**
- * Returns the value of field 'title'.
- *
- * @return the value of field 'Title'.
- */
- public java.lang.String getTitle(
- ) {
- return this._title;
- }
-
- /**
- * Returns the value of field 'viewName'.
- *
- * @return the value of field 'ViewName'.
- */
- public java.lang.String getViewName(
- ) {
- return this._viewName;
- }
-
- /**
- * Returns the value of field 'width'.
- *
- * @return the value of field 'Width'.
- */
- public int getWidth(
- ) {
- return this._width;
- }
-
- /**
- * Returns the value of field 'wrapAlignment'.
- *
- * @return the value of field 'WrapAlignment'.
- */
- public boolean getWrapAlignment(
- ) {
- return this._wrapAlignment;
- }
-
- /**
- * Returns the value of field 'xpos'.
- *
- * @return the value of field 'Xpos'.
- */
- public int getXpos(
- ) {
- return this._xpos;
- }
-
- /**
- * Returns the value of field 'ypos'.
- *
- * @return the value of field 'Ypos'.
- */
- public int getYpos(
- ) {
- return this._ypos;
- }
-
- /**
- * Method hasCentreColumnLabels.
- *
- * @return true if at least one CentreColumnLabels has been adde
- */
- public boolean hasCentreColumnLabels(
- ) {
- return this._has_centreColumnLabels;
- }
-
- /**
- * Method hasConsThreshold.
- *
- * @return true if at least one ConsThreshold has been added
- */
- public boolean hasConsThreshold(
- ) {
- return this._has_consThreshold;
- }
-
- /**
- * Method hasConservationSelected.
- *
- * @return true if at least one ConservationSelected has been
- * added
- */
- public boolean hasConservationSelected(
- ) {
- return this._has_conservationSelected;
- }
-
- /**
- * Method hasFollowHighlight.
- *
- * @return true if at least one FollowHighlight has been added
- */
- public boolean hasFollowHighlight(
- ) {
- return this._has_followHighlight;
- }
-
- /**
- * Method hasFollowSelection.
- *
- * @return true if at least one FollowSelection has been added
- */
- public boolean hasFollowSelection(
- ) {
- return this._has_followSelection;
- }
-
- /**
- * Method hasFontSize.
- *
- * @return true if at least one FontSize has been added
- */
- public boolean hasFontSize(
- ) {
- return this._has_fontSize;
- }
-
- /**
- * Method hasFontStyle.
- *
- * @return true if at least one FontStyle has been added
- */
- public boolean hasFontStyle(
- ) {
- return this._has_fontStyle;
- }
-
- /**
- * Method hasGatheredViews.
- *
- * @return true if at least one GatheredViews has been added
- */
- public boolean hasGatheredViews(
- ) {
- return this._has_gatheredViews;
- }
-
- /**
- * Method hasHeight.
- *
- * @return true if at least one Height has been added
- */
- public boolean hasHeight(
- ) {
- return this._has_height;
- }
-
- /**
- * Method hasIgnoreGapsinConsensus.
- *
- * @return true if at least one IgnoreGapsinConsensus has been
- * added
- */
- public boolean hasIgnoreGapsinConsensus(
- ) {
- return this._has_ignoreGapsinConsensus;
- }
-
- /**
- * Method hasNormaliseSequenceLogo.
- *
- * @return true if at least one NormaliseSequenceLogo has been
- * added
- */
- public boolean hasNormaliseSequenceLogo(
- ) {
- return this._has_normaliseSequenceLogo;
- }
-
- /**
- * Method hasPidSelected.
- *
- * @return true if at least one PidSelected has been added
- */
- public boolean hasPidSelected(
- ) {
- return this._has_pidSelected;
- }
-
- /**
- * Method hasPidThreshold.
- *
- * @return true if at least one PidThreshold has been added
- */
- public boolean hasPidThreshold(
- ) {
- return this._has_pidThreshold;
- }
-
- /**
- * Method hasRenderGaps.
- *
- * @return true if at least one RenderGaps has been added
- */
- public boolean hasRenderGaps(
- ) {
- return this._has_renderGaps;
- }
-
- /**
- * Method hasRightAlignIds.
- *
- * @return true if at least one RightAlignIds has been added
- */
- public boolean hasRightAlignIds(
- ) {
- return this._has_rightAlignIds;
- }
-
- /**
- * Method hasShowAnnotation.
- *
- * @return true if at least one ShowAnnotation has been added
- */
- public boolean hasShowAnnotation(
- ) {
- return this._has_showAnnotation;
- }
-
- /**
- * Method hasShowBoxes.
- *
- * @return true if at least one ShowBoxes has been added
- */
- public boolean hasShowBoxes(
- ) {
- return this._has_showBoxes;
- }
-
- /**
- * Method hasShowColourText.
- *
- * @return true if at least one ShowColourText has been added
- */
- public boolean hasShowColourText(
- ) {
- return this._has_showColourText;
- }
-
- /**
- * Method hasShowConsensusHistogram.
- *
- * @return true if at least one ShowConsensusHistogram has been
- * added
- */
- public boolean hasShowConsensusHistogram(
- ) {
- return this._has_showConsensusHistogram;
- }
-
- /**
- * Method hasShowDbRefTooltip.
- *
- * @return true if at least one ShowDbRefTooltip has been added
- */
- public boolean hasShowDbRefTooltip(
- ) {
- return this._has_showDbRefTooltip;
- }
-
- /**
- * Method hasShowFullId.
- *
- * @return true if at least one ShowFullId has been added
- */
- public boolean hasShowFullId(
- ) {
- return this._has_showFullId;
- }
-
- /**
- * Method hasShowGroupConsensus.
- *
- * @return true if at least one ShowGroupConsensus has been adde
- */
- public boolean hasShowGroupConsensus(
- ) {
- return this._has_showGroupConsensus;
- }
-
- /**
- * Method hasShowGroupConservation.
- *
- * @return true if at least one ShowGroupConservation has been
- * added
- */
- public boolean hasShowGroupConservation(
- ) {
- return this._has_showGroupConservation;
- }
-
- /**
- * Method hasShowNPfeatureTooltip.
- *
- * @return true if at least one ShowNPfeatureTooltip has been
- * added
- */
- public boolean hasShowNPfeatureTooltip(
- ) {
- return this._has_showNPfeatureTooltip;
- }
-
- /**
- * Method hasShowSequenceFeatures.
- *
- * @return true if at least one ShowSequenceFeatures has been
- * added
- */
- public boolean hasShowSequenceFeatures(
- ) {
- return this._has_showSequenceFeatures;
- }
-
- /**
- * Method hasShowSequenceLogo.
- *
- * @return true if at least one ShowSequenceLogo has been added
- */
- public boolean hasShowSequenceLogo(
- ) {
- return this._has_showSequenceLogo;
- }
-
- /**
- * Method hasShowText.
- *
- * @return true if at least one ShowText has been added
- */
- public boolean hasShowText(
- ) {
- return this._has_showText;
- }
-
- /**
- * Method hasShowUnconserved.
- *
- * @return true if at least one ShowUnconserved has been added
- */
- public boolean hasShowUnconserved(
- ) {
- return this._has_showUnconserved;
- }
-
- /**
- * Method hasStartRes.
- *
- * @return true if at least one StartRes has been added
- */
- public boolean hasStartRes(
- ) {
- return this._has_startRes;
- }
-
- /**
- * Method hasStartSeq.
- *
- * @return true if at least one StartSeq has been added
- */
- public boolean hasStartSeq(
- ) {
- return this._has_startSeq;
- }
-
- /**
- * Method hasTextCol1.
- *
- * @return true if at least one TextCol1 has been added
- */
- public boolean hasTextCol1(
- ) {
- return this._has_textCol1;
- }
-
- /**
- * Method hasTextCol2.
- *
- * @return true if at least one TextCol2 has been added
- */
- public boolean hasTextCol2(
- ) {
- return this._has_textCol2;
- }
-
- /**
- * Method hasTextColThreshold.
- *
- * @return true if at least one TextColThreshold has been added
- */
- public boolean hasTextColThreshold(
- ) {
- return this._has_textColThreshold;
- }
-
- /**
- * Method hasWidth.
- *
- * @return true if at least one Width has been added
- */
- public boolean hasWidth(
- ) {
- return this._has_width;
- }
-
- /**
- * 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 true if at least one Ypos has been added
- */
- public boolean hasYpos(
- ) {
- return this._has_ypos;
- }
-
- /**
- * Returns the value of field 'centreColumnLabels'.
- *
- * @return the value of field 'CentreColumnLabels'.
- */
- public boolean isCentreColumnLabels(
- ) {
- return this._centreColumnLabels;
- }
-
- /**
- * Returns the value of field 'conservationSelected'.
- *
- * @return the value of field 'ConservationSelected'.
- */
- public boolean isConservationSelected(
- ) {
- return this._conservationSelected;
- }
-
- /**
- * Returns the value of field 'followHighlight'.
- *
- * @return the value of field 'FollowHighlight'.
- */
- public boolean isFollowHighlight(
- ) {
- return this._followHighlight;
- }
-
- /**
- * Returns the value of field 'followSelection'.
- *
- * @return the value of field 'FollowSelection'.
- */
- public boolean isFollowSelection(
- ) {
- return this._followSelection;
- }
-
- /**
- * Returns the value of field 'gatheredViews'.
- *
- * @return the value of field 'GatheredViews'.
- */
- public boolean isGatheredViews(
- ) {
- return this._gatheredViews;
- }
-
- /**
- * Returns the value of field 'ignoreGapsinConsensus'.
- *
- * @return the value of field 'IgnoreGapsinConsensus'.
- */
- public boolean isIgnoreGapsinConsensus(
- ) {
- return this._ignoreGapsinConsensus;
- }
-
- /**
- * Returns the value of field 'normaliseSequenceLogo'.
- *
- * @return the value of field 'NormaliseSequenceLogo'.
- */
- public boolean isNormaliseSequenceLogo(
- ) {
- return this._normaliseSequenceLogo;
- }
-
- /**
- * Returns the value of field 'pidSelected'.
- *
- * @return the value of field 'PidSelected'.
- */
- public boolean isPidSelected(
- ) {
- return this._pidSelected;
- }
-
- /**
- * 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 the value of field 'ShowAnnotation'.
- */
- public boolean isShowAnnotation(
- ) {
- return this._showAnnotation;
- }
-
- /**
- * 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 'showConsensusHistogram'.
- *
- * @return the value of field 'ShowConsensusHistogram'.
- */
- public boolean isShowConsensusHistogram(
- ) {
- return this._showConsensusHistogram;
- }
-
- /**
- * Returns the value of field 'showDbRefTooltip'.
- *
- * @return the value of field 'ShowDbRefTooltip'.
- */
- public boolean isShowDbRefTooltip(
- ) {
- return this._showDbRefTooltip;
- }
-
- /**
- * Returns the value of field 'showFullId'.
- *
- * @return the value of field 'ShowFullId'.
- */
- public boolean isShowFullId(
- ) {
- return this._showFullId;
- }
-
- /**
- * Returns the value of field 'showGroupConsensus'.
- *
- * @return the value of field 'ShowGroupConsensus'.
- */
- public boolean isShowGroupConsensus(
- ) {
- return this._showGroupConsensus;
- }
-
- /**
- * Returns the value of field 'showGroupConservation'.
- *
- * @return the value of field 'ShowGroupConservation'.
- */
- public boolean isShowGroupConservation(
- ) {
- return this._showGroupConservation;
- }
-
- /**
- * Returns the value of field 'showNPfeatureTooltip'.
- *
- * @return the value of field 'ShowNPfeatureTooltip'.
- */
- public boolean isShowNPfeatureTooltip(
- ) {
- return this._showNPfeatureTooltip;
- }
-
- /**
- * Returns the value of field 'showSequenceFeatures'.
- *
- * @return the value of field 'ShowSequenceFeatures'.
- */
- public boolean isShowSequenceFeatures(
- ) {
- return this._showSequenceFeatures;
- }
-
- /**
- * Returns the value of field 'showSequenceLogo'.
- *
- * @return the value of field 'ShowSequenceLogo'.
- */
- public boolean isShowSequenceLogo(
- ) {
- return this._showSequenceLogo;
- }
-
- /**
- * Returns the value of field 'showText'.
- *
- * @return the value of field 'ShowText'.
- */
- public boolean isShowText(
- ) {
- return this._showText;
- }
-
- /**
- * Returns the value of field 'showUnconserved'.
- *
- * @return the value of field 'ShowUnconserved'.
- */
- public boolean isShowUnconserved(
- ) {
- return this._showUnconserved;
- }
-
- /**
- * 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;
- }
-
- /**
- * Returns the value of field 'wrapAlignment'.
- *
- * @return the value of field 'WrapAlignment'.
- */
- public boolean isWrapAlignment(
- ) {
- return this._wrapAlignment;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllCalcIdParam(
- ) {
- this._calcIdParamList.clear();
- }
-
- /**
- */
- public void removeAllHiddenColumns(
- ) {
- this._hiddenColumnsList.clear();
- }
-
- /**
- * Method removeCalcIdParam.
- *
- * @param vCalcIdParam
- * @return true if the object was removed from the collection.
- */
- public boolean removeCalcIdParam(
- final jalview.schemabinding.version2.CalcIdParam vCalcIdParam) {
- boolean removed = _calcIdParamList.remove(vCalcIdParam);
- return removed;
- }
-
- /**
- * Method removeCalcIdParamAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public jalview.schemabinding.version2.CalcIdParam removeCalcIdParamAt(
- final int index) {
- java.lang.Object obj = this._calcIdParamList.remove(index);
- return (jalview.schemabinding.version2.CalcIdParam) obj;
- }
-
- /**
- * 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 the element removed from the collection
- */
- public jalview.schemabinding.version2.HiddenColumns removeHiddenColumnsAt(
- final int index) {
- java.lang.Object obj = this._hiddenColumnsList.remove(index);
- return (jalview.schemabinding.version2.HiddenColumns) obj;
- }
-
- /**
- * Sets the value of field 'annotationColours'.
- *
- * @param annotationColours the value of field
- * 'annotationColours'.
- */
- public void setAnnotationColours(
- final jalview.schemabinding.version2.AnnotationColours annotationColours) {
- this._annotationColours = annotationColours;
- }
-
- /**
- * Sets the value of field 'bgColour'.
- *
- * @param bgColour the value of field 'bgColour'.
- */
- public void setBgColour(
- final java.lang.String bgColour) {
- this._bgColour = bgColour;
- }
-
- /**
- *
- *
- * @param index
- * @param vCalcIdParam
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setCalcIdParam(
- final int index,
- final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._calcIdParamList.size()) {
- throw new IndexOutOfBoundsException("setCalcIdParam: Index value '" + index + "' not in range [0.." + (this._calcIdParamList.size() - 1) + "]");
- }
-
- this._calcIdParamList.set(index, vCalcIdParam);
- }
-
- /**
- *
- *
- * @param vCalcIdParamArray
- */
- public void setCalcIdParam(
- final jalview.schemabinding.version2.CalcIdParam[] vCalcIdParamArray) {
- //-- copy array
- _calcIdParamList.clear();
-
- for (int i = 0; i < vCalcIdParamArray.length; i++) {
- this._calcIdParamList.add(vCalcIdParamArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'centreColumnLabels'.
- *
- * @param centreColumnLabels the value of field
- * 'centreColumnLabels'.
- */
- public void setCentreColumnLabels(
- final boolean centreColumnLabels) {
- this._centreColumnLabels = centreColumnLabels;
- this._has_centreColumnLabels = true;
- }
-
- /**
- * Sets the value of field 'consThreshold'.
- *
- * @param consThreshold the value of field 'consThreshold'.
- */
- public void setConsThreshold(
- final int consThreshold) {
- this._consThreshold = consThreshold;
- this._has_consThreshold = true;
- }
-
- /**
- * Sets the value of field 'conservationSelected'.
- *
- * @param conservationSelected the value of field
- * 'conservationSelected'.
- */
- public void setConservationSelected(
- final boolean conservationSelected) {
- this._conservationSelected = conservationSelected;
- this._has_conservationSelected = true;
- }
-
- /**
- * Sets the value of field 'followHighlight'.
- *
- * @param followHighlight the value of field 'followHighlight'.
- */
- public void setFollowHighlight(
- final boolean followHighlight) {
- this._followHighlight = followHighlight;
- this._has_followHighlight = true;
- }
-
- /**
- * Sets the value of field 'followSelection'.
- *
- * @param followSelection the value of field 'followSelection'.
- */
- public void setFollowSelection(
- final boolean followSelection) {
- this._followSelection = followSelection;
- this._has_followSelection = true;
- }
-
- /**
- * Sets the value of field 'fontName'.
- *
- * @param fontName the value of field 'fontName'.
- */
- public void setFontName(
- final java.lang.String fontName) {
- this._fontName = fontName;
- }
-
- /**
- * Sets the value of field 'fontSize'.
- *
- * @param fontSize the value of field 'fontSize'.
- */
- public void setFontSize(
- final int fontSize) {
- this._fontSize = fontSize;
- this._has_fontSize = true;
- }
-
- /**
- * Sets the value of field 'fontStyle'.
- *
- * @param fontStyle the value of field 'fontStyle'.
- */
- public void setFontStyle(
- final int fontStyle) {
- this._fontStyle = fontStyle;
- this._has_fontStyle = true;
- }
-
- /**
- * Sets the value of field 'gatheredViews'.
- *
- * @param gatheredViews the value of field 'gatheredViews'.
- */
- public void setGatheredViews(
- final boolean gatheredViews) {
- this._gatheredViews = gatheredViews;
- this._has_gatheredViews = true;
- }
-
- /**
- * Sets the value of field 'height'.
- *
- * @param height the value of field 'height'.
- */
- public void setHeight(
- final int height) {
- this._height = height;
- this._has_height = true;
- }
-
- /**
- *
- *
- * @param index
- * @param vHiddenColumns
- * @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) + "]");
- }
-
- this._hiddenColumnsList.set(index, vHiddenColumns);
- }
-
- /**
- *
- *
- * @param vHiddenColumnsArray
- */
- public void setHiddenColumns(
- final jalview.schemabinding.version2.HiddenColumns[] vHiddenColumnsArray) {
- //-- copy array
- _hiddenColumnsList.clear();
-
- for (int i = 0; i < vHiddenColumnsArray.length; i++) {
- this._hiddenColumnsList.add(vHiddenColumnsArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'id'. The field 'id' has the
- * following description: unique id used by jalview to
- * synchronize between stored and
- * instantiated views
- *
- *
- * @param id the value of field 'id'.
- */
- public void setId(
- final java.lang.String id) {
- this._id = id;
- }
-
- /**
- * Sets the value of field 'ignoreGapsinConsensus'.
- *
- * @param ignoreGapsinConsensus the value of field
- * 'ignoreGapsinConsensus'.
- */
- public void setIgnoreGapsinConsensus(
- final boolean ignoreGapsinConsensus) {
- this._ignoreGapsinConsensus = ignoreGapsinConsensus;
- this._has_ignoreGapsinConsensus = true;
- }
-
- /**
- * Sets the value of field 'normaliseSequenceLogo'.
- *
- * @param normaliseSequenceLogo the value of field
- * 'normaliseSequenceLogo'.
- */
- public void setNormaliseSequenceLogo(
- final boolean normaliseSequenceLogo) {
- this._normaliseSequenceLogo = normaliseSequenceLogo;
- this._has_normaliseSequenceLogo = true;
- }
-
- /**
- * Sets the value of field 'pidSelected'.
- *
- * @param pidSelected the value of field 'pidSelected'.
- */
- public void setPidSelected(
- final boolean pidSelected) {
- this._pidSelected = pidSelected;
- this._has_pidSelected = true;
- }
-
- /**
- * Sets the value of field 'pidThreshold'.
- *
- * @param pidThreshold the value of field 'pidThreshold'.
- */
- public void setPidThreshold(
- final int pidThreshold) {
- this._pidThreshold = pidThreshold;
- this._has_pidThreshold = true;
- }
-
- /**
- * Sets the value of field 'renderGaps'.
- *
- * @param renderGaps the value of field 'renderGaps'.
- */
- public void setRenderGaps(
- final boolean renderGaps) {
- this._renderGaps = renderGaps;
- this._has_renderGaps = true;
- }
-
- /**
- * Sets the value of field 'rightAlignIds'.
- *
- * @param rightAlignIds the value of field 'rightAlignIds'.
- */
- public void setRightAlignIds(
- final boolean rightAlignIds) {
- this._rightAlignIds = rightAlignIds;
- this._has_rightAlignIds = true;
- }
-
- /**
- * Sets the value of field 'sequenceSetId'.
- *
- * @param sequenceSetId the value of field 'sequenceSetId'.
- */
- public void setSequenceSetId(
- final java.lang.String sequenceSetId) {
- this._sequenceSetId = sequenceSetId;
- }
-
- /**
- * Sets the value of field 'showAnnotation'.
- *
- * @param showAnnotation the value of field 'showAnnotation'.
- */
- public void setShowAnnotation(
- final boolean showAnnotation) {
- this._showAnnotation = showAnnotation;
- this._has_showAnnotation = true;
- }
-
- /**
- * Sets the value of field 'showBoxes'.
- *
- * @param showBoxes the value of field 'showBoxes'.
- */
- public void setShowBoxes(
- final boolean showBoxes) {
- this._showBoxes = showBoxes;
- this._has_showBoxes = true;
- }
-
- /**
- * Sets the value of field 'showColourText'.
- *
- * @param showColourText the value of field 'showColourText'.
- */
- public void setShowColourText(
- final boolean showColourText) {
- this._showColourText = showColourText;
- this._has_showColourText = true;
- }
-
- /**
- * Sets the value of field 'showConsensusHistogram'.
- *
- * @param showConsensusHistogram the value of field
- * 'showConsensusHistogram'.
- */
- public void setShowConsensusHistogram(
- final boolean showConsensusHistogram) {
- this._showConsensusHistogram = showConsensusHistogram;
- this._has_showConsensusHistogram = true;
- }
-
- /**
- * Sets the value of field 'showDbRefTooltip'.
- *
- * @param showDbRefTooltip the value of field 'showDbRefTooltip'
- */
- public void setShowDbRefTooltip(
- final boolean showDbRefTooltip) {
- this._showDbRefTooltip = showDbRefTooltip;
- this._has_showDbRefTooltip = true;
- }
-
- /**
- * Sets the value of field 'showFullId'.
- *
- * @param showFullId the value of field 'showFullId'.
- */
- public void setShowFullId(
- final boolean showFullId) {
- this._showFullId = showFullId;
- this._has_showFullId = true;
- }
-
- /**
- * Sets the value of field 'showGroupConsensus'.
- *
- * @param showGroupConsensus the value of field
- * 'showGroupConsensus'.
- */
- public void setShowGroupConsensus(
- final boolean showGroupConsensus) {
- this._showGroupConsensus = showGroupConsensus;
- this._has_showGroupConsensus = true;
- }
-
- /**
- * Sets the value of field 'showGroupConservation'.
- *
- * @param showGroupConservation the value of field
- * 'showGroupConservation'.
- */
- public void setShowGroupConservation(
- final boolean showGroupConservation) {
- this._showGroupConservation = showGroupConservation;
- this._has_showGroupConservation = true;
- }
-
- /**
- * Sets the value of field 'showNPfeatureTooltip'.
- *
- * @param showNPfeatureTooltip the value of field
- * 'showNPfeatureTooltip'.
- */
- public void setShowNPfeatureTooltip(
- final boolean showNPfeatureTooltip) {
- this._showNPfeatureTooltip = showNPfeatureTooltip;
- this._has_showNPfeatureTooltip = true;
- }
-
- /**
- * Sets the value of field 'showSequenceFeatures'.
- *
- * @param showSequenceFeatures the value of field
- * 'showSequenceFeatures'.
- */
- public void setShowSequenceFeatures(
- final boolean showSequenceFeatures) {
- this._showSequenceFeatures = showSequenceFeatures;
- this._has_showSequenceFeatures = true;
- }
-
- /**
- * Sets the value of field 'showSequenceLogo'.
- *
- * @param showSequenceLogo the value of field 'showSequenceLogo'
- */
- public void setShowSequenceLogo(
- final boolean showSequenceLogo) {
- this._showSequenceLogo = showSequenceLogo;
- this._has_showSequenceLogo = true;
- }
-
- /**
- * Sets the value of field 'showText'.
- *
- * @param showText the value of field 'showText'.
- */
- public void setShowText(
- final boolean showText) {
- this._showText = showText;
- this._has_showText = true;
- }
-
- /**
- * Sets the value of field 'showUnconserved'.
- *
- * @param showUnconserved the value of field 'showUnconserved'.
- */
- public void setShowUnconserved(
- final boolean showUnconserved) {
- this._showUnconserved = showUnconserved;
- this._has_showUnconserved = true;
- }
-
- /**
- * Sets the value of field 'startRes'.
- *
- * @param startRes the value of field 'startRes'.
- */
- public void setStartRes(
- final int startRes) {
- this._startRes = startRes;
- this._has_startRes = true;
- }
-
- /**
- * Sets the value of field 'startSeq'.
- *
- * @param startSeq the value of field 'startSeq'.
- */
- public void setStartSeq(
- final int startSeq) {
- this._startSeq = startSeq;
- this._has_startSeq = true;
- }
-
- /**
- * Sets the value of field 'textCol1'.
- *
- * @param textCol1 the value of field 'textCol1'.
- */
- public void setTextCol1(
- final int textCol1) {
- this._textCol1 = textCol1;
- this._has_textCol1 = true;
- }
-
- /**
- * Sets the value of field 'textCol2'.
- *
- * @param textCol2 the value of field 'textCol2'.
- */
- public void setTextCol2(
- final int textCol2) {
- this._textCol2 = textCol2;
- this._has_textCol2 = true;
- }
-
- /**
- * Sets the value of field 'textColThreshold'.
- *
- * @param textColThreshold the value of field 'textColThreshold'
- */
- public void setTextColThreshold(
- final int textColThreshold) {
- this._textColThreshold = textColThreshold;
- this._has_textColThreshold = true;
- }
-
- /**
- * Sets the value of field 'title'.
- *
- * @param title the value of field 'title'.
- */
- public void setTitle(
- final java.lang.String title) {
- this._title = title;
- }
-
- /**
- * Sets the value of field 'viewName'.
- *
- * @param viewName the value of field 'viewName'.
- */
- public void setViewName(
- final java.lang.String viewName) {
- this._viewName = viewName;
- }
-
- /**
- * Sets the value of field 'width'.
- *
- * @param width the value of field 'width'.
- */
- public void setWidth(
- final int width) {
- this._width = width;
- this._has_width = true;
- }
-
- /**
- * Sets the value of field 'wrapAlignment'.
- *
- * @param wrapAlignment the value of field 'wrapAlignment'.
- */
- public void setWrapAlignment(
- final boolean wrapAlignment) {
- this._wrapAlignment = wrapAlignment;
- this._has_wrapAlignment = true;
- }
-
- /**
- * Sets the value of field 'xpos'.
- *
- * @param xpos the value of field 'xpos'.
- */
- public void setXpos(
- final int xpos) {
- this._xpos = xpos;
- this._has_xpos = true;
- }
-
- /**
- * Sets the value of field 'ypos'.
- *
- * @param ypos the value of field 'ypos'.
- */
- public void setYpos(
- final int ypos) {
- this._ypos = ypos;
- this._has_ypos = true;
- }
-
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled
- * jalview.schemabinding.version2.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);
- }
-
- /**
- *
- *
- * @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);
- }
+ public void deleteStartRes()
+ {
+ this._has_startRes = false;
+ }
+
+ /**
+ */
+ public void deleteStartSeq()
+ {
+ this._has_startSeq = false;
+ }
+
+ /**
+ */
+ public void deleteTextCol1()
+ {
+ this._has_textCol1 = false;
+ }
+
+ /**
+ */
+ public void deleteTextCol2()
+ {
+ this._has_textCol2 = false;
+ }
+
+ /**
+ */
+ public void deleteTextColThreshold()
+ {
+ this._has_textColThreshold = false;
+ }
+
+ /**
+ */
+ public void deleteWidth()
+ {
+ this._has_width = false;
+ }
+
+ /**
+ */
+ public void deleteWrapAlignment()
+ {
+ this._has_wrapAlignment = false;
+ }
+
+ /**
+ */
+ public void deleteXpos()
+ {
+ this._has_xpos = false;
+ }
+
+ /**
+ */
+ public void deleteYpos()
+ {
+ this._has_ypos = false;
+ }
+
+ /**
+ * Method enumerateCalcIdParam.
+ *
+ * @return an Enumeration over all jalview.schemabinding.version2.CalcIdParam
+ * elements
+ */
+ public java.util.Enumeration enumerateCalcIdParam()
+ {
+ return this._calcIdParamList.elements();
+ }
+
+ /**
+ * Method enumerateHiddenColumns.
+ *
+ * @return an Enumeration over all
+ * jalview.schemabinding.version2.HiddenColumns elements
+ */
+ public java.util.Enumeration enumerateHiddenColumns()
+ {
+ return this._hiddenColumnsList.elements();
+ }
+
+ /**
+ * Returns the value of field 'annotationColours'.
+ *
+ * @return the value of field 'AnnotationColours'.
+ */
+ public jalview.schemabinding.version2.AnnotationColours getAnnotationColours()
+ {
+ return this._annotationColours;
+ }
+
+ /**
+ * Returns the value of field 'bgColour'.
+ *
+ * @return the value of field 'BgColour'.
+ */
+ public java.lang.String getBgColour()
+ {
+ return this._bgColour;
+ }
+
+ /**
+ * Method getCalcIdParam.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.CalcIdParam at the
+ * given index
+ */
+ public jalview.schemabinding.version2.CalcIdParam getCalcIdParam(
+ final int index) throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._calcIdParamList.size())
+ {
+ throw new IndexOutOfBoundsException("getCalcIdParam: Index value '"
+ + index + "' not in range [0.."
+ + (this._calcIdParamList.size() - 1) + "]");
+ }
+
+ return (jalview.schemabinding.version2.CalcIdParam) _calcIdParamList
+ .get(index);
+ }
+
+ /**
+ * Method getCalcIdParam.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public jalview.schemabinding.version2.CalcIdParam[] getCalcIdParam()
+ {
+ jalview.schemabinding.version2.CalcIdParam[] array = new jalview.schemabinding.version2.CalcIdParam[0];
+ return (jalview.schemabinding.version2.CalcIdParam[]) this._calcIdParamList
+ .toArray(array);
+ }
+
+ /**
+ * Method getCalcIdParamCount.
+ *
+ * @return the size of this collection
+ */
+ public int getCalcIdParamCount()
+ {
+ return this._calcIdParamList.size();
+ }
+
+ /**
+ * Returns the value of field 'centreColumnLabels'.
+ *
+ * @return the value of field 'CentreColumnLabels'.
+ */
+ public boolean getCentreColumnLabels()
+ {
+ return this._centreColumnLabels;
+ }
+
+ /**
+ * Returns the value of field 'consThreshold'.
+ *
+ * @return the value of field 'ConsThreshold'.
+ */
+ public int getConsThreshold()
+ {
+ return this._consThreshold;
+ }
+
+ /**
+ * Returns the value of field 'conservationSelected'.
+ *
+ * @return the value of field 'ConservationSelected'.
+ */
+ public boolean getConservationSelected()
+ {
+ return this._conservationSelected;
+ }
+
+ /**
+ * Returns the value of field 'followHighlight'.
+ *
+ * @return the value of field 'FollowHighlight'.
+ */
+ public boolean getFollowHighlight()
+ {
+ return this._followHighlight;
+ }
+
+ /**
+ * Returns the value of field 'followSelection'.
+ *
+ * @return the value of field 'FollowSelection'.
+ */
+ public boolean getFollowSelection()
+ {
+ return this._followSelection;
+ }
+
+ /**
+ * Returns the value of field 'fontName'.
+ *
+ * @return the value of field 'FontName'.
+ */
+ public java.lang.String getFontName()
+ {
+ return this._fontName;
+ }
+
+ /**
+ * Returns the value of field 'fontSize'.
+ *
+ * @return the value of field 'FontSize'.
+ */
+ public int getFontSize()
+ {
+ return this._fontSize;
+ }
+
+ /**
+ * Returns the value of field 'fontStyle'.
+ *
+ * @return the value of field 'FontStyle'.
+ */
+ public int getFontStyle()
+ {
+ return this._fontStyle;
+ }
+
+ /**
+ * Returns the value of field 'gatheredViews'.
+ *
+ * @return the value of field 'GatheredViews'.
+ */
+ public boolean getGatheredViews()
+ {
+ return this._gatheredViews;
+ }
+
+ /**
+ * Returns the value of field 'height'.
+ *
+ * @return the value of field 'Height'.
+ */
+ public int getHeight()
+ {
+ return this._height;
+ }
+
+ /**
+ * Method getHiddenColumns.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ * @return the value of the jalview.schemabinding.version2.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
+ .get(index);
+ }
+
+ /**
+ * Method getHiddenColumns.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ 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.
+ *
+ * @return the size of this collection
+ */
+ public int getHiddenColumnsCount()
+ {
+ return this._hiddenColumnsList.size();
+ }
+
+ /**
+ * Returns the value of field 'id'. The field 'id' has the following
+ * description: unique id used by jalview to synchronize between stored and
+ * instantiated views
+ *
+ *
+ * @return the value of field 'Id'.
+ */
+ public java.lang.String getId()
+ {
+ return this._id;
+ }
+
+ /**
+ * Returns the value of field 'ignoreGapsinConsensus'.
+ *
+ * @return the value of field 'IgnoreGapsinConsensus'.
+ */
+ public boolean getIgnoreGapsinConsensus()
+ {
+ return this._ignoreGapsinConsensus;
+ }
+
+ /**
+ * Returns the value of field 'normaliseSequenceLogo'.
+ *
+ * @return the value of field 'NormaliseSequenceLogo'.
+ */
+ public boolean getNormaliseSequenceLogo()
+ {
+ return this._normaliseSequenceLogo;
+ }
+
+ /**
+ * Returns the value of field 'pidSelected'.
+ *
+ * @return the value of field 'PidSelected'.
+ */
+ public boolean getPidSelected()
+ {
+ return this._pidSelected;
+ }
+
+ /**
+ * Returns the value of field 'pidThreshold'.
+ *
+ * @return the value of field 'PidThreshold'.
+ */
+ public int getPidThreshold()
+ {
+ return this._pidThreshold;
+ }
+
+ /**
+ * Returns the value of field 'renderGaps'.
+ *
+ * @return the value of field 'RenderGaps'.
+ */
+ public boolean getRenderGaps()
+ {
+ return this._renderGaps;
+ }
+
+ /**
+ * Returns the value of field 'rightAlignIds'.
+ *
+ * @return the value of field 'RightAlignIds'.
+ */
+ public boolean getRightAlignIds()
+ {
+ return this._rightAlignIds;
+ }
+
+ /**
+ * Returns the value of field 'sequenceSetId'.
+ *
+ * @return the value of field 'SequenceSetId'.
+ */
+ public java.lang.String getSequenceSetId()
+ {
+ return this._sequenceSetId;
+ }
+
+ /**
+ * Returns the value of field 'showAnnotation'.
+ *
+ * @return the value of field 'ShowAnnotation'.
+ */
+ public boolean getShowAnnotation()
+ {
+ return this._showAnnotation;
+ }
+
+ /**
+ * Returns the value of field 'showBoxes'.
+ *
+ * @return the value of field 'ShowBoxes'.
+ */
+ public boolean getShowBoxes()
+ {
+ return this._showBoxes;
+ }
+
+ /**
+ * Returns the value of field 'showColourText'.
+ *
+ * @return the value of field 'ShowColourText'.
+ */
+ public boolean getShowColourText()
+ {
+ return this._showColourText;
+ }
+
+ /**
+ * Returns the value of field 'showConsensusHistogram'.
+ *
+ * @return the value of field 'ShowConsensusHistogram'.
+ */
+ public boolean getShowConsensusHistogram()
+ {
+ return this._showConsensusHistogram;
+ }
+
+ /**
+ * Returns the value of field 'showDbRefTooltip'.
+ *
+ * @return the value of field 'ShowDbRefTooltip'.
+ */
+ public boolean getShowDbRefTooltip()
+ {
+ return this._showDbRefTooltip;
+ }
+
+ /**
+ * Returns the value of field 'showFullId'.
+ *
+ * @return the value of field 'ShowFullId'.
+ */
+ public boolean getShowFullId()
+ {
+ return this._showFullId;
+ }
+
+ /**
+ * Returns the value of field 'showGroupConsensus'.
+ *
+ * @return the value of field 'ShowGroupConsensus'.
+ */
+ public boolean getShowGroupConsensus()
+ {
+ return this._showGroupConsensus;
+ }
+
+ /**
+ * Returns the value of field 'showGroupConservation'.
+ *
+ * @return the value of field 'ShowGroupConservation'.
+ */
+ public boolean getShowGroupConservation()
+ {
+ return this._showGroupConservation;
+ }
+
+ /**
+ * Returns the value of field 'showNPfeatureTooltip'.
+ *
+ * @return the value of field 'ShowNPfeatureTooltip'.
+ */
+ public boolean getShowNPfeatureTooltip()
+ {
+ return this._showNPfeatureTooltip;
+ }
+
+ /**
+ * Returns the value of field 'showSequenceFeatures'.
+ *
+ * @return the value of field 'ShowSequenceFeatures'.
+ */
+ public boolean getShowSequenceFeatures()
+ {
+ return this._showSequenceFeatures;
+ }
+
+ /**
+ * Returns the value of field 'showSequenceLogo'.
+ *
+ * @return the value of field 'ShowSequenceLogo'.
+ */
+ public boolean getShowSequenceLogo()
+ {
+ return this._showSequenceLogo;
+ }
+
+ /**
+ * Returns the value of field 'showText'.
+ *
+ * @return the value of field 'ShowText'.
+ */
+ public boolean getShowText()
+ {
+ return this._showText;
+ }
+
+ /**
+ * Returns the value of field 'showUnconserved'.
+ *
+ * @return the value of field 'ShowUnconserved'.
+ */
+ public boolean getShowUnconserved()
+ {
+ return this._showUnconserved;
+ }
+
+ /**
+ * Returns the value of field 'startRes'.
+ *
+ * @return the value of field 'StartRes'.
+ */
+ public int getStartRes()
+ {
+ return this._startRes;
+ }
+
+ /**
+ * Returns the value of field 'startSeq'.
+ *
+ * @return the value of field 'StartSeq'.
+ */
+ public int getStartSeq()
+ {
+ return this._startSeq;
+ }
+
+ /**
+ * Returns the value of field 'textCol1'.
+ *
+ * @return the value of field 'TextCol1'.
+ */
+ public int getTextCol1()
+ {
+ return this._textCol1;
+ }
+
+ /**
+ * Returns the value of field 'textCol2'.
+ *
+ * @return the value of field 'TextCol2'.
+ */
+ public int getTextCol2()
+ {
+ return this._textCol2;
+ }
+
+ /**
+ * Returns the value of field 'textColThreshold'.
+ *
+ * @return the value of field 'TextColThreshold'.
+ */
+ public int getTextColThreshold()
+ {
+ return this._textColThreshold;
+ }
+
+ /**
+ * Returns the value of field 'title'.
+ *
+ * @return the value of field 'Title'.
+ */
+ public java.lang.String getTitle()
+ {
+ return this._title;
+ }
+
+ /**
+ * Returns the value of field 'viewName'.
+ *
+ * @return the value of field 'ViewName'.
+ */
+ public java.lang.String getViewName()
+ {
+ return this._viewName;
+ }
+
+ /**
+ * Returns the value of field 'width'.
+ *
+ * @return the value of field 'Width'.
+ */
+ public int getWidth()
+ {
+ return this._width;
+ }
+
+ /**
+ * Returns the value of field 'wrapAlignment'.
+ *
+ * @return the value of field 'WrapAlignment'.
+ */
+ public boolean getWrapAlignment()
+ {
+ return this._wrapAlignment;
+ }
+
+ /**
+ * Returns the value of field 'xpos'.
+ *
+ * @return the value of field 'Xpos'.
+ */
+ public int getXpos()
+ {
+ return this._xpos;
+ }
+
+ /**
+ * Returns the value of field 'ypos'.
+ *
+ * @return the value of field 'Ypos'.
+ */
+ public int getYpos()
+ {
+ return this._ypos;
+ }
+
+ /**
+ * Method hasCentreColumnLabels.
+ *
+ * @return true if at least one CentreColumnLabels has been adde
+ */
+ public boolean hasCentreColumnLabels()
+ {
+ return this._has_centreColumnLabels;
+ }
+
+ /**
+ * Method hasConsThreshold.
+ *
+ * @return true if at least one ConsThreshold has been added
+ */
+ public boolean hasConsThreshold()
+ {
+ return this._has_consThreshold;
+ }
+
+ /**
+ * Method hasConservationSelected.
+ *
+ * @return true if at least one ConservationSelected has been added
+ */
+ public boolean hasConservationSelected()
+ {
+ return this._has_conservationSelected;
+ }
+
+ /**
+ * Method hasFollowHighlight.
+ *
+ * @return true if at least one FollowHighlight has been added
+ */
+ public boolean hasFollowHighlight()
+ {
+ return this._has_followHighlight;
+ }
+
+ /**
+ * Method hasFollowSelection.
+ *
+ * @return true if at least one FollowSelection has been added
+ */
+ public boolean hasFollowSelection()
+ {
+ return this._has_followSelection;
+ }
+
+ /**
+ * Method hasFontSize.
+ *
+ * @return true if at least one FontSize has been added
+ */
+ public boolean hasFontSize()
+ {
+ return this._has_fontSize;
+ }
+
+ /**
+ * Method hasFontStyle.
+ *
+ * @return true if at least one FontStyle has been added
+ */
+ public boolean hasFontStyle()
+ {
+ return this._has_fontStyle;
+ }
+
+ /**
+ * Method hasGatheredViews.
+ *
+ * @return true if at least one GatheredViews has been added
+ */
+ public boolean hasGatheredViews()
+ {
+ return this._has_gatheredViews;
+ }
+
+ /**
+ * Method hasHeight.
+ *
+ * @return true if at least one Height has been added
+ */
+ public boolean hasHeight()
+ {
+ return this._has_height;
+ }
+
+ /**
+ * Method hasIgnoreGapsinConsensus.
+ *
+ * @return true if at least one IgnoreGapsinConsensus has been added
+ */
+ public boolean hasIgnoreGapsinConsensus()
+ {
+ return this._has_ignoreGapsinConsensus;
+ }
+
+ /**
+ * Method hasNormaliseSequenceLogo.
+ *
+ * @return true if at least one NormaliseSequenceLogo has been added
+ */
+ public boolean hasNormaliseSequenceLogo()
+ {
+ return this._has_normaliseSequenceLogo;
+ }
+
+ /**
+ * Method hasPidSelected.
+ *
+ * @return true if at least one PidSelected has been added
+ */
+ public boolean hasPidSelected()
+ {
+ return this._has_pidSelected;
+ }
+
+ /**
+ * Method hasPidThreshold.
+ *
+ * @return true if at least one PidThreshold has been added
+ */
+ public boolean hasPidThreshold()
+ {
+ return this._has_pidThreshold;
+ }
+
+ /**
+ * Method hasRenderGaps.
+ *
+ * @return true if at least one RenderGaps has been added
+ */
+ public boolean hasRenderGaps()
+ {
+ return this._has_renderGaps;
+ }
+
+ /**
+ * Method hasRightAlignIds.
+ *
+ * @return true if at least one RightAlignIds has been added
+ */
+ public boolean hasRightAlignIds()
+ {
+ return this._has_rightAlignIds;
+ }
+
+ /**
+ * Method hasShowAnnotation.
+ *
+ * @return true if at least one ShowAnnotation has been added
+ */
+ public boolean hasShowAnnotation()
+ {
+ return this._has_showAnnotation;
+ }
+
+ /**
+ * Method hasShowBoxes.
+ *
+ * @return true if at least one ShowBoxes has been added
+ */
+ public boolean hasShowBoxes()
+ {
+ return this._has_showBoxes;
+ }
+
+ /**
+ * Method hasShowColourText.
+ *
+ * @return true if at least one ShowColourText has been added
+ */
+ public boolean hasShowColourText()
+ {
+ return this._has_showColourText;
+ }
+
+ /**
+ * Method hasShowConsensusHistogram.
+ *
+ * @return true if at least one ShowConsensusHistogram has been added
+ */
+ public boolean hasShowConsensusHistogram()
+ {
+ return this._has_showConsensusHistogram;
+ }
+
+ /**
+ * Method hasShowDbRefTooltip.
+ *
+ * @return true if at least one ShowDbRefTooltip has been added
+ */
+ public boolean hasShowDbRefTooltip()
+ {
+ return this._has_showDbRefTooltip;
+ }
+
+ /**
+ * Method hasShowFullId.
+ *
+ * @return true if at least one ShowFullId has been added
+ */
+ public boolean hasShowFullId()
+ {
+ return this._has_showFullId;
+ }
+
+ /**
+ * Method hasShowGroupConsensus.
+ *
+ * @return true if at least one ShowGroupConsensus has been adde
+ */
+ public boolean hasShowGroupConsensus()
+ {
+ return this._has_showGroupConsensus;
+ }
+
+ /**
+ * Method hasShowGroupConservation.
+ *
+ * @return true if at least one ShowGroupConservation has been added
+ */
+ public boolean hasShowGroupConservation()
+ {
+ return this._has_showGroupConservation;
+ }
+
+ /**
+ * Method hasShowNPfeatureTooltip.
+ *
+ * @return true if at least one ShowNPfeatureTooltip has been added
+ */
+ public boolean hasShowNPfeatureTooltip()
+ {
+ return this._has_showNPfeatureTooltip;
+ }
+
+ /**
+ * Method hasShowSequenceFeatures.
+ *
+ * @return true if at least one ShowSequenceFeatures has been added
+ */
+ public boolean hasShowSequenceFeatures()
+ {
+ return this._has_showSequenceFeatures;
+ }
+
+ /**
+ * Method hasShowSequenceLogo.
+ *
+ * @return true if at least one ShowSequenceLogo has been added
+ */
+ public boolean hasShowSequenceLogo()
+ {
+ return this._has_showSequenceLogo;
+ }
+
+ /**
+ * Method hasShowText.
+ *
+ * @return true if at least one ShowText has been added
+ */
+ public boolean hasShowText()
+ {
+ return this._has_showText;
+ }
+
+ /**
+ * Method hasShowUnconserved.
+ *
+ * @return true if at least one ShowUnconserved has been added
+ */
+ public boolean hasShowUnconserved()
+ {
+ return this._has_showUnconserved;
+ }
+
+ /**
+ * Method hasStartRes.
+ *
+ * @return true if at least one StartRes has been added
+ */
+ public boolean hasStartRes()
+ {
+ return this._has_startRes;
+ }
+
+ /**
+ * Method hasStartSeq.
+ *
+ * @return true if at least one StartSeq has been added
+ */
+ public boolean hasStartSeq()
+ {
+ return this._has_startSeq;
+ }
+
+ /**
+ * Method hasTextCol1.
+ *
+ * @return true if at least one TextCol1 has been added
+ */
+ public boolean hasTextCol1()
+ {
+ return this._has_textCol1;
+ }
+
+ /**
+ * Method hasTextCol2.
+ *
+ * @return true if at least one TextCol2 has been added
+ */
+ public boolean hasTextCol2()
+ {
+ return this._has_textCol2;
+ }
+
+ /**
+ * Method hasTextColThreshold.
+ *
+ * @return true if at least one TextColThreshold has been added
+ */
+ public boolean hasTextColThreshold()
+ {
+ return this._has_textColThreshold;
+ }
+
+ /**
+ * Method hasWidth.
+ *
+ * @return true if at least one Width has been added
+ */
+ public boolean hasWidth()
+ {
+ return this._has_width;
+ }
+
+ /**
+ * 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 true if at least one Ypos has been added
+ */
+ public boolean hasYpos()
+ {
+ return this._has_ypos;
+ }
+
+ /**
+ * Returns the value of field 'centreColumnLabels'.
+ *
+ * @return the value of field 'CentreColumnLabels'.
+ */
+ public boolean isCentreColumnLabels()
+ {
+ return this._centreColumnLabels;
+ }
+
+ /**
+ * Returns the value of field 'conservationSelected'.
+ *
+ * @return the value of field 'ConservationSelected'.
+ */
+ public boolean isConservationSelected()
+ {
+ return this._conservationSelected;
+ }
+
+ /**
+ * Returns the value of field 'followHighlight'.
+ *
+ * @return the value of field 'FollowHighlight'.
+ */
+ public boolean isFollowHighlight()
+ {
+ return this._followHighlight;
+ }
+
+ /**
+ * Returns the value of field 'followSelection'.
+ *
+ * @return the value of field 'FollowSelection'.
+ */
+ public boolean isFollowSelection()
+ {
+ return this._followSelection;
+ }
+
+ /**
+ * Returns the value of field 'gatheredViews'.
+ *
+ * @return the value of field 'GatheredViews'.
+ */
+ public boolean isGatheredViews()
+ {
+ return this._gatheredViews;
+ }
+
+ /**
+ * Returns the value of field 'ignoreGapsinConsensus'.
+ *
+ * @return the value of field 'IgnoreGapsinConsensus'.
+ */
+ public boolean isIgnoreGapsinConsensus()
+ {
+ return this._ignoreGapsinConsensus;
+ }
+
+ /**
+ * Returns the value of field 'normaliseSequenceLogo'.
+ *
+ * @return the value of field 'NormaliseSequenceLogo'.
+ */
+ public boolean isNormaliseSequenceLogo()
+ {
+ return this._normaliseSequenceLogo;
+ }
+
+ /**
+ * Returns the value of field 'pidSelected'.
+ *
+ * @return the value of field 'PidSelected'.
+ */
+ public boolean isPidSelected()
+ {
+ return this._pidSelected;
+ }
+
+ /**
+ * 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 the value of field 'ShowAnnotation'.
+ */
+ public boolean isShowAnnotation()
+ {
+ return this._showAnnotation;
+ }
+
+ /**
+ * 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 'showConsensusHistogram'.
+ *
+ * @return the value of field 'ShowConsensusHistogram'.
+ */
+ public boolean isShowConsensusHistogram()
+ {
+ return this._showConsensusHistogram;
+ }
+
+ /**
+ * Returns the value of field 'showDbRefTooltip'.
+ *
+ * @return the value of field 'ShowDbRefTooltip'.
+ */
+ public boolean isShowDbRefTooltip()
+ {
+ return this._showDbRefTooltip;
+ }
+
+ /**
+ * Returns the value of field 'showFullId'.
+ *
+ * @return the value of field 'ShowFullId'.
+ */
+ public boolean isShowFullId()
+ {
+ return this._showFullId;
+ }
+
+ /**
+ * Returns the value of field 'showGroupConsensus'.
+ *
+ * @return the value of field 'ShowGroupConsensus'.
+ */
+ public boolean isShowGroupConsensus()
+ {
+ return this._showGroupConsensus;
+ }
+
+ /**
+ * Returns the value of field 'showGroupConservation'.
+ *
+ * @return the value of field 'ShowGroupConservation'.
+ */
+ public boolean isShowGroupConservation()
+ {
+ return this._showGroupConservation;
+ }
+
+ /**
+ * Returns the value of field 'showNPfeatureTooltip'.
+ *
+ * @return the value of field 'ShowNPfeatureTooltip'.
+ */
+ public boolean isShowNPfeatureTooltip()
+ {
+ return this._showNPfeatureTooltip;
+ }
+
+ /**
+ * Returns the value of field 'showSequenceFeatures'.
+ *
+ * @return the value of field 'ShowSequenceFeatures'.
+ */
+ public boolean isShowSequenceFeatures()
+ {
+ return this._showSequenceFeatures;
+ }
+
+ /**
+ * Returns the value of field 'showSequenceLogo'.
+ *
+ * @return the value of field 'ShowSequenceLogo'.
+ */
+ public boolean isShowSequenceLogo()
+ {
+ return this._showSequenceLogo;
+ }
+
+ /**
+ * Returns the value of field 'showText'.
+ *
+ * @return the value of field 'ShowText'.
+ */
+ public boolean isShowText()
+ {
+ return this._showText;
+ }
+
+ /**
+ * Returns the value of field 'showUnconserved'.
+ *
+ * @return the value of field 'ShowUnconserved'.
+ */
+ public boolean isShowUnconserved()
+ {
+ return this._showUnconserved;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Returns the value of field 'wrapAlignment'.
+ *
+ * @return the value of field 'WrapAlignment'.
+ */
+ public boolean isWrapAlignment()
+ {
+ return this._wrapAlignment;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ */
+ public void removeAllCalcIdParam()
+ {
+ this._calcIdParamList.clear();
+ }
+
+ /**
+ */
+ public void removeAllHiddenColumns()
+ {
+ this._hiddenColumnsList.clear();
+ }
+
+ /**
+ * Method removeCalcIdParam.
+ *
+ * @param vCalcIdParam
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeCalcIdParam(
+ final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
+ {
+ boolean removed = _calcIdParamList.remove(vCalcIdParam);
+ return removed;
+ }
+
+ /**
+ * Method removeCalcIdParamAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.schemabinding.version2.CalcIdParam removeCalcIdParamAt(
+ final int index)
+ {
+ java.lang.Object obj = this._calcIdParamList.remove(index);
+ return (jalview.schemabinding.version2.CalcIdParam) obj;
+ }
+
+ /**
+ * 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 the element removed from the collection
+ */
+ public jalview.schemabinding.version2.HiddenColumns removeHiddenColumnsAt(
+ final int index)
+ {
+ java.lang.Object obj = this._hiddenColumnsList.remove(index);
+ return (jalview.schemabinding.version2.HiddenColumns) obj;
+ }
+
+ /**
+ * Sets the value of field 'annotationColours'.
+ *
+ * @param annotationColours
+ * the value of field 'annotationColours'.
+ */
+ public void setAnnotationColours(
+ final jalview.schemabinding.version2.AnnotationColours annotationColours)
+ {
+ this._annotationColours = annotationColours;
+ }
+
+ /**
+ * Sets the value of field 'bgColour'.
+ *
+ * @param bgColour
+ * the value of field 'bgColour'.
+ */
+ public void setBgColour(final java.lang.String bgColour)
+ {
+ this._bgColour = bgColour;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vCalcIdParam
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setCalcIdParam(final int index,
+ final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._calcIdParamList.size())
+ {
+ throw new IndexOutOfBoundsException("setCalcIdParam: Index value '"
+ + index + "' not in range [0.."
+ + (this._calcIdParamList.size() - 1) + "]");
+ }
+
+ this._calcIdParamList.set(index, vCalcIdParam);
+ }
+
+ /**
+ *
+ *
+ * @param vCalcIdParamArray
+ */
+ public void setCalcIdParam(
+ final jalview.schemabinding.version2.CalcIdParam[] vCalcIdParamArray)
+ {
+ // -- copy array
+ _calcIdParamList.clear();
+
+ for (int i = 0; i < vCalcIdParamArray.length; i++)
+ {
+ this._calcIdParamList.add(vCalcIdParamArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'centreColumnLabels'.
+ *
+ * @param centreColumnLabels
+ * the value of field 'centreColumnLabels'.
+ */
+ public void setCentreColumnLabels(final boolean centreColumnLabels)
+ {
+ this._centreColumnLabels = centreColumnLabels;
+ this._has_centreColumnLabels = true;
+ }
+
+ /**
+ * Sets the value of field 'consThreshold'.
+ *
+ * @param consThreshold
+ * the value of field 'consThreshold'.
+ */
+ public void setConsThreshold(final int consThreshold)
+ {
+ this._consThreshold = consThreshold;
+ this._has_consThreshold = true;
+ }
+
+ /**
+ * Sets the value of field 'conservationSelected'.
+ *
+ * @param conservationSelected
+ * the value of field 'conservationSelected'.
+ */
+ public void setConservationSelected(final boolean conservationSelected)
+ {
+ this._conservationSelected = conservationSelected;
+ this._has_conservationSelected = true;
+ }
+
+ /**
+ * Sets the value of field 'followHighlight'.
+ *
+ * @param followHighlight
+ * the value of field 'followHighlight'.
+ */
+ public void setFollowHighlight(final boolean followHighlight)
+ {
+ this._followHighlight = followHighlight;
+ this._has_followHighlight = true;
+ }
+
+ /**
+ * Sets the value of field 'followSelection'.
+ *
+ * @param followSelection
+ * the value of field 'followSelection'.
+ */
+ public void setFollowSelection(final boolean followSelection)
+ {
+ this._followSelection = followSelection;
+ this._has_followSelection = true;
+ }
+
+ /**
+ * Sets the value of field 'fontName'.
+ *
+ * @param fontName
+ * the value of field 'fontName'.
+ */
+ public void setFontName(final java.lang.String fontName)
+ {
+ this._fontName = fontName;
+ }
+
+ /**
+ * Sets the value of field 'fontSize'.
+ *
+ * @param fontSize
+ * the value of field 'fontSize'.
+ */
+ public void setFontSize(final int fontSize)
+ {
+ this._fontSize = fontSize;
+ this._has_fontSize = true;
+ }
+
+ /**
+ * Sets the value of field 'fontStyle'.
+ *
+ * @param fontStyle
+ * the value of field 'fontStyle'.
+ */
+ public void setFontStyle(final int fontStyle)
+ {
+ this._fontStyle = fontStyle;
+ this._has_fontStyle = true;
+ }
+
+ /**
+ * Sets the value of field 'gatheredViews'.
+ *
+ * @param gatheredViews
+ * the value of field 'gatheredViews'.
+ */
+ public void setGatheredViews(final boolean gatheredViews)
+ {
+ this._gatheredViews = gatheredViews;
+ this._has_gatheredViews = true;
+ }
+
+ /**
+ * Sets the value of field 'height'.
+ *
+ * @param height
+ * the value of field 'height'.
+ */
+ public void setHeight(final int height)
+ {
+ this._height = height;
+ this._has_height = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vHiddenColumns
+ * @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) + "]");
+ }
+
+ this._hiddenColumnsList.set(index, vHiddenColumns);
+ }
+
+ /**
+ *
+ *
+ * @param vHiddenColumnsArray
+ */
+ public void setHiddenColumns(
+ final jalview.schemabinding.version2.HiddenColumns[] vHiddenColumnsArray)
+ {
+ // -- copy array
+ _hiddenColumnsList.clear();
+
+ for (int i = 0; i < vHiddenColumnsArray.length; i++)
+ {
+ this._hiddenColumnsList.add(vHiddenColumnsArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'id'. The field 'id' has the following description:
+ * unique id used by jalview to synchronize between stored and instantiated
+ * views
+ *
+ *
+ * @param id
+ * the value of field 'id'.
+ */
+ public void setId(final java.lang.String id)
+ {
+ this._id = id;
+ }
+
+ /**
+ * Sets the value of field 'ignoreGapsinConsensus'.
+ *
+ * @param ignoreGapsinConsensus
+ * the value of field 'ignoreGapsinConsensus'.
+ */
+ public void setIgnoreGapsinConsensus(final boolean ignoreGapsinConsensus)
+ {
+ this._ignoreGapsinConsensus = ignoreGapsinConsensus;
+ this._has_ignoreGapsinConsensus = true;
+ }
+
+ /**
+ * Sets the value of field 'normaliseSequenceLogo'.
+ *
+ * @param normaliseSequenceLogo
+ * the value of field 'normaliseSequenceLogo'.
+ */
+ public void setNormaliseSequenceLogo(final boolean normaliseSequenceLogo)
+ {
+ this._normaliseSequenceLogo = normaliseSequenceLogo;
+ this._has_normaliseSequenceLogo = true;
+ }
+
+ /**
+ * Sets the value of field 'pidSelected'.
+ *
+ * @param pidSelected
+ * the value of field 'pidSelected'.
+ */
+ public void setPidSelected(final boolean pidSelected)
+ {
+ this._pidSelected = pidSelected;
+ this._has_pidSelected = true;
+ }
+
+ /**
+ * Sets the value of field 'pidThreshold'.
+ *
+ * @param pidThreshold
+ * the value of field 'pidThreshold'.
+ */
+ public void setPidThreshold(final int pidThreshold)
+ {
+ this._pidThreshold = pidThreshold;
+ this._has_pidThreshold = true;
+ }
+
+ /**
+ * Sets the value of field 'renderGaps'.
+ *
+ * @param renderGaps
+ * the value of field 'renderGaps'.
+ */
+ public void setRenderGaps(final boolean renderGaps)
+ {
+ this._renderGaps = renderGaps;
+ this._has_renderGaps = true;
+ }
+
+ /**
+ * Sets the value of field 'rightAlignIds'.
+ *
+ * @param rightAlignIds
+ * the value of field 'rightAlignIds'.
+ */
+ public void setRightAlignIds(final boolean rightAlignIds)
+ {
+ this._rightAlignIds = rightAlignIds;
+ this._has_rightAlignIds = true;
+ }
+
+ /**
+ * Sets the value of field 'sequenceSetId'.
+ *
+ * @param sequenceSetId
+ * the value of field 'sequenceSetId'.
+ */
+ public void setSequenceSetId(final java.lang.String sequenceSetId)
+ {
+ this._sequenceSetId = sequenceSetId;
+ }
+
+ /**
+ * Sets the value of field 'showAnnotation'.
+ *
+ * @param showAnnotation
+ * the value of field 'showAnnotation'.
+ */
+ public void setShowAnnotation(final boolean showAnnotation)
+ {
+ this._showAnnotation = showAnnotation;
+ this._has_showAnnotation = true;
+ }
+
+ /**
+ * Sets the value of field 'showBoxes'.
+ *
+ * @param showBoxes
+ * the value of field 'showBoxes'.
+ */
+ public void setShowBoxes(final boolean showBoxes)
+ {
+ this._showBoxes = showBoxes;
+ this._has_showBoxes = true;
+ }
+
+ /**
+ * Sets the value of field 'showColourText'.
+ *
+ * @param showColourText
+ * the value of field 'showColourText'.
+ */
+ public void setShowColourText(final boolean showColourText)
+ {
+ this._showColourText = showColourText;
+ this._has_showColourText = true;
+ }
+
+ /**
+ * Sets the value of field 'showConsensusHistogram'.
+ *
+ * @param showConsensusHistogram
+ * the value of field 'showConsensusHistogram'.
+ */
+ public void setShowConsensusHistogram(final boolean showConsensusHistogram)
+ {
+ this._showConsensusHistogram = showConsensusHistogram;
+ this._has_showConsensusHistogram = true;
+ }
+
+ /**
+ * Sets the value of field 'showDbRefTooltip'.
+ *
+ * @param showDbRefTooltip
+ * the value of field 'showDbRefTooltip'
+ */
+ public void setShowDbRefTooltip(final boolean showDbRefTooltip)
+ {
+ this._showDbRefTooltip = showDbRefTooltip;
+ this._has_showDbRefTooltip = true;
+ }
+
+ /**
+ * Sets the value of field 'showFullId'.
+ *
+ * @param showFullId
+ * the value of field 'showFullId'.
+ */
+ public void setShowFullId(final boolean showFullId)
+ {
+ this._showFullId = showFullId;
+ this._has_showFullId = true;
+ }
+
+ /**
+ * Sets the value of field 'showGroupConsensus'.
+ *
+ * @param showGroupConsensus
+ * the value of field 'showGroupConsensus'.
+ */
+ public void setShowGroupConsensus(final boolean showGroupConsensus)
+ {
+ this._showGroupConsensus = showGroupConsensus;
+ this._has_showGroupConsensus = true;
+ }
+
+ /**
+ * Sets the value of field 'showGroupConservation'.
+ *
+ * @param showGroupConservation
+ * the value of field 'showGroupConservation'.
+ */
+ public void setShowGroupConservation(final boolean showGroupConservation)
+ {
+ this._showGroupConservation = showGroupConservation;
+ this._has_showGroupConservation = true;
+ }
+
+ /**
+ * Sets the value of field 'showNPfeatureTooltip'.
+ *
+ * @param showNPfeatureTooltip
+ * the value of field 'showNPfeatureTooltip'.
+ */
+ public void setShowNPfeatureTooltip(final boolean showNPfeatureTooltip)
+ {
+ this._showNPfeatureTooltip = showNPfeatureTooltip;
+ this._has_showNPfeatureTooltip = true;
+ }
+
+ /**
+ * Sets the value of field 'showSequenceFeatures'.
+ *
+ * @param showSequenceFeatures
+ * the value of field 'showSequenceFeatures'.
+ */
+ public void setShowSequenceFeatures(final boolean showSequenceFeatures)
+ {
+ this._showSequenceFeatures = showSequenceFeatures;
+ this._has_showSequenceFeatures = true;
+ }
+
+ /**
+ * Sets the value of field 'showSequenceLogo'.
+ *
+ * @param showSequenceLogo
+ * the value of field 'showSequenceLogo'
+ */
+ public void setShowSequenceLogo(final boolean showSequenceLogo)
+ {
+ this._showSequenceLogo = showSequenceLogo;
+ this._has_showSequenceLogo = true;
+ }
+
+ /**
+ * Sets the value of field 'showText'.
+ *
+ * @param showText
+ * the value of field 'showText'.
+ */
+ public void setShowText(final boolean showText)
+ {
+ this._showText = showText;
+ this._has_showText = true;
+ }
+
+ /**
+ * Sets the value of field 'showUnconserved'.
+ *
+ * @param showUnconserved
+ * the value of field 'showUnconserved'.
+ */
+ public void setShowUnconserved(final boolean showUnconserved)
+ {
+ this._showUnconserved = showUnconserved;
+ this._has_showUnconserved = true;
+ }
+
+ /**
+ * Sets the value of field 'startRes'.
+ *
+ * @param startRes
+ * the value of field 'startRes'.
+ */
+ public void setStartRes(final int startRes)
+ {
+ this._startRes = startRes;
+ this._has_startRes = true;
+ }
+
+ /**
+ * Sets the value of field 'startSeq'.
+ *
+ * @param startSeq
+ * the value of field 'startSeq'.
+ */
+ public void setStartSeq(final int startSeq)
+ {
+ this._startSeq = startSeq;
+ this._has_startSeq = true;
+ }
+
+ /**
+ * Sets the value of field 'textCol1'.
+ *
+ * @param textCol1
+ * the value of field 'textCol1'.
+ */
+ public void setTextCol1(final int textCol1)
+ {
+ this._textCol1 = textCol1;
+ this._has_textCol1 = true;
+ }
+
+ /**
+ * Sets the value of field 'textCol2'.
+ *
+ * @param textCol2
+ * the value of field 'textCol2'.
+ */
+ public void setTextCol2(final int textCol2)
+ {
+ this._textCol2 = textCol2;
+ this._has_textCol2 = true;
+ }
+
+ /**
+ * Sets the value of field 'textColThreshold'.
+ *
+ * @param textColThreshold
+ * the value of field 'textColThreshold'
+ */
+ public void setTextColThreshold(final int textColThreshold)
+ {
+ this._textColThreshold = textColThreshold;
+ this._has_textColThreshold = true;
+ }
+
+ /**
+ * Sets the value of field 'title'.
+ *
+ * @param title
+ * the value of field 'title'.
+ */
+ public void setTitle(final java.lang.String title)
+ {
+ this._title = title;
+ }
+
+ /**
+ * Sets the value of field 'viewName'.
+ *
+ * @param viewName
+ * the value of field 'viewName'.
+ */
+ public void setViewName(final java.lang.String viewName)
+ {
+ this._viewName = viewName;
+ }
+
+ /**
+ * Sets the value of field 'width'.
+ *
+ * @param width
+ * the value of field 'width'.
+ */
+ public void setWidth(final int width)
+ {
+ this._width = width;
+ this._has_width = true;
+ }
+
+ /**
+ * Sets the value of field 'wrapAlignment'.
+ *
+ * @param wrapAlignment
+ * the value of field 'wrapAlignment'.
+ */
+ public void setWrapAlignment(final boolean wrapAlignment)
+ {
+ this._wrapAlignment = wrapAlignment;
+ this._has_wrapAlignment = true;
+ }
+
+ /**
+ * Sets the value of field 'xpos'.
+ *
+ * @param xpos
+ * the value of field 'xpos'.
+ */
+ public void setXpos(final int xpos)
+ {
+ this._xpos = xpos;
+ this._has_xpos = true;
+ }
+
+ /**
+ * Sets the value of field 'ypos'.
+ *
+ * @param ypos
+ * the value of field 'ypos'.
+ */
+ public void setYpos(final int ypos)
+ {
+ this._ypos = ypos;
+ this._has_ypos = true;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled jalview.schemabinding.version2.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);
+ }
+
+ /**
+ *
+ *
+ * @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);
+ }
}
package jalview.schemabinding.version2;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
*
* @version $Revision$ $Date$
*/
-public class WebServiceParameterSet implements java.io.Serializable {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * The short name for the parameter set. This will be shown
- * amongst the
- * other presets for the web service.
- *
- */
- private java.lang.String _name;
-
- /**
- * A Jalview Web Service Parameter Set container
- * version number.
- * Version 1 created for storing Jaba user presets.
- *
- */
- private java.lang.String _version;
-
- /**
- * Short description - as utf8 encoded text. This is
- * usually displayed
- * in the body of an HTML capable tooltip, so HTML tags may be
- * embedded
- * using standard UTF8 encoding.
- *
- */
- private java.lang.String _description;
-
- /**
- * URL for which the parameter set is valid. Jalview will use
- * it to
- * match up parameter sets to service instances that can parse
- * the
- * parameter set payload.
- *
- */
- private java.util.Vector _serviceURLList;
-
- /**
- * UTF8 encoded string to be processed into a specific web
- * services'
- * parameter set. Note - newlines may be important to the
- * structure
- * of this file.
- *
- */
- private java.lang.String _parameters;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public WebServiceParameterSet() {
- super();
- this._serviceURLList = new java.util.Vector();
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- *
- *
- * @param vServiceURL
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addServiceURL(
- final java.lang.String vServiceURL)
- throws java.lang.IndexOutOfBoundsException {
- this._serviceURLList.addElement(vServiceURL);
+public class WebServiceParameterSet implements java.io.Serializable
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * The short name for the parameter set. This will be shown amongst the other
+ * presets for the web service.
+ *
+ */
+ private java.lang.String _name;
+
+ /**
+ * A Jalview Web Service Parameter Set container version number. Version 1
+ * created for storing Jaba user presets.
+ *
+ */
+ private java.lang.String _version;
+
+ /**
+ * Short description - as utf8 encoded text. This is usually displayed in the
+ * body of an HTML capable tooltip, so HTML tags may be embedded using
+ * standard UTF8 encoding.
+ *
+ */
+ private java.lang.String _description;
+
+ /**
+ * URL for which the parameter set is valid. Jalview will use it to match up
+ * parameter sets to service instances that can parse the parameter set
+ * payload.
+ *
+ */
+ private java.util.Vector _serviceURLList;
+
+ /**
+ * UTF8 encoded string to be processed into a specific web services' parameter
+ * set. Note - newlines may be important to the structure of this file.
+ *
+ */
+ private java.lang.String _parameters;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public WebServiceParameterSet()
+ {
+ super();
+ this._serviceURLList = new java.util.Vector();
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ *
+ *
+ * @param vServiceURL
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addServiceURL(final java.lang.String vServiceURL)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._serviceURLList.addElement(vServiceURL);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vServiceURL
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void addServiceURL(final int index,
+ final java.lang.String vServiceURL)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ this._serviceURLList.add(index, vServiceURL);
+ }
+
+ /**
+ * Method enumerateServiceURL.
+ *
+ * @return an Enumeration over all java.lang.String elements
+ */
+ public java.util.Enumeration enumerateServiceURL()
+ {
+ return this._serviceURLList.elements();
+ }
+
+ /**
+ * Returns the value of field 'description'. The field 'description' has the
+ * following description: Short description - as utf8 encoded text. This is
+ * usually displayed in the body of an HTML capable tooltip, so HTML tags may
+ * be embedded using standard UTF8 encoding.
+ *
+ *
+ * @return the value of field 'Description'.
+ */
+ public java.lang.String getDescription()
+ {
+ return this._description;
+ }
+
+ /**
+ * Returns the value of field 'name'. The field 'name' has the following
+ * description: The short name for the parameter set. This will be shown
+ * amongst the other presets for the web service.
+ *
+ *
+ * @return the value of field 'Name'.
+ */
+ public java.lang.String getName()
+ {
+ return this._name;
+ }
+
+ /**
+ * Returns the value of field 'parameters'. The field 'parameters' has the
+ * following description: UTF8 encoded string to be processed into a specific
+ * web services' parameter set. Note - newlines may be important to the
+ * structure of this file.
+ *
+ *
+ * @return the value of field 'Parameters'.
+ */
+ public java.lang.String getParameters()
+ {
+ return this._parameters;
+ }
+
+ /**
+ * Method getServiceURL.
+ *
+ * @param index
+ * @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 getServiceURL(final int index)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._serviceURLList.size())
+ {
+ throw new IndexOutOfBoundsException("getServiceURL: Index value '"
+ + index + "' not in range [0.."
+ + (this._serviceURLList.size() - 1) + "]");
}
- /**
- *
- *
- * @param index
- * @param vServiceURL
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addServiceURL(
- final int index,
- final java.lang.String vServiceURL)
- throws java.lang.IndexOutOfBoundsException {
- this._serviceURLList.add(index, vServiceURL);
+ return (java.lang.String) _serviceURLList.get(index);
+ }
+
+ /**
+ * Method getServiceURL.Returns the contents of the collection in an Array.
+ * <p>
+ * 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
+ * <i>know</i> that the Array returned is of exactly the correct length.
+ *
+ * @return this collection as an Array
+ */
+ public java.lang.String[] getServiceURL()
+ {
+ java.lang.String[] array = new java.lang.String[0];
+ return (java.lang.String[]) this._serviceURLList.toArray(array);
+ }
+
+ /**
+ * Method getServiceURLCount.
+ *
+ * @return the size of this collection
+ */
+ public int getServiceURLCount()
+ {
+ return this._serviceURLList.size();
+ }
+
+ /**
+ * Returns the value of field 'version'. The field 'version' has the following
+ * description: A Jalview Web Service Parameter Set container version number.
+ * Version 1 created for storing Jaba user presets.
+ *
+ *
+ * @return the value of field 'Version'.
+ */
+ public java.lang.String getVersion()
+ {
+ return this._version;
+ }
+
+ /**
+ * 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;
}
-
- /**
- * Method enumerateServiceURL.
- *
- * @return an Enumeration over all java.lang.String elements
- */
- public java.util.Enumeration enumerateServiceURL(
- ) {
- return this._serviceURLList.elements();
- }
-
- /**
- * Returns the value of field 'description'. The field
- * 'description' has the following description: Short
- * description - as utf8 encoded text. This is
- * usually displayed
- * in the body of an HTML capable tooltip, so HTML tags may be
- * embedded
- * using standard UTF8 encoding.
- *
- *
- * @return the value of field 'Description'.
- */
- public java.lang.String getDescription(
- ) {
- return this._description;
- }
-
- /**
- * Returns the value of field 'name'. The field 'name' has the
- * following description: The short name for the parameter set.
- * This will be shown amongst the
- * other presets for the web service.
- *
- *
- * @return the value of field 'Name'.
- */
- public java.lang.String getName(
- ) {
- return this._name;
- }
-
- /**
- * Returns the value of field 'parameters'. The field
- * 'parameters' has the following description: UTF8 encoded
- * string to be processed into a specific web services'
- * parameter set. Note - newlines may be important to the
- * structure
- * of this file.
- *
- *
- * @return the value of field 'Parameters'.
- */
- public java.lang.String getParameters(
- ) {
- return this._parameters;
- }
-
- /**
- * Method getServiceURL.
- *
- * @param index
- * @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 getServiceURL(
- final int index)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._serviceURLList.size()) {
- throw new IndexOutOfBoundsException("getServiceURL: Index value '" + index + "' not in range [0.." + (this._serviceURLList.size() - 1) + "]");
- }
-
- return (java.lang.String) _serviceURLList.get(index);
- }
-
- /**
- * Method getServiceURL.Returns the contents of the collection
- * in an Array. <p>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 <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public java.lang.String[] getServiceURL(
- ) {
- java.lang.String[] array = new java.lang.String[0];
- return (java.lang.String[]) this._serviceURLList.toArray(array);
- }
-
- /**
- * Method getServiceURLCount.
- *
- * @return the size of this collection
- */
- public int getServiceURLCount(
- ) {
- return this._serviceURLList.size();
- }
-
- /**
- * Returns the value of field 'version'. The field 'version'
- * has the following description: A Jalview Web Service
- * Parameter Set container
- * version number.
- * Version 1 created for storing Jaba user presets.
- *
- *
- * @return the value of field 'Version'.
+ return true;
+ }
+
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, out);
+ }
+
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException,
+ org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
*/
- public java.lang.String getVersion(
- ) {
- return this._version;
+ public void removeAllServiceURL()
+ {
+ this._serviceURLList.clear();
+ }
+
+ /**
+ * Method removeServiceURL.
+ *
+ * @param vServiceURL
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeServiceURL(final java.lang.String vServiceURL)
+ {
+ boolean removed = _serviceURLList.remove(vServiceURL);
+ return removed;
+ }
+
+ /**
+ * Method removeServiceURLAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public java.lang.String removeServiceURLAt(final int index)
+ {
+ java.lang.Object obj = this._serviceURLList.remove(index);
+ return (java.lang.String) obj;
+ }
+
+ /**
+ * Sets the value of field 'description'. The field 'description' has the
+ * following description: Short description - as utf8 encoded text. This is
+ * usually displayed in the body of an HTML capable tooltip, so HTML tags may
+ * be embedded using standard UTF8 encoding.
+ *
+ *
+ * @param description
+ * the value of field 'description'.
+ */
+ public void setDescription(final java.lang.String description)
+ {
+ this._description = description;
+ }
+
+ /**
+ * Sets the value of field 'name'. The field 'name' has the following
+ * description: The short name for the parameter set. This will be shown
+ * amongst the other presets for the web service.
+ *
+ *
+ * @param name
+ * the value of field 'name'.
+ */
+ public void setName(final java.lang.String name)
+ {
+ this._name = name;
+ }
+
+ /**
+ * Sets the value of field 'parameters'. The field 'parameters' has the
+ * following description: UTF8 encoded string to be processed into a specific
+ * web services' parameter set. Note - newlines may be important to the
+ * structure of this file.
+ *
+ *
+ * @param parameters
+ * the value of field 'parameters'.
+ */
+ public void setParameters(final java.lang.String parameters)
+ {
+ this._parameters = parameters;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vServiceURL
+ * @throws java.lang.IndexOutOfBoundsException
+ * if the index given is outside the bounds of the collection
+ */
+ public void setServiceURL(final int index,
+ final java.lang.String vServiceURL)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ // check bounds for index
+ if (index < 0 || index >= this._serviceURLList.size())
+ {
+ throw new IndexOutOfBoundsException("setServiceURL: Index value '"
+ + index + "' not in range [0.."
+ + (this._serviceURLList.size() - 1) + "]");
}
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
- }
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
- }
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
- }
-
- /**
- */
- public void removeAllServiceURL(
- ) {
- this._serviceURLList.clear();
- }
-
- /**
- * Method removeServiceURL.
- *
- * @param vServiceURL
- * @return true if the object was removed from the collection.
- */
- public boolean removeServiceURL(
- final java.lang.String vServiceURL) {
- boolean removed = _serviceURLList.remove(vServiceURL);
- return removed;
- }
-
- /**
- * Method removeServiceURLAt.
- *
- * @param index
- * @return the element removed from the collection
- */
- public java.lang.String removeServiceURLAt(
- final int index) {
- java.lang.Object obj = this._serviceURLList.remove(index);
- return (java.lang.String) obj;
- }
-
- /**
- * Sets the value of field 'description'. The field
- * 'description' has the following description: Short
- * description - as utf8 encoded text. This is
- * usually displayed
- * in the body of an HTML capable tooltip, so HTML tags may be
- * embedded
- * using standard UTF8 encoding.
- *
- *
- * @param description the value of field 'description'.
- */
- public void setDescription(
- final java.lang.String description) {
- this._description = description;
- }
-
- /**
- * Sets the value of field 'name'. The field 'name' has the
- * following description: The short name for the parameter set.
- * This will be shown amongst the
- * other presets for the web service.
- *
- *
- * @param name the value of field 'name'.
- */
- public void setName(
- final java.lang.String name) {
- this._name = name;
- }
-
- /**
- * Sets the value of field 'parameters'. The field 'parameters'
- * has the following description: UTF8 encoded string to be
- * processed into a specific web services'
- * parameter set. Note - newlines may be important to the
- * structure
- * of this file.
- *
- *
- * @param parameters the value of field 'parameters'.
- */
- public void setParameters(
- final java.lang.String parameters) {
- this._parameters = parameters;
- }
-
- /**
- *
- *
- * @param index
- * @param vServiceURL
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void setServiceURL(
- final int index,
- final java.lang.String vServiceURL)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._serviceURLList.size()) {
- throw new IndexOutOfBoundsException("setServiceURL: Index value '" + index + "' not in range [0.." + (this._serviceURLList.size() - 1) + "]");
- }
-
- this._serviceURLList.set(index, vServiceURL);
- }
-
- /**
- *
- *
- * @param vServiceURLArray
- */
- public void setServiceURL(
- final java.lang.String[] vServiceURLArray) {
- //-- copy array
- _serviceURLList.clear();
-
- for (int i = 0; i < vServiceURLArray.length; i++) {
- this._serviceURLList.add(vServiceURLArray[i]);
- }
- }
-
- /**
- * Sets the value of field 'version'. The field 'version' has
- * the following description: A Jalview Web Service Parameter
- * Set container
- * version number.
- * Version 1 created for storing Jaba user presets.
- *
- *
- * @param version the value of field 'version'.
- */
- public void setVersion(
- final java.lang.String version) {
- this._version = version;
- }
-
- /**
- * 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.WebServiceParameterSet
- */
- public static jalview.schemabinding.version2.WebServiceParameterSet unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (jalview.schemabinding.version2.WebServiceParameterSet) Unmarshaller.unmarshal(jalview.schemabinding.version2.WebServiceParameterSet.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);
+ this._serviceURLList.set(index, vServiceURL);
+ }
+
+ /**
+ *
+ *
+ * @param vServiceURLArray
+ */
+ public void setServiceURL(final java.lang.String[] vServiceURLArray)
+ {
+ // -- copy array
+ _serviceURLList.clear();
+
+ for (int i = 0; i < vServiceURLArray.length; i++)
+ {
+ this._serviceURLList.add(vServiceURLArray[i]);
}
+ }
+
+ /**
+ * Sets the value of field 'version'. The field 'version' has the following
+ * description: A Jalview Web Service Parameter Set container version number.
+ * Version 1 created for storing Jaba user presets.
+ *
+ *
+ * @param version
+ * the value of field 'version'.
+ */
+ public void setVersion(final java.lang.String version)
+ {
+ this._version = version;
+ }
+
+ /**
+ * 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.WebServiceParameterSet
+ */
+ public static jalview.schemabinding.version2.WebServiceParameterSet unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException
+ {
+ return (jalview.schemabinding.version2.WebServiceParameterSet) Unmarshaller
+ .unmarshal(
+ jalview.schemabinding.version2.WebServiceParameterSet.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);
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.AlcodMap;
*
* @version $Revision$ $Date$
*/
-public class AlcodMapDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _elementDefinition.
- */
- private boolean _elementDefinition;
-
- /**
- * Field _nsPrefix.
- */
- private java.lang.String _nsPrefix;
-
- /**
- * Field _nsURI.
- */
- private java.lang.String _nsURI;
-
- /**
- * Field _xmlName.
- */
- private java.lang.String _xmlName;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public AlcodMapDescriptor() {
- super();
- _nsURI = "www.vamsas.ac.uk/jalview/version2";
- _xmlName = "alcodMap";
- _elementDefinition = true;
-
- //-- set grouping compositor
- setCompositorAsSequence();
- org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
- org.exolab.castor.mapping.FieldHandler handler = null;
- org.exolab.castor.xml.FieldValidator fieldValidator = null;
- //-- initialize attribute descriptors
-
- //-- _dnasq
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dnasq", "dnasq", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- AlcodMap target = (AlcodMap) object;
- return target.getDnasq();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- AlcodMap target = (AlcodMap) object;
- target.setDnasq( (java.lang.String) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setRequired(true);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _dnasq
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- org.exolab.castor.xml.validators.StringValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.StringValidator();
- fieldValidator.setValidator(typeValidator);
- typeValidator.setWhiteSpace("preserve");
- }
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- //-- _mapping
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Mapping.class, "_mapping", "Mapping", org.exolab.castor.xml.NodeType.Element);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- AlcodMap target = (AlcodMap) object;
- return target.getMapping();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- AlcodMap target = (AlcodMap) object;
- target.setMapping( (jalview.schemabinding.version2.Mapping) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return new jalview.schemabinding.version2.Mapping();
- }
- };
- desc.setHandler(handler);
- desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
- desc.setRequired(true);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _mapping
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
+public class AlcodMapDescriptor extends
+ org.exolab.castor.xml.util.XMLClassDescriptorImpl
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _elementDefinition.
+ */
+ private boolean _elementDefinition;
+
+ /**
+ * Field _nsPrefix.
+ */
+ private java.lang.String _nsPrefix;
+
+ /**
+ * Field _nsURI.
+ */
+ private java.lang.String _nsURI;
+
+ /**
+ * Field _xmlName.
+ */
+ private java.lang.String _xmlName;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public AlcodMapDescriptor()
+ {
+ super();
+ _nsURI = "www.vamsas.ac.uk/jalview/version2";
+ _xmlName = "alcodMap";
+ _elementDefinition = true;
+
+ // -- set grouping compositor
+ setCompositorAsSequence();
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+ org.exolab.castor.mapping.FieldHandler handler = null;
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;
+ // -- initialize attribute descriptors
+
+ // -- _dnasq
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_dnasq", "dnasq",
+ org.exolab.castor.xml.NodeType.Attribute);
+ desc.setImmutable(true);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ AlcodMap target = (AlcodMap) object;
+ return target.getDnasq();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ AlcodMap target = (AlcodMap) object;
+ target.setDnasq((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _dnasq
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { // -- local scope
+ org.exolab.castor.xml.validators.StringValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+ fieldValidator.setValidator(typeValidator);
+ typeValidator.setWhiteSpace("preserve");
}
-
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
- }
-
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.AlcodMap.class;
- }
-
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
-
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
-
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
-
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
-
- /**
- * Method isElementDefinition.
- *
- * @return true if XML schema definition of this Class is that
- * of a global
- * element or element with anonymous type definition.
- */
- public boolean isElementDefinition(
- ) {
- return _elementDefinition;
+ desc.setValidator(fieldValidator);
+ // -- initialize element descriptors
+
+ // -- _mapping
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ jalview.schemabinding.version2.Mapping.class, "_mapping",
+ "Mapping", org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ AlcodMap target = (AlcodMap) object;
+ return target.getMapping();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ AlcodMap target = (AlcodMap) object;
+ target.setMapping((jalview.schemabinding.version2.Mapping) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return new jalview.schemabinding.version2.Mapping();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _mapping
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.AlcodMap.class;
+ }
+
+ /**
+ * Method getNameSpacePrefix.
+ *
+ * @return the namespace prefix to use when marshaling as XML.
+ */
+ public java.lang.String getNameSpacePrefix()
+ {
+ return _nsPrefix;
+ }
+
+ /**
+ * Method getNameSpaceURI.
+ *
+ * @return the namespace URI used when marshaling and unmarshaling as XML.
+ */
+ public java.lang.String getNameSpaceURI()
+ {
+ return _nsURI;
+ }
+
+ /**
+ * Method getValidator.
+ *
+ * @return a specific validator for the class described by this
+ * ClassDescriptor.
+ */
+ public org.exolab.castor.xml.TypeValidator getValidator()
+ {
+ return this;
+ }
+
+ /**
+ * Method getXMLName.
+ *
+ * @return the XML Name for the Class being described.
+ */
+ public java.lang.String getXMLName()
+ {
+ return _xmlName;
+ }
+
+ /**
+ * Method isElementDefinition.
+ *
+ * @return true if XML schema definition of this Class is that of a global
+ * element or element with anonymous type definition.
+ */
+ public boolean isElementDefinition()
+ {
+ return _elementDefinition;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Alcodon;
*
* @version $Revision$ $Date$
*/
-public class AlcodonDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _elementDefinition.
- */
- private boolean _elementDefinition;
-
- /**
- * Field _nsPrefix.
- */
- private java.lang.String _nsPrefix;
-
- /**
- * Field _nsURI.
- */
- private java.lang.String _nsURI;
-
- /**
- * Field _xmlName.
- */
- private java.lang.String _xmlName;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public AlcodonDescriptor() {
- super();
- _nsURI = "www.vamsas.ac.uk/jalview/version2";
- _xmlName = "alcodon";
- _elementDefinition = true;
- org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
- org.exolab.castor.mapping.FieldHandler handler = null;
- org.exolab.castor.xml.FieldValidator fieldValidator = null;
- //-- initialize attribute descriptors
-
- //-- _pos1
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_pos1", "pos1", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Alcodon target = (Alcodon) object;
- if (!target.hasPos1()) { return null; }
- return new java.lang.Long(target.getPos1());
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Alcodon target = (Alcodon) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deletePos1();
- return;
- }
- target.setPos1( ((java.lang.Long) value).longValue());
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _pos1
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- { //-- local scope
- org.exolab.castor.xml.validators.LongValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.LongValidator();
- fieldValidator.setValidator(typeValidator);
- }
- desc.setValidator(fieldValidator);
- //-- _pos2
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_pos2", "pos2", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Alcodon target = (Alcodon) object;
- if (!target.hasPos2()) { return null; }
- return new java.lang.Long(target.getPos2());
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Alcodon target = (Alcodon) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deletePos2();
- return;
- }
- target.setPos2( ((java.lang.Long) value).longValue());
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _pos2
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- { //-- local scope
- org.exolab.castor.xml.validators.LongValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.LongValidator();
- fieldValidator.setValidator(typeValidator);
+public class AlcodonDescriptor extends
+ org.exolab.castor.xml.util.XMLClassDescriptorImpl
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _elementDefinition.
+ */
+ private boolean _elementDefinition;
+
+ /**
+ * Field _nsPrefix.
+ */
+ private java.lang.String _nsPrefix;
+
+ /**
+ * Field _nsURI.
+ */
+ private java.lang.String _nsURI;
+
+ /**
+ * Field _xmlName.
+ */
+ private java.lang.String _xmlName;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public AlcodonDescriptor()
+ {
+ super();
+ _nsURI = "www.vamsas.ac.uk/jalview/version2";
+ _xmlName = "alcodon";
+ _elementDefinition = true;
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+ org.exolab.castor.mapping.FieldHandler handler = null;
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;
+ // -- initialize attribute descriptors
+
+ // -- _pos1
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Long.TYPE, "_pos1", "pos1",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ Alcodon target = (Alcodon) object;
+ if (!target.hasPos1())
+ {
+ return null;
}
- desc.setValidator(fieldValidator);
- //-- _pos3
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_pos3", "pos3", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Alcodon target = (Alcodon) object;
- if (!target.hasPos3()) { return null; }
- return new java.lang.Long(target.getPos3());
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Alcodon target = (Alcodon) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deletePos3();
- return;
- }
- target.setPos3( ((java.lang.Long) value).longValue());
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _pos3
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- { //-- local scope
- org.exolab.castor.xml.validators.LongValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.LongValidator();
- fieldValidator.setValidator(typeValidator);
+ return new java.lang.Long(target.getPos1());
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Alcodon target = (Alcodon) object;
+ // if null, use delete method for optional primitives
+ if (value == null)
+ {
+ target.deletePos1();
+ return;
+ }
+ target.setPos1(((java.lang.Long) value).longValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- }
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+ // -- validation code for: _pos1
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ { // -- local scope
+ org.exolab.castor.xml.validators.LongValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.LongValidator();
+ fieldValidator.setValidator(typeValidator);
+ }
+ desc.setValidator(fieldValidator);
+ // -- _pos2
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Long.TYPE, "_pos2", "pos2",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ Alcodon target = (Alcodon) object;
+ if (!target.hasPos2())
+ {
+ return null;
+ }
+ return new java.lang.Long(target.getPos2());
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Alcodon target = (Alcodon) object;
+ // if null, use delete method for optional primitives
+ if (value == null)
+ {
+ target.deletePos2();
+ return;
+ }
+ target.setPos2(((java.lang.Long) value).longValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _pos2
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ { // -- local scope
+ org.exolab.castor.xml.validators.LongValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.LongValidator();
+ fieldValidator.setValidator(typeValidator);
}
+ desc.setValidator(fieldValidator);
+ // -- _pos3
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Long.TYPE, "_pos3", "pos3",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ Alcodon target = (Alcodon) object;
+ if (!target.hasPos3())
+ {
+ return null;
+ }
+ return new java.lang.Long(target.getPos3());
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.Alcodon.class;
- }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Alcodon target = (Alcodon) object;
+ // if null, use delete method for optional primitives
+ if (value == null)
+ {
+ target.deletePos3();
+ return;
+ }
+ target.setPos3(((java.lang.Long) value).longValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- validation code for: _pos3
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ { // -- local scope
+ org.exolab.castor.xml.validators.LongValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.LongValidator();
+ fieldValidator.setValidator(typeValidator);
}
+ desc.setValidator(fieldValidator);
+ // -- initialize element descriptors
- /**
- * 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;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * 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;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.Alcodon.class;
+ }
+
+ /**
+ * Method getNameSpacePrefix.
+ *
+ * @return the namespace prefix to use when marshaling as XML.
+ */
+ public java.lang.String getNameSpacePrefix()
+ {
+ return _nsPrefix;
+ }
+
+ /**
+ * Method getNameSpaceURI.
+ *
+ * @return the namespace URI used when marshaling and unmarshaling as XML.
+ */
+ public java.lang.String getNameSpaceURI()
+ {
+ return _nsURI;
+ }
+
+ /**
+ * Method getValidator.
+ *
+ * @return a specific validator for the class described by this
+ * ClassDescriptor.
+ */
+ public org.exolab.castor.xml.TypeValidator getValidator()
+ {
+ return this;
+ }
+
+ /**
+ * Method getXMLName.
+ *
+ * @return the XML Name for the Class being described.
+ */
+ public java.lang.String getXMLName()
+ {
+ return _xmlName;
+ }
+
+ /**
+ * Method isElementDefinition.
+ *
+ * @return true if XML schema definition of this Class is that of a global
+ * element or element with anonymous type definition.
+ */
+ public boolean isElementDefinition()
+ {
+ return _elementDefinition;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.AlcodonFrame;
*
* @version $Revision$ $Date$
*/
-public class AlcodonFrameDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _elementDefinition.
- */
- private boolean _elementDefinition;
-
- /**
- * Field _nsPrefix.
- */
- private java.lang.String _nsPrefix;
-
- /**
- * Field _nsURI.
- */
- private java.lang.String _nsURI;
-
- /**
- * Field _xmlName.
- */
- private java.lang.String _xmlName;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public AlcodonFrameDescriptor() {
- super();
- _nsURI = "www.vamsas.ac.uk/jalview/version2";
- _xmlName = "AlcodonFrame";
- _elementDefinition = true;
-
- //-- set grouping compositor
- setCompositorAsSequence();
- org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
- org.exolab.castor.mapping.FieldHandler handler = null;
- org.exolab.castor.xml.FieldValidator fieldValidator = null;
- //-- initialize attribute descriptors
-
- //-- initialize element descriptors
-
- //-- _alcodonList
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Alcodon.class, "_alcodonList", "alcodon", org.exolab.castor.xml.NodeType.Element);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- AlcodonFrame target = (AlcodonFrame) object;
- return target.getAlcodon();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- AlcodonFrame target = (AlcodonFrame) object;
- target.addAlcodon( (jalview.schemabinding.version2.Alcodon) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
- try {
- AlcodonFrame target = (AlcodonFrame) object;
- target.removeAllAlcodon();
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return new jalview.schemabinding.version2.Alcodon();
- }
- };
- desc.setHandler(handler);
- desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
- desc.setMultivalued(true);
- addFieldDescriptor(desc);
-
- //-- validation code for: _alcodonList
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(0);
- { //-- local scope
+public class AlcodonFrameDescriptor extends
+ org.exolab.castor.xml.util.XMLClassDescriptorImpl
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _elementDefinition.
+ */
+ private boolean _elementDefinition;
+
+ /**
+ * Field _nsPrefix.
+ */
+ private java.lang.String _nsPrefix;
+
+ /**
+ * Field _nsURI.
+ */
+ private java.lang.String _nsURI;
+
+ /**
+ * Field _xmlName.
+ */
+ private java.lang.String _xmlName;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public AlcodonFrameDescriptor()
+ {
+ super();
+ _nsURI = "www.vamsas.ac.uk/jalview/version2";
+ _xmlName = "AlcodonFrame";
+ _elementDefinition = true;
+
+ // -- set grouping compositor
+ setCompositorAsSequence();
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+ org.exolab.castor.mapping.FieldHandler handler = null;
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;
+ // -- initialize attribute descriptors
+
+ // -- initialize element descriptors
+
+ // -- _alcodonList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ jalview.schemabinding.version2.Alcodon.class, "_alcodonList",
+ "alcodon", org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ AlcodonFrame target = (AlcodonFrame) object;
+ return target.getAlcodon();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ AlcodonFrame target = (AlcodonFrame) object;
+ target.addAlcodon((jalview.schemabinding.version2.Alcodon) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- _alcodMapList
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.AlcodMap.class, "_alcodMapList", "alcodMap", org.exolab.castor.xml.NodeType.Element);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- AlcodonFrame target = (AlcodonFrame) object;
- return target.getAlcodMap();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- AlcodonFrame target = (AlcodonFrame) object;
- target.addAlcodMap( (jalview.schemabinding.version2.AlcodMap) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
- try {
- AlcodonFrame target = (AlcodonFrame) object;
- target.removeAllAlcodMap();
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return new jalview.schemabinding.version2.AlcodMap();
- }
- };
- desc.setHandler(handler);
- desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
- desc.setMultivalued(true);
- addFieldDescriptor(desc);
-
- //-- validation code for: _alcodMapList
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(0);
- { //-- local scope
+ }
+
+ public void resetValue(Object object) throws IllegalStateException,
+ IllegalArgumentException
+ {
+ try
+ {
+ AlcodonFrame target = (AlcodonFrame) object;
+ target.removeAllAlcodon();
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return new jalview.schemabinding.version2.Alcodon();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
+ desc.setMultivalued(true);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _alcodonList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ // -- _alcodMapList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ jalview.schemabinding.version2.AlcodMap.class, "_alcodMapList",
+ "alcodMap", org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ AlcodonFrame target = (AlcodonFrame) object;
+ return target.getAlcodMap();
+ }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ AlcodonFrame target = (AlcodonFrame) object;
+ target.addAlcodMap((jalview.schemabinding.version2.AlcodMap) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ public void resetValue(Object object) throws IllegalStateException,
+ IllegalArgumentException
+ {
+ try
+ {
+ AlcodonFrame target = (AlcodonFrame) object;
+ target.removeAllAlcodMap();
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
- return null;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return new jalview.schemabinding.version2.AlcodMap();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
+ desc.setMultivalued(true);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _alcodMapList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.AlcodonFrame.class;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.AlcodonFrame.class;
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ /**
+ * Method getNameSpacePrefix.
+ *
+ * @return the namespace prefix to use when marshaling as XML.
+ */
+ public java.lang.String getNameSpacePrefix()
+ {
+ return _nsPrefix;
+ }
- /**
- * 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;
- }
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.AnnotationColours;
*
* @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;
-
-
- //----------------/
- //- 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");
+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;
+
+ // ----------------/
+ // - 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;
}
- 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);
+ 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());
}
- 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);
+ }
+
+ 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());
}
- 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");
+ }
+
+ 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;
}
- 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);
+ 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());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- }
+ }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- //-----------/
- //- Methods -/
- //-----------/
+ // -- 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());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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();
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.AnnotationColours.class;
- }
+ 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());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- 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());
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ 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());
+ }
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * 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;
+ // -- 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Annotation;
*
* @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;
-
-
- //----------------/
- //- 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);
- //-- _groupRef
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_groupRef", "groupRef", 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.getGroupRef();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Annotation target = (Annotation) object;
- target.setGroupRef( (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: _groupRef
- 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);
- //-- _graphHeight
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_graphHeight", "graphHeight", 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.hasGraphHeight()) { return null; }
- return new java.lang.Integer(target.getGraphHeight());
- }
- 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.deleteGraphHeight();
- return;
- }
- target.setGraphHeight( ((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: _graphHeight
- 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);
- //-- _centreColLabels
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_centreColLabels", "centreColLabels", 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.hasCentreColLabels()) { return null; }
- return (target.getCentreColLabels() ? 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.deleteCentreColLabels();
- return;
- }
- target.setCentreColLabels( ((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: _centreColLabels
- 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);
- //-- _scaleColLabels
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_scaleColLabels", "scaleColLabels", 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.hasScaleColLabels()) { return null; }
- return (target.getScaleColLabels() ? 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.deleteScaleColLabels();
- return;
- }
- target.setScaleColLabels( ((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: _scaleColLabels
- 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);
- //-- _showAllColLabels
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showAllColLabels", "showAllColLabels", 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.hasShowAllColLabels()) { return null; }
- return (target.getShowAllColLabels() ? 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.deleteShowAllColLabels();
- return;
- }
- target.setShowAllColLabels( ((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: _showAllColLabels
- 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);
- //-- _autoCalculated
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_autoCalculated", "autoCalculated", 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.hasAutoCalculated()) { return null; }
- return (target.getAutoCalculated() ? 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.deleteAutoCalculated();
- return;
- }
- target.setAutoCalculated( ((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: _autoCalculated
- 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);
- //-- _belowAlignment
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_belowAlignment", "belowAlignment", 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.hasBelowAlignment()) { return null; }
- return (target.getBelowAlignment() ? 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.deleteBelowAlignment();
- return;
- }
- target.setBelowAlignment( ((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: _belowAlignment
- 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);
- //-- _calcId
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_calcId", "calcId", 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.getCalcId();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Annotation target = (Annotation) object;
- target.setCalcId( (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: _calcId
- 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
-
- //-- _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);
+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;
+
+ // ----------------/
+ // - 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);
+ // -- _groupRef
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_groupRef", "groupRef",
+ 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.getGroupRef();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Annotation target = (Annotation) object;
+ target.setGroupRef((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: _groupRef
+ 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);
+ // -- _graphHeight
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Integer.TYPE, "_graphHeight", "graphHeight",
+ 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.hasGraphHeight())
+ {
+ return null;
+ }
+ return new java.lang.Integer(target.getGraphHeight());
+ }
+
+ 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.deleteGraphHeight();
+ return;
+ }
+ target.setGraphHeight(((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: _graphHeight
+ 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);
- //-----------/
- //- Methods -/
- //-----------/
+ // -- 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);
+ // -- _centreColLabels
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_centreColLabels", "centreColLabels",
+ 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.hasCentreColLabels())
+ {
+ return null;
+ }
+ return (target.getCentreColLabels() ? java.lang.Boolean.TRUE
+ : java.lang.Boolean.FALSE);
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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.deleteCentreColLabels();
+ return;
+ }
+ target.setCentreColLabels(((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: _centreColLabels
+ 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);
+ // -- _scaleColLabels
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_scaleColLabels", "scaleColLabels",
+ 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.hasScaleColLabels())
+ {
+ return null;
+ }
+ return (target.getScaleColLabels() ? 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.deleteScaleColLabels();
+ return;
+ }
+ target.setScaleColLabels(((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: _scaleColLabels
+ 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);
+ // -- _showAllColLabels
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_showAllColLabels",
+ "showAllColLabels", 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.hasShowAllColLabels())
+ {
+ return null;
+ }
+ return (target.getShowAllColLabels() ? 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.deleteShowAllColLabels();
+ return;
+ }
+ target.setShowAllColLabels(((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: _showAllColLabels
+ 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);
+ // -- _autoCalculated
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_autoCalculated", "autoCalculated",
+ 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.hasAutoCalculated())
+ {
+ return null;
+ }
+ return (target.getAutoCalculated() ? 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.deleteAutoCalculated();
+ return;
+ }
+ target.setAutoCalculated(((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);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _autoCalculated
+ 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);
+ // -- _belowAlignment
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_belowAlignment", "belowAlignment",
+ 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.hasBelowAlignment())
+ {
+ return null;
+ }
+ return (target.getBelowAlignment() ? 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.deleteBelowAlignment();
+ return;
+ }
+ target.setBelowAlignment(((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);
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.Annotation.class;
+ // -- validation code for: _belowAlignment
+ 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);
+ // -- _calcId
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_calcId", "calcId",
+ 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.getCalcId();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Annotation target = (Annotation) object;
+ target.setCalcId((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);
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
+ // -- validation code for: _calcId
+ 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
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- _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());
+ }
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
+ 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);
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ // -- 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();
+ }
- /**
- * 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;
+ 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.AnnotationElement;
*
* @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;
-
-
- //----------------/
- //- 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");
+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;
+
+ // ----------------/
+ // - 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;
}
- 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");
+ 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());
}
- 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);
+ }
+
+ 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;
}
- 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);
+ 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());
}
- desc.setValidator(fieldValidator);
+ }
+
+ 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();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ 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());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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();
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.AnnotationElement.class;
- }
+ 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());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ 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);
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- 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();
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ 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);
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ // -- 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());
+ }
+ }
- /**
- * 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;
+ 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.CalcIdParam;
*
* @version $Revision$ $Date$
*/
-public class CalcIdParamDescriptor extends jalview.schemabinding.version2.descriptors.WebServiceParameterSetDescriptor {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _elementDefinition.
- */
- private boolean _elementDefinition;
-
- /**
- * Field _nsPrefix.
- */
- private java.lang.String _nsPrefix;
-
- /**
- * Field _nsURI.
- */
- private java.lang.String _nsURI;
-
- /**
- * Field _xmlName.
- */
- private java.lang.String _xmlName;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public CalcIdParamDescriptor() {
- super();
- setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.WebServiceParameterSetDescriptor());
- _nsURI = "www.jalview.org";
- _xmlName = "calcIdParam";
- _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
-
- //-- _calcId
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_calcId", "calcId", 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
- {
- CalcIdParam target = (CalcIdParam) object;
- return target.getCalcId();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- CalcIdParam target = (CalcIdParam) object;
- target.setCalcId( (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: _calcId
- 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");
+public class CalcIdParamDescriptor
+ extends
+ jalview.schemabinding.version2.descriptors.WebServiceParameterSetDescriptor
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _elementDefinition.
+ */
+ private boolean _elementDefinition;
+
+ /**
+ * Field _nsPrefix.
+ */
+ private java.lang.String _nsPrefix;
+
+ /**
+ * Field _nsURI.
+ */
+ private java.lang.String _nsURI;
+
+ /**
+ * Field _xmlName.
+ */
+ private java.lang.String _xmlName;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public CalcIdParamDescriptor()
+ {
+ super();
+ setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.WebServiceParameterSetDescriptor());
+ _nsURI = "www.jalview.org";
+ _xmlName = "calcIdParam";
+ _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
+
+ // -- _calcId
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_calcId", "calcId",
+ 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
+ {
+ CalcIdParam target = (CalcIdParam) object;
+ return target.getCalcId();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ CalcIdParam target = (CalcIdParam) object;
+ target.setCalcId((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- _needsUpdate
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_needsUpdate", "needsUpdate", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- CalcIdParam target = (CalcIdParam) object;
- if (!target.hasNeedsUpdate()) { return null; }
- return (target.getNeedsUpdate() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- CalcIdParam target = (CalcIdParam) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteNeedsUpdate();
- return;
- }
- target.setNeedsUpdate( ((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: _needsUpdate
- 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);
+ }
+
+ 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: _calcId
+ 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);
+ // -- _needsUpdate
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_needsUpdate", "needsUpdate",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ CalcIdParam target = (CalcIdParam) object;
+ if (!target.hasNeedsUpdate())
+ {
+ return null;
}
- desc.setValidator(fieldValidator);
- //-- _autoUpdate
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_autoUpdate", "autoUpdate", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- CalcIdParam target = (CalcIdParam) object;
- if (!target.hasAutoUpdate()) { return null; }
- return (target.getAutoUpdate() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- CalcIdParam target = (CalcIdParam) object;
- // ignore null values for non optional primitives
- if (value == null) { return; }
-
- target.setAutoUpdate( ((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: _autoUpdate
- 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);
+ return (target.getNeedsUpdate() ? java.lang.Boolean.TRUE
+ : java.lang.Boolean.FALSE);
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ CalcIdParam target = (CalcIdParam) object;
+ // if null, use delete method for optional primitives
+ if (value == null)
+ {
+ target.deleteNeedsUpdate();
+ return;
+ }
+ target.setNeedsUpdate(((java.lang.Boolean) value).booleanValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _needsUpdate
+ 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);
+ // -- _autoUpdate
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_autoUpdate", "autoUpdate",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ CalcIdParam target = (CalcIdParam) object;
+ if (!target.hasAutoUpdate())
+ {
+ return null;
+ }
+ return (target.getAutoUpdate() ? java.lang.Boolean.TRUE
+ : java.lang.Boolean.FALSE);
+ }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ CalcIdParam target = (CalcIdParam) object;
+ // ignore null values for non optional primitives
+ if (value == null)
+ {
+ return;
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ target.setAutoUpdate(((java.lang.Boolean) value).booleanValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _autoUpdate
+ 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
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.CalcIdParam.class;
- }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.CalcIdParam.class;
+ }
- /**
- * 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;
- }
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Colour;
*
* @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;
-
-
- //----------------/
- //- 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");
+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;
+
+ // ----------------/
+ // - 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());
}
- desc.setValidator(fieldValidator);
- //-- _minRGB
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_minRGB", "minRGB", 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.getMinRGB();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Colour target = (Colour) object;
- target.setMinRGB( (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: _minRGB
- 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");
+ }
+
+ 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());
}
- desc.setValidator(fieldValidator);
- //-- _threshType
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_threshType", "threshType", 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.getThreshType();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Colour target = (Colour) object;
- target.setThreshType( (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: _threshType
- 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");
+ }
+
+ 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);
+ // -- _minRGB
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_minRGB", "minRGB",
+ 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.getMinRGB();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Colour target = (Colour) object;
+ target.setMinRGB((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- 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
- {
- Colour target = (Colour) 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 {
- Colour target = (Colour) 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);
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _minRGB
+ 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);
+ // -- _threshType
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_threshType", "threshType",
+ 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.getThreshType();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Colour target = (Colour) object;
+ target.setThreshType((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- _max
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_max", "max", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Colour target = (Colour) object;
- if (!target.hasMax()) { return null; }
- return new java.lang.Float(target.getMax());
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Colour target = (Colour) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteMax();
- return;
- }
- target.setMax( ((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: _max
- 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);
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _threshType
+ 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
+ {
+ Colour target = (Colour) object;
+ if (!target.hasThreshold())
+ {
+ return null;
}
- desc.setValidator(fieldValidator);
- //-- _min
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_min", "min", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Colour target = (Colour) object;
- if (!target.hasMin()) { return null; }
- return new java.lang.Float(target.getMin());
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Colour target = (Colour) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteMin();
- return;
- }
- target.setMin( ((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: _min
- 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);
+ return new java.lang.Float(target.getThreshold());
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Colour target = (Colour) 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());
}
- desc.setValidator(fieldValidator);
- //-- _colourByLabel
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourByLabel", "colourByLabel", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Colour target = (Colour) object;
- if (!target.hasColourByLabel()) { return null; }
- return (target.getColourByLabel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Colour target = (Colour) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteColourByLabel();
- return;
- }
- target.setColourByLabel( ((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: _colourByLabel
- 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);
+ }
+
+ 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);
+ // -- _max
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Float.TYPE, "_max", "max",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ Colour target = (Colour) object;
+ if (!target.hasMax())
+ {
+ return null;
}
- desc.setValidator(fieldValidator);
- //-- _autoScale
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_autoScale", "autoScale", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Colour target = (Colour) object;
- if (!target.hasAutoScale()) { return null; }
- return (target.getAutoScale() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Colour target = (Colour) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteAutoScale();
- return;
- }
- target.setAutoScale( ((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: _autoScale
- 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);
+ return new java.lang.Float(target.getMax());
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Colour target = (Colour) object;
+ // if null, use delete method for optional primitives
+ if (value == null)
+ {
+ target.deleteMax();
+ return;
+ }
+ target.setMax(((java.lang.Float) value).floatValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- }
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+ // -- validation code for: _max
+ 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);
+ // -- _min
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Float.TYPE, "_min", "min",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ Colour target = (Colour) object;
+ if (!target.hasMin())
+ {
+ return null;
+ }
+ return new java.lang.Float(target.getMin());
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Colour target = (Colour) object;
+ // if null, use delete method for optional primitives
+ if (value == null)
+ {
+ target.deleteMin();
+ return;
+ }
+ target.setMin(((java.lang.Float) value).floatValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _min
+ 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);
+ // -- _colourByLabel
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_colourByLabel", "colourByLabel",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ Colour target = (Colour) object;
+ if (!target.hasColourByLabel())
+ {
+ return null;
+ }
+ return (target.getColourByLabel() ? java.lang.Boolean.TRUE
+ : java.lang.Boolean.FALSE);
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.Colour.class;
- }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Colour target = (Colour) object;
+ // if null, use delete method for optional primitives
+ if (value == null)
+ {
+ target.deleteColourByLabel();
+ return;
+ }
+ target.setColourByLabel(((java.lang.Boolean) value)
+ .booleanValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- validation code for: _colourByLabel
+ 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);
+ // -- _autoScale
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_autoScale", "autoScale",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ Colour target = (Colour) object;
+ if (!target.hasAutoScale())
+ {
+ return null;
+ }
+ return (target.getAutoScale() ? java.lang.Boolean.TRUE
+ : java.lang.Boolean.FALSE);
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Colour target = (Colour) object;
+ // if null, use delete method for optional primitives
+ if (value == null)
+ {
+ target.deleteAutoScale();
+ return;
+ }
+ target.setAutoScale(((java.lang.Boolean) value).booleanValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * 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;
+ // -- validation code for: _autoScale
+ 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
+
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.DBRef;
*
* @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;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public DBRefDescriptor() {
- super();
- _nsURI = "www.vamsas.ac.uk/jalview/version2";
- _xmlName = "DBRef";
- _elementDefinition = true;
-
- //-- set grouping compositor
- setCompositorAsSequence();
- org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
- org.exolab.castor.mapping.FieldHandler handler = null;
- org.exolab.castor.xml.FieldValidator fieldValidator = null;
- //-- 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
-
- //-- _mapping
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Mapping.class, "_mapping", "Mapping", org.exolab.castor.xml.NodeType.Element);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- DBRef target = (DBRef) object;
- return target.getMapping();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- DBRef target = (DBRef) object;
- target.setMapping( (jalview.schemabinding.version2.Mapping) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return new jalview.schemabinding.version2.Mapping();
- }
- };
- desc.setHandler(handler);
- desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _mapping
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- { //-- local scope
- }
- desc.setValidator(fieldValidator);
- }
+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;
- //-----------/
- //- Methods -/
- //-----------/
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public DBRefDescriptor()
+ {
+ super();
+ _nsURI = "www.vamsas.ac.uk/jalview/version2";
+ _xmlName = "DBRef";
+ _elementDefinition = true;
+
+ // -- set grouping compositor
+ setCompositorAsSequence();
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+ org.exolab.castor.mapping.FieldHandler handler = null;
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;
+ // -- 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);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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();
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.DBRef.class;
- }
+ 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());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- 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();
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ 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);
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ // -- 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
+
+ // -- _mapping
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ jalview.schemabinding.version2.Mapping.class, "_mapping",
+ "Mapping", org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ DBRef target = (DBRef) object;
+ return target.getMapping();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ DBRef target = (DBRef) object;
+ target.setMapping((jalview.schemabinding.version2.Mapping) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return new jalview.schemabinding.version2.Mapping();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * 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;
+ // -- validation code for: _mapping
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Feature;
*
* @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;
-
-
- //----------------/
- //- 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);
+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;
+
+ // ----------------/
+ // - 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;
}
- 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
+ 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());
}
- desc.setValidator(fieldValidator);
+ }
+
+ 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;
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ target.setEnd(((java.lang.Integer) value).intValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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());
+ }
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.Feature.class;
+ 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());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
+ 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());
+ }
+ }
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ 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());
+ }
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
+ 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);
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ // -- 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
- /**
- * 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;
+ // -- _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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.FeatureSettings;
*
* @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;
-
-
- //----------------/
- //- 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
+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;
+
+ // ----------------/
+ // - 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());
}
- 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
+ }
+
+ 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());
}
- desc.setValidator(fieldValidator);
+ }
+
+ 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());
+ }
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ 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());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
- return null;
- }
+ 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);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _groupList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.FeatureSettings.class;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.FeatureSettings.class;
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ /**
+ * Method getNameSpacePrefix.
+ *
+ * @return the namespace prefix to use when marshaling as XML.
+ */
+ public java.lang.String getNameSpacePrefix()
+ {
+ return _nsPrefix;
+ }
- /**
- * 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;
- }
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Features;
*
* @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;
-
-
- //----------------/
- //- 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(
- ) {
- return super.getIdentity();
- }
-
- /**
- * 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;
- }
+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;
+
+ // ----------------/
+ // - 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()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Group;
*
* @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;
-
-
- //----------------/
- //- 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);
+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;
+
+ // ----------------/
+ // - 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());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
+ }
+
+ 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;
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ target.setDisplay(((java.lang.Boolean) value).booleanValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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
- /**
- * 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;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.Group.class;
+ }
- /**
- * 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;
- }
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.HiddenColumns;
*
* @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;
-
-
- //----------------/
- //- 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);
+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;
+
+ // ----------------/
+ // - 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;
}
- 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);
+ return new java.lang.Integer(target.getStart());
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ HiddenColumns target = (HiddenColumns) object;
+ // if null, use delete method for optional primitives
+ if (value == null)
+ {
+ target.deleteStart();
+ return;
+ }
+ target.setStart(((java.lang.Integer) value).intValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- }
+ }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- //-----------/
- //- Methods -/
- //-----------/
+ // -- 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());
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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
- /**
- * 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;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.HiddenColumns.class;
+ }
- /**
- * 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;
- }
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.JGroup;
*
* @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;
-
-
- //----------------/
- //- 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);
- //-- _showUnconserved
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showUnconserved", "showUnconserved", 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.hasShowUnconserved()) { return null; }
- return (target.getShowUnconserved() ? 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.deleteShowUnconserved();
- return;
- }
- target.setShowUnconserved( ((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: _showUnconserved
- 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);
- //-- _ignoreGapsinConsensus
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_ignoreGapsinConsensus", "ignoreGapsinConsensus", 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.hasIgnoreGapsinConsensus()) { return null; }
- return (target.getIgnoreGapsinConsensus() ? 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.deleteIgnoreGapsinConsensus();
- return;
- }
- target.setIgnoreGapsinConsensus( ((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: _ignoreGapsinConsensus
- 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);
- //-- _showConsensusHistogram
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showConsensusHistogram", "showConsensusHistogram", 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.hasShowConsensusHistogram()) { return null; }
- return (target.getShowConsensusHistogram() ? 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.deleteShowConsensusHistogram();
- return;
- }
- target.setShowConsensusHistogram( ((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: _showConsensusHistogram
- 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);
- //-- _showSequenceLogo
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showSequenceLogo", "showSequenceLogo", 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.hasShowSequenceLogo()) { return null; }
- return (target.getShowSequenceLogo() ? 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.deleteShowSequenceLogo();
- return;
- }
- target.setShowSequenceLogo( ((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: _showSequenceLogo
- 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);
- //-- _normaliseSequenceLogo
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_normaliseSequenceLogo", "normaliseSequenceLogo", 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.hasNormaliseSequenceLogo()) { return null; }
- return (target.getNormaliseSequenceLogo() ? 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.deleteNormaliseSequenceLogo();
- return;
- }
- target.setNormaliseSequenceLogo( ((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: _normaliseSequenceLogo
- 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);
- //-- _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
- {
- JGroup target = (JGroup) object;
- return target.getId();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- JGroup target = (JGroup) 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
-
- //-- _seqList
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_seqList", "seq", 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
- {
- 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;
- target.addSeq( (java.lang.String) value);
- } 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.StringValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.StringValidator();
- fieldValidator.setValidator(typeValidator);
- typeValidator.setWhiteSpace("preserve");
- }
- desc.setValidator(fieldValidator);
+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;
+
+ // ----------------/
+ // - 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);
- //-----------/
- //- Methods -/
- //-----------/
+ // -- 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());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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());
+ }
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ 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());
+ }
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.JGroup.class;
+ 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);
+ // -- _showUnconserved
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_showUnconserved", "showUnconserved",
+ 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.hasShowUnconserved())
+ {
+ return null;
+ }
+ return (target.getShowUnconserved() ? 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.deleteShowUnconserved();
+ return;
+ }
+ target.setShowUnconserved(((java.lang.Boolean) value)
+ .booleanValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _showUnconserved
+ 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);
+ // -- _ignoreGapsinConsensus
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_ignoreGapsinConsensus",
+ "ignoreGapsinConsensus",
+ 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.hasIgnoreGapsinConsensus())
+ {
+ return null;
+ }
+ return (target.getIgnoreGapsinConsensus() ? java.lang.Boolean.TRUE
+ : java.lang.Boolean.FALSE);
+ }
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ 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.deleteIgnoreGapsinConsensus();
+ return;
+ }
+ target.setIgnoreGapsinConsensus(((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: _ignoreGapsinConsensus
+ 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);
+ // -- _showConsensusHistogram
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_showConsensusHistogram",
+ "showConsensusHistogram",
+ 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.hasShowConsensusHistogram())
+ {
+ return null;
+ }
+ return (target.getShowConsensusHistogram() ? 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.deleteShowConsensusHistogram();
+ return;
+ }
+ target.setShowConsensusHistogram(((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);
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
+ // -- validation code for: _showConsensusHistogram
+ 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);
+ // -- _showSequenceLogo
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_showSequenceLogo",
+ "showSequenceLogo", 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.hasShowSequenceLogo())
+ {
+ return null;
+ }
+ return (target.getShowSequenceLogo() ? 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.deleteShowSequenceLogo();
+ return;
+ }
+ target.setShowSequenceLogo(((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: _showSequenceLogo
+ 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);
+ // -- _normaliseSequenceLogo
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_normaliseSequenceLogo",
+ "normaliseSequenceLogo",
+ 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.hasNormaliseSequenceLogo())
+ {
+ return null;
+ }
+ return (target.getNormaliseSequenceLogo() ? 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.deleteNormaliseSequenceLogo();
+ return;
+ }
+ target.setNormaliseSequenceLogo(((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: _normaliseSequenceLogo
+ 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);
+ // -- _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
+ {
+ JGroup target = (JGroup) object;
+ return target.getId();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ JGroup target = (JGroup) 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);
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ // -- 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
+
+ // -- _seqList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_seqList", "seq",
+ 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
+ {
+ JGroup target = (JGroup) object;
+ return target.getSeq();
+ }
- /**
- * 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;
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ JGroup target = (JGroup) object;
+ target.addSeq((java.lang.String) value);
+ } 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.StringValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+ fieldValidator.setValidator(typeValidator);
+ typeValidator.setWhiteSpace("preserve");
}
+ desc.setValidator(fieldValidator);
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.JSeq;
*
* @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;
-
-
- //----------------/
- //- 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.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
- {
- JSeq target = (JSeq) object;
- return target.getId();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- JSeq target = (JSeq) 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);
- //-- _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);
+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;
+
+ // ----------------/
+ // - 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;
}
- 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
+ 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());
}
- 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
+ }
+
+ 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;
}
- 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);
+ 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());
}
- desc.setValidator(fieldValidator);
+ }
+
+ 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;
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ target.setEnd(((java.lang.Integer) value).intValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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.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
+ {
+ JSeq target = (JSeq) object;
+ return target.getId();
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.JSeq.class;
- }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ JSeq target = (JSeq) 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);
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
+ // -- 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);
+ // -- _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);
+ }
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ 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);
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
+ // -- 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());
+ }
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ 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;
+ }
- /**
- * 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;
+ 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.JalviewModel;
*
* @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;
-
-
- //----------------/
- //- 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
+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;
+
+ // ----------------/
+ // - 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());
}
- desc.setValidator(fieldValidator);
- }
+ }
+ 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);
- //-----------/
- //- Methods -/
- //-----------/
+ // -- 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();
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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();
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.JalviewModel.class;
- }
+ 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());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ 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);
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- 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();
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ 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());
+ }
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ 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);
- /**
- * 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;
+ // -- 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.JalviewModelSequence;
*
* @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;
-
-
- //----------------/
- //- 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
+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;
+
+ // ----------------/
+ // - 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());
}
- 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
+ }
+
+ 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());
}
- 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
+ }
+
+ 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());
}
- 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
+ }
+
+ 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());
}
- 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
+ }
+
+ 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());
}
- desc.setValidator(fieldValidator);
- //-- _featureSettings
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.FeatureSettings.class, "_featureSettings", "FeatureSettings", org.exolab.castor.xml.NodeType.Element);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- JalviewModelSequence target = (JalviewModelSequence) object;
- return target.getFeatureSettings();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- JalviewModelSequence target = (JalviewModelSequence) object;
- target.setFeatureSettings( (jalview.schemabinding.version2.FeatureSettings) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return new jalview.schemabinding.version2.FeatureSettings();
- }
- };
- desc.setHandler(handler);
- desc.setNameSpaceURI("www.jalview.org");
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _featureSettings
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- { //-- local scope
+ }
+
+ public void resetValue(Object object) throws IllegalStateException,
+ IllegalArgumentException
+ {
+ try
+ {
+ JalviewModelSequence target = (JalviewModelSequence) object;
+ target.removeAllViewport();
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
+ }
+
+ 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());
+ }
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ 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());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
- return null;
- }
+ 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);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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();
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.JalviewModelSequence.class;
- }
+ 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());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ 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());
+ }
+ }
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ 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);
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
+ // -- 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();
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ 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);
- /**
- * 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;
+ // -- 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Colour;
*
* @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;
-
-
- //----------------/
- //- 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
-
- //-- _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
- {
- JalviewUserColours target = (JalviewUserColours) object;
- return target.getVersion();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- JalviewUserColours target = (JalviewUserColours) 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);
- //-- _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.setMultivalued(true);
- addFieldDescriptor(desc);
-
- //-- validation code for: _colourList
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(0);
- { //-- local scope
+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;
+
+ // ----------------/
+ // - 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());
}
- desc.setValidator(fieldValidator);
+ }
+
+ 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
+ // -- _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
+ {
+ JalviewUserColours target = (JalviewUserColours) object;
+ return target.getVersion();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ JalviewUserColours target = (JalviewUserColours) object;
+ target.setVersion((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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);
+ // -- _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();
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.JalviewUserColours.class;
- }
+ 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());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ 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());
+ }
+ }
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return new Colour();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(true);
+ addFieldDescriptor(desc);
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
+ // -- validation code for: _colourList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * 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;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.MapListFrom;
*
* @version $Revision$ $Date$
*/
-public class MapListFromDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _elementDefinition.
- */
- private boolean _elementDefinition;
-
- /**
- * Field _nsPrefix.
- */
- private java.lang.String _nsPrefix;
-
- /**
- * Field _nsURI.
- */
- private java.lang.String _nsURI;
-
- /**
- * Field _xmlName.
- */
- private java.lang.String _xmlName;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public MapListFromDescriptor() {
- super();
- _nsURI = "www.vamsas.ac.uk/jalview/version2";
- _xmlName = "mapListFrom";
- _elementDefinition = true;
- org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
- org.exolab.castor.mapping.FieldHandler handler = null;
- org.exolab.castor.xml.FieldValidator fieldValidator = null;
- //-- initialize attribute descriptors
-
- //-- _start
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- MapListFrom target = (MapListFrom) object;
- if (!target.hasStart()) { return null; }
- return new java.lang.Integer(target.getStart());
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- MapListFrom target = (MapListFrom) object;
- // ignore null values for non optional primitives
- if (value == null) { return; }
-
- target.setStart( ((java.lang.Integer) value).intValue());
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setRequired(true);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _start
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
- fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
+public class MapListFromDescriptor extends
+ org.exolab.castor.xml.util.XMLClassDescriptorImpl
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _elementDefinition.
+ */
+ private boolean _elementDefinition;
+
+ /**
+ * Field _nsPrefix.
+ */
+ private java.lang.String _nsPrefix;
+
+ /**
+ * Field _nsURI.
+ */
+ private java.lang.String _nsURI;
+
+ /**
+ * Field _xmlName.
+ */
+ private java.lang.String _xmlName;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public MapListFromDescriptor()
+ {
+ super();
+ _nsURI = "www.vamsas.ac.uk/jalview/version2";
+ _xmlName = "mapListFrom";
+ _elementDefinition = true;
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+ org.exolab.castor.mapping.FieldHandler handler = null;
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;
+ // -- initialize attribute descriptors
+
+ // -- _start
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Integer.TYPE, "_start", "start",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ MapListFrom target = (MapListFrom) object;
+ if (!target.hasStart())
+ {
+ return null;
}
- desc.setValidator(fieldValidator);
- //-- _end
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- MapListFrom target = (MapListFrom) object;
- if (!target.hasEnd()) { return null; }
- return new java.lang.Integer(target.getEnd());
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- MapListFrom target = (MapListFrom) object;
- // ignore null values for non optional primitives
- if (value == null) { return; }
-
- target.setEnd( ((java.lang.Integer) value).intValue());
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setRequired(true);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _end
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
- fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
+ return new java.lang.Integer(target.getStart());
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ MapListFrom target = (MapListFrom) object;
+ // ignore null values for non optional primitives
+ if (value == null)
+ {
+ return;
+ }
+
+ target.setStart(((java.lang.Integer) value).intValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _start
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { // -- local scope
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
+ desc.setValidator(fieldValidator);
+ // -- _end
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Integer.TYPE, "_end", "end",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ MapListFrom target = (MapListFrom) object;
+ if (!target.hasEnd())
+ {
+ return null;
+ }
+ return new java.lang.Integer(target.getEnd());
+ }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ MapListFrom target = (MapListFrom) object;
+ // ignore null values for non optional primitives
+ if (value == null)
+ {
+ return;
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ target.setEnd(((java.lang.Integer) value).intValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _end
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { // -- local scope
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
+ desc.setValidator(fieldValidator);
+ // -- initialize element descriptors
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.MapListFrom.class;
- }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.MapListFrom.class;
+ }
- /**
- * 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;
- }
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.MapListTo;
*
* @version $Revision$ $Date$
*/
-public class MapListToDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _elementDefinition.
- */
- private boolean _elementDefinition;
-
- /**
- * Field _nsPrefix.
- */
- private java.lang.String _nsPrefix;
-
- /**
- * Field _nsURI.
- */
- private java.lang.String _nsURI;
-
- /**
- * Field _xmlName.
- */
- private java.lang.String _xmlName;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public MapListToDescriptor() {
- super();
- _nsURI = "www.vamsas.ac.uk/jalview/version2";
- _xmlName = "mapListTo";
- _elementDefinition = true;
- org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
- org.exolab.castor.mapping.FieldHandler handler = null;
- org.exolab.castor.xml.FieldValidator fieldValidator = null;
- //-- initialize attribute descriptors
-
- //-- _start
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- MapListTo target = (MapListTo) object;
- if (!target.hasStart()) { return null; }
- return new java.lang.Integer(target.getStart());
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- MapListTo target = (MapListTo) object;
- // ignore null values for non optional primitives
- if (value == null) { return; }
-
- target.setStart( ((java.lang.Integer) value).intValue());
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setRequired(true);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _start
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
- fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
+public class MapListToDescriptor extends
+ org.exolab.castor.xml.util.XMLClassDescriptorImpl
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _elementDefinition.
+ */
+ private boolean _elementDefinition;
+
+ /**
+ * Field _nsPrefix.
+ */
+ private java.lang.String _nsPrefix;
+
+ /**
+ * Field _nsURI.
+ */
+ private java.lang.String _nsURI;
+
+ /**
+ * Field _xmlName.
+ */
+ private java.lang.String _xmlName;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public MapListToDescriptor()
+ {
+ super();
+ _nsURI = "www.vamsas.ac.uk/jalview/version2";
+ _xmlName = "mapListTo";
+ _elementDefinition = true;
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+ org.exolab.castor.mapping.FieldHandler handler = null;
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;
+ // -- initialize attribute descriptors
+
+ // -- _start
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Integer.TYPE, "_start", "start",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ MapListTo target = (MapListTo) object;
+ if (!target.hasStart())
+ {
+ return null;
}
- desc.setValidator(fieldValidator);
- //-- _end
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- MapListTo target = (MapListTo) object;
- if (!target.hasEnd()) { return null; }
- return new java.lang.Integer(target.getEnd());
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- MapListTo target = (MapListTo) object;
- // ignore null values for non optional primitives
- if (value == null) { return; }
-
- target.setEnd( ((java.lang.Integer) value).intValue());
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setRequired(true);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _end
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
- fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
+ return new java.lang.Integer(target.getStart());
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ MapListTo target = (MapListTo) object;
+ // ignore null values for non optional primitives
+ if (value == null)
+ {
+ return;
+ }
+
+ target.setStart(((java.lang.Integer) value).intValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _start
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { // -- local scope
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
+ desc.setValidator(fieldValidator);
+ // -- _end
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Integer.TYPE, "_end", "end",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ MapListTo target = (MapListTo) object;
+ if (!target.hasEnd())
+ {
+ return null;
+ }
+ return new java.lang.Integer(target.getEnd());
+ }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ MapListTo target = (MapListTo) object;
+ // ignore null values for non optional primitives
+ if (value == null)
+ {
+ return;
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ target.setEnd(((java.lang.Integer) value).intValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _end
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { // -- local scope
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
+ desc.setValidator(fieldValidator);
+ // -- initialize element descriptors
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.MapListTo.class;
- }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.MapListTo.class;
+ }
- /**
- * 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;
- }
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.MapListType;
*
* @version $Revision$ $Date$
*/
-public class MapListTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _elementDefinition.
- */
- private boolean _elementDefinition;
-
- /**
- * Field _nsPrefix.
- */
- private java.lang.String _nsPrefix;
-
- /**
- * Field _nsURI.
- */
- private java.lang.String _nsURI;
-
- /**
- * Field _xmlName.
- */
- private java.lang.String _xmlName;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public MapListTypeDescriptor() {
- super();
- _nsURI = "www.vamsas.ac.uk/jalview/version2";
- _xmlName = "mapListType";
- _elementDefinition = false;
-
- //-- set grouping compositor
- setCompositorAsSequence();
- org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
- org.exolab.castor.mapping.FieldHandler handler = null;
- org.exolab.castor.xml.FieldValidator fieldValidator = null;
- //-- initialize attribute descriptors
-
- //-- _mapFromUnit
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_mapFromUnit", "mapFromUnit", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- MapListType target = (MapListType) object;
- if (!target.hasMapFromUnit()) { return null; }
- return new java.lang.Long(target.getMapFromUnit());
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- MapListType target = (MapListType) object;
- // ignore null values for non optional primitives
- if (value == null) { return; }
-
- target.setMapFromUnit( ((java.lang.Long) value).longValue());
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setRequired(true);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _mapFromUnit
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- org.exolab.castor.xml.validators.LongValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.LongValidator();
- fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(1L);
- }
- desc.setValidator(fieldValidator);
- //-- _mapToUnit
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_mapToUnit", "mapToUnit", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- MapListType target = (MapListType) object;
- if (!target.hasMapToUnit()) { return null; }
- return new java.lang.Long(target.getMapToUnit());
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- MapListType target = (MapListType) object;
- // ignore null values for non optional primitives
- if (value == null) { return; }
-
- target.setMapToUnit( ((java.lang.Long) value).longValue());
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setRequired(true);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _mapToUnit
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- org.exolab.castor.xml.validators.LongValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.LongValidator();
- fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(1L);
- }
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- //-- _mapListFromList
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.MapListFrom.class, "_mapListFromList", "mapListFrom", org.exolab.castor.xml.NodeType.Element);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- MapListType target = (MapListType) object;
- return target.getMapListFrom();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- MapListType target = (MapListType) object;
- target.addMapListFrom( (jalview.schemabinding.version2.MapListFrom) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
- try {
- MapListType target = (MapListType) object;
- target.removeAllMapListFrom();
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return new jalview.schemabinding.version2.MapListFrom();
- }
- };
- desc.setHandler(handler);
- desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
- desc.setMultivalued(true);
- addFieldDescriptor(desc);
-
- //-- validation code for: _mapListFromList
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(0);
- { //-- local scope
+public class MapListTypeDescriptor extends
+ org.exolab.castor.xml.util.XMLClassDescriptorImpl
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _elementDefinition.
+ */
+ private boolean _elementDefinition;
+
+ /**
+ * Field _nsPrefix.
+ */
+ private java.lang.String _nsPrefix;
+
+ /**
+ * Field _nsURI.
+ */
+ private java.lang.String _nsURI;
+
+ /**
+ * Field _xmlName.
+ */
+ private java.lang.String _xmlName;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public MapListTypeDescriptor()
+ {
+ super();
+ _nsURI = "www.vamsas.ac.uk/jalview/version2";
+ _xmlName = "mapListType";
+ _elementDefinition = false;
+
+ // -- set grouping compositor
+ setCompositorAsSequence();
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+ org.exolab.castor.mapping.FieldHandler handler = null;
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;
+ // -- initialize attribute descriptors
+
+ // -- _mapFromUnit
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Long.TYPE, "_mapFromUnit", "mapFromUnit",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ MapListType target = (MapListType) object;
+ if (!target.hasMapFromUnit())
+ {
+ return null;
}
- desc.setValidator(fieldValidator);
- //-- _mapListToList
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.MapListTo.class, "_mapListToList", "mapListTo", org.exolab.castor.xml.NodeType.Element);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- MapListType target = (MapListType) object;
- return target.getMapListTo();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- MapListType target = (MapListType) object;
- target.addMapListTo( (jalview.schemabinding.version2.MapListTo) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
- try {
- MapListType target = (MapListType) object;
- target.removeAllMapListTo();
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return new jalview.schemabinding.version2.MapListTo();
- }
- };
- desc.setHandler(handler);
- desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
- desc.setMultivalued(true);
- addFieldDescriptor(desc);
-
- //-- validation code for: _mapListToList
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(0);
- { //-- local scope
+ return new java.lang.Long(target.getMapFromUnit());
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ MapListType target = (MapListType) object;
+ // ignore null values for non optional primitives
+ if (value == null)
+ {
+ return;
+ }
+
+ target.setMapFromUnit(((java.lang.Long) value).longValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _mapFromUnit
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { // -- local scope
+ org.exolab.castor.xml.validators.LongValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.LongValidator();
+ fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(1L);
}
+ desc.setValidator(fieldValidator);
+ // -- _mapToUnit
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Long.TYPE, "_mapToUnit", "mapToUnit",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ MapListType target = (MapListType) object;
+ if (!target.hasMapToUnit())
+ {
+ return null;
+ }
+ return new java.lang.Long(target.getMapToUnit());
+ }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ MapListType target = (MapListType) object;
+ // ignore null values for non optional primitives
+ if (value == null)
+ {
+ return;
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ target.setMapToUnit(((java.lang.Long) value).longValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _mapToUnit
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { // -- local scope
+ org.exolab.castor.xml.validators.LongValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.LongValidator();
+ fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(1L);
}
+ desc.setValidator(fieldValidator);
+ // -- initialize element descriptors
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.MapListType.class;
- }
+ // -- _mapListFromList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ jalview.schemabinding.version2.MapListFrom.class,
+ "_mapListFromList", "mapListFrom",
+ org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ MapListType target = (MapListType) object;
+ return target.getMapListFrom();
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ MapListType target = (MapListType) object;
+ target.addMapListFrom((jalview.schemabinding.version2.MapListFrom) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ public void resetValue(Object object) throws IllegalStateException,
+ IllegalArgumentException
+ {
+ try
+ {
+ MapListType target = (MapListType) object;
+ target.removeAllMapListFrom();
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return new jalview.schemabinding.version2.MapListFrom();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
+ desc.setMultivalued(true);
+ addFieldDescriptor(desc);
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ // -- validation code for: _mapListFromList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ // -- _mapListToList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ jalview.schemabinding.version2.MapListTo.class,
+ "_mapListToList", "mapListTo",
+ org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ MapListType target = (MapListType) object;
+ return target.getMapListTo();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ MapListType target = (MapListType) object;
+ target.addMapListTo((jalview.schemabinding.version2.MapListTo) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+
+ public void resetValue(Object object) throws IllegalStateException,
+ IllegalArgumentException
+ {
+ try
+ {
+ MapListType target = (MapListType) object;
+ target.removeAllMapListTo();
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * 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;
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return new jalview.schemabinding.version2.MapListTo();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
+ desc.setMultivalued(true);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _mapListToList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.MapListType.class;
+ }
+
+ /**
+ * Method getNameSpacePrefix.
+ *
+ * @return the namespace prefix to use when marshaling as XML.
+ */
+ public java.lang.String getNameSpacePrefix()
+ {
+ return _nsPrefix;
+ }
+
+ /**
+ * Method getNameSpaceURI.
+ *
+ * @return the namespace URI used when marshaling and unmarshaling as XML.
+ */
+ public java.lang.String getNameSpaceURI()
+ {
+ return _nsURI;
+ }
+
+ /**
+ * Method getValidator.
+ *
+ * @return a specific validator for the class described by this
+ * ClassDescriptor.
+ */
+ public org.exolab.castor.xml.TypeValidator getValidator()
+ {
+ return this;
+ }
+
+ /**
+ * Method getXMLName.
+ *
+ * @return the XML Name for the Class being described.
+ */
+ public java.lang.String getXMLName()
+ {
+ return _xmlName;
+ }
+
+ /**
+ * Method isElementDefinition.
+ *
+ * @return true if XML schema definition of this Class is that of a global
+ * element or element with anonymous type definition.
+ */
+ public boolean isElementDefinition()
+ {
+ return _elementDefinition;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.MappingChoice;
*
* @version $Revision$ $Date$
*/
-public class MappingChoiceDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _elementDefinition.
- */
- private boolean _elementDefinition;
-
- /**
- * Field _nsPrefix.
- */
- private java.lang.String _nsPrefix;
-
- /**
- * Field _nsURI.
- */
- private java.lang.String _nsURI;
-
- /**
- * Field _xmlName.
- */
- private java.lang.String _xmlName;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public MappingChoiceDescriptor() {
- super();
- _nsURI = "www.vamsas.ac.uk/jalview/version2";
- _elementDefinition = false;
-
- //-- set grouping compositor
- setCompositorAsChoice();
- org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
- org.exolab.castor.mapping.FieldHandler handler = null;
- org.exolab.castor.xml.FieldValidator fieldValidator = null;
- //-- initialize attribute descriptors
-
- //-- initialize element descriptors
-
- //-- _sequence
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.Sequence.class, "_sequence", "Sequence", org.exolab.castor.xml.NodeType.Element);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- MappingChoice target = (MappingChoice) object;
- return target.getSequence();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- MappingChoice target = (MappingChoice) object;
- target.setSequence( (jalview.schemabinding.version2.Sequence) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return new jalview.schemabinding.version2.Sequence();
- }
- };
- desc.setHandler(handler);
- desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _sequence
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- { //-- local scope
- }
- desc.setValidator(fieldValidator);
- //-- _dseqFor
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dseqFor", "dseqFor", org.exolab.castor.xml.NodeType.Element);
- desc.setImmutable(true);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- MappingChoice target = (MappingChoice) object;
- return target.getDseqFor();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- MappingChoice target = (MappingChoice) object;
- target.setDseqFor( (java.lang.String) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _dseqFor
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- { //-- local scope
- org.exolab.castor.xml.validators.StringValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.StringValidator();
- fieldValidator.setValidator(typeValidator);
- typeValidator.setWhiteSpace("preserve");
+public class MappingChoiceDescriptor extends
+ org.exolab.castor.xml.util.XMLClassDescriptorImpl
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _elementDefinition.
+ */
+ private boolean _elementDefinition;
+
+ /**
+ * Field _nsPrefix.
+ */
+ private java.lang.String _nsPrefix;
+
+ /**
+ * Field _nsURI.
+ */
+ private java.lang.String _nsURI;
+
+ /**
+ * Field _xmlName.
+ */
+ private java.lang.String _xmlName;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public MappingChoiceDescriptor()
+ {
+ super();
+ _nsURI = "www.vamsas.ac.uk/jalview/version2";
+ _elementDefinition = false;
+
+ // -- set grouping compositor
+ setCompositorAsChoice();
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+ org.exolab.castor.mapping.FieldHandler handler = null;
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;
+ // -- initialize attribute descriptors
+
+ // -- initialize element descriptors
+
+ // -- _sequence
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ jalview.schemabinding.version2.Sequence.class, "_sequence",
+ "Sequence", org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ MappingChoice target = (MappingChoice) object;
+ return target.getSequence();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ MappingChoice target = (MappingChoice) object;
+ target.setSequence((jalview.schemabinding.version2.Sequence) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return new jalview.schemabinding.version2.Sequence();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _sequence
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ // -- _dseqFor
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_dseqFor", "dseqFor",
+ org.exolab.castor.xml.NodeType.Element);
+ desc.setImmutable(true);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ MappingChoice target = (MappingChoice) object;
+ return target.getDseqFor();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ MappingChoice target = (MappingChoice) object;
+ target.setDseqFor((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _dseqFor
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ { // -- local scope
+ org.exolab.castor.xml.validators.StringValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+ fieldValidator.setValidator(typeValidator);
+ typeValidator.setWhiteSpace("preserve");
}
-
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
- }
-
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.MappingChoice.class;
- }
-
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
-
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
-
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
-
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
-
- /**
- * Method isElementDefinition.
- *
- * @return true if XML schema definition of this Class is that
- * of a global
- * element or element with anonymous type definition.
- */
- public boolean isElementDefinition(
- ) {
- return _elementDefinition;
- }
+ desc.setValidator(fieldValidator);
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.MappingChoice.class;
+ }
+
+ /**
+ * Method getNameSpacePrefix.
+ *
+ * @return the namespace prefix to use when marshaling as XML.
+ */
+ public java.lang.String getNameSpacePrefix()
+ {
+ return _nsPrefix;
+ }
+
+ /**
+ * Method getNameSpaceURI.
+ *
+ * @return the namespace URI used when marshaling and unmarshaling as XML.
+ */
+ public java.lang.String getNameSpaceURI()
+ {
+ return _nsURI;
+ }
+
+ /**
+ * Method getValidator.
+ *
+ * @return a specific validator for the class described by this
+ * ClassDescriptor.
+ */
+ public org.exolab.castor.xml.TypeValidator getValidator()
+ {
+ return this;
+ }
+
+ /**
+ * Method getXMLName.
+ *
+ * @return the XML Name for the Class being described.
+ */
+ public java.lang.String getXMLName()
+ {
+ return _xmlName;
+ }
+
+ /**
+ * Method isElementDefinition.
+ *
+ * @return true if XML schema definition of this Class is that of a global
+ * element or element with anonymous type definition.
+ */
+ public boolean isElementDefinition()
+ {
+ return _elementDefinition;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Mapping;
*
* @version $Revision$ $Date$
*/
-public class MappingDescriptor extends jalview.schemabinding.version2.descriptors.MapListTypeDescriptor {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _elementDefinition.
- */
- private boolean _elementDefinition;
-
- /**
- * Field _nsPrefix.
- */
- private java.lang.String _nsPrefix;
-
- /**
- * Field _nsURI.
- */
- private java.lang.String _nsURI;
-
- /**
- * Field _xmlName.
- */
- private java.lang.String _xmlName;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public MappingDescriptor() {
- super();
- setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.MapListTypeDescriptor());
- _nsURI = "www.vamsas.ac.uk/jalview/version2";
- _xmlName = "Mapping";
- _elementDefinition = true;
-
- //-- set grouping compositor
- setCompositorAsChoice();
- org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
- org.exolab.castor.mapping.FieldHandler handler = null;
- org.exolab.castor.xml.FieldValidator fieldValidator = null;
- //-- initialize attribute descriptors
-
- //-- initialize element descriptors
-
- //-- _mappingChoice
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.MappingChoice.class, "_mappingChoice", "-error-if-this-is-used-", org.exolab.castor.xml.NodeType.Element);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Mapping target = (Mapping) object;
- return target.getMappingChoice();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Mapping target = (Mapping) object;
- target.setMappingChoice( (jalview.schemabinding.version2.MappingChoice) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return new jalview.schemabinding.version2.MappingChoice();
- }
- };
- desc.setHandler(handler);
- desc.setContainer(true);
- desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor());
- desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _mappingChoice
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- { //-- local scope
+public class MappingDescriptor extends
+ jalview.schemabinding.version2.descriptors.MapListTypeDescriptor
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _elementDefinition.
+ */
+ private boolean _elementDefinition;
+
+ /**
+ * Field _nsPrefix.
+ */
+ private java.lang.String _nsPrefix;
+
+ /**
+ * Field _nsURI.
+ */
+ private java.lang.String _nsURI;
+
+ /**
+ * Field _xmlName.
+ */
+ private java.lang.String _xmlName;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public MappingDescriptor()
+ {
+ super();
+ setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.MapListTypeDescriptor());
+ _nsURI = "www.vamsas.ac.uk/jalview/version2";
+ _xmlName = "Mapping";
+ _elementDefinition = true;
+
+ // -- set grouping compositor
+ setCompositorAsChoice();
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+ org.exolab.castor.mapping.FieldHandler handler = null;
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;
+ // -- initialize attribute descriptors
+
+ // -- initialize element descriptors
+
+ // -- _mappingChoice
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ jalview.schemabinding.version2.MappingChoice.class,
+ "_mappingChoice", "-error-if-this-is-used-",
+ org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ Mapping target = (Mapping) object;
+ return target.getMappingChoice();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Mapping target = (Mapping) object;
+ target.setMappingChoice((jalview.schemabinding.version2.MappingChoice) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
- return null;
- }
-
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
- }
-
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.Mapping.class;
- }
-
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
-
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
-
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
-
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
-
- /**
- * Method isElementDefinition.
- *
- * @return true if XML schema definition of this Class is that
- * of a global
- * element or element with anonymous type definition.
- */
- public boolean isElementDefinition(
- ) {
- return _elementDefinition;
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return new jalview.schemabinding.version2.MappingChoice();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setContainer(true);
+ desc.setClassDescriptor(new jalview.schemabinding.version2.descriptors.MappingChoiceDescriptor());
+ desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _mappingChoice
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.Mapping.class;
+ }
+
+ /**
+ * Method getNameSpacePrefix.
+ *
+ * @return the namespace prefix to use when marshaling as XML.
+ */
+ public java.lang.String getNameSpacePrefix()
+ {
+ return _nsPrefix;
+ }
+
+ /**
+ * Method getNameSpaceURI.
+ *
+ * @return the namespace URI used when marshaling and unmarshaling as XML.
+ */
+ public java.lang.String getNameSpaceURI()
+ {
+ return _nsURI;
+ }
+
+ /**
+ * Method getValidator.
+ *
+ * @return a specific validator for the class described by this
+ * ClassDescriptor.
+ */
+ public org.exolab.castor.xml.TypeValidator getValidator()
+ {
+ return this;
+ }
+
+ /**
+ * Method getXMLName.
+ *
+ * @return the XML Name for the Class being described.
+ */
+ public java.lang.String getXMLName()
+ {
+ return _xmlName;
+ }
+
+ /**
+ * Method isElementDefinition.
+ *
+ * @return true if XML schema definition of this Class is that of a global
+ * element or element with anonymous type definition.
+ */
+ public boolean isElementDefinition()
+ {
+ return _elementDefinition;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.OtherData;
*
* @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;
-
-
- //----------------/
- //- 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");
+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;
+
+ // ----------------/
+ // - 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());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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());
+ }
+ }
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
- }
-
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.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;
+ 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Pdbentry;
*
* @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;
-
-
- //----------------/
- //- 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);
- }
+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;
- //-----------/
- //- Methods -/
- //-----------/
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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();
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.Pdbentry.class;
- }
+ 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());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- 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();
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ 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());
+ }
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ 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);
- /**
- * 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;
+ // -- 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.PdbentryItem;
*
* @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;
-
-
- //----------------/
- //- 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
+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;
+
+ // ----------------/
+ // - 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());
}
- desc.setValidator(fieldValidator);
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
- return null;
- }
-
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
- }
-
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.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;
+ }
+
+ 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Pdbids;
*
* @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;
-
-
- //----------------/
- //- 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
+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;
+
+ // ----------------/
+ // - 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());
}
- desc.setValidator(fieldValidator);
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
- return null;
- }
-
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
- }
-
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.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;
+ }
+
+ 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()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Property;
*
* @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;
-
-
- //----------------/
- //- 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");
+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;
+
+ // ----------------/
+ // - 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());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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());
+ }
+ }
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
- }
-
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.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;
+ 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Sequence;
*
* @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;
-
-
- //----------------/
- //- 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
-
- //-- _dsseqid
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dsseqid", "dsseqid", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Sequence target = (Sequence) object;
- return target.getDsseqid();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Sequence target = (Sequence) object;
- target.setDsseqid( (java.lang.String) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _dsseqid
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- { //-- local scope
- org.exolab.castor.xml.validators.StringValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.StringValidator();
- fieldValidator.setValidator(typeValidator);
- typeValidator.setWhiteSpace("preserve");
- }
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- //-- _DBRefList
- 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);
- }
+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;
- //-----------/
- //- Methods -/
- //-----------/
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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
+
+ // -- _dsseqid
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_dsseqid", "dsseqid",
+ org.exolab.castor.xml.NodeType.Attribute);
+ desc.setImmutable(true);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ Sequence target = (Sequence) object;
+ return target.getDsseqid();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Sequence target = (Sequence) object;
+ target.setDsseqid((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _dsseqid
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ { // -- local scope
+ org.exolab.castor.xml.validators.StringValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+ fieldValidator.setValidator(typeValidator);
+ typeValidator.setWhiteSpace("preserve");
}
+ desc.setValidator(fieldValidator);
+ // -- initialize element descriptors
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.Sequence.class;
- }
+ // -- _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();
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ 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());
+ }
+ }
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ 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());
+ }
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ 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);
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ // -- validation code for: _DBRefList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ }
- /**
- * 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;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.SequenceSet;
*
* @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;
-
-
- //----------------/
- //- 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");
+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;
+
+ // ----------------/
+ // - 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());
}
- desc.setValidator(fieldValidator);
- //-- _datasetId
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_datasetId", "datasetId", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- SequenceSet target = (SequenceSet) object;
- return target.getDatasetId();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- SequenceSet target = (SequenceSet) object;
- target.setDatasetId( (java.lang.String) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- desc.setMultivalued(false);
- addFieldDescriptor(desc);
-
- //-- validation code for: _datasetId
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- { //-- local scope
- org.exolab.castor.xml.validators.StringValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.StringValidator();
- fieldValidator.setValidator(typeValidator);
- typeValidator.setWhiteSpace("preserve");
+ }
+
+ 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);
+ // -- _datasetId
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_datasetId", "datasetId",
+ org.exolab.castor.xml.NodeType.Attribute);
+ desc.setImmutable(true);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ SequenceSet target = (SequenceSet) object;
+ return target.getDatasetId();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ SequenceSet target = (SequenceSet) object;
+ target.setDatasetId((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- 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
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _datasetId
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ { // -- local scope
+ org.exolab.castor.xml.validators.StringValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+ fieldValidator.setValidator(typeValidator);
+ typeValidator.setWhiteSpace("preserve");
+ }
+ desc.setValidator(fieldValidator);
+ // -- initialize element descriptors
+
+ // -- _sequenceList
+ 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());
}
- 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
+ }
+
+ 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());
}
- 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
+ }
+
+ 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());
}
- desc.setValidator(fieldValidator);
- //-- _alcodonFrameList
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.AlcodonFrame.class, "_alcodonFrameList", "AlcodonFrame", org.exolab.castor.xml.NodeType.Element);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- SequenceSet target = (SequenceSet) object;
- return target.getAlcodonFrame();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- SequenceSet target = (SequenceSet) object;
- target.addAlcodonFrame( (jalview.schemabinding.version2.AlcodonFrame) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
- try {
- SequenceSet target = (SequenceSet) object;
- target.removeAllAlcodonFrame();
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return new jalview.schemabinding.version2.AlcodonFrame();
- }
- };
- desc.setHandler(handler);
- desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
- desc.setMultivalued(true);
- addFieldDescriptor(desc);
-
- //-- validation code for: _alcodonFrameList
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(0);
- { //-- local scope
+ }
+
+ 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());
}
- desc.setValidator(fieldValidator);
+ }
+
+ 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());
+ }
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ 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());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
- return null;
- }
+ 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);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _sequenceSetPropertiesList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ // -- _alcodonFrameList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ jalview.schemabinding.version2.AlcodonFrame.class,
+ "_alcodonFrameList", "AlcodonFrame",
+ org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ SequenceSet target = (SequenceSet) object;
+ return target.getAlcodonFrame();
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.SequenceSet.class;
- }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ SequenceSet target = (SequenceSet) object;
+ target.addAlcodonFrame((jalview.schemabinding.version2.AlcodonFrame) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ public void resetValue(Object object) throws IllegalStateException,
+ IllegalArgumentException
+ {
+ try
+ {
+ SequenceSet target = (SequenceSet) object;
+ target.removeAllAlcodonFrame();
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return new jalview.schemabinding.version2.AlcodonFrame();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
+ desc.setMultivalued(true);
+ addFieldDescriptor(desc);
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
+ // -- validation code for: _alcodonFrameList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * 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;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.SequenceSetProperties;
*
* @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;
-
-
- //----------------/
- //- 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");
+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;
+
+ // ----------------/
+ // - 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());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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());
+ }
+ }
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
- }
-
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.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;
+ 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.SequenceType;
*
* @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;
-
-
- //----------------/
- //- 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");
+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;
+
+ // ----------------/
+ // - 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());
}
- 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");
+ }
+
+ 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());
}
- desc.setValidator(fieldValidator);
+ }
+
+ 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();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ 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());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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();
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.SequenceType.class;
- }
+ 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());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ 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);
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- 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);
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
- /**
- * 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;
- }
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Setting;
*
* @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;
-
-
- //----------------/
- //- 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");
+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;
+
+ // ----------------/
+ // - 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());
}
- 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);
+ }
+
+ 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;
}
- 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);
+ 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());
}
- 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);
+ }
+
+ 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;
}
- 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
- {
- Setting target = (Setting) 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 {
- Setting target = (Setting) 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);
+ 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());
}
- 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
- {
- Setting target = (Setting) 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 {
- Setting target = (Setting) 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);
+ }
+
+ 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;
}
- desc.setValidator(fieldValidator);
- //-- _threshstate
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_threshstate", "threshstate", 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.hasThreshstate()) { return null; }
- return new java.lang.Integer(target.getThreshstate());
- }
- 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.deleteThreshstate();
- return;
- }
- target.setThreshstate( ((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: _threshstate
- 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);
+ 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());
}
- desc.setValidator(fieldValidator);
- //-- _max
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_max", "max", 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.hasMax()) { return null; }
- return new java.lang.Float(target.getMax());
- }
- 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.deleteMax();
- return;
- }
- target.setMax( ((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: _max
- 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);
+ }
+
+ 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);
+ // -- _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
+ {
+ Setting target = (Setting) object;
+ if (!target.hasMincolour())
+ {
+ return null;
}
- desc.setValidator(fieldValidator);
- //-- _min
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_min", "min", 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.hasMin()) { return null; }
- return new java.lang.Float(target.getMin());
- }
- 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.deleteMin();
- return;
- }
- target.setMin( ((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: _min
- 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);
+ return new java.lang.Integer(target.getMincolour());
+ }
+
+ 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.deleteMincolour();
+ return;
+ }
+ target.setMincolour(((java.lang.Integer) value).intValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- _colourByLabel
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourByLabel", "colourByLabel", 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.hasColourByLabel()) { return null; }
- return (target.getColourByLabel() ? 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;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteColourByLabel();
- return;
- }
- target.setColourByLabel( ((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: _colourByLabel
- 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);
+ }
+
+ 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);
+ // -- _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
+ {
+ Setting target = (Setting) object;
+ if (!target.hasThreshold())
+ {
+ return null;
}
- desc.setValidator(fieldValidator);
- //-- _autoScale
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_autoScale", "autoScale", 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.hasAutoScale()) { return null; }
- return (target.getAutoScale() ? 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;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteAutoScale();
- return;
- }
- target.setAutoScale( ((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: _autoScale
- 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);
+ return new java.lang.Float(target.getThreshold());
+ }
+
+ 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.deleteThreshold();
+ return;
+ }
+ target.setThreshold(((java.lang.Float) value).floatValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- }
+ }
+
+ 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);
+ // -- _threshstate
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Integer.TYPE, "_threshstate", "threshstate",
+ 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.hasThreshstate())
+ {
+ return null;
+ }
+ return new java.lang.Integer(target.getThreshstate());
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ 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.deleteThreshstate();
+ return;
+ }
+ target.setThreshstate(((java.lang.Integer) value).intValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _threshstate
+ 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);
+ // -- _max
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Float.TYPE, "_max", "max",
+ 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.hasMax())
+ {
+ return null;
+ }
+ return new java.lang.Float(target.getMax());
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.Setting.class;
- }
+ 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.deleteMax();
+ return;
+ }
+ target.setMax(((java.lang.Float) value).floatValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- validation code for: _max
+ 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);
+ // -- _min
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Float.TYPE, "_min", "min",
+ 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.hasMin())
+ {
+ return null;
+ }
+ return new java.lang.Float(target.getMin());
+ }
+
+ 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.deleteMin();
+ return;
+ }
+ target.setMin(((java.lang.Float) value).floatValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _min
+ 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);
+ // -- _colourByLabel
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_colourByLabel", "colourByLabel",
+ 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.hasColourByLabel())
+ {
+ return null;
+ }
+ return (target.getColourByLabel() ? java.lang.Boolean.TRUE
+ : java.lang.Boolean.FALSE);
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ 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.deleteColourByLabel();
+ return;
+ }
+ target.setColourByLabel(((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: _colourByLabel
+ 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);
+ // -- _autoScale
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_autoScale", "autoScale",
+ 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.hasAutoScale())
+ {
+ return null;
+ }
+ return (target.getAutoScale() ? java.lang.Boolean.TRUE
+ : java.lang.Boolean.FALSE);
+ }
- /**
- * 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;
+ 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.deleteAutoScale();
+ return;
+ }
+ target.setAutoScale(((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: _autoScale
+ 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
+
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.StructureState;
*
* @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;
-
-
- //----------------/
- //- 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");
+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;
+
+ // ----------------/
+ // - 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());
}
- 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);
+ }
+
+ 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;
}
- desc.setValidator(fieldValidator);
- //-- _viewId
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewId", "viewId", 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
- {
- StructureState target = (StructureState) object;
- return target.getViewId();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- StructureState target = (StructureState) object;
- target.setViewId( (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: _viewId
- 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");
+ 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());
}
- desc.setValidator(fieldValidator);
- //-- _alignwithAlignPanel
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_alignwithAlignPanel", "alignwithAlignPanel", 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.hasAlignwithAlignPanel()) { return null; }
- return (target.getAlignwithAlignPanel() ? 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.deleteAlignwithAlignPanel();
- return;
- }
- target.setAlignwithAlignPanel( ((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: _alignwithAlignPanel
- 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);
+ }
+
+ 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);
+ // -- _viewId
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_viewId", "viewId",
+ 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
+ {
+ StructureState target = (StructureState) object;
+ return target.getViewId();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ StructureState target = (StructureState) object;
+ target.setViewId((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- _colourwithAlignPanel
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourwithAlignPanel", "colourwithAlignPanel", 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.hasColourwithAlignPanel()) { return null; }
- return (target.getColourwithAlignPanel() ? 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.deleteColourwithAlignPanel();
- return;
- }
- target.setColourwithAlignPanel( ((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: _colourwithAlignPanel
- 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);
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _viewId
+ 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);
+ // -- _alignwithAlignPanel
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_alignwithAlignPanel",
+ "alignwithAlignPanel", 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.hasAlignwithAlignPanel())
+ {
+ return null;
}
- desc.setValidator(fieldValidator);
- //-- _colourByJmol
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourByJmol", "colourByJmol", 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.hasColourByJmol()) { return null; }
- return (target.getColourByJmol() ? 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.deleteColourByJmol();
- return;
- }
- target.setColourByJmol( ((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: _colourByJmol
- 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);
+ return (target.getAlignwithAlignPanel() ? 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.deleteAlignwithAlignPanel();
+ return;
+ }
+ target.setAlignwithAlignPanel(((java.lang.Boolean) value)
+ .booleanValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- 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);
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _alignwithAlignPanel
+ 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);
+ // -- _colourwithAlignPanel
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_colourwithAlignPanel",
+ "colourwithAlignPanel",
+ 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.hasColourwithAlignPanel())
+ {
+ return null;
}
- 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);
+ return (target.getColourwithAlignPanel() ? 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.deleteColourwithAlignPanel();
+ return;
+ }
+ target.setColourwithAlignPanel(((java.lang.Boolean) value)
+ .booleanValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- 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);
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _colourwithAlignPanel
+ 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);
+ // -- _colourByJmol
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_colourByJmol", "colourByJmol",
+ 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.hasColourByJmol())
+ {
+ return null;
}
- 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);
+ return (target.getColourByJmol() ? 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.deleteColourByJmol();
+ return;
+ }
+ target.setColourByJmol(((java.lang.Boolean) value).booleanValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- }
+ }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- //-----------/
- //- Methods -/
- //-----------/
+ // -- validation code for: _colourByJmol
+ 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);
+ // -- _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());
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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());
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.StructureState.class;
- }
+ 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());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- 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
+ {
+ StructureState target = (StructureState) object;
+ if (!target.hasXpos())
+ {
+ return null;
+ }
+ return new java.lang.Integer(target.getXpos());
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ 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());
+ }
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ 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());
+ }
+ }
- /**
- * 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;
+ 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);
+ // -- initialize element descriptors
+
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.ThresholdLine;
*
* @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;
-
-
- //----------------/
- //- 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");
+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;
+
+ // ----------------/
+ // - 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());
}
- 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);
+ }
+
+ 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;
}
- 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);
+ 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());
}
- desc.setValidator(fieldValidator);
- //-- initialize element descriptors
-
- }
+ }
+ 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());
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ 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());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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
- /**
- * 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;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.ThresholdLine.class;
+ }
- /**
- * 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;
- }
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Tree;
*
* @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;
-
-
- //----------------/
- //- 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
-
- //-- _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);
+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;
+
+ // ----------------/
+ // - 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
+
+ // -- _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());
}
- 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);
+ }
+
+ 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;
}
- 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);
+ 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());
}
- 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);
+ }
+
+ 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;
}
- 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);
+ 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());
}
- 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);
+ }
+
+ 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;
}
- 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);
+ 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());
}
- 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);
+ }
+
+ 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;
}
- desc.setValidator(fieldValidator);
- //-- _id
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
- super.setIdentity(desc);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Tree target = (Tree) object;
- return target.getId();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Tree target = (Tree) 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 new java.lang.String();
- }
- };
- 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.IdValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IdValidator();
- fieldValidator.setValidator(typeValidator);
+ 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());
}
- 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
- {
- 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);
+ }
+
+ 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;
}
- 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);
+ 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());
}
- 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);
+ }
+
+ 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;
}
- 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);
+ 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());
}
- 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");
+ }
+
+ 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;
}
- 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");
+ 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());
}
- desc.setValidator(fieldValidator);
- }
+ }
+ 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);
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ 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());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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);
+ // -- _id
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_id", "id",
+ org.exolab.castor.xml.NodeType.Attribute);
+ super.setIdentity(desc);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ Tree target = (Tree) object;
+ return target.getId();
+ }
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Tree target = (Tree) 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 new java.lang.String();
+ }
+ };
+ 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.IdValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();
+ fieldValidator.setValidator(typeValidator);
}
+ desc.setValidator(fieldValidator);
+ // -- _width
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Integer.TYPE, "_width", "width",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ 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());
+ }
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.Tree.class;
+ 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);
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
+ // -- 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);
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- 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());
+ }
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
+ 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);
+ // -- 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();
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ 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());
+ }
+ }
- /**
- * 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;
+ 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.UserColourScheme;
*
* @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;
-
-
- //----------------/
- //- 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(
- ) {
- return super.getIdentity();
- }
-
- /**
- * 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;
- }
+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;
+
+ // ----------------/
+ // - 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()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.UserColours;
*
* @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;
-
-
- //----------------/
- //- 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
+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;
+
+ // ----------------/
+ // - 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());
}
- desc.setValidator(fieldValidator);
- }
-
-
- //-----------/
- //- Methods -/
- //-----------/
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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");
}
-
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
- }
-
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.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;
+ 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 super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.VAMSAS;
*
* @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;
-
-
- //----------------/
- //- 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");
+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;
+
+ // ----------------/
+ // - 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());
}
- 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
+ }
+
+ 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());
}
- desc.setValidator(fieldValidator);
+ }
+
+ 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());
+ }
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ 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());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
- return null;
- }
+ 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);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- validation code for: _sequenceSetList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.VAMSAS.class;
- }
+ // -----------/
+ // - Methods -/
+ // -----------/
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
- }
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.VAMSAS.class;
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
- }
+ /**
+ * Method getNameSpacePrefix.
+ *
+ * @return the namespace prefix to use when marshaling as XML.
+ */
+ public java.lang.String getNameSpacePrefix()
+ {
+ return _nsPrefix;
+ }
- /**
- * 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;
- }
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.VamsasModel;
*
* @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;
-
-
- //----------------/
- //- 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(
- ) {
- return super.getIdentity();
- }
-
- /**
- * 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;
- }
+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;
+
+ // ----------------/
+ // - 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()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * 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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.Viewport;
*
* @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;
-
-
- //----------------/
- //- 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);
- //-- _showUnconserved
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showUnconserved", "showUnconserved", 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.hasShowUnconserved()) { return null; }
- return (target.getShowUnconserved() ? 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.deleteShowUnconserved();
- return;
- }
- target.setShowUnconserved( ((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: _showUnconserved
- 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);
- //-- _showNPfeatureTooltip
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showNPfeatureTooltip", "showNPfeatureTooltip", 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.hasShowNPfeatureTooltip()) { return null; }
- return (target.getShowNPfeatureTooltip() ? 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.deleteShowNPfeatureTooltip();
- return;
- }
- target.setShowNPfeatureTooltip( ((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: _showNPfeatureTooltip
- 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);
- //-- _showDbRefTooltip
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showDbRefTooltip", "showDbRefTooltip", 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.hasShowDbRefTooltip()) { return null; }
- return (target.getShowDbRefTooltip() ? 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.deleteShowDbRefTooltip();
- return;
- }
- target.setShowDbRefTooltip( ((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: _showDbRefTooltip
- 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);
- //-- _followHighlight
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_followHighlight", "followHighlight", 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.hasFollowHighlight()) { return null; }
- return (target.getFollowHighlight() ? 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.deleteFollowHighlight();
- return;
- }
- target.setFollowHighlight( ((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: _followHighlight
- 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);
- //-- _followSelection
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_followSelection", "followSelection", 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.hasFollowSelection()) { return null; }
- return (target.getFollowSelection() ? 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.deleteFollowSelection();
- return;
- }
- target.setFollowSelection( ((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: _followSelection
- 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);
- //-- _centreColumnLabels
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_centreColumnLabels", "centreColumnLabels", 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.hasCentreColumnLabels()) { return null; }
- return (target.getCentreColumnLabels() ? 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.deleteCentreColumnLabels();
- return;
- }
- target.setCentreColumnLabels( ((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: _centreColumnLabels
- 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);
- //-- _showGroupConservation
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showGroupConservation", "showGroupConservation", 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.hasShowGroupConservation()) { return null; }
- return (target.getShowGroupConservation() ? 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.deleteShowGroupConservation();
- return;
- }
- target.setShowGroupConservation( ((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: _showGroupConservation
- 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);
- //-- _showGroupConsensus
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showGroupConsensus", "showGroupConsensus", 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.hasShowGroupConsensus()) { return null; }
- return (target.getShowGroupConsensus() ? 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.deleteShowGroupConsensus();
- return;
- }
- target.setShowGroupConsensus( ((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: _showGroupConsensus
- 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);
- //-- _showConsensusHistogram
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showConsensusHistogram", "showConsensusHistogram", 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.hasShowConsensusHistogram()) { return null; }
- return (target.getShowConsensusHistogram() ? 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.deleteShowConsensusHistogram();
- return;
- }
- target.setShowConsensusHistogram( ((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: _showConsensusHistogram
- 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);
- //-- _showSequenceLogo
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showSequenceLogo", "showSequenceLogo", 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.hasShowSequenceLogo()) { return null; }
- return (target.getShowSequenceLogo() ? 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.deleteShowSequenceLogo();
- return;
- }
- target.setShowSequenceLogo( ((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: _showSequenceLogo
- 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);
- //-- _normaliseSequenceLogo
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_normaliseSequenceLogo", "normaliseSequenceLogo", 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.hasNormaliseSequenceLogo()) { return null; }
- return (target.getNormaliseSequenceLogo() ? 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.deleteNormaliseSequenceLogo();
- return;
- }
- target.setNormaliseSequenceLogo( ((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: _normaliseSequenceLogo
- 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);
- //-- _ignoreGapsinConsensus
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_ignoreGapsinConsensus", "ignoreGapsinConsensus", 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.hasIgnoreGapsinConsensus()) { return null; }
- return (target.getIgnoreGapsinConsensus() ? 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.deleteIgnoreGapsinConsensus();
- return;
- }
- target.setIgnoreGapsinConsensus( ((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: _ignoreGapsinConsensus
- 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);
- //-- _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);
- //-- _id
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
- super.setIdentity(desc);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Viewport target = (Viewport) object;
- return target.getId();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Viewport target = (Viewport) 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 new java.lang.String();
- }
- };
- 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.IdValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IdValidator();
- fieldValidator.setValidator(typeValidator);
- }
- desc.setValidator(fieldValidator);
- //-- _width
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- Viewport target = (Viewport) object;
- if (!target.hasWidth()) { return null; }
- return new java.lang.Integer(target.getWidth());
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Viewport target = (Viewport) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteWidth();
- return;
- }
- target.setWidth( ((java.lang.Integer) value).intValue());
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
- }
- };
- desc.setHandler(handler);
- 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);
- //-- _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);
- //-- 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);
- //-- _calcIdParamList
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.CalcIdParam.class, "_calcIdParamList", "calcIdParam", 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.getCalcIdParam();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- Viewport target = (Viewport) object;
- target.addCalcIdParam( (jalview.schemabinding.version2.CalcIdParam) 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.removeAllCalcIdParam();
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return new jalview.schemabinding.version2.CalcIdParam();
- }
- };
- desc.setHandler(handler);
- desc.setNameSpaceURI("www.jalview.org");
- desc.setMultivalued(true);
- addFieldDescriptor(desc);
-
- //-- validation code for: _calcIdParamList
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(0);
- { //-- local scope
- }
- desc.setValidator(fieldValidator);
+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;
+
+ // ----------------/
+ // - 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();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ 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());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ 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());
+ }
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ 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());
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.Viewport.class;
+ 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);
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
+ // -- 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);
+ }
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ 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);
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
+ // -- 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);
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ // -- 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);
+ // -- _showUnconserved
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_showUnconserved", "showUnconserved",
+ 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.hasShowUnconserved())
+ {
+ return null;
+ }
+ return (target.getShowUnconserved() ? 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.deleteShowUnconserved();
+ return;
+ }
+ target.setShowUnconserved(((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: _showUnconserved
+ 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);
- /**
- * 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;
+ // -- 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);
+ // -- _showNPfeatureTooltip
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_showNPfeatureTooltip",
+ "showNPfeatureTooltip",
+ 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.hasShowNPfeatureTooltip())
+ {
+ return null;
+ }
+ return (target.getShowNPfeatureTooltip() ? 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.deleteShowNPfeatureTooltip();
+ return;
+ }
+ target.setShowNPfeatureTooltip(((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: _showNPfeatureTooltip
+ 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);
+ // -- _showDbRefTooltip
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_showDbRefTooltip",
+ "showDbRefTooltip", 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.hasShowDbRefTooltip())
+ {
+ return null;
+ }
+ return (target.getShowDbRefTooltip() ? 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.deleteShowDbRefTooltip();
+ return;
+ }
+ target.setShowDbRefTooltip(((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: _showDbRefTooltip
+ 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);
+ // -- _followHighlight
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_followHighlight", "followHighlight",
+ 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.hasFollowHighlight())
+ {
+ return null;
+ }
+ return (target.getFollowHighlight() ? 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.deleteFollowHighlight();
+ return;
+ }
+ target.setFollowHighlight(((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: _followHighlight
+ 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);
+ // -- _followSelection
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_followSelection", "followSelection",
+ 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.hasFollowSelection())
+ {
+ return null;
+ }
+ return (target.getFollowSelection() ? 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.deleteFollowSelection();
+ return;
+ }
+ target.setFollowSelection(((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: _followSelection
+ 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);
+ // -- _centreColumnLabels
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_centreColumnLabels",
+ "centreColumnLabels", 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.hasCentreColumnLabels())
+ {
+ return null;
+ }
+ return (target.getCentreColumnLabels() ? 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.deleteCentreColumnLabels();
+ return;
+ }
+ target.setCentreColumnLabels(((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: _centreColumnLabels
+ 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);
+ // -- _showGroupConservation
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_showGroupConservation",
+ "showGroupConservation",
+ 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.hasShowGroupConservation())
+ {
+ return null;
+ }
+ return (target.getShowGroupConservation() ? 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.deleteShowGroupConservation();
+ return;
+ }
+ target.setShowGroupConservation(((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: _showGroupConservation
+ 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);
+ // -- _showGroupConsensus
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_showGroupConsensus",
+ "showGroupConsensus", 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.hasShowGroupConsensus())
+ {
+ return null;
+ }
+ return (target.getShowGroupConsensus() ? 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.deleteShowGroupConsensus();
+ return;
+ }
+ target.setShowGroupConsensus(((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: _showGroupConsensus
+ 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);
+ // -- _showConsensusHistogram
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_showConsensusHistogram",
+ "showConsensusHistogram",
+ 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.hasShowConsensusHistogram())
+ {
+ return null;
+ }
+ return (target.getShowConsensusHistogram() ? 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.deleteShowConsensusHistogram();
+ return;
+ }
+ target.setShowConsensusHistogram(((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: _showConsensusHistogram
+ 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);
+ // -- _showSequenceLogo
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_showSequenceLogo",
+ "showSequenceLogo", 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.hasShowSequenceLogo())
+ {
+ return null;
+ }
+ return (target.getShowSequenceLogo() ? 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.deleteShowSequenceLogo();
+ return;
+ }
+ target.setShowSequenceLogo(((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: _showSequenceLogo
+ 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);
+ // -- _normaliseSequenceLogo
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_normaliseSequenceLogo",
+ "normaliseSequenceLogo",
+ 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.hasNormaliseSequenceLogo())
+ {
+ return null;
+ }
+ return (target.getNormaliseSequenceLogo() ? 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.deleteNormaliseSequenceLogo();
+ return;
+ }
+ target.setNormaliseSequenceLogo(((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: _normaliseSequenceLogo
+ 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);
+ // -- _ignoreGapsinConsensus
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Boolean.TYPE, "_ignoreGapsinConsensus",
+ "ignoreGapsinConsensus",
+ 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.hasIgnoreGapsinConsensus())
+ {
+ return null;
+ }
+ return (target.getIgnoreGapsinConsensus() ? 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.deleteIgnoreGapsinConsensus();
+ return;
+ }
+ target.setIgnoreGapsinConsensus(((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: _ignoreGapsinConsensus
+ 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);
+ // -- _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);
+ // -- _id
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_id", "id",
+ org.exolab.castor.xml.NodeType.Attribute);
+ super.setIdentity(desc);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ Viewport target = (Viewport) object;
+ return target.getId();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Viewport target = (Viewport) 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 new java.lang.String();
+ }
+ };
+ 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.IdValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();
+ fieldValidator.setValidator(typeValidator);
+ }
+ desc.setValidator(fieldValidator);
+ // -- _width
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.Integer.TYPE, "_width", "width",
+ org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ Viewport target = (Viewport) object;
+ if (!target.hasWidth())
+ {
+ return null;
+ }
+ return new java.lang.Integer(target.getWidth());
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Viewport target = (Viewport) object;
+ // if null, use delete method for optional primitives
+ if (value == null)
+ {
+ target.deleteWidth();
+ return;
+ }
+ target.setWidth(((java.lang.Integer) value).intValue());
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ 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);
+ // -- _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);
+ // -- 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);
+ // -- _calcIdParamList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ jalview.schemabinding.version2.CalcIdParam.class,
+ "_calcIdParamList", "calcIdParam",
+ 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.getCalcIdParam();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ Viewport target = (Viewport) object;
+ target.addCalcIdParam((jalview.schemabinding.version2.CalcIdParam) 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.removeAllCalcIdParam();
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return new jalview.schemabinding.version2.CalcIdParam();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("www.jalview.org");
+ desc.setMultivalued(true);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _calcIdParamList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { // -- local scope
+ }
+ desc.setValidator(fieldValidator);
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.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;
+ }
}
package jalview.schemabinding.version2.descriptors;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import jalview.schemabinding.version2.WebServiceParameterSet;
*
* @version $Revision$ $Date$
*/
-public class WebServiceParameterSetDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _elementDefinition.
- */
- private boolean _elementDefinition;
-
- /**
- * Field _nsPrefix.
- */
- private java.lang.String _nsPrefix;
-
- /**
- * Field _nsURI.
- */
- private java.lang.String _nsURI;
-
- /**
- * Field _xmlName.
- */
- private java.lang.String _xmlName;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public WebServiceParameterSetDescriptor() {
- super();
- _nsURI = "www.jalview.org/xml/wsparamset";
- _xmlName = "WebServiceParameterSet";
- _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
-
- //-- _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
- {
- WebServiceParameterSet target = (WebServiceParameterSet) object;
- return target.getName();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- WebServiceParameterSet target = (WebServiceParameterSet) 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);
- //-- initialize element descriptors
-
- //-- _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
- {
- WebServiceParameterSet target = (WebServiceParameterSet) object;
- return target.getVersion();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- WebServiceParameterSet target = (WebServiceParameterSet) 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);
- //-- _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
- {
- WebServiceParameterSet target = (WebServiceParameterSet) object;
- return target.getDescription();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- WebServiceParameterSet target = (WebServiceParameterSet) 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);
- //-- _serviceURLList
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_serviceURLList", "serviceURL", org.exolab.castor.xml.NodeType.Element);
- handler = new org.exolab.castor.xml.XMLFieldHandler() {
- public java.lang.Object getValue( java.lang.Object object )
- throws IllegalStateException
- {
- WebServiceParameterSet target = (WebServiceParameterSet) object;
- return target.getServiceURL();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- WebServiceParameterSet target = (WebServiceParameterSet) object;
- target.addServiceURL( (java.lang.String) value);
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
- try {
- WebServiceParameterSet target = (WebServiceParameterSet) object;
- target.removeAllServiceURL();
- } catch (java.lang.Exception ex) {
- throw new IllegalStateException(ex.toString());
- }
- }
- public java.lang.Object newInstance(java.lang.Object parent) {
- return new java.lang.String();
- }
- };
- desc.setHandler(handler);
- desc.setRequired(true);
- desc.setMultivalued(true);
- addFieldDescriptor(desc);
-
- //-- validation code for: _serviceURLList
- fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
- { //-- local scope
- }
- desc.setValidator(fieldValidator);
- //-- _parameters
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_parameters", "parameters", 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
- {
- WebServiceParameterSet target = (WebServiceParameterSet) object;
- return target.getParameters();
- }
- public void setValue( java.lang.Object object, java.lang.Object value)
- throws IllegalStateException, IllegalArgumentException
- {
- try {
- WebServiceParameterSet target = (WebServiceParameterSet) object;
- target.setParameters( (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: _parameters
- 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");
+public class WebServiceParameterSetDescriptor extends
+ org.exolab.castor.xml.util.XMLClassDescriptorImpl
+{
+
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
+
+ /**
+ * Field _elementDefinition.
+ */
+ private boolean _elementDefinition;
+
+ /**
+ * Field _nsPrefix.
+ */
+ private java.lang.String _nsPrefix;
+
+ /**
+ * Field _nsURI.
+ */
+ private java.lang.String _nsURI;
+
+ /**
+ * Field _xmlName.
+ */
+ private java.lang.String _xmlName;
+
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+
+ public WebServiceParameterSetDescriptor()
+ {
+ super();
+ _nsURI = "www.jalview.org/xml/wsparamset";
+ _xmlName = "WebServiceParameterSet";
+ _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
+
+ // -- _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
+ {
+ WebServiceParameterSet target = (WebServiceParameterSet) object;
+ return target.getName();
+ }
+
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ WebServiceParameterSet target = (WebServiceParameterSet) object;
+ target.setName((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
}
- desc.setValidator(fieldValidator);
+ }
+
+ 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);
+ // -- initialize element descriptors
+ // -- _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
+ {
+ WebServiceParameterSet target = (WebServiceParameterSet) object;
+ return target.getVersion();
+ }
- //-----------/
- //- Methods -/
- //-----------/
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ WebServiceParameterSet target = (WebServiceParameterSet) object;
+ target.setVersion((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getAccessMode.
- *
- * @return the access mode specified for this class.
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode(
- ) {
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
return null;
- }
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getIdentity.
- *
- * @return the identity field, null if this class has no
- * identity.
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity(
- ) {
- return super.getIdentity();
+ // -- 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);
+ // -- _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
+ {
+ WebServiceParameterSet target = (WebServiceParameterSet) object;
+ return target.getDescription();
+ }
- /**
- * Method getJavaClass.
- *
- * @return the Java class represented by this descriptor.
- */
- public java.lang.Class getJavaClass(
- ) {
- return jalview.schemabinding.version2.WebServiceParameterSet.class;
- }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ WebServiceParameterSet target = (WebServiceParameterSet) object;
+ target.setDescription((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getNameSpacePrefix.
- *
- * @return the namespace prefix to use when marshaling as XML.
- */
- public java.lang.String getNameSpacePrefix(
- ) {
- return _nsPrefix;
- }
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
- /**
- * Method getNameSpaceURI.
- *
- * @return the namespace URI used when marshaling and
- * unmarshaling as XML.
- */
- public java.lang.String getNameSpaceURI(
- ) {
- return _nsURI;
+ // -- 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);
+ // -- _serviceURLList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_serviceURLList", "serviceURL",
+ org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler()
+ {
+ public java.lang.Object getValue(java.lang.Object object)
+ throws IllegalStateException
+ {
+ WebServiceParameterSet target = (WebServiceParameterSet) object;
+ return target.getServiceURL();
+ }
- /**
- * Method getValidator.
- *
- * @return a specific validator for the class described by this
- * ClassDescriptor.
- */
- public org.exolab.castor.xml.TypeValidator getValidator(
- ) {
- return this;
- }
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ WebServiceParameterSet target = (WebServiceParameterSet) object;
+ target.addServiceURL((java.lang.String) value);
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
- /**
- * Method getXMLName.
- *
- * @return the XML Name for the Class being described.
- */
- public java.lang.String getXMLName(
- ) {
- return _xmlName;
+ public void resetValue(Object object) throws IllegalStateException,
+ IllegalArgumentException
+ {
+ try
+ {
+ WebServiceParameterSet target = (WebServiceParameterSet) object;
+ target.removeAllServiceURL();
+ } catch (java.lang.Exception ex)
+ {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+
+ public java.lang.Object newInstance(java.lang.Object parent)
+ {
+ return new java.lang.String();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setRequired(true);
+ desc.setMultivalued(true);
+ addFieldDescriptor(desc);
+
+ // -- validation code for: _serviceURLList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { // -- local scope
}
+ desc.setValidator(fieldValidator);
+ // -- _parameters
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
+ java.lang.String.class, "_parameters", "parameters",
+ 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
+ {
+ WebServiceParameterSet target = (WebServiceParameterSet) object;
+ return target.getParameters();
+ }
- /**
- * 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;
+ public void setValue(java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try
+ {
+ WebServiceParameterSet target = (WebServiceParameterSet) object;
+ target.setParameters((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: _parameters
+ 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);
+ }
+
+ // -----------/
+ // - Methods -/
+ // -----------/
+
+ /**
+ * Method getAccessMode.
+ *
+ * @return the access mode specified for this class.
+ */
+ public org.exolab.castor.mapping.AccessMode getAccessMode()
+ {
+ return null;
+ }
+
+ /**
+ * Method getIdentity.
+ *
+ * @return the identity field, null if this class has no identity.
+ */
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()
+ {
+ return super.getIdentity();
+ }
+
+ /**
+ * Method getJavaClass.
+ *
+ * @return the Java class represented by this descriptor.
+ */
+ public java.lang.Class getJavaClass()
+ {
+ return jalview.schemabinding.version2.WebServiceParameterSet.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;
+ }
}
{
// TODO Auto-generated method stub
super.alignmentChanged(alignment, hiddenReps);
-
+
if (seqAssociated && annotation.getCalcId() != null)
{
- if (seqannot!=null) {
+ if (seqannot != null)
+ {
seqannot.clear();
- } else {
- seqannot=new IdentityHashMap<SequenceI, AlignmentAnnotation>();
+ }
+ else
+ {
+ seqannot = new IdentityHashMap<SequenceI, AlignmentAnnotation>();
}
for (AlignmentAnnotation alan : alignment.findAnnotation(annotation
.getCalcId()))
public Color findColour(char c, int j, SequenceI seq)
{
Color currentColour = Color.white;
- AlignmentAnnotation annotation=(seqAssociated ? seqannot.get(seq):this.annotation);
- if (annotation==null)
+ AlignmentAnnotation annotation = (seqAssociated ? seqannot.get(seq)
+ : this.annotation);
+ if (annotation == null)
{
return currentColour;
}
import java.awt.Color;
import jalview.datamodel.SequenceI;
+
public class Blosum62ColourScheme extends ResidueColourScheme
{
public Blosum62ColourScheme()
*/
public BuriedColourScheme()
{
- super(ResidueProperties.aaIndex, ResidueProperties.buried, ResidueProperties.buriedmin,
- ResidueProperties.buriedmax);
+ super(ResidueProperties.aaIndex, ResidueProperties.buried,
+ ResidueProperties.buriedmin, ResidueProperties.buriedmax);
}
/**
colhash.put("YELLOW", new Color((float) 0.8, (float) 0.8, (float) 0.0));
}
- public ClustalxColourScheme(AnnotatedCollectionI alignment, Map<SequenceI, SequenceCollectionI> hiddenReps)
+ public ClustalxColourScheme(AnnotatedCollectionI alignment,
+ Map<SequenceI, SequenceCollectionI> hiddenReps)
{
- alignmentChanged(alignment,hiddenReps);
+ alignmentChanged(alignment, hiddenReps);
}
- public void alignmentChanged(AnnotatedCollectionI alignment, Map<SequenceI, SequenceCollectionI> hiddenReps) {
- int maxWidth=alignment.getWidth();
- List<SequenceI> seqs=alignment.getSequences(hiddenReps);
+
+ public void alignmentChanged(AnnotatedCollectionI alignment,
+ Map<SequenceI, SequenceCollectionI> hiddenReps)
+ {
+ int maxWidth = alignment.getWidth();
+ List<SequenceI> seqs = alignment.getSequences(hiddenReps);
cons2 = new int[maxWidth][24];
includeGaps = isIncludeGaps(); // does nothing - TODO replace with call to
// get the current setting of the
int j = 0;
char[] seq;
- for (SequenceI sq: seqs)
+ for (SequenceI sq : seqs)
{
seq = sq.getSequence();
public void setThreshold(int ct, boolean ignoreGaps);
- public void alignmentChanged(AnnotatedCollectionI alignment, Map<SequenceI, SequenceCollectionI> hiddenReps);
+ public void alignmentChanged(AnnotatedCollectionI alignment,
+ Map<SequenceI, SequenceCollectionI> hiddenReps);
}
* values of the colourscheme constants is important for callers of
* getColourName(int i), since it can be used to enumerate the set of built in
* colours. The FIRST_COLOUR and LAST_COLOUR symbols are provided for this.
- *
+ *
* @author $author$
* @version $Revision$
*/
public static final int TCOFFEE = 15;
-
/**
* index of first colourscheme (includes 'None')
*/
/**
* DOCUMENT ME!
- *
+ *
* @param name
* DOCUMENT ME!
- *
+ *
* @return DOCUMENT ME!
*/
public static int getColourIndexFromName(String name)
/**
* DOCUMENT ME!
- *
+ *
* @param cs
* DOCUMENT ME!
- *
+ *
* @return DOCUMENT ME!
*/
public static String getColourName(ColourSchemeI cs)
/**
* DOCUMENT ME!
- *
+ *
* @param index
* DOCUMENT ME!
- *
+ *
* @return DOCUMENT ME!
*/
public static String getColourName(int index)
break;
/*
* case COVARIATION: ret = "Covariation";
- *
+ *
* break;
*/
case USER_DEFINED:
return ret;
}
+
/**
* retrieve or create colourscheme associated with name
- *
+ *
* @param seqs
* sequences to colour
* @param width
}
/**
- * Construct an instance of ColourSchemeI corresponding to the given colourscheme index
- *
+ * Construct an instance of ColourSchemeI corresponding to the given
+ * colourscheme index
+ *
* @param seqs
* sequences to be coloured by colourscheme
* @param width
* geometry of alignment
* @param index
* colourscheme number
- *
- * @return null or an instance of the colourscheme configured to colour given sequence set
+ *
+ * @return null or an instance of the colourscheme configured to colour given
+ * sequence set
*/
- public static ColourSchemeI getColour(jalview.datamodel.AnnotatedCollectionI coll, int index)
+ public static ColourSchemeI getColour(
+ jalview.datamodel.AnnotatedCollectionI coll, int index)
{
- // TODO 3.0 2.8 refactor signature to take an alignmentI like container so colourschemes based on annotation can be initialised
+ // TODO 3.0 2.8 refactor signature to take an alignmentI like container so
+ // colourschemes based on annotation can be initialised
ColourSchemeI cs = null;
switch (index)
case TCOFFEE:
cs = new TCoffeeColourScheme(coll);
- // case COVARIATION:
- // cs = new CovariationColourScheme(annotation);
+ // case COVARIATION:
+ // cs = new CovariationColourScheme(annotation);
- // break;
+ // break;
case USER_DEFINED:
Color[] col = new Color[24];
for (int j = 0; j <= numHelix; j++)
{
- helixcolorhash.put(Integer.toString(j), jalview.util.ColorUtils
- .generateRandomColor(Color.white));
+ helixcolorhash.put(Integer.toString(j),
+ jalview.util.ColorUtils.generateRandomColor(Color.white));
}
}
{
public HelixColourScheme()
{
- super(ResidueProperties.aaIndex, ResidueProperties.helix, ResidueProperties.helixmin,
- ResidueProperties.helixmax);
+ super(ResidueProperties.aaIndex, ResidueProperties.helix,
+ ResidueProperties.helixmin, ResidueProperties.helixmax);
}
public Color makeColour(float c)
*/
public HydrophobicColourScheme()
{
- super(ResidueProperties.aaIndex, ResidueProperties.hyd, ResidueProperties.hydmin,
- ResidueProperties.hydmax);
+ super(ResidueProperties.aaIndex, ResidueProperties.hyd,
+ ResidueProperties.hydmin, ResidueProperties.hydmax);
}
/**
*/
public NucleotideColourScheme()
{
- super(ResidueProperties.nucleotideIndex, ResidueProperties.nucleotide, 0);
+ super(ResidueProperties.nucleotideIndex, ResidueProperties.nucleotide,
+ 0);
}
/**
this.thresholds = ResidueProperties.pidThresholds;
}
-
@Override
public Color findColour(char c, int j, SequenceI seq)
{
*/
public PurinePyrimidineColourScheme()
{
- super(ResidueProperties.purinepyrimidineIndex, ResidueProperties.purinepyrimidine, 0);
+ super(ResidueProperties.purinepyrimidineIndex,
+ ResidueProperties.purinepyrimidine, 0);
}
/**
public void refresh()
{
- if (lastrefresh != annotation._rnasecstr.hashCode() && annotation.isValidStruc())
+ if (lastrefresh != annotation._rnasecstr.hashCode()
+ && annotation.isValidStruc())
{
annotation.getRNAStruc();
lastrefresh = annotation._rnasecstr.hashCode();
boolean adjusting = false;
- public RNAHelicesColourChooser(AlignViewportI av, final AlignmentViewPanel ap)
+ public RNAHelicesColourChooser(AlignViewportI av,
+ final AlignmentViewPanel ap)
{
oldcs = av.getGlobalColourScheme();
if (av.getAlignment().getGroups() != null)
{
oldgroupColours = new Hashtable();
- for (SequenceGroup sg:ap.getAlignment().getGroups())
+ for (SequenceGroup sg : ap.getAlignment().getGroups())
{
if (sg.cs != null)
{
RNAHelicesColour rhc = null;
rhc = new RNAHelicesColour(currentAnnotation);
-
+
av.setGlobalColourScheme(rhc);
if (av.getAlignment().getGroups() != null)
{
- for (SequenceGroup sg:ap.getAlignment().getGroups())
+ for (SequenceGroup sg : ap.getAlignment().getGroups())
{
if (sg.cs == null)
{
av.setGlobalColourScheme(oldcs);
if (av.getAlignment().getGroups() != null)
{
- for (SequenceGroup sg:ap.getAlignment().getGroups())
+ for (SequenceGroup sg : ap.getAlignment().getGroups())
{
sg.cs = (ColourSchemeI) oldgroupColours.get(sg);
}
public class ResidueColourScheme implements ColourSchemeI
{
final int[] symbolIndex;
+
boolean conservationColouring = false;
Color[] colors = null;
/**
* Creates a new ResidueColourScheme object.
- * @param final int[] index table into colors (ResidueProperties.naIndex or ResidueProperties.aaIndex)
+ *
+ * @param final int[] index table into colors (ResidueProperties.naIndex or
+ * ResidueProperties.aaIndex)
* @param colors
* colours for symbols in sequences
* @param threshold
* threshold for conservation shading
*/
- public ResidueColourScheme(int[] aaOrnaIndex, Color[] colours, int threshold)
+ public ResidueColourScheme(int[] aaOrnaIndex, Color[] colours,
+ int threshold)
{
symbolIndex = aaOrnaIndex;
this.colors = colours;
}
/**
- * Creates a new ResidueColourScheme object with a lookup table for indexing the colour map
+ * Creates a new ResidueColourScheme object with a lookup table for indexing
+ * the colour map
*/
public ResidueColourScheme(int[] aaOrNaIndex)
{
symbolIndex = aaOrNaIndex;
}
+
/**
- * Creates a new ResidueColourScheme object - default constructor for non-sequence dependent colourschemes
+ * Creates a new ResidueColourScheme object - default constructor for
+ * non-sequence dependent colourschemes
*/
public ResidueColourScheme()
{
*/
public Color findColour(char c)
{
- return colors == null ? Color.white
- : colors[symbolIndex[c]];
+ return colors == null ? Color.white : colors[symbolIndex[c]];
}
@Override
{
Color currentColour;
- if (colors!=null && symbolIndex!=null && (threshold == 0) || aboveThreshold(c, j))
+ if (colors != null && symbolIndex != null && (threshold == 0)
+ || aboveThreshold(c, j))
{
currentColour = colors[symbolIndex[c]];
}
return currentColour;
}
+
/**
* Get the percentage threshold for this colour scheme
*
}
/**
- * maximum (gap) index for matrices involving protein alphabet
+ * maximum (gap) index for matrices involving protein alphabet
*/
- public final static int maxProteinIndex=23;
+ public final static int maxProteinIndex = 23;
+
/**
- * maximum (gap) index for matrices involving nucleotide alphabet
+ * maximum (gap) index for matrices involving nucleotide alphabet
*/
- public final static int maxNucleotideIndex=10;
-
+ public final static int maxNucleotideIndex = 10;
+
static
{
nucleotideIndex = new int[255];
// Will equate sequences if working with mixed nucleotide sets.
// treats T and U identically. R and Y weak equivalence with AG and CTU.
// N matches any other base weakly
- //
+ //
static final int[][] DNA =
{
- { 10, -8, -8, -8, -8, 1, 1, 1, -8, 1, 1 }, // A
- { -8, 10, -8, -8, -8, 1, 1, -8, 1, 1, 1 }, // C
- { -8, -8, 10, -8, -8, 1, 1, 1, -8, 1, 1 }, // G
- { -8, -8, -8, 10, 10, 1, 1, -8, 1, 1, 1 }, // T
- { -8, -8, -8, 10, 10, 1, 1, -8, 1, 1, 1 }, // U
- { 1, 1, 1, 1, 1, 10, 0, 0, 0, 1, 1 }, // I
- { 1, 1, 1, 1, 1, 0, 10, 0, 0, 1, 1 }, // X
- { 1, -8, 1, -8, -8, 0, 0, 10, -8, 1, 1 }, // R
- { -8, 1, -8, 1, 1, 0, 0, -8, 10, 1, 1 }, // Y
- { 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1 }, // N
- { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, // -
+ { 10, -8, -8, -8, -8, 1, 1, 1, -8, 1, 1 }, // A
+ { -8, 10, -8, -8, -8, 1, 1, -8, 1, 1, 1 }, // C
+ { -8, -8, 10, -8, -8, 1, 1, 1, -8, 1, 1 }, // G
+ { -8, -8, -8, 10, 10, 1, 1, -8, 1, 1, 1 }, // T
+ { -8, -8, -8, 10, 10, 1, 1, -8, 1, 1, 1 }, // U
+ { 1, 1, 1, 1, 1, 10, 0, 0, 0, 1, 1 }, // I
+ { 1, 1, 1, 1, 1, 0, 10, 0, 0, 1, 1 }, // X
+ { 1, -8, 1, -8, -8, 0, 0, 10, -8, 1, 1 }, // R
+ { -8, 1, -8, 1, 1, 0, 0, -8, 10, 1, 1 }, // Y
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1 }, // N
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, // -
};
-/**
+ /**
* register matrices in list
*/
static
scoreMatrices.put("BLOSUM62", new ScoreMatrix("BLOSUM62", BLOSUM62, 0));
scoreMatrices.put("PAM250", new ScoreMatrix("PAM250", PAM250, 0));
scoreMatrices.put("DNA", new ScoreMatrix("DNA", DNA, 1));
-
+
}
public static final Color[] pidColours =
* @param max
* DOCUMENT ME!
*/
- public ScoreColourScheme(int symbolIndex[], double[] scores, double min, double max)
+ public ScoreColourScheme(int symbolIndex[], double[] scores, double min,
+ double max)
{
super(symbolIndex);
{\r
return outputMatrix(false);\r
}\r
+\r
public String outputMatrix(boolean html)\r
{\r
- StringBuffer sb=new StringBuffer();\r
- int[] symbols=(type==0) ? ResidueProperties.aaIndex : ResidueProperties.nucleotideIndex;\r
- int symMax = (type==0) ? ResidueProperties.maxProteinIndex :ResidueProperties.maxNucleotideIndex;\r
- boolean header=true;\r
+ StringBuffer sb = new StringBuffer();\r
+ int[] symbols = (type == 0) ? ResidueProperties.aaIndex\r
+ : ResidueProperties.nucleotideIndex;\r
+ int symMax = (type == 0) ? ResidueProperties.maxProteinIndex\r
+ : ResidueProperties.maxNucleotideIndex;\r
+ boolean header = true;\r
if (html)\r
{\r
sb.append("<table>");\r
}\r
- for (char sym='A';sym<='Z';sym++)\r
+ for (char sym = 'A'; sym <= 'Z'; sym++)\r
{\r
- if (symbols[sym]>=0 && symbols[sym]<symMax)\r
+ if (symbols[sym] >= 0 && symbols[sym] < symMax)\r
{\r
- if (header) {\r
- sb.append(html ? "<tr><td></td>" : "");\r
- for (char sym2='A';sym2<='Z';sym2++)\r
+ if (header)\r
{\r
- if (symbols[sym2]>=0 && symbols[sym2]<symMax)\r
+ sb.append(html ? "<tr><td></td>" : "");\r
+ for (char sym2 = 'A'; sym2 <= 'Z'; sym2++)\r
{\r
- sb.append((html ? "<td> " : "\t")+sym2 +(html ? " </td>": ""));\r
+ if (symbols[sym2] >= 0 && symbols[sym2] < symMax)\r
+ {\r
+ sb.append((html ? "<td> " : "\t") + sym2\r
+ + (html ? " </td>" : ""));\r
+ }\r
}\r
+ header = false;\r
+ sb.append(html ? "</tr>\n" : "\n");\r
}\r
- header=false;\r
- sb.append(html ? "</tr>\n" : "\n");\r
- } \r
if (html)\r
{\r
sb.append("<tr>");\r
}\r
- sb.append((html ? "<td>" : "")+sym+(html ? "</td>" : ""));\r
- for (char sym2='A';sym2<='Z';sym2++)\r
+ sb.append((html ? "<td>" : "") + sym + (html ? "</td>" : ""));\r
+ for (char sym2 = 'A'; sym2 <= 'Z'; sym2++)\r
{\r
- if (symbols[sym2]>=0 && symbols[sym2]<symMax)\r
+ if (symbols[sym2] >= 0 && symbols[sym2] < symMax)\r
{\r
- sb.append((html ? "<td>" : "\t")+matrix[symbols[sym]][symbols[sym2]]+(html ? "</td>" : ""));\r
+ sb.append((html ? "<td>" : "\t")\r
+ + matrix[symbols[sym]][symbols[sym2]]\r
+ + (html ? "</td>" : ""));\r
}\r
}\r
sb.append(html ? "</tr>\n" : "\n");\r
*/
public StrandColourScheme()
{
- super(ResidueProperties.aaIndex, ResidueProperties.strand, ResidueProperties.strandmin,
- ResidueProperties.strandmax);
+ super(ResidueProperties.aaIndex, ResidueProperties.strand,
+ ResidueProperties.strandmin, ResidueProperties.strandmax);
}
/**
import java.util.TreeMap;
/**
- * Defines the color score for T-Coffee MSA
+ * Defines the color score for T-Coffee MSA
* <p>
* See http://tcoffee.org
*
*
* @author Paolo Di Tommaso
- *
+ *
*/
-public class TCoffeeColourScheme extends ResidueColourScheme {
+public class TCoffeeColourScheme extends ResidueColourScheme
+{
+
+ static final Color[] colors =
+ { new Color(102, 102, 255), // #6666FF
+ new Color(0, 255, 0), // #00FF00
+ new Color(102, 255, 0), // #66FF00
+ new Color(204, 255, 0), // #CCFF00
+ new Color(255, 255, 0), // #FFFF00
+ new Color(255, 204, 0), // #FFCC00
+ new Color(255, 153, 0), // #FF9900
+ new Color(255, 102, 0), // #FF6600
+ new Color(255, 51, 0), // #FF3300
+ new Color(255, 34, 0) // #FF2000
+ };
+
+ IdentityHashMap<SequenceI, Color[]> seqMap;
- static final Color[] colors = {
- new Color( 102, 102, 255 ), // #6666FF
- new Color( 0, 255, 0), // #00FF00
- new Color( 102, 255, 0), // #66FF00
- new Color( 204, 255, 0), // #CCFF00
- new Color( 255, 255, 0), // #FFFF00
- new Color( 255, 204, 0), // #FFCC00
- new Color( 255, 153, 0), // #FF9900
- new Color( 255, 102, 0), // #FF6600
- new Color( 255, 51, 0), // #FF3300
- new Color( 255, 34, 0) // #FF2000
- };
+ /**
+ * the color scheme needs to look at the alignment to get and cache T-COFFEE
+ * scores
+ *
+ * @param alignment
+ * - annotated sequences to be searched
+ */
+ public TCoffeeColourScheme(AnnotatedCollectionI alignment)
+ {
+ alignmentChanged(alignment, null);
+ }
+ @Override
+ public void alignmentChanged(AnnotatedCollectionI alignment,
+ Map<SequenceI, SequenceCollectionI> hiddenReps)
+ {
+ // TODO: if sequences have been represented and they have scores, could
+ // compute an average sequence score for the representative
- IdentityHashMap<SequenceI, Color[]> seqMap;
- /**
- * the color scheme needs to look at the alignment to get and cache T-COFFEE scores
- *
- * @param alignment - annotated sequences to be searched
- */
- public TCoffeeColourScheme(AnnotatedCollectionI alignment) {
- alignmentChanged(alignment, null);
- }
- @Override
- public void alignmentChanged(AnnotatedCollectionI alignment, Map<SequenceI, SequenceCollectionI> hiddenReps)
- {
- // TODO: if sequences have been represented and they have scores, could compute an average sequence score for the representative
-
- // assume only one set of TCOFFEE scores - but could have more than one potentially.
- ArrayList<AlignmentAnnotation> annots = new ArrayList<AlignmentAnnotation>();
- // Search alignment to get all tcoffee annotation and pick one set of annotation to use to colour seqs.
- seqMap = new IdentityHashMap<SequenceI, Color[]>();
- int w=0;
- for (AlignmentAnnotation al:alignment.findAnnotation(TCoffeeScoreFile.TCOFFEE_SCORE))
- {
- if (al.sequenceRef!=null && !al.belowAlignment)
- {
- annots.add(al);
- if (w<al.annotations.length)
- {
- w=al.annotations.length;
- }
- Color[] scores=new Color[al.annotations.length];
- int i=0;
- for (Annotation an:al.annotations)
- {
- scores[i++]=(an!=null) ? an.colour : Color.white;
- }
- seqMap.put(al.sequenceRef, scores);
- }
- }
+ // assume only one set of TCOFFEE scores - but could have more than one
+ // potentially.
+ ArrayList<AlignmentAnnotation> annots = new ArrayList<AlignmentAnnotation>();
+ // Search alignment to get all tcoffee annotation and pick one set of
+ // annotation to use to colour seqs.
+ seqMap = new IdentityHashMap<SequenceI, Color[]>();
+ int w = 0;
+ for (AlignmentAnnotation al : alignment
+ .findAnnotation(TCoffeeScoreFile.TCOFFEE_SCORE))
+ {
+ if (al.sequenceRef != null && !al.belowAlignment)
+ {
+ annots.add(al);
+ if (w < al.annotations.length)
+ {
+ w = al.annotations.length;
+ }
+ Color[] scores = new Color[al.annotations.length];
+ int i = 0;
+ for (Annotation an : al.annotations)
+ {
+ scores[i++] = (an != null) ? an.colour : Color.white;
+ }
+ seqMap.put(al.sequenceRef, scores);
+ }
+ }
// TODO: compute average colour for each symbol type in each column - gives
// a second order colourscheme for colouring a sequence logo derived from
// the alignment (colour reflects quality of alignment for each residue
// class)
- }
- @Override
- public Color findColour(char c, int j, SequenceI seq) {
- Color[] cols;
+ }
+
+ @Override
+ public Color findColour(char c, int j, SequenceI seq)
+ {
+ Color[] cols;
+
+ if (seqMap == null || (cols = seqMap.get(seq)) == null)
+ {
+ // see above TODO about computing a colour for each residue in each
+ // column: cc = _rcols[i][indexFor[c]];
+ return Color.white;
+ }
- if( seqMap==null || (cols=seqMap.get(seq))==null) {
-// see above TODO about computing a colour for each residue in each column: cc = _rcols[i][indexFor[c]];
- return Color.white;
- }
-
- if( j < 0 || j>= cols.length ) {
- return Color.white;
- }
- return cols[j];
- }
+ if (j < 0 || j >= cols.length)
+ {
+ return Color.white;
+ }
+ return cols[j];
+ }
}
*/
public TurnColourScheme()
{
- super(ResidueProperties.aaIndex,ResidueProperties.turn, ResidueProperties.turnmin,
- ResidueProperties.turnmax);
+ super(ResidueProperties.aaIndex, ResidueProperties.turn,
+ ResidueProperties.turnmin, ResidueProperties.turnmax);
}
/**
*/
public ZappoColourScheme()
{
- super(ResidueProperties.aaIndex, ResidueProperties.zappo, 0);
+ super(ResidueProperties.aaIndex, ResidueProperties.zappo, 0);
}
}
/**
* handler for alignmentViewPanel events
+ *
* @author jimp
- *
+ *
*/
public interface AlignmentViewPanelListener
{
public interface SecondaryStructureListener
{
- // TODO - redefine to allow RNA mouseovers to be passed back correctly to listeners
+ // TODO - redefine to allow RNA mouseovers to be passed back correctly to
+ // listeners
public void mouseOverSequence(SequenceI sequence, int index);
}
{
/**
*
- * @return list of structure files (unique IDs/filenames) that this listener handles messages for, or null if generic listener (only used by removeListener method)
+ * @return list of structure files (unique IDs/filenames) that this listener
+ * handles messages for, or null if generic listener (only used by
+ * removeListener method)
*/
public String[] getPdbFile();
/**
- * NOT A LISTENER METHOD!
- * called by structure viewer when the given atom/structure has been moused over. Typically, implementors call StructureSelectionManager.mouseOverStructure
+ * NOT A LISTENER METHOD! called by structure viewer when the given
+ * atom/structure has been moused over. Typically, implementors call
+ * StructureSelectionManager.mouseOverStructure
+ *
* @param atomIndex
* @param strInfo
*/
public void mouseOverStructure(int atomIndex, String strInfo);
/**
- * called by StructureSelectionManager to inform viewer to highlight given atomspec
+ * called by StructureSelectionManager to inform viewer to highlight given
+ * atomspec
+ *
* @param atomIndex
* @param pdbResNum
* @param chain
String pdbId);
/**
- * called by StructureSelectionManager when the colours of a sequence associated with a structure have changed.
- * @param source (untyped) usually an alignPanel
+ * called by StructureSelectionManager when the colours of a sequence
+ * associated with a structure have changed.
+ *
+ * @param source
+ * (untyped) usually an alignPanel
*/
public void updateColours(Object source);
/**
* called by Jalview to get the colour for the given atomspec
+ *
* @param atomIndex
* @param pdbResNum
* @param chain
String chain, String pdbId);
/**
- * called by structureSelectionManager to instruct implementor to release any direct references it may hold to the given object (typically, these are Jalview alignment panels).
+ * called by structureSelectionManager to instruct implementor to release any
+ * direct references it may hold to the given object (typically, these are
+ * Jalview alignment panels).
+ *
* @param svl
*/
public void releaseReferences(Object svl);
*******************************************************************************/
package jalview.structure;
-
/**
* holder for script commands generated for a particular structure mapping
+ *
* @author jimp
- *
+ *
*/
-public class StructureMappingcommandSet {
+public class StructureMappingcommandSet
+{
/**
* structure file for which these commands were generated
*/
public String mapping;
+
/**
* set of commands
*/
public String[] commands;
+
/**
- * some object that indicates what the commands can be parsed by (eg JmolCommands.class implies these are Jmol commands)
+ * some object that indicates what the commands can be parsed by (eg
+ * JmolCommands.class implies these are Jmol commands)
*/
public Object handledBy;
+
/**
- * record the originating command generator, the structure mapping involved, and the set of commands to be passed.
+ * record the originating command generator, the structure mapping involved,
+ * and the set of commands to be passed.
+ *
* @param handledBy
* @param files
* @param commands
*/
- public StructureMappingcommandSet(Object handledBy, String files, String[] commands)
+ public StructureMappingcommandSet(Object handledBy, String files,
+ String[] commands)
{
- this.mapping=files;
- this.handledBy=handledBy;
- this.commands=commands;
+ this.mapping = files;
+ this.handledBy = handledBy;
+ this.commands = commands;
}
}
public class StructureSelectionManager
{
- static IdentityHashMap<StructureSelectionManagerProvider,StructureSelectionManager> instances;
+ static IdentityHashMap<StructureSelectionManagerProvider, StructureSelectionManager> instances;
StructureMapping[] mappings;
/**
* debug function - write all mappings to stdout
*/
- public void reportMapping() {\r
- if (mappings==null)\r
- {\r
- System.err.println("reportMapping: No PDB/Sequence mappings.");\r
- }else{\r
- System.err.println("reportMapping: There are "+mappings.length+" mappings.");\r
- for (int m=0;m<mappings.length;m++)\r
- {\r
- System.err.println("mapping "+m+" : "+mappings[m].pdbfile);\r
- }\r
- }\r
- }\r
+ public void reportMapping()
+ {
+ if (mappings == null)
+ {
+ System.err.println("reportMapping: No PDB/Sequence mappings.");
+ }
+ else
+ {
+ System.err.println("reportMapping: There are " + mappings.length
+ + " mappings.");
+ for (int m = 0; m < mappings.length; m++)
+ {
+ System.err.println("mapping " + m + " : " + mappings[m].pdbfile);
+ }
+ }
+ }
+
Hashtable mappingData = new Hashtable();
- public static StructureSelectionManager getStructureSelectionManager(StructureSelectionManagerProvider context)
+ public static StructureSelectionManager getStructureSelectionManager(
+ StructureSelectionManagerProvider context)
{
if (instances == null)
{
- instances = new java.util.IdentityHashMap<StructureSelectionManagerProvider,StructureSelectionManager>();
+ instances = new java.util.IdentityHashMap<StructureSelectionManagerProvider, StructureSelectionManager>();
}
- StructureSelectionManager instance=instances.get(context);
- if (instance==null)
+ StructureSelectionManager instance = instances.get(context);
+ if (instance == null)
{
- instances.put(context, instance=new StructureSelectionManager());
+ instances.put(context, instance = new StructureSelectionManager());
}
return instance;
}
/**
* register a listener for alignment sequence mouseover events
+ *
* @param svl
*/
public void addStructureViewerListener(Object svl)
ex.printStackTrace();
return null;
}
-
+
String targetChain;
for (int s = 0; s < sequence.length; s++)
{
for (int i = 0; i < pdb.chains.size(); i++)
{
PDBChain chain = ((PDBChain) pdb.chains.elementAt(i));
- if (targetChain.length() > 0 && !targetChain.equals(chain.id) && !infChain)
+ if (targetChain.length() > 0 && !targetChain.equals(chain.id)
+ && !infChain)
{
continue; // don't try to map chains don't match.
}
// allocate enough slots to store the mapping from positions in
// sequence[s] to the associated chain
- int[][] mapping = new int[sequence[s].findPosition(sequence[s].getLength()) + 2][2];
+ int[][] mapping = new int[sequence[s].findPosition(sequence[s]
+ .getLength()) + 2][2];
int resNum = -10000;
int index = 0;
listeners.removeElement(svl);
if (svl instanceof SequenceListener)
{
- for (int i=0;i<listeners.size();i++)
+ for (int i = 0; i < listeners.size(); i++)
{
if (listeners.elementAt(i) instanceof StructureListener)
{
- ((StructureListener)listeners.elementAt(i)).releaseReferences(svl);
+ ((StructureListener) listeners.elementAt(i))
+ .releaseReferences(svl);
}
}
}
-
+
if (pdbfiles == null)
{
return;
public void mouseOverStructure(int pdbResNum, String chain, String pdbfile)
{
- if (listeners==null)
+ if (listeners == null)
{
// old or prematurely sent event
return;
}
}
}
- if (results!=null)
+ if (results != null)
{
for (int i = 0; i < listeners.size(); i++)
{
int atomNo = 0;
for (int i = 0; i < listeners.size(); i++)
{
- Object listener=listeners.elementAt(i);
- if (listener==source)
+ Object listener = listeners.elementAt(i);
+ if (listener == source)
{
continue;
}
}
if (hasSequenceListeners)
{
- ((SequenceListener) listener)
- .highlightSequence(results);
+ ((SequenceListener) listener).highlightSequence(results);
}
}
- else if (listener instanceof VamsasListener
- && !handlingVamsasMo)
+ else if (listener instanceof VamsasListener && !handlingVamsasMo)
{
// DEBUG
// System.err.println("Vamsas from Seq " + seq.getDisplayId(false) + "
// index);
// pass the mouse over and absolute position onto the
// VamsasListener(s)
- ((VamsasListener) listener).mouseOver(seq,
- indexpos, source);
+ ((VamsasListener) listener).mouseOver(seq, indexpos, source);
}
- else if(listener instanceof SecondaryStructureListener){
- ((SecondaryStructureListener) listener).mouseOverSequence(seq,indexpos);
+ else if (listener instanceof SecondaryStructureListener)
+ {
+ ((SecondaryStructureListener) listener).mouseOverSequence(seq,
+ indexpos);
}
}
}
}
}
}
-
- Vector<AlignmentViewPanelListener> view_listeners=new Vector<AlignmentViewPanelListener>();
- public synchronized void sendViewPosition(jalview.api.AlignmentViewPanel source, int startRes,
- int endRes, int startSeq, int endSeq)
+
+ Vector<AlignmentViewPanelListener> view_listeners = new Vector<AlignmentViewPanelListener>();
+
+ public synchronized void sendViewPosition(
+ jalview.api.AlignmentViewPanel source, int startRes, int endRes,
+ int startSeq, int endSeq)
{
if (view_listeners != null && view_listeners.size() > 0)
{
- Enumeration<AlignmentViewPanelListener> listeners = view_listeners.elements();
+ Enumeration<AlignmentViewPanelListener> listeners = view_listeners
+ .elements();
while (listeners.hasMoreElements())
{
- AlignmentViewPanelListener slis = listeners
- .nextElement();
+ AlignmentViewPanelListener slis = listeners.nextElement();
if (slis != source)
{
slis.viewPosition(startRes, endRes, startSeq, endSeq, source);
}
}
}
-
- public void finalize() throws Throwable {
- if (listeners!=null) {
+ public void finalize() throws Throwable
+ {
+ if (listeners != null)
+ {
listeners.clear();
- listeners=null;
+ listeners = null;
}
- if (mappingData!=null)
+ if (mappingData != null)
{
mappingData.clear();
- mappingData=null;
+ mappingData = null;
}
- if (sel_listeners!=null)
+ if (sel_listeners != null)
{
sel_listeners.clear();
- sel_listeners=null;
+ sel_listeners = null;
}
- if (view_listeners!=null)
+ if (view_listeners != null)
{
view_listeners.clear();
- view_listeners=null;
+ view_listeners = null;
}
- mappings=null;
- seqmappingrefs=null;
+ mappings = null;
+ seqmappingrefs = null;
}
/**
* release all references associated with this manager provider
+ *
* @param jalviewLite
*/
public static void release(StructureSelectionManagerProvider jalviewLite)
{
-// synchronized (instances)
+ // synchronized (instances)
{
if (instances == null)
{
import jalview.datamodel.SequenceI;\r
\r
/**\r
- * The vamsasListener allows peers to receive mouseOver events from any Jalview alignment window.\r
+ * The vamsasListener allows peers to receive mouseOver events from any Jalview\r
+ * alignment window.\r
+ * \r
* @author JimP\r
- *\r
+ * \r
* @history Version 1 released for Jalview 2.4.\r
- * @history Version 2 mouseOver refactored to include an additional parameter allowing the source of the event to be passed to the handler. \r
+ * @history Version 2 mouseOver refactored to include an additional parameter\r
+ * allowing the source of the event to be passed to the handler.\r
* \r
* \r
*/\r
*******************************************************************************/
package jalview.structure;
-
/**
- * an object that can generate mouseover events for VamsasListeners. This is purely a tag for the
- * moment, but there may be more interrogative methods in future.
+ * an object that can generate mouseover events for VamsasListeners. This is
+ * purely a tag for the moment, but there may be more interrogative methods in
+ * future.
*
*/
public interface VamsasSource
{
-
}
{
String mrjVersion = System.getProperty("mrj.version");
String majorMRJVersion;
- if (mrjVersion==null) {
+ if (mrjVersion == null)
+ {
// must be on some later build with mrj support
majorMRJVersion = "3.1";
- } else {
+ }
+ else
+ {
majorMRJVersion = mrjVersion.substring(0, 3);
}
// Another pid with region specification
public final static float PID(String seq1, String seq2, int start, int end)
{
- return PID(seq1, seq2, start, end, true,false);
+ return PID(seq1, seq2, start, end, true, false);
}
+
/**
- * Calculate percent identity for a pair of sequences over a particular range, with different options for ignoring gaps.
+ * Calculate percent identity for a pair of sequences over a particular range,
+ * with different options for ignoring gaps.
+ *
* @param seq1
* @param seq2
- * @param start - position in seqs
- * @param end - position in seqs
- * @param wcGaps - if true - gaps match any character, if false, do not match anything
- * @param ungappedOnly - if true - only count PID over ungapped columns
+ * @param start
+ * - position in seqs
+ * @param end
+ * - position in seqs
+ * @param wcGaps
+ * - if true - gaps match any character, if false, do not match
+ * anything
+ * @param ungappedOnly
+ * - if true - only count PID over ungapped columns
* @return
*/
- public final static float PID(String seq1, String seq2, int start, int end, boolean wcGaps, boolean ungappedOnly)
+ public final static float PID(String seq1, String seq2, int start,
+ int end, boolean wcGaps, boolean ungappedOnly)
{
int s1len = seq1.length();
int s2len = seq2.length();
start = len - 1; // we just use a single residue for the difference
}
- int elen=len-start,bad = 0;
+ int elen = len - start, bad = 0;
char chr1;
char chr2;
boolean agap;
// Faster than toUpperCase
chr2 -= caseShift;
}
-
+
if (chr1 != chr2)
{
- if (agap)
- {
- if (ungappedOnly)
- {
- elen--;
- } else if (!wcGaps) {
- bad++;
- }
- } else {
- bad++;
- }
+ if (agap)
+ {
+ if (ungappedOnly)
+ {
+ elen--;
+ }
+ else if (!wcGaps)
+ {
+ bad++;
+ }
+ }
+ else
+ {
+ bad++;
+ }
}
-
+
+ }
+ if (elen < 1)
+ {
+ return 0f;
}
- if (elen<1) { return 0f; }
return ((float) 100 * (elen - bad)) / elen;
}
import java.util.StringTokenizer;
import java.util.regex.Pattern;
-
/**
* utility class for dealing with HTML link extraction
+ *
* @author jprocter
- *
+ *
*/
public class ParseHtmlBodyAndLinks
+{
+ String orig = null;
+
+ public String getOrig()
{
- String orig=null;
- public String getOrig()
- {
- return orig;
- }
- boolean htmlContent=true;
- /**
- * @return true if the content looked like HTML
+ return orig;
+ }
- */
- public boolean isHtmlContent()
- {
- return htmlContent;
- }
+ boolean htmlContent = true;
- ArrayList<String> links=new ArrayList<String>();
- StringBuffer sb = new StringBuffer();
- /**
- * result of parsing description - with or without HTML tags
- * @return
- */
- public String getContent()
- {
-
- return sb.toString();
- }
- /**
- * list of Label|Link encoded URL links extracted from HTML
- * @return
- */
- public ArrayList<String> getLinks() {
- return links;
- }
+ /**
+ * @return true if the content looked like HTML
+ */
+ public boolean isHtmlContent()
+ {
+ return htmlContent;
+ }
+
+ ArrayList<String> links = new ArrayList<String>();
+
+ StringBuffer sb = new StringBuffer();
+
+ /**
+ * result of parsing description - with or without HTML tags
+ *
+ * @return
+ */
+ public String getContent()
+ {
- /**
- *
- * @param description - html or text content to be parsed
- * @param removeHTML flag to indicate if HTML tags should be removed if they are present.
- * @param newline
- */
- public ParseHtmlBodyAndLinks(String description,
- boolean removeHTML, String newline)
+ return sb.toString();
+ }
+
+ /**
+ * list of Label|Link encoded URL links extracted from HTML
+ *
+ * @return
+ */
+ public ArrayList<String> getLinks()
+ {
+ return links;
+ }
+
+ /**
+ *
+ * @param description
+ * - html or text content to be parsed
+ * @param removeHTML
+ * flag to indicate if HTML tags should be removed if they are
+ * present.
+ * @param newline
+ */
+ public ParseHtmlBodyAndLinks(String description, boolean removeHTML,
+ String newline)
+ {
+ if (description == null || description.length() == 0)
{
- if (description==null || description.length()==0)
- {
- htmlContent=false;
- return;
- }
+ htmlContent = false;
+ return;
+ }
if (description.toUpperCase().indexOf("<HTML>") == -1)
{
htmlContent = false;
{
// instead of parsing the html into plaintext
// clean the description ready for embedding in html
- sb = new StringBuffer(Pattern.compile("<").matcher(description).replaceAll("<"));
-
+ sb = new StringBuffer(Pattern.compile("<").matcher(description)
+ .replaceAll("<"));
+
}
-
+
+ }
+
+ /**
+ * get either the parsed content or the original, depending on whether the
+ * original looked like html content or not.
+ *
+ * @return
+ */
+ public String getNonHtmlContent()
+ {
+ return isHtmlContent() ? sb.toString() : orig;
}
- /**
- * get either the parsed content or the original, depending on whether the original looked like html content or not.
- * @return
- */
- public String getNonHtmlContent()
- {
- return isHtmlContent() ? sb.toString() : orig;
- }
}
\r
/**\r
* escape a string according to the local platform's escape character\r
+ * \r
* @param file\r
* @return escaped file\r
*/\r
public static String escapeString(String file)\r
{\r
- StringBuffer f=new StringBuffer();\r
- int p=0,lastp=0;\r
- while ((p=file.indexOf('\\',lastp))>-1)\r
+ StringBuffer f = new StringBuffer();\r
+ int p = 0, lastp = 0;\r
+ while ((p = file.indexOf('\\', lastp)) > -1)\r
{\r
- f.append(file.subSequence(lastp,p));\r
+ f.append(file.subSequence(lastp, p));\r
f.append("\\\\");\r
- lastp=p+1;\r
+ lastp = p + 1;\r
}\r
f.append(file.substring(lastp));\r
return f.toString();\r
/**
* base class holding visualization and analysis attributes and common logic for
* an active alignment view displayed in the GUI
- *
+ *
* @author jimp
- *
+ *
*/
public abstract class AlignmentViewport implements AlignViewportI
{
}
/**
- *
- *
+ *
+ *
* @return flag indicating if colourchanges propagated to all groups
*/
public boolean getColourAppliesToAllGroups()
/**
* GUI state
- *
+ *
* @return true if percent identity threshold is applied to shading
*/
public boolean getAbovePIDThreshold()
/**
* GUI state
- *
- *
+ *
+ *
* @param b
* indicate if percent identity threshold is applied to shading
*/
/**
* DOCUMENT ME!
- *
+ *
* @param thresh
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @return DOCUMENT ME!
*/
public int getThreshold()
int increment;
/**
- *
+ *
* @param inc
* set the scalar for bleaching colourschemes according to degree of
* conservation
/**
* GUI State
- *
+ *
* @return get scalar for bleaching colourschemes by conservation
*/
public int getIncrement()
/**
* GUI state
- *
+ *
* @return true if conservation based shading is enabled
*/
public boolean getConservationSelected()
/**
* GUI state
- *
+ *
* @param b
* enable conservation based shading
*/
return;
}
if (calculator
- .getRegisteredWorkersOfClass(jalview.workers.ConservationThread.class)==null)
+ .getRegisteredWorkersOfClass(jalview.workers.ConservationThread.class) == null)
{
calculator.registerWorker(new jalview.workers.ConservationThread(
this, ap));
{
return;
}
- if (calculator.getRegisteredWorkersOfClass(ConsensusThread.class)==null)
+ if (calculator.getRegisteredWorkersOfClass(ConsensusThread.class) == null)
{
calculator.registerWorker(new ConsensusThread(this, ap));
}
{
return;
}
- if (calculator
- .getRegisteredWorkersOfClass(StrucConsensusThread.class)==null)
+ if (calculator.getRegisteredWorkersOfClass(StrucConsensusThread.class) == null)
{
calculator.registerWorker(new StrucConsensusThread(this, ap));
}
}
/**
- *
+ *
* @return flag to indicate if the consensus histogram should be rendered by
* default
*/
}
/**
- *
- *
+ *
+ *
* @return null or the currently selected sequence region
*/
public SequenceGroup getSelectionGroup()
/**
* Set the selection group for this window.
- *
+ *
* @param sg
* - group holding references to sequences in this alignment view
- *
+ *
*/
public void setSelectionGroup(SequenceGroup sg)
{
}
/**
- *
+ *
* @return
*/
@Override
/**
* unique viewId for synchronizing state (e.g. with stored Jalview Project)
- *
+ *
*/
protected String viewId = null;
/**
* checks current SelectionGroup against record of last hash value, and
* updates record.
- *
+ *
* @param b
* update the record of last hash value
- *
+ *
* @return true if SelectionGroup changed since last call (when b is true)
*/
public boolean isSelectionGroupChanged(boolean b)
/**
* checks current colsel against record of last hash value, and optionally
* updates record.
- *
+ *
* @param b
* update the record of last hash value
* @return true if colsel changed since last call (when b is true)
/**
* Property change listener for changes in alignment
- *
+ *
* @param listener
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
- *
+ *
* @param listener
* DOCUMENT ME!
*/
/**
* Property change listener for changes in alignment
- *
+ *
* @param prop
* DOCUMENT ME!
* @param oldvalue
* This method returns an array of new SequenceI objects derived from the
* whole alignment or just the current selection with start and end points
* adjusted
- *
+ *
* @note if you need references to the actual SequenceI objects in the
* alignment or currently selected then use getSequenceSelection()
* @return selection as new sequenceI objects
// JBPNote: in applet, this method returned references to the alignment
// sequences, and it did not honour the presence/absence of annotation
// attached to the alignment (probably!)
- if (selectionGroup == null || selectionGroup.getSize()==0)
+ if (selectionGroup == null || selectionGroup.getSize() == 0)
{
sequences = alignment.getSequencesArray();
AlignmentAnnotation[] annots = alignment.getAlignmentAnnotation();
/**
* get the currently selected sequence objects or all the sequences in the
* alignment.
- *
+ *
* @return array of references to sequence objects
*/
public SequenceI[] getSequenceSelection()
* if columns are hidden they will not be returned in the result. Use this for
* calculating trees, PCA, redundancy etc on views which contain hidden
* columns.
- *
+ *
* @return String[]
*/
public jalview.datamodel.CigarArray getViewAsCigars(
/**
* return a compact representation of the current alignment selection to pass
* to an analysis function
- *
+ *
* @param selectedOnly
* boolean true to just return the selected view
* @return AlignmentView
/**
* return a compact representation of the current alignment selection to pass
* to an analysis function
- *
+ *
* @param selectedOnly
* boolean true to just return the selected view
* @param markGroups
* if columns are hidden they will not be returned in the result. Use this for
* calculating trees, PCA, redundancy etc on views which contain hidden
* columns.
- *
+ *
* @return String[]
*/
public String[] getViewAsString(boolean selectedRegionOnly)
/**
* return visible region boundaries within given column range
- *
+ *
* @param min
* first column (inclusive, from 0)
* @param max
/**
* apply any post-edit constraints and trigger any calculations needed after
* an edit has been performed on the alignment
- *
+ *
* @param ap
*/
public void alignmentChanged(AlignmentViewPanel ap)
/*
* (non-Javadoc)
+ *
* @see jalview.api.AlignViewportI#calcPanelHeight()
*/
public int calcPanelHeight()
// setHeight of panels
AlignmentAnnotation[] aa = getAlignment().getAlignmentAnnotation();
int height = 0;
- int charHeight=getCharHeight();
+ int charHeight = getCharHeight();
if (aa != null)
{
boolean graphgrp[] = null;
}
}
aa[i].height = 0;
-
+
if (aa[i].hasText)
{
aa[i].height += charHeight;
}
-
+
if (aa[i].hasIcons)
{
aa[i].height += 16;
}
-
+
if (aa[i].graph > 0)
{
aa[i].height += aa[i].graphHeight;
}
-
+
if (aa[i].height == 0)
{
aa[i].height = 20;
}
-
+
height += aa[i].height;
}
}
boolean normLogo = isNormaliseSequenceLogo();
/**
- * TODO reorder the annotation rows according to group/sequence ordering on alignment
+ * TODO reorder the annotation rows according to group/sequence ordering on
+ * alignment
*/
boolean sortg = true;
public PCAModel(AlignmentView seqstrings2, SequenceI[] seqs2,
boolean nucleotide2)
{
- seqstrings=seqstrings2;
- seqs=seqs2;
- nucleotide=nucleotide2;
+ seqstrings = seqstrings2;
+ seqs = seqs2;
+ nucleotide = nucleotide2;
}
private volatile PCA pca;
-
+
int top;
-
+
AlignmentView seqstrings;
SequenceI[] seqs;
/**
- * use the identity matrix for calculating similarity between sequences.
+ * use the identity matrix for calculating similarity between sequences.
*/
- private boolean nucleotide=false;
+ private boolean nucleotide = false;
private Vector<SequencePoint> points;
- private boolean jvCalcMode=true;
+ private boolean jvCalcMode = true;
public boolean isJvCalcMode()
{
public void run()
{
-
+
pca = new PCA(seqstrings.getSequenceStrings(' '), nucleotide);
pca.setJvCalcMode(jvCalcMode);
pca.run();
SequencePoint sp = new SequencePoint(seqs[i], scores[i]);
points.addElement(sp);
}
-
+
}
public void updateRc(RotatableCanvasI rc)
{
return nucleotide;
}
+
public void setNucleotide(boolean nucleotide)
{
- this.nucleotide=nucleotide;
+ this.nucleotide = nucleotide;
}
/**
/**
* update the 2d coordinates for the list of points to the given dimensions
* Principal dimension is getTop(). Next greatest eigenvector is getTop()-1.
- * Note - pca.getComponents starts counting the spectrum from rank-2 to zero, rather than rank-1, so getComponents(dimN ...) == updateRcView(dimN+1 ..)
- * @param dim1
+ * Note - pca.getComponents starts counting the spectrum from rank-2 to zero,
+ * rather than rank-1, so getComponents(dimN ...) == updateRcView(dimN+1 ..)
+ *
+ * @param dim1
* @param dim2
* @param dim3
*/
public void updateRcView(int dim1, int dim2, int dim3)
{
// note: actual indices for components are dim1-1, etc (patch for JAL-1123)
- float[][] scores = pca.getComponents(dim1-1, dim2-1, dim3-1, 100);
+ float[][] scores = pca.getComponents(dim1 - 1, dim2 - 1, dim3 - 1, 100);
for (int i = 0; i < pca.getM().rows; i++)
{
{
return seqstrings;
}
- public String getPointsasCsv(boolean transformed, int xdim, int ydim, int zdim)
+
+ public String getPointsasCsv(boolean transformed, int xdim, int ydim,
+ int zdim)
{
StringBuffer csv = new StringBuffer();
csv.append("\"Sequence\"");
public void setJvCalcMode(boolean state)
{
- jvCalcMode=state;
+ jvCalcMode = state;
}
}
/*
* (non-Javadoc)
- *
+ *
* @see jalview.api.AlignCalcManagerI#isPending(jalview.api.AlignCalcWorkerI)
*/
@Override
{
synchronized (inProgress)
{
-// System.err.println("Worker "+worker.getClass()+" marked as complete.");
+ // System.err.println("Worker "+worker.getClass()+" marked as complete.");
inProgress.remove(worker.getClass());
List<AlignCalcWorkerI> upd = updating.get(worker.getClass());
if (upd != null)
@Override
public void startWorker(AlignCalcWorkerI worker)
{
-// System.err.println("Starting "+worker.getClass());
-// new Exception("").printStackTrace();
+ // System.err.println("Starting "+worker.getClass());
+ // new Exception("").printStackTrace();
Thread tw = new Thread(worker);
tw.setName(worker.getClass().toString());
tw.start();
{
List<AlignCalcWorkerI> workers = getRegisteredWorkersOfClass(typeToRemove);
List<AlignCalcWorkerI> removable = new ArrayList<AlignCalcWorkerI>();
- Set<AlignCalcWorkerI> toremovannot=new HashSet<AlignCalcWorkerI>();
+ Set<AlignCalcWorkerI> toremovannot = new HashSet<AlignCalcWorkerI>();
synchronized (restartable)
{
- for (AlignCalcWorkerI worker:restartable) {
- if (typeToRemove.equals(worker.getClass())) {
+ for (AlignCalcWorkerI worker : restartable)
+ {
+ if (typeToRemove.equals(worker.getClass()))
+ {
removable.add(worker);
toremovannot.add(worker);
}
}
synchronized (canUpdate)
{
- for (AlignCalcWorkerI worker:canUpdate) {
- if (typeToRemove.equals(worker.getClass())) {
+ for (AlignCalcWorkerI worker : canUpdate)
+ {
+ if (typeToRemove.equals(worker.getClass()))
+ {
removable.add(worker);
toremovannot.add(worker);
}
}
// TODO: finish testing this extension
-/* synchronized (inProgress)
- {
- // need to kill or mark as dead any running threads...
- (inProgress.get(typeToRemove));
- }
-
- if (workers == null)
- {
- return;
- }
- for (AlignCalcWorkerI worker : workers)
- {
-
- if (isPending(worker))
- {
- worker.abortAndDestroy();
- startWorker(worker);
- }
- else
- {
- System.err.println("Pending exists for " + workerClass);
- }
- }*/
+ /*
+ * synchronized (inProgress) { // need to kill or mark as dead any running
+ * threads... (inProgress.get(typeToRemove)); }
+ *
+ * if (workers == null) { return; } for (AlignCalcWorkerI worker : workers)
+ * {
+ *
+ * if (isPending(worker)) { worker.abortAndDestroy(); startWorker(worker); }
+ * else { System.err.println("Pending exists for " + workerClass); } }
+ */
}
}
import jalview.datamodel.AlignmentI;
/**
- * Base class for alignment calculation workers
+ * Base class for alignment calculation workers
+ *
* @author jimp
- *
+ *
*/
public abstract class AlignCalcWorker implements AlignCalcWorkerI
{
* manager and data source for calculations
*/
protected AlignViewportI alignViewport;
+
protected AlignCalcManagerI calcMan;
+
protected AlignmentViewPanel ap;
- protected List<AlignmentAnnotation> ourAnnots=null;
-
+
+ protected List<AlignmentAnnotation> ourAnnots = null;
+
public AlignCalcWorker(AlignViewportI alignViewport,
AlignmentViewPanel alignPanel)
{
this.alignViewport = alignViewport;
- calcMan=alignViewport.getCalcManager();
- ap = alignPanel;
+ calcMan = alignViewport.getCalcManager();
+ ap = alignPanel;
}
+
protected void abortAndDestroy()
{
- if (calcMan!=null) {
+ if (calcMan != null)
+ {
calcMan.workerComplete(this);
}
- alignViewport=null;
- calcMan=null;
- ap=null;
-
+ alignViewport = null;
+ calcMan = null;
+ ap = null;
+
}
+
public boolean involves(AlignmentAnnotation i)
{
- return ourAnnots!=null && ourAnnots.contains(i);
+ return ourAnnots != null && ourAnnots.contains(i);
}
/**
- * permanently remove from the alignment all annotation rows managed by this worker
+ * permanently remove from the alignment all annotation rows managed by this
+ * worker
*/
@Override
public void removeOurAnnotation()
{
- if (ourAnnots!=null && alignViewport!=null)
+ if (ourAnnots != null && alignViewport != null)
{
- AlignmentI alignment=alignViewport.getAlignment();
- synchronized (ourAnnots) {
- for (AlignmentAnnotation aa:ourAnnots)
+ AlignmentI alignment = alignViewport.getAlignment();
+ synchronized (ourAnnots)
+ {
+ for (AlignmentAnnotation aa : ourAnnots)
{
alignment.deleteAnnotation(aa, true);
}
}
}
}
- // TODO: allow GUI to query workers associated with annotation to add items to annotation label panel popup menu
+ // TODO: allow GUI to query workers associated with annotation to add items to
+ // annotation label panel popup menu
}
import java.util.Hashtable;
-public class ConsensusThread extends AlignCalcWorker implements AlignCalcWorkerI
+public class ConsensusThread extends AlignCalcWorker implements
+ AlignCalcWorkerI
{
public ConsensusThread(AlignViewportI alignViewport,
AlignmentViewPanel alignPanel)
return;
}
calcMan.notifyStart(this);
- long started=System.currentTimeMillis();
+ long started = System.currentTimeMillis();
try
{
- AlignmentAnnotation consensus = alignViewport.getAlignmentConsensusAnnotation();
- if (consensus==null || calcMan.isPending(this)) {
+ AlignmentAnnotation consensus = alignViewport
+ .getAlignmentConsensusAnnotation();
+ if (consensus == null || calcMan.isPending(this))
+ {
calcMan.workerComplete(this);
return;
}
{
if (ap != null)
{
- ap.paintAlignment(false);
+ ap.paintAlignment(false);
}
Thread.sleep(200);
} catch (Exception ex)
return;
}
- consensus = alignViewport
- .getAlignmentConsensusAnnotation();
+ consensus = alignViewport.getAlignmentConsensusAnnotation();
consensus.annotations = null;
consensus.annotations = new Annotation[aWidth];
Hashtable[] hconsensus = alignViewport.getSequenceConsensusHash();
hconsensus = new Hashtable[aWidth];
- try {
- AAFrequency.calculate(alignment.getSequencesArray(), 0,
- alignment.getWidth(), hconsensus, true);
- } catch (ArrayIndexOutOfBoundsException x){
+ try
+ {
+ AAFrequency.calculate(alignment.getSequencesArray(), 0,
+ alignment.getWidth(), hconsensus, true);
+ } catch (ArrayIndexOutOfBoundsException x)
+ {
// this happens due to a race condition -
// alignment was edited at same time as calculation was running
//
-// calcMan.workerCannotRun(this);
+ // calcMan.workerCannotRun(this);
calcMan.workerComplete(this);
return;
}
AlignmentAnnotation consensus = alignViewport
.getAlignmentConsensusAnnotation();
Hashtable[] hconsensus = alignViewport.getSequenceConsensusHash();
- if (immediate || !calcMan.isWorking(this) && consensus!=null && hconsensus!=null)
+ if (immediate || !calcMan.isWorking(this) && consensus != null
+ && hconsensus != null)
{
AAFrequency.completeConsensus(consensus, hconsensus, 0,
- hconsensus.length, alignViewport.getIgnoreGapsConsensus(),
- alignViewport.isShowSequenceLogo());
+ hconsensus.length, alignViewport.getIgnoreGapsConsensus(),
+ alignViewport.isShowSequenceLogo());
}
}
}
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
-public class ConservationThread extends AlignCalcWorker implements AlignCalcWorkerI
+public class ConservationThread extends AlignCalcWorker implements
+ AlignCalcWorkerI
{
- private int ConsPercGaps = 25; // JBPNote : This should be a configurable property!
+ private int ConsPercGaps = 25; // JBPNote : This should be a configurable
+ // property!
- public ConservationThread(AlignViewportI alignViewport, AlignmentViewPanel alignPanel)
+ public ConservationThread(AlignViewportI alignViewport,
+ AlignmentViewPanel alignPanel)
{
super(alignViewport, alignPanel);
ConsPercGaps = alignViewport.getConsPercGaps();
}
private Conservation cons;
- AlignmentAnnotation conservation,quality;
+
+ AlignmentAnnotation conservation, quality;
+
int alWidth;
+
@Override
public void run()
{
ex.printStackTrace();
}
}
- if (alignViewport.isClosed()) {
+ if (alignViewport.isClosed())
+ {
abortAndDestroy();
}
- List<AlignmentAnnotation>ourAnnot = new ArrayList<AlignmentAnnotation>();
- AlignmentI alignment=alignViewport.getAlignment();
- conservation=alignViewport.getAlignmentConservationAnnotation();
- quality=alignViewport.getAlignmentQualityAnnot();
+ List<AlignmentAnnotation> ourAnnot = new ArrayList<AlignmentAnnotation>();
+ AlignmentI alignment = alignViewport.getAlignment();
+ conservation = alignViewport.getAlignmentConservationAnnotation();
+ quality = alignViewport.getAlignmentQualityAnnot();
ourAnnot.add(conservation);
ourAnnot.add(quality);
ourAnnots = ourAnnot;
// AlignViewport.UPDATING_CONSERVATION = true;
- if (alignment==null || (alWidth=alignment.getWidth())< 0)
+ if (alignment == null || (alWidth = alignment.getWidth()) < 0)
{
calcMan.workerComplete(this);
- //.updatingConservation = false;
- //AlignViewport.UPDATING_CONSERVATION = false;
+ // .updatingConservation = false;
+ // AlignViewport.UPDATING_CONSERVATION = false;
return;
}
- try {
- cons = Conservation.calculateConservation("All",
- jalview.schemes.ResidueProperties.propHash, 3,
- alignment.getSequences(), 0, alWidth - 1, false, ConsPercGaps, quality!=null);
+ try
+ {
+ cons = Conservation.calculateConservation("All",
+ jalview.schemes.ResidueProperties.propHash, 3,
+ alignment.getSequences(), 0, alWidth - 1, false,
+ ConsPercGaps, quality != null);
} catch (IndexOutOfBoundsException x)
{
// probable race condition. just finish and return without any fuss.
private void updateResultAnnotation(boolean b)
{
- if (b || !calcMan.isWorking(this) && cons!=null && conservation!=null && quality!=null)
- cons.completeAnnotations(conservation,
- quality, 0, alWidth);
+ if (b || !calcMan.isWorking(this) && cons != null
+ && conservation != null && quality != null)
+ cons.completeAnnotations(conservation, quality, 0, alWidth);
}
+
@Override
public void updateAnnotation()
{
return;
}
- try {
- jalview.analysis.StructureFrequency.calculate(
- alignment.getSequencesArray(), 0, alignment.getWidth(),
- hStrucConsensus, true, rnaStruc);
+ try
+ {
+ jalview.analysis.StructureFrequency.calculate(
+ alignment.getSequencesArray(), 0, alignment.getWidth(),
+ hStrucConsensus, true, rnaStruc);
} catch (ArrayIndexOutOfBoundsException x)
{
calcMan.workerComplete(this);
/**
* Extracts additional info from alignment view's context.
+ *
* @param alframe
* - reference for copying mappings and display styles across
* @param wsinfo2
* @param sources\r
* array of database source strings to query references from\r
*/\r
- public DBRefFetcher(SequenceI[] seqs, AlignFrame af, DbSourceProxy[] sources)\r
+ public DBRefFetcher(SequenceI[] seqs, AlignFrame af,\r
+ DbSourceProxy[] sources)\r
{\r
this.af = af;\r
alseqs = new SequenceI[seqs.length];\r
while (en.hasMoreElements())\r
{\r
jalviewSourceI src = en.nextElement();\r
- List<DbSourceProxy> sp=src.getSequenceSourceProxies();\r
+ List<DbSourceProxy> sp = src.getSequenceSourceProxies();\r
selsources.addAll(sp);\r
- if (sp.size()>1)\r
+ if (sp.size() > 1)\r
{\r
- Cache.log.debug("Added many Db Sources for :"+src.getTitle());\r
+ Cache.log.debug("Added many Db Sources for :" + src.getTitle());\r
}\r
}\r
// select appropriate databases based on alignFrame context.\r
{\r
defdb = DBRefSource.PROTEINDBS;\r
}\r
- List<DbSourceProxy> srces=new ArrayList<DbSourceProxy>();\r
- for (String ddb:defdb) {\r
- List<DbSourceProxy> srcesfordb=sfetcher.getSourceProxy(ddb);\r
- if (srcesfordb!=null) {\r
+ List<DbSourceProxy> srces = new ArrayList<DbSourceProxy>();\r
+ for (String ddb : defdb)\r
+ {\r
+ List<DbSourceProxy> srcesfordb = sfetcher.getSourceProxy(ddb);\r
+ if (srcesfordb != null)\r
+ {\r
srces.addAll(srcesfordb);\r
}\r
}\r
- \r
+\r
// append the selected sequence sources to the default dbs\r
srces.addAll(selsources);\r
dbSources = srces.toArray(new DbSourceProxy[0]);\r
dbSources = new DbSourceProxy[0];\r
}\r
// append additional sources\r
- DbSourceProxy[] otherdb=sfetcher\r
+ DbSourceProxy[] otherdb = sfetcher\r
.getDbSourceProxyInstances(jalview.ws.dbsources.das.datamodel.DasSequenceSource.class);\r
if (otherdb != null && otherdb.length > 0)\r
{\r
- DbSourceProxy[] newsrc = new DbSourceProxy[dbSources.length + otherdb.length];\r
+ DbSourceProxy[] newsrc = new DbSourceProxy[dbSources.length\r
+ + otherdb.length];\r
System.arraycopy(dbSources, 0, newsrc, 0, dbSources.length);\r
System.arraycopy(otherdb, 0, newsrc, dbSources.length, otherdb.length);\r
dbSources = newsrc;\r
\r
jalview.ws.seqfetcher.DbSourceProxy dbsource = dbSources[db];\r
{\r
- // for moment, we dumbly iterate over all retrieval sources for a particular database\r
- // TODO: introduce multithread multisource queries and logic to remove a query from other sources if any source for a database returns a record\r
+ // for moment, we dumbly iterate over all retrieval sources for a\r
+ // particular database\r
+ // TODO: introduce multithread multisource queries and logic to remove a\r
+ // query from other sources if any source for a database returns a\r
+ // record\r
if (dbsource.getDbSourceProperties().containsKey(\r
DBRefSource.MULTIACC))\r
{\r
}\r
if (retrieved != null)\r
{\r
- transferReferences(sdataset, dbsource.getDbSource(), retrieved);\r
+ transferReferences(sdataset, dbsource.getDbSource(),\r
+ retrieved);\r
}\r
}\r
else\r
long startTime;\r
\r
private DasSourceRegistryI sourceRegistry;\r
- private boolean useJDASMultiThread=true;\r
+\r
+ private boolean useJDASMultiThread = true;\r
+\r
/**\r
* Creates a new SequenceFeatureFetcher object. Uses default\r
* \r
FeatureSettings fsettings, List<jalviewSourceI> selectedSources2,\r
boolean checkDbrefs, boolean promptFetchDbrefs)\r
{\r
- this(oursequences,fsettings,selectedSources2,checkDbrefs,promptFetchDbrefs,true);\r
+ this(oursequences, fsettings, selectedSources2, checkDbrefs,\r
+ promptFetchDbrefs, true);\r
}\r
+\r
public DasSequenceFeatureFetcher(SequenceI[] oursequences,\r
FeatureSettings fsettings, List<jalviewSourceI> selectedSources2,\r
- boolean checkDbrefs, boolean promptFetchDbrefs, boolean useJDasMultiThread)\r
+ boolean checkDbrefs, boolean promptFetchDbrefs,\r
+ boolean useJDasMultiThread)\r
{\r
- this.useJDASMultiThread=useJDasMultiThread;\r
+ this.useJDASMultiThread = useJDasMultiThread;\r
this.selectedSources = new ArrayList<jalviewSourceI>();\r
// filter both sequences and sources to eliminate duplicates\r
for (jalviewSourceI src : selectedSources2)\r
}\r
\r
}\r
+\r
private void _startFetching()\r
{\r
- running=true;\r
+ running = true;\r
new Thread(new FetchSeqFeatures()).start();\r
}\r
+\r
class FetchSeqFeatures implements Runnable\r
{\r
public void run()\r
setGuiFetchComplete();\r
}\r
}\r
+\r
class FetchDBRefs implements Runnable\r
{\r
public void run()\r
{\r
- running=true;\r
+ running = true;\r
new DBRefFetcher(sequences, af).fetchDBRefs(true);\r
startFetching();\r
setGuiFetchComplete();\r
*/\r
void startFetching()\r
{\r
- running=true;\r
+ running = true;\r
cancelled = false;\r
startTime = System.currentTimeMillis();\r
if (af != null)\r
Map<String, Map<List<String>, DasGFFAdapter>> results = new HashMap<String, Map<List<String>, DasGFFAdapter>>();\r
if (!useJDASMultiThread)\r
{\r
- Iterator<String> sources=src.iterator();\r
+ Iterator<String> sources = src.iterator();\r
// iterate over each query for each source and do each one individually\r
- for (List<String> idl:ids)\r
+ for (List<String> idl : ids)\r
{\r
- String source=sources.next();\r
- FeaturesClient featuresc=new FeaturesClient(sourceRegistry.getSessionHandler().getConnectionPropertyProviderFor(source));\r
- for (String id:idl)\r
+ String source = sources.next();\r
+ FeaturesClient featuresc = new FeaturesClient(sourceRegistry\r
+ .getSessionHandler().getConnectionPropertyProviderFor(\r
+ source));\r
+ for (String id : idl)\r
{\r
- List<String> qid=Arrays.asList(new String[] { id});\r
- try {\r
- DasGFFAdapter dga=featuresc.fetchData(source, qid);\r
- Map<List<String>,DasGFFAdapter> ers=results.get(source);\r
- if (ers==null)\r
+ List<String> qid = Arrays.asList(new String[]\r
+ { id });\r
+ try\r
+ {\r
+ DasGFFAdapter dga = featuresc.fetchData(source, qid);\r
+ Map<List<String>, DasGFFAdapter> ers = results.get(source);\r
+ if (ers == null)\r
{\r
- results.put(source, ers=new HashMap<List<String>,DasGFFAdapter>());\r
+ results.put(source,\r
+ ers = new HashMap<List<String>, DasGFFAdapter>());\r
}\r
ers.put(qid, dga);\r
} catch (Exception ex)\r
{\r
- Map<List<String>,Exception> ers=errors.get(source);\r
- if (ers==null)\r
+ Map<List<String>, Exception> ers = errors.get(source);\r
+ if (ers == null)\r
{\r
- errors.put(source, ers=new HashMap<List<String>,Exception>());\r
+ errors.put(source,\r
+ ers = new HashMap<List<String>, Exception>());\r
}\r
ers.put(qid, ex);\r
}\r
}\r
}\r
- } else {\r
- // pass them all at once\r
- fc.fetchData(src, ids, false, results, errors);\r
- fc.shutDown();\r
- while (!fc.isTerminated())\r
+ }\r
+ else\r
{\r
- try\r
- {\r
- Thread.sleep(200);\r
- } catch (InterruptedException x)\r
+ // pass them all at once\r
+ fc.fetchData(src, ids, false, results, errors);\r
+ fc.shutDown();\r
+ while (!fc.isTerminated())\r
{\r
+ try\r
+ {\r
+ Thread.sleep(200);\r
+ } catch (InterruptedException x)\r
+ {\r
\r
+ }\r
}\r
}\r
- }\r
Iterator<List<String>> idset = ids.iterator();\r
Iterator<List<DBRefEntry>> idobjset = idobj.iterator();\r
Iterator<Map<String, SequenceI>> seqset = sqset.iterator();\r
for (SEGMENT seg : segments)\r
{\r
String id = seg.getId();\r
- if (ids.indexOf(id)==-1)\r
+ if (ids.indexOf(id) == -1)\r
{\r
- id=id.toUpperCase();\r
+ id = id.toUpperCase();\r
}\r
DBRefEntry dbref = idobj.get(ids.indexOf(id));\r
SequenceI sequence = sequencemap.get(id);\r
for (FEATURE feat : seg.getFEATURE())\r
{\r
// standard DAS feature-> jalview sequence feature transformation\r
- SequenceFeature f = newSequenceFeature(feat, jvsource.getTitle());\r
+ SequenceFeature f = newSequenceFeature(feat,\r
+ jvsource.getTitle());\r
if (!parseSeqFeature(sequence, f, feat, jvsource))\r
{\r
if (dbref.getMap() != null && f.getBegin() > 0\r
}\r
\r
int sourcesRemaining = 0;\r
- private boolean running=false;\r
+\r
+ private boolean running = false;\r
+\r
private void setGuiFetchComplete()\r
{\r
- running=false;\r
+ running = false;\r
if (!cancelled && af != null)\r
{\r
// only update the progress bar if we've completed the fetch normally\r
System.err.println("Adding entry for " + wfname + " " + description);
if (wfname.toLowerCase().indexOf("funcnet") == -1)
{
- description = Pattern.compile("\\s+",Pattern.MULTILINE).matcher(description).replaceAll(" ");
+ description = Pattern.compile("\\s+", Pattern.MULTILINE)
+ .matcher(description).replaceAll(" ");
groupURLdescr.addElement(description);
groupURLdescr.addElement(description);
- String urlstub=wfname;
- if (wfname.indexOf(" ")>-1)
+ String urlstub = wfname;
+ if (wfname.indexOf(" ") > -1)
{
- // make the name safe!
- try {
- urlstub = URLEncoder.encode(wfname,"utf-8");
- } catch (UnsupportedEncodingException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ // make the name safe!
+ try
+ {
+ urlstub = URLEncoder.encode(wfname, "utf-8");
+ } catch (UnsupportedEncodingException e)
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
}
groupURLLinks
.addElement(wfname
return;
}
}
- try {
+ try
+ {
descr = HtmlEncoder.encode(descr);
- } catch (Exception e){};
-
+ } catch (Exception e)
+ {
+ }
+ ;
+
boolean seqsorids = (urlgenerator.getGroupURLType() & urlgenerator.SEQUENCEIDS) == 0;
int i = urlgenerator.getNumberInvolved(urlstub);
JMenuItem item = new JMenuItem(label);
wsInfo.setStatus(j.jobnum, WebserviceInfo.STATE_STOPPED_ERROR);
}
// and pass on any sub-job messages to the user
- StringBuffer output=new StringBuffer();
- if (OutputHeader!=null) {
-
+ StringBuffer output = new StringBuffer();
+ if (OutputHeader != null)
+ {
+
output.append(OutputHeader);
}
- if (progheader!=null)
+ if (progheader != null)
{
output.append(progheader);
}
// probably won't be
// enough memory to handle the results later on anyway.
// try {
- String stat = j.getStatus();
- if (stat!=null) {
+ String stat = j.getStatus();
+ if (stat != null)
+ {
output.append(stat);
}
// } catch (OutOfMemoryError e)
// "..\n(Out of memory when displaying status)\n");
// }
}
- wsInfo.setProgressText(j.jobnum,output.toString());
+ wsInfo.setProgressText(j.jobnum, output.toString());
}
else
{
ArrayList<String> dassrc = new ArrayList<String>(), nondas = new ArrayList<String>();\r
for (int i = 0; i < srcs.length; i++)\r
{\r
- boolean das = false,skip=false;\r
+ boolean das = false, skip = false;\r
String nm;\r
for (DbSourceProxy dbs : getSourceProxy(srcs[i]))\r
{\r
- // Skip the alignment databases for the moment - they're not useful for verifying a single sequence against its reference source\r
+ // Skip the alignment databases for the moment - they're not useful for\r
+ // verifying a single sequence against its reference source\r
if (dbs.isA(DBRefSource.ALIGNMENTDB))\r
{\r
- skip=true;\r
- } else {\r
+ skip = true;\r
+ }\r
+ else\r
+ {\r
nm = dbs.getDbName();\r
if (getSourceProxy(srcs[i]) instanceof jalview.ws.dbsources.das.datamodel.DasSequenceSource)\r
{\r
{
/**
* Called by the AlignFrame web service menu constructor to enable a service
- * instance to add menu entries. Usually, any actionperformed methods associated with menu items will create new instances of GUI classes to handle the action in a thread-safe manner.
+ * instance to add menu entries. Usually, any actionperformed methods
+ * associated with menu items will create new instances of GUI classes to
+ * handle the action in a thread-safe manner.
*
* @param wsmenu
* the menu to which any menu entries/sub menus are to be attached
* @author JimP\r
* \r
*/\r
-abstract public class Pfam extends Xfam implements\r
- DbSourceProxy\r
+abstract public class Pfam extends Xfam implements DbSourceProxy\r
{\r
\r
public Pfam()\r
* @see jalview.ws.DbSourceProxy#getDbVersion()\r
*/\r
@Override\r
-public String getDbVersion()\r
+ public String getDbVersion()\r
{\r
// TODO Auto-generated method stub\r
return null;\r
}\r
\r
- /**Returns base URL for selected Pfam alignment type\r
+ /**\r
+ * Returns base URL for selected Pfam alignment type\r
* \r
* @return PFAM URL stub for this DbSource\r
*/\r
@Override\r
-protected abstract String getXFAMURL();\r
+ protected abstract String getXFAMURL();\r
\r
/*\r
* (non-Javadoc)\r
/*\r
* public String getDbName() { return "PFAM"; // getDbSource(); }\r
*/\r
- \r
- \r
- public String getXfamSource() { return jalview.datamodel.DBRefSource.PFAM; }\r
- \r
- \r
+\r
+ public String getXfamSource()\r
+ {\r
+ return jalview.datamodel.DBRefSource.PFAM;\r
+ }\r
+\r
}\r
return "PF03760";\r
}\r
\r
-public String getDbVersion() {\r
- return null;\r
-}\r
+ public String getDbVersion()\r
+ {\r
+ return null;\r
+ }\r
\r
}\r
return null;
}
- /**Returns base URL for selected Rfam alignment type
+ /**
+ * Returns base URL for selected Rfam alignment type
*
* @return RFAM URL stub for this DbSource
*/
return accession.indexOf("RF") == 0;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see jalview.ws.dbsources.Xfam#getXfamSource()
*/
public String getXfamSource()
/**
* API for a registry that provides datasources that jalview can access
+ *
* @author jprocter
- *
+ *
*/
public interface DasSourceRegistryI
{
jalviewSourceI getSource(String nickname);
- //TODO: re JAL-424 - introduce form where local source is queried for metadata, rather than have it all provided by caller.
- jalviewSourceI createLocalSource(String uri, String name, boolean sequence,
- boolean features);
+ // TODO: re JAL-424 - introduce form where local source is queried for
+ // metadata, rather than have it all provided by caller.
+ jalviewSourceI createLocalSource(String uri, String name,
+ boolean sequence, boolean features);
+
boolean removeLocalSource(jalviewSourceI source);
void refreshSources();
String getLocalSourceString();
List<jalviewSourceI> resolveSourceNicknames(List<String> sources);
+
// TODO: refactor to jDAS specific interface
MultipleConnectionPropertyProviderI getSessionHandler();
}
/**
*
- * @return null if not a sequence source, otherwise a series of database sources that can be used to retrieve sequence data for particular database coordinate systems
+ * @return null if not a sequence source, otherwise a series of database
+ * sources that can be used to retrieve sequence data for particular
+ * database coordinate systems
*/
List<DbSourceProxy> getSequenceSourceProxies();
/**
* returns the base URL for the latest version of a source's DAS endpoint set
+ *
* @return
*/
String getSourceURL();
/**
- * test to see if this source's latest version is older than the given source
+ * test to see if this source's latest version is older than the given source
+ *
* @param jalviewSourceI
* @return true if newer than given source
*/
protected String dbname = "DASCS";\r
\r
protected String dbrefname = "das:source";\r
- protected MultipleConnectionPropertyProviderI connprops=null;\r
+\r
+ protected MultipleConnectionPropertyProviderI connprops = null;\r
+\r
/**\r
* create a new DbSource proxy for a DAS 1 source\r
* \r
* if source is not capable of the 'sequence' command\r
*/\r
public DasSequenceSource(String dbname, String dbrefname, SOURCE source,\r
- VERSION version, COORDINATES coordsys, MultipleConnectionPropertyProviderI connprops) throws Exception\r
+ VERSION version, COORDINATES coordsys,\r
+ MultipleConnectionPropertyProviderI connprops) throws Exception\r
{\r
- if (!(jsrc = new JalviewSource(source, connprops, false)).isSequenceSource())\r
+ if (!(jsrc = new JalviewSource(source, connprops, false))\r
+ .isSequenceSource())\r
{\r
throw new Exception("Source " + source.getTitle()\r
+ " does not support the sequence command.");\r
this.source = source;\r
this.dbname = dbname;\r
this.dbrefname = dbrefname.toUpperCase();\r
- if (coordsys!=null ) {\r
+ if (coordsys != null)\r
+ {\r
this.coordsys = coordsys;\r
}\r
- this.connprops=connprops;\r
+ this.connprops = connprops;\r
}\r
\r
public String getAccessionSeparator()\r
\r
public String getDbVersion()\r
{\r
- return coordsys!=null ? coordsys.getVersion() : "";\r
+ return coordsys != null ? coordsys.getVersion() : "";\r
}\r
\r
public AlignmentI getSequenceRecords(String queries) throws Exception\r
src.add(jsrc.getSourceURL());\r
Map<String, Map<List<String>, DasSequenceAdapter>> resultset = new HashMap<String, Map<List<String>, DasSequenceAdapter>>();\r
Map<String, Map<List<String>, Exception>> errors = new HashMap<String, Map<List<String>, Exception>>();\r
- \r
+\r
// First try multiple sources\r
boolean multiple = true, retry = false;\r
do\r
System.err\r
.println("Retrieving IDs individually from das source: "\r
+ sr);\r
- org.biodas.jdas.client.SequenceClient sq = new SequenceClient(connprops.getConnectionPropertyProviderFor(sr));\r
+ org.biodas.jdas.client.SequenceClient sq = new SequenceClient(\r
+ connprops.getConnectionPropertyProviderFor(sr));\r
for (String q : toks)\r
{\r
List<String> qset = Arrays.asList(new String[]\r
srcs.addElement(jsrc);\r
try\r
{\r
- jalview.ws.DasSequenceFeatureFetcher dssf=new jalview.ws.DasSequenceFeatureFetcher(sqs, null, srcs, false,\r
- false, multiple);\r
+ jalview.ws.DasSequenceFeatureFetcher dssf = new jalview.ws.DasSequenceFeatureFetcher(\r
+ sqs, null, srcs, false, false, multiple);\r
while (dssf.isRunning())\r
{\r
- try {\r
+ try\r
+ {\r
Thread.sleep(200);\r
} catch (InterruptedException x)\r
{\r
- \r
+\r
}\r
}\r
- \r
+\r
} catch (Exception x)\r
{\r
Cache.log\r
\r
public String getTestQuery()\r
{\r
- return coordsys==null ? "" : coordsys.getTestRange();\r
+ return coordsys == null ? "" : coordsys.getTestRange();\r
}\r
\r
public boolean isValidReference(String accession)\r
if (registry.lastIndexOf("sources.xml") == registry.length() - 11)
{
// no trailing sources.xml document for registry in JDAS
- jalview.bin.Cache.setProperty(jalview.bin.Cache.DAS_REGISTRY_URL,
- registry=registry.substring(0, registry.lastIndexOf("sources.xml")));
+ jalview.bin.Cache.setProperty(
+ jalview.bin.Cache.DAS_REGISTRY_URL,
+ registry = registry.substring(0,
+ registry.lastIndexOf("sources.xml")));
}
return registry;
}
public class JalviewSource implements jalviewSourceI
{
SOURCE source;
+
MultipleConnectionPropertyProviderI connprov;
- public JalviewSource(SOURCE local2, MultipleConnectionPropertyProviderI connprov, boolean local)
+
+ public JalviewSource(SOURCE local2,
+ MultipleConnectionPropertyProviderI connprov, boolean local)
{
- this.connprov=connprov;
+ this.connprov = connprov;
this.local = local;
source = local2;
}
{
try
{
- // kind of dumb, since org.biodas.jdas.dassources.utils.VersionAdapter.getSourceUriFromQueryUri() does this,
- // but this way, we can access non DAS 1.6 compliant sources (which have to have a URL like <sourcename>/das/ and cause a validation exception)
-
+ // kind of dumb, since
+ // org.biodas.jdas.dassources.utils.VersionAdapter.getSourceUriFromQueryUri()
+ // does this,
+ // but this way, we can access non DAS 1.6 compliant sources (which have
+ // to have a URL like <sourcename>/das/ and cause a validation exception)
+
for (CAPABILITY cap : getVersion().getCAPABILITY())
{
String capname = cap.getType().substring(
cap.getType().indexOf(":") + 1);
- int p=cap.getQueryUri().lastIndexOf(capname);
- if (p<-1) {
- throw new Exception("Invalid das source: "+source.getUri());
- }
- if (cap.getQueryUri().charAt(p)=='/')
+ int p = cap.getQueryUri().lastIndexOf(capname);
+ if (p < -1)
+ {
+ throw new Exception("Invalid das source: " + source.getUri());
+ }
+ if (cap.getQueryUri().charAt(p) == '/')
{
p--;
}
- return cap.getQueryUri().substring(0,p);
+ return cap.getQueryUri().substring(0, p);
}
} catch (Exception x)
{
@Override
public ContentHandler createContentHandler(String mimetype)
{
-
+
// TODO Auto-generated method stub
return null;
}
import org.apache.james.mime4j.parser.Field;
/**
- * ContentHandler for parsing mime encoded messages into Jalview objects.
- * TODO: complete implementation
- * TODO: test implementation
- * TODO: hook in to Jalview IO and service response parser.
+ * ContentHandler for parsing mime encoded messages into Jalview objects. TODO:
+ * complete implementation TODO: test implementation TODO: hook in to Jalview IO
+ * and service response parser.
+ *
* @author JimP
- *
+ *
*/
public class JalviewMimeContentHandler implements ContentHandler
{
/**
* create a new handler to process a Jalview mime message.
+ *
* @param ds
*/
public JalviewMimeContentHandler(JalviewDataset ds)
{
- context=ds;
+ context = ds;
}
+
/**
* type of data pack being parsed currently
*/
String currentType;
+
/**
* name of data pack being parsed currently
*/
String currentName;
-
+
/**
- * sources for data to be parsed
+ * sources for data to be parsed
*/
- List<DataProvider> dataItems = new ArrayList<DataProvider>();
-
+ List<DataProvider> dataItems = new ArrayList<DataProvider>();
+
@Override
public void body(BodyDescriptor arg0, InputStream arg1)
throws MimeException, IOException
{
-
+
// TODO Auto-generated method stub
-
+
}
@Override
public void endBodyPart() throws MimeException
{
// TODO Auto-generated method stub
-
+
}
@Override
public void endHeader() throws MimeException
{
// TODO Auto-generated method stub
-
+
}
@Override
public void endMessage() throws MimeException
{
// TODO Auto-generated method stub
-
+
}
@Override
public void endMultipart() throws MimeException
{
// TODO Auto-generated method stub
-
+
}
@Override
public void epilogue(InputStream arg0) throws MimeException, IOException
{
// TODO Auto-generated method stub
-
+
}
@Override
public void field(Field arg0) throws MimeException
{
// TODO Auto-generated method stub
-
+
}
@Override
public void preamble(InputStream arg0) throws MimeException, IOException
{
// TODO Auto-generated method stub
-
+
}
@Override
public void raw(InputStream arg0) throws MimeException, IOException
{
// TODO Auto-generated method stub
-
+
}
@Override
public void startBodyPart() throws MimeException
{
// TODO Auto-generated method stub
-
+
}
@Override
public void startHeader() throws MimeException
{
// TODO Auto-generated method stub
-
+
}
@Override
public void startMessage() throws MimeException
{
// TODO Auto-generated method stub
-
+
}
@Override
public void startMultipart(BodyDescriptor arg0) throws MimeException
{
// TODO Auto-generated method stub
-
+
}
/**
*
- * @return data providers to parse each data file extracted from the mime stream.
+ * @return data providers to parse each data file extracted from the mime
+ * stream.
*/
public Iterable<DataProvider> getJalviewDataProviders()
{
import jalview.io.packed.DataProvider.JvDataType;
/**
- * static functions for resolving Jalview datatypes from mime types
- * @author JimP
- * TODO: consider making get(Mime)TypeOf functions throw exceptions rather than returning null
+ * static functions for resolving Jalview datatypes from mime types
+ *
+ * @author JimP TODO: consider making get(Mime)TypeOf functions throw exceptions
+ * rather than returning null
*/
public class MimeTypes
{
/**
- * pair list {String,JvDataType} giving a mime-type followed by its associated JvDataType enumeration.
+ * pair list {String,JvDataType} giving a mime-type followed by its associated
+ * JvDataType enumeration.
*/
- final public static Object[] typemap = new Object[] {
- "application/x-align",JvDataType.ALIGNMENT,
- "application/x-jalview-annotation",JvDataType.ANNOTATION,
- "application/x-newick",JvDataType.TREE,
- "application/x-new-hampshire",JvDataType.TREE,
- "application/x-new-hampshire-extended",JvDataType.TREE,
- "application/x-nh",JvDataType.TREE,
- "application/x-nhx",JvDataType.TREE,
- "application/x-gff",JvDataType.FEATURES,
- "application/x-gff3",JvDataType.FEATURES,
- "application/x-jalview-feature-file",JvDataType.FEATURES,
- "application/x-pdb",JvDataType.SEQASSOCATED};
+ final public static Object[] typemap = new Object[]
+ { "application/x-align", JvDataType.ALIGNMENT,
+ "application/x-jalview-annotation", JvDataType.ANNOTATION,
+ "application/x-newick", JvDataType.TREE,
+ "application/x-new-hampshire", JvDataType.TREE,
+ "application/x-new-hampshire-extended", JvDataType.TREE,
+ "application/x-nh", JvDataType.TREE, "application/x-nhx",
+ JvDataType.TREE, "application/x-gff", JvDataType.FEATURES,
+ "application/x-gff3", JvDataType.FEATURES,
+ "application/x-jalview-feature-file", JvDataType.FEATURES,
+ "application/x-pdb", JvDataType.SEQASSOCATED };
+
/**
*
* @param mimeType
public static JvDataType getTypeOf(String mimeType)
{
String mt = mimeType.toLowerCase();
- for (int i=0;i<typemap.length;i+=2)
+ for (int i = 0; i < typemap.length; i += 2)
{
if (typemap[i].equals(mt))
{
- return (JvDataType) typemap[i+1];
+ return (JvDataType) typemap[i + 1];
}
}
return null;
}
-
+
/**
*
* @param type
*/
public static String getMimeTypeOf(JvDataType type)
{
- for (int i=1;i<typemap.length;i+=2)
+ for (int i = 1; i < typemap.length; i += 2)
{
if (typemap[i].equals(type))
{
- return (String) typemap[i-1];
+ return (String) typemap[i - 1];
}
}
return null;
{
// Adjust input view for gaps
// propagate insertions into profile
- alcsel = ColumnSelection.propagateInsertions(profileseq, al, input);
+ alcsel = ColumnSelection.propagateInsertions(profileseq, al,
+ input);
}
}
}
}
}
-
public JPredJob(Hashtable SequenceInfo, SequenceI seq, int[] delMap)
{
super();
sequence = new vamsas.objects.simple.Sequence();
sequence.setId(seq.getName());
sequence.setSeq(sq);
- } else {
+ }
+ else
+ {
errorMessage = "Sequence is too short to predict with JPred - need at least 20 amino acids.";
}
}
}
}
}
- String errorMessage="";
+
+ String errorMessage = "";
+
public String getValidationMessages()
{
- return errorMessage+"\n";
+ return errorMessage + "\n";
}
}
jobs = new WSJob[]
{ job };
job.setJobnum(0);
- } else {
+ }
+ else
+ {
wsInfo.appendProgressText(job.getValidationMessages());
}
}
{ job };
OutputHeader = wsInfo.getProgressText();
job.setJobnum(0);
- } else {
+ }
+ else
+ {
wsInfo.appendProgressText(job.getValidationMessages());
}
}
private static Map<String, Map<String, Map<String, Object>>> annotMap;
private static String DONTCOMBINE = "DONTCOMBINE";
+
private static String INVISIBLE = "INVISIBLE";
static
{
- // TODO: turn this into some kind of configuration file that's a bit easier to edit
+ // TODO: turn this into some kind of configuration file that's a bit easier
+ // to edit
featureMap = new HashMap<String, Map<String, String[]>>();
Map<String, String[]> fmap;
featureMap.put(compbio.ws.client.Services.IUPredWS.toString(),
amap = new HashMap<String, Map<String, Object>>());
amap.put("Dydx", new HashMap<String, Object>());
amap.get("Dydx").put(DONTCOMBINE, DONTCOMBINE);
- amap.get("Dydx").put(THRESHOLD, new double[] {1, 0});
+ amap.get("Dydx").put(THRESHOLD, new double[]
+ { 1, 0 });
amap.put("SmoothedScore", new HashMap<String, Object>());
- amap.get("SmoothedScore").put(INVISIBLE,INVISIBLE);
+ amap.get("SmoothedScore").put(INVISIBLE, INVISIBLE);
amap.put("RawScore", new HashMap<String, Object>());
- amap.get("RawScore").put(INVISIBLE,INVISIBLE);
+ amap.get("RawScore").put(INVISIBLE, INVISIBLE);
annotMap.put(compbio.ws.client.Services.DisemblWS.toString(),
amap = new HashMap<String, Map<String, Object>>());
amap.put("COILS", new HashMap<String, Object>());
amap.put("HOTLOOPS", new HashMap<String, Object>());
amap.put("REM465", new HashMap<String, Object>());
- amap.get("COILS").put(THRESHOLD, new double[] { 1, 0.516});
- amap.get("HOTLOOPS").put(THRESHOLD, new double[] { 1, 0.6});
- amap.get("REM465").put(THRESHOLD, new double[] { 1, 0.1204});
-
+ amap.get("COILS").put(THRESHOLD, new double[]
+ { 1, 0.516 });
+ amap.get("HOTLOOPS").put(THRESHOLD, new double[]
+ { 1, 0.6 });
+ amap.get("REM465").put(THRESHOLD, new double[]
+ { 1, 0.1204 });
+
annotMap.put(compbio.ws.client.Services.IUPredWS.toString(),
amap = new HashMap<String, Map<String, Object>>());
amap.put("Long", new HashMap<String, Object>());
amap.put("Short", new HashMap<String, Object>());
- amap.get("Long").put(THRESHOLD, new double[] { 1, 0.5});
- amap.get("Short").put(THRESHOLD, new double[] { 1, 0.5});
+ amap.get("Long").put(THRESHOLD, new double[]
+ { 1, 0.5 });
+ amap.get("Short").put(THRESHOLD, new double[]
+ { 1, 0.5 });
annotMap.put(compbio.ws.client.Services.JronnWS.toString(),
amap = new HashMap<String, Map<String, Object>>());
amap.put("JRonn", new HashMap<String, Object>());
- amap.get("JRonn").put(THRESHOLD, new double[] { 1, 0.5});
+ amap.get("JRonn").put(THRESHOLD, new double[]
+ { 1, 0.5 });
}
@Override
}
else
{
- if (scr.getScores().size()==0)
+ if (scr.getScores().size() == 0)
{
continue;
}
AlignmentAnnotation annot = createAnnotationRowsForScores(
ourAnnot, service.serviceType + " (" + scr.getMethod()
- + ")", service.getServiceTypeURI()+"/"+ scr.getMethod(), aseq,
- base+1, scr);
+ + ")",
+ service.getServiceTypeURI() + "/" + scr.getMethod(),
+ aseq, base + 1, scr);
annot.graph = AlignmentAnnotation.LINE_GRAPH;
- annot.visible = (annotTypeMap==null || annotTypeMap.get(scr.getMethod())==null || annotTypeMap.get(scr.getMethod()).get(INVISIBLE) == null);
- double[] thrsh=(annotTypeMap==null || annotTypeMap.get(scr.getMethod())==null) ? null : (double[]) annotTypeMap.get(scr.getMethod()).get(THRESHOLD);
- if (annotTypeMap==null || annotTypeMap.get(scr.getMethod())==null || annotTypeMap.get(scr.getMethod()).get(DONTCOMBINE) == null)
+ annot.visible = (annotTypeMap == null
+ || annotTypeMap.get(scr.getMethod()) == null || annotTypeMap
+ .get(scr.getMethod()).get(INVISIBLE) == null);
+ double[] thrsh = (annotTypeMap == null || annotTypeMap.get(scr
+ .getMethod()) == null) ? null : (double[]) annotTypeMap
+ .get(scr.getMethod()).get(THRESHOLD);
+ if (annotTypeMap == null
+ || annotTypeMap.get(scr.getMethod()) == null
+ || annotTypeMap.get(scr.getMethod()).get(DONTCOMBINE) == null)
{
{
if (!sameGroup)
annot.graphGroup = graphGroup;
}
}
-
- annot.description = "<html>"+service.getActionText() + " - raw scores";
- if (thrsh!=null)
+
+ annot.description = "<html>" + service.getActionText()
+ + " - raw scores";
+ if (thrsh != null)
{
- String threshNote=(thrsh[0]>0 ? "Above " : "Below ")+thrsh[1]+" indicates disorder";
- annot.threshold=new GraphLine((float) thrsh[1], threshNote, Color.red);
- annot.description+="<br/>"+threshNote;
+ String threshNote = (thrsh[0] > 0 ? "Above " : "Below ")
+ + thrsh[1] + " indicates disorder";
+ annot.threshold = new GraphLine((float) thrsh[1], threshNote,
+ Color.red);
+ annot.description += "<br/>" + threshNote;
}
- annot.description+="</html>";
+ annot.description += "</html>";
Color col = new UserColourScheme(typeName)
.createColourFromName(typeName + scr.getMethod());
for (int p = 0, ps = annot.annotations.length; p < ps; p++)
annot.annotations[p].colour = col;
}
}
- annot._linecolour=col;
+ annot._linecolour = col;
}
}
if (lastAnnot + 1 == ourAnnot.size())
fr.setColour(ft, ggc);
}
}
- // TODO: JAL-1150 - create sequence feature settings API for defining styles and enabling/disabling feature overlay on alignment panel
+ // TODO: JAL-1150 - create sequence feature settings API for defining
+ // styles and enabling/disabling feature overlay on alignment panel
((jalview.gui.AlignmentPanel) ap).updateFeatureRendererFrom(fr);
- if (af.alignPanel==ap)
+ if (af.alignPanel == ap)
{
// only do this if the alignFrame is currently showing this view.
af.setShowSeqFeatures(true);
- }
+ }
ap.paintAlignment(true);
}
if (ourAnnot.size() > 0)
boolean found = false;
for (String url : urls)
{
- if (service.getServiceTypeURI().equals(url) || service.getUri().equalsIgnoreCase(url))
+ if (service.getServiceTypeURI().equals(url)
+ || service.getUri().equalsIgnoreCase(url))
{
found = true;
break;
this.jws2Discoverer = jws2Discoverer;
this.jwsservers = jwsservers;
}
- Services[] JABAWS1SERVERS=new Services[]
- { Services.ClustalWS, Services.MuscleWS, Services.MafftWS,
- Services.ProbconsWS, Services.TcoffeeWS };
- Services[] JABAWS2SERVERS=new Services[]
- { Services.ClustalWS, Services.MuscleWS, Services.MafftWS,
- Services.ProbconsWS, Services.TcoffeeWS, Services.AAConWS, Services.DisemblWS, Services.GlobPlotWS, Services.IUPredWS, Services.JronnWS };
-
+
+ Services[] JABAWS1SERVERS = new Services[]
+ { Services.ClustalWS, Services.MuscleWS, Services.MafftWS,
+ Services.ProbconsWS, Services.TcoffeeWS };
+
+ Services[] JABAWS2SERVERS = new Services[]
+ { Services.ClustalWS, Services.MuscleWS, Services.MafftWS,
+ Services.ProbconsWS, Services.TcoffeeWS, Services.AAConWS,
+ Services.DisemblWS, Services.GlobPlotWS, Services.IUPredWS,
+ Services.JronnWS };
+
/*
* (non-Javadoc)
*
}
if (svc == null)
{
- svc = new Jws2Instance(jwsservers, srv.toString(), cat.name,
- "JABAWS 1 Alignment Service", service);
+ svc = new Jws2Instance(jwsservers, srv.toString(),
+ cat.name, "JABAWS 1 Alignment Service", service);
}
jws2Discoverer.addService(jwsservers, svc);
}
try
{
stats = aaservice.pullExecStatistics(rslt, rpos);
- } catch (Exception x)
+ } catch (Exception x)
{
if (x.getMessage().contains(
if (--serverErrorsLeft > 0)
{
retry = true;
- try {
+ try
+ {
Thread.sleep(200);
- } catch (InterruptedException q) {};
- } else {
+ } catch (InterruptedException q)
+ {
+ }
+ ;
+ }
+ else
+ {
throw x;
}
}
;
}
} while (!finished);
- if (serverErrorsLeft>0)
+ if (serverErrorsLeft > 0)
{
try
{
protected List<Argument> paramset;
- public Jws2Client(AlignFrame _alignFrame,
- WsParamSetI preset, List<Argument> arguments)
+ public Jws2Client(AlignFrame _alignFrame, WsParamSetI preset,
+ List<Argument> arguments)
{
alignFrame = _alignFrame;
this.preset = preset;
{
return processParams(sh, editParams, false);
}
+
protected boolean processParams(Jws2Instance sh, boolean editParams,
boolean adjustingExisting)
{
sh.paramStore = new JabaParamStore(sh,
Desktop.getUserParameterStore());
}
- WsJobParameters jobParams = (preset==null && paramset!=null && paramset.size()>0)
- ? new WsJobParameters(null, sh, null, paramset)
- : new WsJobParameters(sh, preset);
+ WsJobParameters jobParams = (preset == null && paramset != null && paramset
+ .size() > 0) ? new WsJobParameters(null, sh, null, paramset)
+ : new WsJobParameters(sh, preset);
if (adjustingExisting)
{
jobParams.setName("Adjusting parameters for existing Calculation");
WsParamSetI prset = jobParams.getPreset();
if (prset == null)
{
- paramset = jobParams.isServiceDefaults() ? null : JabaParamStore.getJabafromJwsArgs(jobParams
- .getJobParams());
- this.preset=null;
+ paramset = jobParams.isServiceDefaults() ? null : JabaParamStore
+ .getJabafromJwsArgs(jobParams.getJobParams());
+ this.preset = null;
}
else
{
// TODO Auto-generated constructor stub
}
- public MsaWSClient(Jws2Instance sh, WsParamSetI preset,
- String altitle, jalview.datamodel.AlignmentView msa,
- boolean submitGaps, boolean preserveOrder, Alignment seqdataset,
+ public MsaWSClient(Jws2Instance sh, WsParamSetI preset, String altitle,
+ jalview.datamodel.AlignmentView msa, boolean submitGaps,
+ boolean preserveOrder, Alignment seqdataset,
AlignFrame _alignFrame)
{
this(sh, preset, null, false, altitle, msa, submitGaps, preserveOrder,
return (WebServiceName.indexOf("lustal") > -1); // cheat!
}
-
public void attachWSMenuEntry(JMenu rmsawsmenu,
final Jws2Instance service, final AlignFrame alignFrame)
{
List<WsParamSetI> presets = service.getParamStore().getPresets();
if (presets != null && presets.size() > 0)
{
- JMenu presetlist = new JMenu("Run "+calcName + "with preset");
+ JMenu presetlist = new JMenu("Run " + calcName + "with preset");
for (final WsParamSetI preset : presets)
{
{
StringBuffer response = j.jobProgress;
long lastchunk = j.getLastChunk();
- boolean changed=false;
+ boolean changed = false;
do
{
j.setLastChunk(lastchunk);
.pullExecStatistics(j.getJobId(), lastchunk);
if (chunk != null)
{
- changed|=chunk.getChunk().length()>0;
+ changed |= chunk.getChunk().length() > 0;
response.append(chunk.getChunk());
lastchunk = chunk.getNextPosition();
- try {
+ try
+ {
Thread.sleep(50);
- } catch (InterruptedException x){};
+ } catch (InterruptedException x)
+ {
+ }
+ ;
}
;
} while (lastchunk >= 0 && j.getLastChunk() != lastchunk);
}
else if (j.hasArguments())
{
- j.setJobId(server.customAlign(j.seqs,j.getJabaArguments()));
+ j.setJobId(server.customAlign(j.seqs, j.getJabaArguments()));
}
else
{
public void parseResult()
{
- long progbar=System.currentTimeMillis();
+ long progbar = System.currentTimeMillis();
wsInfo.setProgressBar("Collecting job results.", progbar);
int results = 0; // number of result sets received
JobStateSummary finalState = new JobStateSummary();
MsaWSJob msjob = ((MsaWSJob) jobs[j]);
if (jobs[j].isFinished() && msjob.alignment == null)
{
- int nunchanged=3,nexcept=3;
- boolean jpchanged=false,jpex=false;
- do {
+ int nunchanged = 3, nexcept = 3;
+ boolean jpchanged = false, jpex = false;
+ do
+ {
try
{
jpchanged = updateJobProgress(msjob);
- jpex=false;
- if (jpchanged) {
- nexcept=3;
+ jpex = false;
+ if (jpchanged)
+ {
+ nexcept = 3;
}
} catch (Exception e)
{
-
+
Cache.log
.warn("Exception when retrieving remaining Job progress data for job "
+ msjob.getJobId() + " on server " + WsUrl);
e.printStackTrace();
nexcept--;
- nunchanged=3;
+ nunchanged = 3;
// set flag remember that we've had an exception.
- jpex=true;
- jpchanged=false;
+ jpex = true;
+ jpchanged = false;
}
if (!jpchanged)
{
try
{
- Thread.sleep(jpex ? 2400 : 1200); // wait a bit longer if we experienced an exception.
+ Thread.sleep(jpex ? 2400 : 1200); // wait a bit longer if we
+ // experienced an exception.
} catch (Exception ex)
{
}
;
nunchanged--;
- }
- } while (nunchanged>0 && nexcept>0);
-
+ }
+ } while (nunchanged > 0 && nexcept > 0);
+
if (Cache.log.isDebugEnabled())
{
System.out.println("Job Execution file for job: "
import javax.swing.event.MenuListener;
/**
- * @author jprocter
+ * @author jprocter
*
*/
-public class SequenceAnnotationWSClient extends Jws2Client
+public class SequenceAnnotationWSClient extends Jws2Client
{
public static final String AAConCalcId = "jabaws2.AACon";
// only add these menu options if the service has user-modifiable
// arguments
annotservice = new JMenuItem("Edit settings and run ...");
- annotservice.setToolTipText("View and change parameters before running calculation");
+ annotservice
+ .setToolTipText("View and change parameters before running calculation");
annotservice.addActionListener(new ActionListener()
{
wsmenu.add(presetlist);
}
- } else {
+ }
+ else
+ {
annotservice = new JMenuItem("View documentation");
- if (service.docUrl!=null)
+ if (service.docUrl != null)
{
annotservice.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent arg0)
{
Desktop.instance.showUrl(service.docUrl);
}
});
- annotservice.setToolTipText("<html>"+JvSwingUtils.wrapTooltip("View <a href=\""+service.docUrl+"\">"+service.docUrl+"</a>")+"</html>");
+ annotservice.setToolTipText("<html>"
+ + JvSwingUtils.wrapTooltip("View <a href=\""
+ + service.docUrl + "\">" + service.docUrl + "</a>")
+ + "</html>");
wsmenu.add(annotservice);
}
}
AAConClient worker = (AAConClient) aaconClient.get(0);
if (!worker.service.hosturl.equals(service.hosturl))
{
- // javax.swing.SwingUtilities.invokeLater(new Runnable()
+ // javax.swing.SwingUtilities.invokeLater(new Runnable()
{
- // @Override
- // public void run()
+ // @Override
+ // public void run()
{
removeCurrentAAConWorkerFor(alignFrame);
buildCurrentAAConWorkerFor(alignFrame, service);
}
- }//);
+ }// );
}
}
}
* @author jprocter TODO: refactor to a generic 'last job and service run'
* container ?
*/
-public class AAConSettings extends jalview.ws.params.AutoCalcSetting
+public class AAConSettings extends jalview.ws.params.AutoCalcSetting
{
Jws2Instance service;
public List<Argument> getJobArgset()
{
- return jobArgset==null ? null : JabaParamStore.getJabafromJwsArgs(jobArgset);
+ return jobArgset == null ? null : JabaParamStore
+ .getJabafromJwsArgs(jobArgset);
}
public void setJobArgset(List<Argument> jobArgset)
{
// TODO: test if parameters valid for service
- this.jobArgset = jobArgset==null ? null : JabaParamStore.getJwsArgsfromJaba(jobArgset);
+ this.jobArgset = jobArgset == null ? null : JabaParamStore
+ .getJwsArgsfromJaba(jobArgset);
}
public String getWsParamFile()
{
- List<Option> opts=null;
- if (jobArgset!=null)
+ List<Option> opts = null;
+ if (jobArgset != null)
{
opts = JabaParamStore.getJabafromJwsArgs(jobArgset);
- } else {
- if (preset!=null)
+ }
+ else
+ {
+ if (preset != null)
{
opts = JabaParamStore.getJabafromJwsArgs(preset.getArguments());
}
}
- if (opts==null || opts.size()==0)
+ if (opts == null || opts.size() == 0)
{
return "";
}
- StringBuffer pset=new StringBuffer();
- for (String ps:ParameterUtils.writeParameterSet(opts, " "))
+ StringBuffer pset = new StringBuffer();
+ for (String ps : ParameterUtils.writeParameterSet(opts, " "))
{
- pset.append(ps); pset.append("\n");
+ pset.append(ps);
+ pset.append("\n");
}
return pset.toString();
}
{
return service.getServiceTypeURI();
}
+
@Override
public String[] getServiceURLs()
{
- return new String[] { service.getUri() };
+ return new String[]
+ { service.getUri() };
}
}
@Override
public ValueType getType()
{
- if (vc.getType()==ValueConstrain.Type.Float) {
+ if (vc.getType() == ValueConstrain.Type.Float)
+ {
return ValueType.Float;
}
- if (vc.getType()==ValueConstrain.Type.Integer) {
+ if (vc.getType() == ValueConstrain.Type.Integer)
+ {
return ValueType.Integer;
}
- throw new Error("IMPLEMENTATION ERROR: jalview.ws.params.ValueConstrainI.ValueType does not support the JABAWS type :"+vc.toString());
+ throw new Error(
+ "IMPLEMENTATION ERROR: jalview.ws.params.ValueConstrainI.ValueType does not support the JABAWS type :"
+ + vc.toString());
}
@Override
public String hosturl;
public String serviceType;
+
public String action;
+
public JABAService service;
+
public String description;
+
public String docUrl;
- public Jws2Instance(String hosturl, String serviceType, String action, String description,
- JABAService service)
+
+ public Jws2Instance(String hosturl, String serviceType, String action,
+ String description, JABAService service)
{
super();
this.hosturl = hosturl;
this.serviceType = serviceType;
this.service = service;
- this.action=action;
+ this.action = action;
this.description = description;
- int p=description.indexOf("MORE INFORMATION:");
- if (p>-1)
+ int p = description.indexOf("MORE INFORMATION:");
+ if (p > -1)
{
- docUrl = description.substring(description.indexOf("http",p)).trim();
- if (docUrl.indexOf('\n')>-1) { docUrl = docUrl.substring(0,docUrl.indexOf("\n")).trim(); }
-
+ docUrl = description.substring(description.indexOf("http", p)).trim();
+ if (docUrl.indexOf('\n') > -1)
+ {
+ docUrl = docUrl.substring(0, docUrl.indexOf("\n")).trim();
+ }
+
}
}
*/
public String getActionText()
{
- return action+" with " + serviceType;
+ return action + " with " + serviceType;
}
/**
{
return ((SequenceAnnotation) service).getRunnerOptions();
}
- throw new Error("Implementation Error: Runner Config not available for a JABAWS service of type "+serviceType+" ("+service.getClass()+")");
+ throw new Error(
+ "Implementation Error: Runner Config not available for a JABAWS service of type "
+ + serviceType + " (" + service.getClass() + ")");
}
@Override
if (service instanceof MsaWS<?>)
{
new MsaWSClient().attachWSMenuEntry(atpoint, this, alignFrame);
- } else
- if (service instanceof SequenceAnnotation<?>){
- new SequenceAnnotationWSClient().attachWSMenuEntry(atpoint, this, alignFrame);
+ }
+ else if (service instanceof SequenceAnnotation<?>)
+ {
+ new SequenceAnnotationWSClient().attachWSMenuEntry(atpoint, this,
+ alignFrame);
}
}
-
public String getServiceTypeURI()
{
- return "java:"+serviceType;
+ return "java:" + serviceType;
}
}
\ No newline at end of file
/**
* set the current value for the argument.
+ *
* @param selectedItem
*/
void setValue(String selectedItem);
public interface ValueConstrainI
{
- public enum ValueType {
- Integer,
- Float,
- String
+ public enum ValueType
+ {
+ Integer, Float, String
};
+
ValueType getType();
Number getMax();
public class BooleanOption extends Option implements OptionI
{
- public BooleanOption(String name, String descr, boolean required, boolean defVal,
- boolean val, URL link)
+ public BooleanOption(String name, String descr, boolean required,
+ boolean defVal, boolean val, URL link)
{
-
- super(name,descr,required,(defVal ? name:""),(val ? name:""),Arrays.asList(new String[] {name}),link);
+
+ super(name, descr, required, (defVal ? name : ""), (val ? name : ""),
+ Arrays.asList(new String[]
+ { name }), link);
}
-
+
}
/**
* @author jimp
- *
+ *
*/
-public class IntegerParameter extends Option implements ParameterI
+public class IntegerParameter extends Option implements ParameterI
{
int defval;
- int min,max;
- public ValueConstrainI getValidValue() {
+
+ int min, max;
+
+ public ValueConstrainI getValidValue()
+ {
return new ValueConstrainI()
{
-
+
@Override
public ValueType getType()
{
return ValueType.Integer;
}
-
+
@Override
public Number getMin()
{
- if (min<max)
+ if (min < max)
+ {
+ return min;
+ }
+ else
{
- return min;
- } else {
return null;
}
}
-
+
@Override
public Number getMax()
{
- if (min<max)
+ if (min < max)
{
return max;
- } else {
+ }
+ else
+ {
return null;
}
}
};
}
+
public IntegerParameter(IntegerParameter parm)
{
super(parm);
min = parm.min;
}
- public IntegerParameter(String name, String description, boolean required, int defValue,
- int min, int max)
+ public IntegerParameter(String name, String description,
+ boolean required, int defValue, int min, int max)
{
- super(name, description, required, String.valueOf(defValue), null, null, null);
+ super(name, description, required, String.valueOf(defValue), null,
+ null, null);
defval = defValue;
this.min = min;
this.max = max;
}
- public IntegerParameter(String name, String description, boolean required, int defValue, int value,
- int min, int max)
+ public IntegerParameter(String name, String description,
+ boolean required, int defValue, int value, int min, int max)
{
- super(name, description, required, String.valueOf(defValue), String.valueOf(value), null, null);
+ super(name, description, required, String.valueOf(defValue), String
+ .valueOf(value), null, null);
defval = defValue;
this.min = min;
this.max = max;
}
+
@Override
public IntegerParameter copy()
{
- return new IntegerParameter(this);
+ return new IntegerParameter(this);
}
-
+
}
import java.util.Collection;
import java.util.List;
-public class Option implements OptionI {
+public class Option implements OptionI
+{
+
+ String name, value, defvalue, description;
+
+ ArrayList<String> possibleVals = new ArrayList<String>();
-
- String name, value, defvalue,description;
- ArrayList<String> possibleVals=new ArrayList<String>();
boolean required;
+
URL fdetails;
+
@Override
public String getName()
{
@Override
public String getValue()
{
- return value==null ? defvalue : value;
+ return value == null ? defvalue : value;
}
@Override
{
return possibleVals;
}
+
public Option(Option opt)
{
name = new String(opt.name);
- if (opt.value!=null)
+ if (opt.value != null)
value = new String(opt.value);
- if (opt.defvalue!=null)
- defvalue=new String(opt.defvalue);
- if (opt.description!=null)
- description=new String(opt.description);
- if (opt.possibleVals!=null) {
- possibleVals = (ArrayList<String>)opt.possibleVals.clone();
+ if (opt.defvalue != null)
+ defvalue = new String(opt.defvalue);
+ if (opt.description != null)
+ description = new String(opt.description);
+ if (opt.possibleVals != null)
+ {
+ possibleVals = (ArrayList<String>) opt.possibleVals.clone();
}
required = opt.required;
// URLs are singletons - so we copy by reference. nasty but true.
fdetails = opt.fdetails;
}
+
public Option()
{
}
public Option(String name2, String description2, boolean isrequired,
- String defValue, String value, Collection<String> possibleVals, URL fdetails)
+ String defValue, String value, Collection<String> possibleVals,
+ URL fdetails)
{
name = name2;
description = description2;
this.value = value;
this.required = isrequired;
this.defvalue = defValue;
- if (possibleVals!=null)
+ if (possibleVals != null)
{
this.possibleVals = new ArrayList<String>();
this.possibleVals.addAll(possibleVals);
this.fdetails = fdetails;
}
-
@Override
public OptionI copy()
{
import jalview.ws.params.ParameterI;
import jalview.ws.params.ValueConstrainI;
-public abstract class Parameter extends Option implements OptionI,ParameterI {
+public abstract class Parameter extends Option implements OptionI,
+ ParameterI
+{
ValueConstrainI validator;
+
@Override
public ValueConstrainI getValidValue()
{
return validator;
}
+
public Parameter(Parameter parm)
{
super(parm);
}
+
public Parameter(ValueConstrainI validator)
{
super();
this.validator = validator;
}
+
@Override
public abstract Parameter copy();
}
\ No newline at end of file
import jalview.datamodel.AlignmentI;
-public interface AlignmentProcessor {
+public interface AlignmentProcessor
+{
/**
* prepare the context alignment for this input
- * @param al - alignment to be processed
+ *
+ * @param al
+ * - alignment to be processed
* @return al or a new alignment with appropriate attributes/order for input
*/
public AlignmentI prepareAlignment(AlignmentI al);
/**
* parses the results of the service output.
+ *
* @return the result of ParsePackedSet.getAlignment()
* @throws Exception
* @throws Error
*/
public String getUrl()
{
- try {
+ try
+ {
return cachedRequest.getURI().toURL().toString();
- } catch (Exception x)
+ } catch (Exception x)
{
x.printStackTrace();
return null;
import sun.misc.CharacterEncoder;
/***
- * InputType is the abstract model of each input parameter that a rest service might take.
- * It enables the engine to validate input by providing
- * { formatter for type, parser for type }
- *
+ * InputType is the abstract model of each input parameter that a rest service
+ * might take. It enables the engine to validate input by providing { formatter
+ * for type, parser for type }
+ *
*/
-public abstract class InputType {
+public abstract class InputType
+{
/**
* not used yet
*/
boolean replaceids;
- public enum molType { NUC, PROT, MIX;
- public static Collection<String> toStringValues()
+ public enum molType
{
- Collection<String> c = new ArrayList<String>();
- for (molType type:values())
+ NUC, PROT, MIX;
+
+ public static Collection<String> toStringValues()
{
- c.add(type.toString());
+ Collection<String> c = new ArrayList<String>();
+ for (molType type : values())
+ {
+ c.add(type.toString());
+ }
+ return c;
}
- return c;
- }}
+ }
+
public String token;
- public int min=1;
- public int max=0; // unbounded
- protected ArrayList<Class> inputData=new ArrayList<Class>();
+
+ public int min = 1;
+
+ public int max = 0; // unbounded
+
+ protected ArrayList<Class> inputData = new ArrayList<Class>();
+
/**
- * initialise the InputType with a list of jalview data classes that the RestJob needs to be able to provide to it.
+ * initialise the InputType with a list of jalview data classes that the
+ * RestJob needs to be able to provide to it.
+ *
* @param types
*/
protected InputType(Class[] types)
{
- if(types!=null)
- {for (Class t:types)
+ if (types != null)
{
- inputData.add(t);
- }
+ for (Class t : types)
+ {
+ inputData.add(t);
}
+ }
}
+
/**
- * do basic tests to ensure the job's service takes this parameter, and the job's input data can be used to generate the input data
+ * do basic tests to ensure the job's service takes this parameter, and the
+ * job's input data can be used to generate the input data
+ *
* @param restJob
* @return
*/
{
if (!validFor(restJob.rsd))
return false;
- for (Class cl:inputData)
+ for (Class cl : inputData)
{
if (!restJob.hasDataOfType(cl))
{
}
return true;
}
-
+
public boolean validFor(RestServiceDescription restServiceDescription)
{
if (!restServiceDescription.inputParams.values().contains(this))
return false;
-
+
return true;
}
+
protected ContentBody utf8StringBody(String content, String type)
{
Charset utf8 = Charset.forName("UTF-8");
- try {
- if (type==null ) {
- return new StringBody(utf8.encode(content).asCharBuffer().toString());
- } else {
- return new StringBody(utf8.encode(content).asCharBuffer().toString(), type, utf8);
- }
+ try
+ {
+ if (type == null)
+ {
+ return new StringBody(utf8.encode(content).asCharBuffer()
+ .toString());
+ }
+ else
+ {
+ return new StringBody(utf8.encode(content).asCharBuffer()
+ .toString(), type, utf8);
+ }
} catch (Exception ex)
{
- System.err.println("Couldn't transform string\n"+content+"\nException was :");
+ System.err.println("Couldn't transform string\n" + content
+ + "\nException was :");
ex.printStackTrace(System.err);
}
return null;
}
+
/**
*
- * @param rj data from which input is to be extracted and formatted
+ * @param rj
+ * data from which input is to be extracted and formatted
* @return StringBody or FileBody ready for posting
*/
- abstract public ContentBody formatForInput(RestJob rj) throws UnsupportedEncodingException,NoValidInputDataException;
+ abstract public ContentBody formatForInput(RestJob rj)
+ throws UnsupportedEncodingException, NoValidInputDataException;
+
/**
*
* @return true if no input data needs to be provided for this parameter
*/
public boolean isConstant()
{
- return (inputData==null || inputData.size()==0);
+ return (inputData == null || inputData.size() == 0);
}
+
/**
- * return a url encoded version of this parameter's value, or an empty string if the parameter has no ='value' content.
+ * return a url encoded version of this parameter's value, or an empty string
+ * if the parameter has no ='value' content.
+ *
* @return
*/
public abstract List<String> getURLEncodedParameter();
-
+
/**
* set the property known as tok, possibly by assigning it with a given val
+ *
* @param tok
- * @param val (may be empty or null)
- * @param warnings place where parse warnings are reported
+ * @param val
+ * (may be empty or null)
+ * @param warnings
+ * place where parse warnings are reported
* @return true if property was set
*/
- public abstract boolean configureProperty(String tok, String val, StringBuffer warnings);
-
+ public abstract boolean configureProperty(String tok, String val,
+ StringBuffer warnings);
+
/**
* Get unique key for this type of parameter in a URL encoding.
- * @return the string that prefixes an input parameter of InputType<T> type in the string returned from getURLEncodedParameter
+ *
+ * @return the string that prefixes an input parameter of InputType<T> type in
+ * the string returned from getURLEncodedParameter
*/
public abstract String getURLtokenPrefix();
+
/**
- * parse the given token String and set InputParameter properties appropriately
- * @param tokenstring - urlencoded parameter string as returned from getURLEncodedParameter
- * @param warnings - place where any warning messages about bad property values are written
+ * parse the given token String and set InputParameter properties
+ * appropriately
+ *
+ * @param tokenstring
+ * - urlencoded parameter string as returned from
+ * getURLEncodedParameter
+ * @param warnings
+ * - place where any warning messages about bad property values are
+ * written
* @return true if configuration succeeded, false otherwise.
*/
- public boolean configureFromURLtokenString(List<String> tokenstring, StringBuffer warnings) {
- boolean valid=true;
- for (String tok:tokenstring)
+ public boolean configureFromURLtokenString(List<String> tokenstring,
+ StringBuffer warnings)
+ {
+ boolean valid = true;
+ for (String tok : tokenstring)
+ {
+ Matcher mtch = Pattern.compile("^([^=]+)=?'?([^']*)?'?").matcher(tok);
+ if (mtch.find())
{
- Matcher mtch = Pattern.compile("^([^=]+)=?'?([^']*)?'?").matcher(tok);
- if (mtch.find()) {
- try {
- if (mtch.group(1).equals("min"))
- {
- min = Integer.parseInt(mtch.group(2));
- continue;
-
- } else
- if (mtch.group(1).equals("max"))
- {
- max = Integer.parseInt(mtch.group(2));
- continue;
- }
- }
- catch (NumberFormatException x)
- {
- valid=false;
- warnings.append("Invalid value for parameter "+mtch.group(1).toLowerCase()+" '"+mtch.group(2)+"' (expected an integer)\n");
- }
-
- if (!configureProperty(mtch.group(1), mtch.group(2), warnings)) {
- if (warnings.length()==0)
- {
- warnings.append("Failed to configure InputType :"+getURLtokenPrefix()+" with property string: '"+mtch.group(0)+"'\n (token is '"+mtch.group(1)+"' and value is '"+mtch.group(2)+"')\n");
- }
- valid=false;
+ try
+ {
+ if (mtch.group(1).equals("min"))
+ {
+ min = Integer.parseInt(mtch.group(2));
+ continue;
+
+ }
+ else if (mtch.group(1).equals("max"))
+ {
+ max = Integer.parseInt(mtch.group(2));
+ continue;
}
+ } catch (NumberFormatException x)
+ {
+ valid = false;
+ warnings.append("Invalid value for parameter "
+ + mtch.group(1).toLowerCase() + " '" + mtch.group(2)
+ + "' (expected an integer)\n");
}
+
+ if (!configureProperty(mtch.group(1), mtch.group(2), warnings))
+ {
+ if (warnings.length() == 0)
+ {
+ warnings.append("Failed to configure InputType :"
+ + getURLtokenPrefix() + " with property string: '"
+ + mtch.group(0) + "'\n (token is '" + mtch.group(1)
+ + "' and value is '" + mtch.group(2) + "')\n");
+ }
+ valid = false;
}
- return valid;
+ }
+ }
+ return valid;
}
+
public void addBaseParams(ArrayList<String> prms)
{
- // todo : check if replaceids should be a global for the service, rather than for a specific parameter.
- if (min!=1) {
- prms.add("min='"+min+"'");
+ // todo : check if replaceids should be a global for the service, rather
+ // than for a specific parameter.
+ if (min != 1)
+ {
+ prms.add("min='" + min + "'");
}
- if (max!=0) {
- prms.add("max='"+max+"'");
+ if (max != 0)
+ {
+ prms.add("max='" + max + "'");
}
}
-
+
public abstract List<OptionI> getOptions();
+
public List<OptionI> getBaseOptions()
{
ArrayList<OptionI> opts = new ArrayList<OptionI>();
- opts.add(new IntegerParameter("min","Minimum number of data of this type",true,1,min,0,-1));
- opts.add(new IntegerParameter("max","Maximum number of data of this type",false,0,max,0,-1));
+ opts.add(new IntegerParameter("min",
+ "Minimum number of data of this type", true, 1, min, 0, -1));
+ opts.add(new IntegerParameter("max",
+ "Maximum number of data of this type", false, 0, max, 0, -1));
return opts;
}
+
/**
* make a copy of this InputType
- * @return
- * may not be needed
- public abstract InputType copy();
+ *
+ * @return may not be needed public abstract InputType copy();
*/
-
+
/**
* parse a set of configuration options
- * @param currentSettings - modified settings originally from getOptions
- * @throws InvalidArgumentException thrown if currentSettings contains invalid options for this type.
+ *
+ * @param currentSettings
+ * - modified settings originally from getOptions
+ * @throws InvalidArgumentException
+ * thrown if currentSettings contains invalid options for this type.
*/
- public void configureFromArgumentI(List<ArgumentI> currentSettings) throws InvalidArgumentException
+ public void configureFromArgumentI(List<ArgumentI> currentSettings)
+ throws InvalidArgumentException
{
ArrayList<String> urltoks = new ArrayList<String>();
String rg;
- for (ArgumentI arg: currentSettings)
+ for (ArgumentI arg : currentSettings)
{
if (arg instanceof ParameterI)
{
- rg=arg.getName()+"='"+arg.getValue()+"'";
- } else {
- // TODO: revise architecture - this is counter intuitive - options with different values to their names are actually parameters
- rg=(arg.getValue().length()>0) ? (arg.getValue().equals(arg.getName()) ? arg.getName():arg.getName()+"='"+arg.getValue()+"'")
- : arg.getName();
- }
- if (rg.length()>0) {
+ rg = arg.getName() + "='" + arg.getValue() + "'";
+ }
+ else
+ {
+ // TODO: revise architecture - this is counter intuitive - options with
+ // different values to their names are actually parameters
+ rg = (arg.getValue().length() > 0) ? (arg.getValue().equals(
+ arg.getName()) ? arg.getName() : arg.getName() + "='"
+ + arg.getValue() + "'") : arg.getName();
+ }
+ if (rg.length() > 0)
+ {
urltoks.add(rg);
}
}
StringBuffer warnings;
- if (!configureFromURLtokenString(urltoks, warnings=new StringBuffer()))
+ if (!configureFromURLtokenString(urltoks, warnings = new StringBuffer()))
{
throw new InvalidArgumentException(warnings.toString());
}
}
+
protected OptionI createMolTypeOption(String name, String descr,
boolean req, molType curType, molType defType)
{
- return new Option(name,descr, req, defType==null ? "" : defType.toString(), curType==null ? "" : curType.toString(),molType.toStringValues(),
- null);
+ return new Option(name, descr, req, defType == null ? ""
+ : defType.toString(),
+ curType == null ? "" : curType.toString(),
+ molType.toStringValues(), null);
}
}
\ No newline at end of file
package jalview.ws.rest;
/**
- * exception thrown if there is no data available to construct a valid input for a particular validInput.InputType and RestJob
+ * exception thrown if there is no data available to construct a valid input for
+ * a particular validInput.InputType and RestJob
+ *
* @author JimP
- *
+ *
*/
public class NoValidInputDataException extends Exception
{
public NoValidInputDataException(String string, Exception ex)
{
- super(string,ex);
+ super(string, ex);
}
}
final AlignFrame alignFrame)
{
JMenuItem submit = new JMenuItem(service.details.Name);
- submit.setToolTipText(service.details.Action+" using "+service.details.Name);
+ submit.setToolTipText(service.details.Action + " using "
+ + service.details.Name);
submit.addActionListener(new ActionListener()
{
*/
protected boolean isAlignmentModified()
{
- if (undoredo == null || av==null || av.getAlignment()==null)
+ if (undoredo == null || av == null || av.getAlignment() == null)
{
- // always return modified if we don't have access to live GUI elements anymore.
+ // always return modified if we don't have access to live GUI elements
+ // anymore.
return true;
}
if (av.isUndoRedoHashModified(undoredo))
{
- // alignment has been modified in some way.
+ // alignment has been modified in some way.
return true;
}
- // TODO: look deeper into modification of selection state, etc that may affect RestJobThread.realiseResults(boolean merge);
+ // TODO: look deeper into modification of selection state, etc that may
+ // affect RestJobThread.realiseResults(boolean merge);
return false;
}
*/
boolean selExists = (av.getSelectionGroup() != null)
&& (av.getSelectionGroup().getSize() > 1);
- // TODO: JAL-715: refactor to alignViewport methods and revise to full focus+context+dataset input data staging model
+ // TODO: JAL-715: refactor to alignViewport methods and revise to full
+ // focus+context+dataset input data staging model
if (selExists)
{
if (service.partitiondata)
{
- if (av.getAlignment().getGroups()!=null && av.getAlignment().getGroups().size() > 0)
+ if (av.getAlignment().getGroups() != null
+ && av.getAlignment().getGroups().size() > 0)
{
// intersect groups with selected region
- _input = new AlignmentView(av.getAlignment(),
- av.getColumnSelection(),
- av.getSelectionGroup(),
- av.hasHiddenColumns(),
- true,
- true);
- viewTitle = "selected "+(av.hasHiddenColumns() ? "visible" : "") + " region of "+af.getTitle();
+ _input = new AlignmentView(av.getAlignment(),
+ av.getColumnSelection(), av.getSelectionGroup(),
+ av.hasHiddenColumns(), true, true);
+ viewTitle = "selected "
+ + (av.hasHiddenColumns() ? "visible" : "")
+ + " region of " + af.getTitle();
}
else
{
// use selected region to partition alignment
- _input = new AlignmentView(av.getAlignment(),
- av.getColumnSelection(),
- av.getSelectionGroup(),
- av.hasHiddenColumns(),
- false,
- true);
+ _input = new AlignmentView(av.getAlignment(),
+ av.getColumnSelection(), av.getSelectionGroup(),
+ av.hasHiddenColumns(), false, true);
}
- viewTitle = "select and unselected "+(av.hasHiddenColumns() ? "visible" : "") + " regions from "+af.getTitle();
+ viewTitle = "select and unselected "
+ + (av.hasHiddenColumns() ? "visible" : "")
+ + " regions from " + af.getTitle();
}
else
{
// just take selected region intersection
- _input = new AlignmentView(av.getAlignment(),
- av.getColumnSelection(),
- av.getSelectionGroup(),
- av.hasHiddenColumns(),
- true,
- true);
- viewTitle = "selected "+(av.hasHiddenColumns() ? "visible" : "") + " region of "+af.getTitle();
+ _input = new AlignmentView(av.getAlignment(),
+ av.getColumnSelection(), av.getSelectionGroup(),
+ av.hasHiddenColumns(), true, true);
+ viewTitle = "selected " + (av.hasHiddenColumns() ? "visible" : "")
+ + " region of " + af.getTitle();
}
- } else {
+ }
+ else
+ {
// standard alignment view without selection present
- _input = new AlignmentView(av.getAlignment(),
- av.getColumnSelection(),
- null,
- av.hasHiddenColumns(),
- false,
+ _input = new AlignmentView(av.getAlignment(),
+ av.getColumnSelection(), null, av.hasHiddenColumns(), false,
true);
- viewTitle = ""+(av.hasHiddenColumns() ? "visible region of " : "") + af.getTitle();
+ viewTitle = "" + (av.hasHiddenColumns() ? "visible region of " : "")
+ + af.getTitle();
}
-
+
RestJobThread jobsthread = new RestJobThread(this);
-
+
if (jobsthread.isValid())
{
setWebserviceInfo(false);
else
{
// TODO: try to tell the user why the job couldn't be started.
- JOptionPane.showMessageDialog(Desktop.desktop,
- (jobsthread.hasWarnings() ? jobsthread.getWarnings() : "The Job couldn't be started. Please check your input, and the Jalview console for any warning messages."),
- "Unable to start web service analysis", JOptionPane.WARNING_MESSAGE);
+ JOptionPane
+ .showMessageDialog(
+ Desktop.desktop,
+ (jobsthread.hasWarnings() ? jobsthread.getWarnings()
+ : "The Job couldn't be started. Please check your input, and the Jalview console for any warning messages."),
+ "Unable to start web service analysis",
+ JOptionPane.WARNING_MESSAGE);
}
}
String action = "Analysis", description = "Sequence Harmony and Multi-Relief (Brandt et al. 2010)", name = "Multi-Harmony";
Hashtable<String, InputType> iparams = new Hashtable<String, InputType>();
jalview.ws.rest.params.JobConstant toolp;
- //toolp = new jalview.ws.rest.JobConstant("tool","jalview");
- //iparams.put(toolp.token, toolp);
- //toolp = new jalview.ws.rest.params.JobConstant("mbjob[method]","shmr");
- //iparams.put(toolp.token, toolp);
- //toolp = new jalview.ws.rest.params.JobConstant("mbjob[description]","step 1");
- //iparams.put(toolp.token, toolp);
- //toolp = new jalview.ws.rest.params.JobConstant("start_search","1");
- //iparams.put(toolp.token, toolp);
- //toolp = new jalview.ws.rest.params.JobConstant("blast","0");
- //iparams.put(toolp.token, toolp);
-
+ // toolp = new jalview.ws.rest.JobConstant("tool","jalview");
+ // iparams.put(toolp.token, toolp);
+ // toolp = new jalview.ws.rest.params.JobConstant("mbjob[method]","shmr");
+ // iparams.put(toolp.token, toolp);
+ // toolp = new
+ // jalview.ws.rest.params.JobConstant("mbjob[description]","step 1");
+ // iparams.put(toolp.token, toolp);
+ // toolp = new jalview.ws.rest.params.JobConstant("start_search","1");
+ // iparams.put(toolp.token, toolp);
+ // toolp = new jalview.ws.rest.params.JobConstant("blast","0");
+ // iparams.put(toolp.token, toolp);
+
jalview.ws.rest.params.Alignment aliinput = new jalview.ws.rest.params.Alignment();
- // SHMR server has a 65K limit for content pasted into the 'ali' parameter, so we always upload our files.
+ // SHMR server has a 65K limit for content pasted into the 'ali' parameter,
+ // so we always upload our files.
aliinput.token = "ali_file";
- aliinput.writeAsFile=true;
+ aliinput.writeAsFile = true;
iparams.put(aliinput.token, aliinput);
jalview.ws.rest.params.SeqGroupIndexVector sgroups = new jalview.ws.rest.params.SeqGroupIndexVector();
sgroups.setMinsize(2);
- sgroups.min=2;// need at least two group defined to make a partition
+ sgroups.min = 2;// need at least two group defined to make a partition
iparams.put("groups", sgroups);
sgroups.token = "groups";
sgroups.sep = " ";
public AlignmentPanel recoverAlignPanelForView()
{
- AlignmentPanel[] aps = Desktop.getAlignmentPanels(av.getSequenceSetId());
- for (AlignmentPanel alp:aps)
+ AlignmentPanel[] aps = Desktop
+ .getAlignmentPanels(av.getSequenceSetId());
+ for (AlignmentPanel alp : aps)
{
if (alp.av == av)
{
return true;
}
- protected static Vector<String> services=null;
- public static final String RSBS_SERVICES="RSBS_SERVICES";
+ protected static Vector<String> services = null;
+
+ public static final String RSBS_SERVICES = "RSBS_SERVICES";
+
public static RestClient[] getRestClients()
{
- if (services==null)
+ if (services == null)
{
services = new Vector<String>();
- try {
- for (RestServiceDescription descr: RestServiceDescription.parseDescriptions(jalview.bin.Cache.getDefault(RSBS_SERVICES,makeShmmrRestClient().service.toString())))
+ try
{
- services.add(descr.toString());
- }
- }
- catch (Exception ex) {
- System.err.println("Serious - RSBS descriptions in user preferences are corrupt!");
+ for (RestServiceDescription descr : RestServiceDescription
+ .parseDescriptions(jalview.bin.Cache.getDefault(
+ RSBS_SERVICES,
+ makeShmmrRestClient().service.toString())))
+ {
+ services.add(descr.toString());
+ }
+ } catch (Exception ex)
+ {
+ System.err
+ .println("Serious - RSBS descriptions in user preferences are corrupt!");
ex.printStackTrace();
}
-
+
}
RestClient[] lst = new RestClient[services.size()];
- int i=0;
- for (String svc:services) {
+ int i = 0;
+ for (String svc : services)
+ {
lst[i++] = new RestClient(new RestServiceDescription(svc));
}
return lst;
}
+
public static void main(String args[])
{
- try {
+ try
+ {
RestClient[] clients = getRestClients();
- System.out.println("Got "+clients.length+" clients.");
- int i=0;
- Vector<String> urls=new Vector<String>();
- for (RestClient cl:clients) {
- System.out.println(""+(++i)+": "+cl.service.toString());
+ System.out.println("Got " + clients.length + " clients.");
+ int i = 0;
+ Vector<String> urls = new Vector<String>();
+ for (RestClient cl : clients)
+ {
+ System.out.println("" + (++i) + ": " + cl.service.toString());
urls.add(cl.service.toString());
}
setRsbsServices(urls);
- if (clients.length!=getRestClients().length)
+ if (clients.length != getRestClients().length)
{
- System.err.println("Failed. Differing numbers of clients when stringified and parsed again.");
+ System.err
+ .println("Failed. Differing numbers of clients when stringified and parsed again.");
}
-
+
} catch (Throwable x)
{
System.err.println("Failed. Unexpected exception.");
x.printStackTrace();
}
}
+
public String getAction()
{
return service.details.Action;
public static Vector<String> getRsbsDescriptions()
{
Vector<String> rsbsDescrs = new Vector<String>();
- for (RestClient rsbs:getRestClients())
+ for (RestClient rsbs : getRestClients())
{
rsbsDescrs.add(rsbs.getRestDescription().toString());
}
public static void setRsbsServices(Vector<String> rsbsUrls)
{
- if (rsbsUrls!=null)
+ if (rsbsUrls != null)
{
// TODO: consider validating services ?
services = new Vector<String>(rsbsUrls);
StringBuffer sprop = new StringBuffer();
- for (String s:services)
+ for (String s : services)
{
sprop.append(s);
}
Cache.setProperty(RSBS_SERVICES, sprop.toString());
- }
+ }
else
{
Cache.removeProperty(RSBS_SERVICES);
*/
int[] origviscontig;
- private AlignmentI contextAl=null;
+ private AlignmentI contextAl = null;
/**
* create a rest job using data bounded by the given start/end column.
.size() >= prm.getValue().min))
{
alinp.add(prm.getValue());
- } else {
- statMessage=("Not enough groups defined on the alignment - need at least "+prm.getValue().min);
+ }
+ else
+ {
+ statMessage = ("Not enough groups defined on the alignment - need at least " + prm
+ .getValue().min);
}
}
}
_input.setDataset(null);
}
dsForIO = _input.getDataset();
- if (contextAl==null)
+ if (contextAl == null)
{
contextAl = _input;
}
validInput = false;
}
}
-
+
boolean validInput = false;
@Override
if (context == null)
{
context = new JalviewDataset(dsForIO, null, squniq, null);
- if (contextAl!=null)
+ if (contextAl != null)
{
- // TODO devise way of merging new annotation onto (identical) existing annotation that was used as input
- // delete all input annotation
- if (contextAl.getAlignmentAnnotation()!=null) {
- for (AlignmentAnnotation alan: contextAl.getAlignmentAnnotation()) {
+ // TODO devise way of merging new annotation onto (identical) existing
+ // annotation that was used as input
+ // delete all input annotation
+ if (contextAl.getAlignmentAnnotation() != null)
+ {
+ for (AlignmentAnnotation alan : contextAl
+ .getAlignmentAnnotation())
+ {
contextAl.deleteAnnotation(alan);
}
}
- // TODO devise way of merging new groups onto (identical) existing groups when they were used as input to service
- // delete all existing groups
- if (contextAl.getGroups()!=null)
+ // TODO devise way of merging new groups onto (identical) existing
+ // groups when they were used as input to service
+ // delete all existing groups
+ if (contextAl.getGroups() != null)
{
contextAl.deleteAllGroups();
}
context.addAlignment(contextAl);
}
-
+
}
return context;
}
* context used to parse results from service
*/
JalviewDataset context = null;
+
protected boolean parsedResults = false;
- protected boolean validJvresults=false;
+
+ protected boolean validJvresults = false;
+
Object[] jvresultobj = null;
+
/**
* process the results obtained from the server into jalview datamodel objects
- * ready to be merged/added to the users' view. Use hasResults to test if results were added to context.
+ * ready to be merged/added to the users' view. Use hasResults to test if
+ * results were added to context.
*/
public void parseResultSet() throws Exception, Error
{
- if (!parsedResults) {
- parsedResults=true;
+ if (!parsedResults)
+ {
+ parsedResults = true;
jvresultobj = resSet.parseResultSet();
validJvresults = true;
}
/**
*
- * @return true if job has an input alignment and it was annotated when results were parsed
+ * @return true if job has an input alignment and it was annotated when
+ * results were parsed
*/
public boolean isInputContextModified()
{
- return contextAl!=null && validJvresults && context.getAl().get(0).isModified();
+ return contextAl != null && validJvresults
+ && context.getAl().get(0).isModified();
}
/**
*
- * @return true if the ID/metadata for the input sequences were saved and sequence IDs renamed.
+ * @return true if the ID/metadata for the input sequences were saved and
+ * sequence IDs renamed.
*/
public boolean isInputUniquified()
{
}
/**
- * Return map between ordering of alignment submitted as input, and ordering of alignment as provided by user
+ * Return map between ordering of alignment submitted as input, and ordering
+ * of alignment as provided by user
+ *
* @return int[sequence index in submitted data]==sequence index in input.
*/
public int[] getOrderMap()
{
SequenceI[] contseq = contextAl.getSequencesArray();
int map[] = new int[contseq.length];
- for (int i=0;i<contseq.length;i++)
+ for (int i = 0; i < contseq.length; i++)
{
- // TODO: optimise for large N - build a lookup hash for IDs returning order, and then lookup each sequ's original order
+ // TODO: optimise for large N - build a lookup hash for IDs returning
+ // order, and then lookup each sequ's original order
map[i] = inputOrder.getOrder().indexOf(contseq[i]);
}
return map;
// TODO: cope with recovering hidden sequences from
// resultContext
{
- for (SequenceI oseq:sg.getSequences(null))
+ for (SequenceI oseq : sg.getSequences(null))
{
SequenceI nseq = getNewSeq(oseq, rseqs[nrj],
ordermap[nrj], destAl);
*/
public RestServiceDescription()
{
-
+
}
+
/**
* @param details
* @param postUrl
return null;
java.util.ArrayList<String> jv = new ArrayList<String>();
int cp = 0, pos, escape;
- boolean wasescaped = false,wasquoted=false;
+ boolean wasescaped = false, wasquoted = false;
String lstitem = null;
while ((pos = list.indexOf(separator, cp)) >= cp)
{
-
+
escape = (pos > 0 && list.charAt(pos - 1) == '\\') ? -1 : 0;
if (wasescaped || wasquoted)
{
if (!wasescaped)
{
// last separator may be in an unmatched quote
- if (java.util.regex.Pattern.matches("('[^']*')*[^']*'",lstitem))
+ if (java.util.regex.Pattern.matches("('[^']*')*[^']*'", lstitem))
{
- wasquoted=true;
+ wasquoted = true;
}
}
-
+
}
if (cp < list.length())
{
private String getServiceIOProperties()
{
ArrayList<String> vls = new ArrayList<String>();
- if (isHseparable()) { vls.add("hseparable");};
- if (isVseparable()) { vls.add("vseparable");};
+ if (isHseparable())
+ {
+ vls.add("hseparable");
+ }
+ ;
+ if (isVseparable())
+ {
+ vls.add("vseparable");
+ }
+ ;
vls.add(new String("gapCharacter='" + gapCharacter + "'"));
vls.add(new String("returns='" + _genOutputFormatString() + "'"));
return arrayToSeparatorList(vls.toArray(new String[0]), ",");
}
/**
- * processes a service encoded as a string (as generated by RestServiceDescription.toString())
- * Note - this will only use the first service definition encountered in the string to configure the service.
+ * processes a service encoded as a string (as generated by
+ * RestServiceDescription.toString()) Note - this will only use the first
+ * service definition encountered in the string to configure the service.
+ *
* @param encoding
- * @param warnings - where warning messages are reported.
- * @return true if configuration was parsed successfully.
+ * @param warnings
+ * - where warning messages are reported.
+ * @return true if configuration was parsed successfully.
*/
public boolean configureFromEncodedString(String encoding,
StringBuffer warnings)
{
String[] list = separatorListToArray(encoding, "|");
-
- int nextpos=parseServiceList(list,warnings, 0);
- if (nextpos>0)
+
+ int nextpos = parseServiceList(list, warnings, 0);
+ if (nextpos > 0)
{
return true;
}
return false;
}
+
/**
- * processes the given list from position p, attempting to configure the service from it.
- * Service lists are formed by concatenating individual stringified services. The first character of a stringified service is '|', enabling this, and the parser will ignore empty fields in a '|' separated list when they fall outside a service definition.
+ * processes the given list from position p, attempting to configure the
+ * service from it. Service lists are formed by concatenating individual
+ * stringified services. The first character of a stringified service is '|',
+ * enabling this, and the parser will ignore empty fields in a '|' separated
+ * list when they fall outside a service definition.
+ *
* @param list
* @param warnings
* @param p
{
boolean invalid = false;
// look for the first non-empty position - expect it to be service name
- while (list[p]!=null && list[p].trim().length()==0)
+ while (list[p] != null && list[p].trim().length() == 0)
{
p++;
}
details.Name = list[p];
- details.Action = list[p+1];
- details.description = list[p+2];
- invalid |= !configureFromServiceInputProperties(list[p+3], warnings);
- if (list.length-p > 5 && list[p+5]!=null && list[p+5].trim().length()>5)
+ details.Action = list[p + 1];
+ details.description = list[p + 2];
+ invalid |= !configureFromServiceInputProperties(list[p + 3], warnings);
+ if (list.length - p > 5 && list[p + 5] != null
+ && list[p + 5].trim().length() > 5)
{
- urlSuffix = list[p+4];
- invalid |= !configureFromInputParamEncodedUrl(list[p+5], warnings);
- p+=6;
+ urlSuffix = list[p + 4];
+ invalid |= !configureFromInputParamEncodedUrl(list[p + 5], warnings);
+ p += 6;
}
else
{
- if (list.length-p > 4 && list[p+4]!=null && list[p+4].trim().length()>5)
+ if (list.length - p > 4 && list[p + 4] != null
+ && list[p + 4].trim().length() > 5)
{
urlSuffix = null;
- invalid |= !configureFromInputParamEncodedUrl(list[p+4], warnings);
- p+=5;
+ invalid |= !configureFromInputParamEncodedUrl(list[p + 4], warnings);
+ p += 5;
}
}
return invalid ? -1 : p;
}
-
+
/**
* @return string representation of the input parameters, their type and
* constraints, appended to the service's base submission URL
ArrayList<String> al = new ArrayList<String>();
for (String prprm : separatorListToArray(iprmparams, ","))
{
- // hack to ensure that strings like "sep=','" containing unescaped commas as values are concatenated
+ // hack to ensure that strings like "sep=','" containing unescaped
+ // commas as values are concatenated
al.add(prprm.trim());
}
if (!jinput.configureFromURLtokenString(al, warnings))
public static void main(String argv[])
{
// test separator list
- try {
- assert(separatorListToArray("foo=',',min='foo',max='1,2,3',fa=','", ",").length==4);
- if (separatorListToArray("minsize='2', sep=','", ",").length==2)
+ try
+ {
+ assert (separatorListToArray("foo=',',min='foo',max='1,2,3',fa=','",
+ ",").length == 4);
+ if (separatorListToArray("minsize='2', sep=','", ",").length == 2)
{
- assert(false);
+ assert (false);
}
-
+
} catch (AssertionError x)
{
System.err.println("separatorListToArray is faulty.");
/**
* parse a concatenated list of rest service descriptions into an array
+ *
* @param services
* @return zero or more services.
- * @throws exceptions if the services are improperly encoded.
+ * @throws exceptions
+ * if the services are improperly encoded.
*/
- public static List<RestServiceDescription> parseDescriptions(String services) throws Exception
+ public static List<RestServiceDescription> parseDescriptions(
+ String services) throws Exception
{
String[] list = separatorListToArray(services, "|");
List<RestServiceDescription> svcparsed = new ArrayList<RestServiceDescription>();
- int p=0,lastp=0;
- StringBuffer warnings=new StringBuffer();
- do {
+ int p = 0, lastp = 0;
+ StringBuffer warnings = new StringBuffer();
+ do
+ {
RestServiceDescription rsd = new RestServiceDescription();
- p=rsd.parseServiceList(list, warnings, lastp=p);
- if (p>lastp && rsd.isValid())
+ p = rsd.parseServiceList(list, warnings, lastp = p);
+ if (p > lastp && rsd.isValid())
{
svcparsed.add(rsd);
- } else {
- throw new Exception("Failed to parse user defined RSBS services from :"+services+"\nFirst error was encountered at token "+lastp+" starting "+list[lastp]+":\n"+rsd.getInvalidMessage());
}
- } while (p<lastp && p<list.length-1);
+ else
+ {
+ throw new Exception(
+ "Failed to parse user defined RSBS services from :"
+ + services
+ + "\nFirst error was encountered at token " + lastp
+ + " starting " + list[lastp] + ":\n"
+ + rsd.getInvalidMessage());
+ }
+ } while (p < lastp && p < list.length - 1);
return svcparsed;
}
/**
* input data as a file upload rather than inline content
*/
- public boolean writeAsFile=false;
+ public boolean writeAsFile = false;
@Override
public ContentBody formatForInput(RestJob rj)
}
return false;
}
+
@Override
public List<OptionI> getOptions()
{
List<OptionI> lst = getBaseOptions();
- lst.add(new BooleanOption("jvsuffix","Append jalview style /start-end suffix to ID", false, false, jvsuffix, null));
- lst.add(new BooleanOption("writeasfile","Append jalview style /start-end suffix to ID", false, false, writeAsFile, null));
-
- lst.add(new Option("format",
- "Alignment upload format", true, "FASTA",
- format, Arrays.asList(jalview.io.FormatAdapter.WRITEABLE_FORMATS), null));
- lst.add(createMolTypeOption("type", "Sequence type", false, type,
+ lst.add(new BooleanOption("jvsuffix",
+ "Append jalview style /start-end suffix to ID", false, false,
+ jvsuffix, null));
+ lst.add(new BooleanOption("writeasfile",
+ "Append jalview style /start-end suffix to ID", false, false,
+ writeAsFile, null));
+
+ lst.add(new Option("format", "Alignment upload format", true, "FASTA",
+ format, Arrays
+ .asList(jalview.io.FormatAdapter.WRITEABLE_FORMATS),
null));
-
+ lst.add(createMolTypeOption("type", "Sequence type", false, type, null));
+
return lst;
}
/**
* format a jalview annotation file for input to a rest service.
+ *
* @author JimP
- *
+ *
*/
-public class AnnotationFile extends InputType {
+public class AnnotationFile extends InputType
+{
public AnnotationFile()
{
- super(new Class[] { AlignmentI.class} );
+ super(new Class[]
+ { AlignmentI.class });
}
+
/**
* standard jalview annotation file
*/
- final String JVANNOT="JalviewAnnotation";
+ final String JVANNOT = "JalviewAnnotation";
+
/**
* export annotation row as simple csv
*/
- final String CSVANNOT="CsvAnnotationRow";
+ final String CSVANNOT = "CsvAnnotationRow";
+
/**
* format of annotation file
*/
- String format=JVANNOT;
+ String format = JVANNOT;
+
// TODO verify annotation file format enumeration
@Override
- public ContentBody formatForInput(RestJob rj) throws UnsupportedEncodingException, NoValidInputDataException
+ public ContentBody formatForInput(RestJob rj)
+ throws UnsupportedEncodingException, NoValidInputDataException
{
- AlignmentI al = rj.getAlignmentForInput(token,molType.MIX);
+ AlignmentI al = rj.getAlignmentForInput(token, molType.MIX);
if (format.equals(JVANNOT))
- {return new StringBody(new jalview.io.AnnotationFile().printAnnotations(al.getAlignmentAnnotation(),
- al.getGroups(),al.getProperties()));
- } else {
- if (!format.equals(CSVANNOT))
- {
- throw new UnsupportedEncodingException("Unrecognised format for exporting Annotation ("+format+")");
- }
- return new StringBody(new jalview.io.AnnotationFile().printCSVAnnotations(al.getAlignmentAnnotation()));
+ {
+ return new StringBody(
+ new jalview.io.AnnotationFile().printAnnotations(
+ al.getAlignmentAnnotation(), al.getGroups(),
+ al.getProperties()));
+ }
+ else
+ {
+ if (!format.equals(CSVANNOT))
+ {
+ throw new UnsupportedEncodingException(
+ "Unrecognised format for exporting Annotation (" + format
+ + ")");
}
+ return new StringBody(
+ new jalview.io.AnnotationFile().printCSVAnnotations(al
+ .getAlignmentAnnotation()));
+ }
}
+
@Override
public List<String> getURLEncodedParameter()
{
ArrayList<String> prms = new ArrayList<String>();
super.addBaseParams(prms);
- prms.add("format='"+format+"'");
- return prms;
+ prms.add("format='" + format + "'");
+ return prms;
}
+
@Override
public String getURLtokenPrefix()
{
return "ALANNOTATION";
}
+
@Override
public boolean configureProperty(String tok, String val,
StringBuffer warnings)
if (tok.startsWith("format"))
{
- for (String fmt : new String[] { CSVANNOT, JVANNOT})
+ for (String fmt : new String[]
+ { CSVANNOT, JVANNOT })
{
if (val.equalsIgnoreCase(fmt))
{
}
warnings.append("Invalid annotation file format '" + val
+ "'. Must be one of (");
- for (String fmt : new String[] { CSVANNOT, JVANNOT})
+ for (String fmt : new String[]
+ { CSVANNOT, JVANNOT })
{
warnings.append(" " + fmt);
}
}
return false;
}
+
@Override
public List<OptionI> getOptions()
{
// TODO - consider disregarding base options here.
List<OptionI> lst = getBaseOptions();
- lst.add(new Option("format",
- "Alignment annotation upload format", true, JVANNOT,
- format, Arrays.asList(new String[]
- { JVANNOT, CSVANNOT}), null));
+ lst.add(new Option("format", "Alignment annotation upload format",
+ true, JVANNOT, format, Arrays.asList(new String[]
+ { JVANNOT, CSVANNOT }), null));
return lst;
}
}
/**
* defines a constant value always provided as a parameter.
+ *
* @author JimP
- *
+ *
*/
public class JobConstant extends InputType
{
String value;
+
/**
*
- * @param param name of parameter
- * @param val value of parameter
+ * @param param
+ * name of parameter
+ * @param val
+ * value of parameter
*/
public JobConstant(String param, String val)
{
public ContentBody formatForInput(RestJob rj)
throws UnsupportedEncodingException, NoValidInputDataException
{
-
+
return new StringBody(value);
}
public List<String> getURLEncodedParameter()
{
ArrayList<String> prm = new ArrayList<String>();
-
- if (value!=null && value.length()>0)
+
+ if (value != null && value.length() > 0)
{
- try {
- prm.add(URLEncoder.encode(value,"UTF-8"));
+ try
+ {
+ prm.add(URLEncoder.encode(value, "UTF-8"));
} catch (UnsupportedEncodingException ex)
{
- throw new Error("Couldn't encode '"+value+"' as UTF-8.",ex);
-
+ throw new Error("Couldn't encode '" + value + "' as UTF-8.", ex);
+
}
}
return prm;
public boolean configureFromURLtokenString(List<String> tokenstring,
StringBuffer warnings)
{
- if (tokenstring.size()>1) {
+ if (tokenstring.size() > 1)
+ {
warnings.append("IMPLEMENTATION ERROR: Constant POST parameters cannot have more than one value.");
return false;
}
- if (tokenstring.size()==1) {
+ if (tokenstring.size() == 1)
+ {
value = tokenstring.get(0);
}
return true;
ArrayList<int[]> gl = new ArrayList<int[]>();
int p = 0;
List<SequenceGroup> sgs;
- synchronized (sgs=al.getGroups())
+ synchronized (sgs = al.getGroups())
{
- for (SequenceGroup sg : sgs)
- {
- if (sg.getSize() < minsize)
- {
- throw new NoValidInputDataException("Group contains less than "
- + minsize + " sequences.");
- }
- // TODO: refactor to sequenceGroup for efficiency -
- // getAlignmentRowInterval(AlignmentI al)
- int[] se = null;
- for (SequenceI sq : sg.getSequencesInOrder(al))
+ for (SequenceGroup sg : sgs)
{
- p = al.findIndex(sq);
- if (se == null)
+ if (sg.getSize() < minsize)
{
- se = new int[]
- { p, p };
+ throw new NoValidInputDataException("Group contains less than "
+ + minsize + " sequences.");
}
- else
+ // TODO: refactor to sequenceGroup for efficiency -
+ // getAlignmentRowInterval(AlignmentI al)
+ int[] se = null;
+ for (SequenceI sq : sg.getSequencesInOrder(al))
+ {
+ p = al.findIndex(sq);
+ if (se == null)
+ {
+ se = new int[]
+ { p, p };
+ }
+ else
+ {
+ if (p < se[0])
+ se[0] = p;
+ if (p > se[1])
+ se[1] = p;
+ }
+ }
+ if (se != null)
{
- if (p < se[0])
- se[0] = p;
- if (p > se[1])
- se[1] = p;
+ gl.add(se);
}
}
- if (se != null)
- {
- gl.add(se);
- }
- }
}
// are there any more sequences ungrouped that should be added as a single
// remaining group ? - these might be at the start or the end
"Separator character between elements of vector", true, ",",
sep, Arrays.asList(new String[]
{ " ", ",", ";", "\t", "|" }), null));
- lst.add(new IntegerParameter("minsize", "Minimum size of partition allowed by service", true, 1, minsize, 1,0));
- lst.add(createMolTypeOption("type", "Sequence type", false, type, molType.MIX));
+ lst.add(new IntegerParameter("minsize",
+ "Minimum size of partition allowed by service", true, 1,
+ minsize, 1, 0));
+ lst.add(createMolTypeOption("type", "Sequence type", false, type,
+ molType.MIX));
return lst;
}
ArrayList<String> prms = new ArrayList<String>();
super.addBaseParams(prms);
prms.add("sep='" + sep + "'");
- if (type!=null)
+ if (type != null)
{
- prms.add("type='"+type+"'");
+ prms.add("type='" + type + "'");
}
return prms;
}
"Separator character between elements of vector", true, ",",
sep, Arrays.asList(new String[]
{ " ", ",", ";", "\t", "|" }), null));
- lst.add(createMolTypeOption("type", "Sequence type", false, type,
- null));
+ lst.add(createMolTypeOption("type", "Sequence type", false, type, null));
return lst;
}
}
import org.jmol.util.ArrayUtil;
/**
- * input a list of sequences separated by some separator
+ * input a list of sequences separated by some separator
+ *
* @author JimP
- *
+ *
*/
-public class SeqVector extends InputType {
+public class SeqVector extends InputType
+{
String sep;
+
molType type;
+
public SeqVector()
{
- super(new Class[] { AlignmentI.class} );
+ super(new Class[]
+ { AlignmentI.class });
}
@Override
- public ContentBody formatForInput(RestJob rj) throws UnsupportedEncodingException, NoValidInputDataException
+ public ContentBody formatForInput(RestJob rj)
+ throws UnsupportedEncodingException, NoValidInputDataException
{
StringBuffer idvector = new StringBuffer();
- boolean list=false;
- for (SequenceI seq:rj.getSequencesForInput(token, type))
+ boolean list = false;
+ for (SequenceI seq : rj.getSequencesForInput(token, type))
{
if (list)
{
}
return new StringBody(idvector.toString());
}
+
@Override
public List<String> getURLEncodedParameter()
{
ArrayList<String> prms = new ArrayList<String>();
super.addBaseParams(prms);
- prms.add("sep='"+ sep+"'");
- if (type!=null)
+ prms.add("sep='" + sep + "'");
+ if (type != null)
{
- prms.add("type='"+type+"'");
+ prms.add("type='" + type + "'");
}
return prms;
}
if (tok.startsWith("sep"))
{
- sep=val;
+ sep = val;
return true;
}
if (tok.startsWith("type"))
{
- try {
- type=molType.valueOf(val);
+ try
+ {
+ type = molType.valueOf(val);
return true;
} catch (Exception x)
{
- warnings.append("Invalid molecule type '"+val+"'. Must be one of (");
- for (molType v:molType.values())
+ warnings.append("Invalid molecule type '" + val
+ + "'. Must be one of (");
+ for (molType v : molType.values())
{
- warnings.append(" "+v);
+ warnings.append(" " + v);
}
warnings.append(")\n");
}
{ " ", ",", ";", "\t", "|" }), null));
lst.add(createMolTypeOption("type", "Sequence type", false, type,
molType.MIX));
-
+
return lst;
}
/**
* format a tree for input to a rest service
+ *
* @author JimP
- *
+ *
*/
-public class Tree extends InputType {
+public class Tree extends InputType
+{
public Tree()
{
- super(new Class[] { jalview.analysis.NJTree.class} );
+ super(new Class[]
+ { jalview.analysis.NJTree.class });
}
// TODO specify modifiers for tree output format
@Override
- public ContentBody formatForInput(RestJob rj) throws UnsupportedEncodingException
+ public ContentBody formatForInput(RestJob rj)
+ throws UnsupportedEncodingException
{
// TODO: implement tree inputType
- /*rj.getTreeForInput(token);
- return new StringBody(new ) */
+ /*
+ * rj.getTreeForInput(token); return new StringBody(new )
+ */
throw new Error("Tree InputType not yet implemented");
- //return null;
+ // return null;
}
+
public String getURLtokenPrefix()
{
- return "NEWICK";
+ return "NEWICK";
}
-
+
@Override
public List<String> getURLEncodedParameter()
{
}\r
Iterator<DbSourceProxy> fetchers = getSourceProxy(db).iterator();\r
Stack<String> queriesLeft = new Stack<String>();\r
-// List<String> queriesFailed = new ArrayList<String>();\r
+ // List<String> queriesFailed = new ArrayList<String>();\r
queriesLeft.addAll(query);\r
while (fetchers.hasNext())\r
{\r
{\r
// create a fetcher and go to it\r
seqset = fetcher.getSequenceRecords(qsb.toString()); // ,\r
- // queriesFailed);\r
+ // queriesFailed);\r
} catch (Exception ex)\r
{\r
System.err.println("Failed to retrieve the following from "\r
public List<DbSourceProxy> getSourceProxy(String db)\r
{\r
List<DbSourceProxy> dbs;\r
- Map<String,DbSourceProxy> dblist = FETCHABLEDBS.get(db);\r
- if (dblist==null) {return new ArrayList<DbSourceProxy>();};\r
- if (dblist.size()>1) {\r
- DbSourceProxy[] l=dblist.values().toArray(new DbSourceProxy[0]);\r
- int i=0;\r
- String[] nm=new String[l.length];\r
- for (DbSourceProxy s:l)\r
+ Map<String, DbSourceProxy> dblist = FETCHABLEDBS.get(db);\r
+ if (dblist == null)\r
+ {\r
+ return new ArrayList<DbSourceProxy>();\r
+ }\r
+ ;\r
+ if (dblist.size() > 1)\r
+ {\r
+ DbSourceProxy[] l = dblist.values().toArray(new DbSourceProxy[0]);\r
+ int i = 0;\r
+ String[] nm = new String[l.length];\r
+ for (DbSourceProxy s : l)\r
{\r
- nm[i++]=s.getDbName().toLowerCase();\r
+ nm[i++] = s.getDbName().toLowerCase();\r
}\r
- jalview.util.QuickSort.sort(nm,l);\r
+ jalview.util.QuickSort.sort(nm, l);\r
dbs = new ArrayList<DbSourceProxy>();\r
- for (i=l.length-1;i>=0; i--)\r
+ for (i = l.length - 1; i >= 0; i--)\r
{\r
dbs.add(l[i]);\r
}\r
- } else {\r
+ }\r
+ else\r
+ {\r
dbs = new ArrayList<DbSourceProxy>(dblist.values());\r
}\r
return dbs;\r
{\r
if (FETCHABLEDBS == null)\r
{\r
- FETCHABLEDBS = new Hashtable<String, Map<String,DbSourceProxy>>();\r
+ FETCHABLEDBS = new Hashtable<String, Map<String, DbSourceProxy>>();\r
}\r
- Map<String,DbSourceProxy> slist = FETCHABLEDBS.get(proxy.getDbSource());\r
+ Map<String, DbSourceProxy> slist = FETCHABLEDBS.get(proxy\r
+ .getDbSource());\r
if (slist == null)\r
{\r
FETCHABLEDBS.put(proxy.getDbSource(),\r
- slist = new Hashtable<String,DbSourceProxy>());\r
+ slist = new Hashtable<String, DbSourceProxy>());\r
}\r
- slist.put(proxy.getDbName(),proxy);\r
+ slist.put(proxy.getDbName(), proxy);\r
}\r
}\r
\r
/**\r
- * test if the database handler for dbName contains the given dbProperty\r
- * when a dbName resolves to a set of proxies - this method will return the result of the test for the first instance.\r
- * TODO implement additional method to query all sources for a db to find one with a particular property\r
+ * test if the database handler for dbName contains the given dbProperty when\r
+ * a dbName resolves to a set of proxies - this method will return the result\r
+ * of the test for the first instance. TODO implement additional method to\r
+ * query all sources for a db to find one with a particular property\r
+ * \r
* @param dbName\r
* @param dbProperty\r
* @return true if proxy has the given property\r
}\r
return sources;\r
}\r
- public DbSourceProxy[] getDbSourceProxyInstances(\r
- Class class1)\r
+\r
+ public DbSourceProxy[] getDbSourceProxyInstances(Class class1)\r
{\r
- ArrayList<DbSourceProxy> prlist=new ArrayList<DbSourceProxy>();\r
- for (String fetchable:getSupportedDb())\r
- for (DbSourceProxy pr:getSourceProxy(fetchable))\r
- {\r
- if (class1.isInstance(pr)) {prlist.add(pr);}\r
- }\r
- if (prlist.size()==0)\r
+ ArrayList<DbSourceProxy> prlist = new ArrayList<DbSourceProxy>();\r
+ for (String fetchable : getSupportedDb())\r
+ for (DbSourceProxy pr : getSourceProxy(fetchable))\r
+ {\r
+ if (class1.isInstance(pr))\r
+ {\r
+ prlist.add(pr);\r
+ }\r
+ }\r
+ if (prlist.size() == 0)\r
{\r
return null;\r
}\r
* add/define mechanism for retrieval of Trees and distance matrices from a\r
* database (unify with io)\r
* \r
- * @author JimP\r
- * TODO: promote to API\r
+ * @author JimP TODO: promote to API\r
*/\r
public interface DbSourceProxy\r
{\r
/**\r
* make one or more queries to the database and attempt to parse the response\r
* into an alignment\r
- * @param queries - one or more queries for database in expected form\r
+ * \r
+ * @param queries\r
+ * - one or more queries for database in expected form\r
* @return null if queries were successful but result was not parsable\r
- * @throws Exception - propagated from underlying transport to database (note - exceptions are not raised if query not found in database)\r
- * \r
+ * @throws Exception\r
+ * - propagated from underlying transport to database (note -\r
+ * exceptions are not raised if query not found in database)\r
+ * \r
*/\r
public AlignmentI getSequenceRecords(String queries) throws Exception;\r
\r
*/\r
public StringBuffer getRawRecords();\r
\r
- \r
/**\r
* Find out more info about the source.\r
- * @param dbsourceproperty - one of the database reference source properties in jalview.datamodel.DBRefSource\r
+ * \r
+ * @param dbsourceproperty\r
+ * - one of the database reference source properties in\r
+ * jalview.datamodel.DBRefSource\r
* @return true if the source has this property\r
*/\r
public boolean isA(Object dbsourceproperty);\r
@Override\r
public boolean isA(Object dbsourceproperty)\r
{\r
- assert(dbsourceproperty!=null);\r
- return (props==null) ? false : props.containsKey(dbsourceproperty);\r
+ assert (dbsourceproperty != null);\r
+ return (props == null) ? false : props.containsKey(dbsourceproperty);\r
}\r
- \r
\r
}\r