From: gmungoc Date: Mon, 23 Apr 2018 14:59:47 +0000 (+0100) Subject: JAL-2956 save/restore HMMER profile to/from Jalview project X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4edae2ab642aedc93fd044d901df988e8c2bc83a;p=jalview.git JAL-2956 save/restore HMMER profile to/from Jalview project --- diff --git a/schemas/jalview.xsd b/schemas/jalview.xsd index 48824e7..d5cd5bc 100755 --- a/schemas/jalview.xsd +++ b/schemas/jalview.xsd @@ -287,6 +287,11 @@ + + + name of the project jar entry that holds the HMM file with the profile for the sequence + + diff --git a/src/jalview/datamodel/HiddenMarkovModel.java b/src/jalview/datamodel/HiddenMarkovModel.java index 3c2c437..e3eb160 100644 --- a/src/jalview/datamodel/HiddenMarkovModel.java +++ b/src/jalview/datamodel/HiddenMarkovModel.java @@ -1,6 +1,5 @@ package jalview.datamodel; -import jalview.bin.Cache; import jalview.io.HMMFile; import jalview.schemes.ResidueProperties; import jalview.util.Comparison; @@ -100,11 +99,14 @@ public class HiddenMarkovModel this.hmmSeq = sq; if (sq.getDatasetSequence() == hmm.mapToHmmConsensus.getTo()) { + // same dataset sequence e.g. after realigning search results this.mapToHmmConsensus = hmm.mapToHmmConsensus; } else { - Cache.log.error("Error: HMM copied with change of mapped sequence"); + // different dataset sequence e.g. after loading HMM from project + this.mapToHmmConsensus = new Mapping(sq.getDatasetSequence(), + hmm.mapToHmmConsensus.getMap()); } } diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 3840597..aed73d6 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -30,6 +30,7 @@ import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.GraphLine; +import jalview.datamodel.HiddenMarkovModel; import jalview.datamodel.PDBEntry; import jalview.datamodel.RnaViewerModel; import jalview.datamodel.SequenceFeature; @@ -45,6 +46,7 @@ import jalview.ext.varna.RnaModel; import jalview.gui.StructureViewer.ViewerType; import jalview.io.DataSourceType; import jalview.io.FileFormat; +import jalview.io.HMMFile; import jalview.renderer.ResidueShaderI; import jalview.schemabinding.version2.AlcodMap; import jalview.schemabinding.version2.AlcodonFrame; @@ -52,7 +54,6 @@ import jalview.schemabinding.version2.Annotation; import jalview.schemabinding.version2.AnnotationColours; import jalview.schemabinding.version2.AnnotationElement; import jalview.schemabinding.version2.CalcIdParam; -import jalview.schemabinding.version2.Colour; import jalview.schemabinding.version2.CompoundMatcher; import jalview.schemabinding.version2.DBRef; import jalview.schemabinding.version2.Features; @@ -167,6 +168,8 @@ public class Jalview2XML private static final String RNA_PREFIX = "rna_"; + private static final String HMMER_PREFIX = "hmmer_"; + private static final String UTF_8 = "UTF-8"; // use this with nextCounter() to make unique names for entities @@ -867,73 +870,28 @@ public class Jalview2XML } } - // TODO: omit sequence features from each alignment view's XML dump if we - // are storing dataset - List sfs = jds - .getSequenceFeatures(); + /* + * save sequence features + * TODO: omit sequence features from each alignment view's + * XML dump if we are storing dataset + */ + List sfs = jds.getSequenceFeatures(); for (SequenceFeature sf : sfs) { - Features features = new Features(); - - features.setBegin(sf.getBegin()); - features.setEnd(sf.getEnd()); - features.setDescription(sf.getDescription()); - features.setType(sf.getType()); - features.setFeatureGroup(sf.getFeatureGroup()); - features.setScore(sf.getScore()); - if (sf.links != null) - { - for (int l = 0; l < sf.links.size(); l++) - { - OtherData keyValue = new OtherData(); - keyValue.setKey("LINK_" + l); - keyValue.setValue(sf.links.elementAt(l).toString()); - features.addOtherData(keyValue); - } - } - if (sf.otherDetails != null) - { - /* - * save feature attributes, which may be simple strings or - * map valued (have sub-attributes) - */ - for (Entry entry : sf.otherDetails.entrySet()) - { - String key = entry.getKey(); - Object value = entry.getValue(); - if (value instanceof Map) - { - for (Entry subAttribute : ((Map) value) - .entrySet()) - { - OtherData otherData = new OtherData(); - otherData.setKey(key); - otherData.setKey2(subAttribute.getKey()); - otherData.setValue(subAttribute.getValue().toString()); - features.addOtherData(otherData); - } - } - else - { - OtherData otherData = new OtherData(); - otherData.setKey(key); - otherData.setValue(value.toString()); - features.addOtherData(otherData); - } - } - } - + Features features = saveFeature(sf); jseq.addFeatures(features); } + /* + * save PDB entries for sequence + */ if (jdatasq.getAllPDBEntries() != null) { - Enumeration en = jdatasq.getAllPDBEntries().elements(); + Enumeration en = jdatasq.getAllPDBEntries().elements(); while (en.hasMoreElements()) { Pdbids pdb = new Pdbids(); - jalview.datamodel.PDBEntry entry = (jalview.datamodel.PDBEntry) en - .nextElement(); + PDBEntry entry = en.nextElement(); String pdbId = entry.getId(); pdb.setId(pdbId); @@ -1017,6 +975,11 @@ public class Jalview2XML saveRnaViewers(jout, jseq, jds, viewIds, ap, storeDS); + if (jds.hasHMMProfile()) + { + saveHmmerProfile(jout, jseq, jds); + } + jms.addJSeq(jseq); } @@ -1508,6 +1471,98 @@ public class Jalview2XML } /** + * Saves the HMMER profile associated with the sequence as a file in the jar, + * in HMMER format, and saves the name of the file as a child element of the + * XML sequence element + * + * @param jout + * @param xmlSeq + * @param seq + */ + protected void saveHmmerProfile(JarOutputStream jout, JSeq xmlSeq, + SequenceI seq) + { + HiddenMarkovModel profile = seq.getHMM(); + if (profile == null) + { + warn("Want to save HMM profile for " + seq.getName() + + " but none found"); + return; + } + HMMFile hmmFile = new HMMFile(profile); + String hmmAsString = hmmFile.print(); + String jarEntryName = HMMER_PREFIX + nextCounter(); + try + { + writeJarEntry(jout, jarEntryName, hmmAsString.getBytes()); + xmlSeq.setHmmerProfile(jarEntryName); + } catch (IOException e) + { + warn("Error saving HMM profile: " + e.getMessage()); + } + } + + /** + * Converts a Jalview SequenceFeature into the XML model of it to save + * + * @param sf + * @return + */ + protected Features saveFeature(SequenceFeature sf) + { + Features features = new Features(); + + features.setBegin(sf.getBegin()); + features.setEnd(sf.getEnd()); + features.setDescription(sf.getDescription()); + features.setType(sf.getType()); + features.setFeatureGroup(sf.getFeatureGroup()); + features.setScore(sf.getScore()); + if (sf.links != null) + { + for (int l = 0; l < sf.links.size(); l++) + { + OtherData keyValue = new OtherData(); + keyValue.setKey("LINK_" + l); + keyValue.setValue(sf.links.elementAt(l).toString()); + features.addOtherData(keyValue); + } + } + if (sf.otherDetails != null) + { + /* + * save feature attributes, which may be simple strings or + * map valued (have sub-attributes) + */ + for (Entry entry : sf.otherDetails.entrySet()) + { + String key = entry.getKey(); + Object value = entry.getValue(); + if (value instanceof Map) + { + for (Entry subAttribute : ((Map) value) + .entrySet()) + { + OtherData otherData = new OtherData(); + otherData.setKey(key); + otherData.setKey2(subAttribute.getKey()); + otherData.setValue(subAttribute.getValue().toString()); + features.addOtherData(otherData); + } + } + else + { + OtherData otherData = new OtherData(); + otherData.setKey(key); + otherData.setValue(value.toString()); + features.addOtherData(otherData); + } + } + } + return features; + } + + /** * Save any Varna viewers linked to this sequence. Writes an rnaViewer element * for each viewer, with *
    @@ -1708,9 +1763,8 @@ public class Jalview2XML } else if (!matchedFile.equals(pdbentry.getFile())) { - Cache.log.warn( - "Probably lost some PDB-Sequence mappings for this structure file (which apparently has same PDB Entry code): " - + pdbentry.getFile()); + warn("Probably lost some PDB-Sequence mappings for this structure file (which apparently has same PDB Entry code): " + + pdbentry.getFile()); } // record the // file so we @@ -2194,12 +2248,12 @@ public class Jalview2XML mpc.setDseqFor(jmpid); if (!seqRefIds.containsKey(mpc.getDseqFor())) { - jalview.bin.Cache.log.debug("creatign new DseqFor ID"); + debug("creating new DseqFor ID"); seqRefIds.put(mpc.getDseqFor(), ps); } else { - jalview.bin.Cache.log.debug("reusing DseqFor ID"); + debug("reusing DseqFor ID"); } mp.setMappingChoice(mpc); @@ -3014,24 +3068,26 @@ public class Jalview2XML // for (int i = 0; i < vamsasSeq.length; i++) { + SequenceI alignmentSeq = al.getSequenceAt(i); if (jseqs[i].getFeaturesCount() > 0) { Features[] features = jseqs[i].getFeatures(); for (int f = 0; f < features.length; f++) { - SequenceFeature sf = new SequenceFeature(features[f].getType(), - features[f].getDescription(), features[f].getBegin(), - features[f].getEnd(), features[f].getScore(), - features[f].getFeatureGroup()); - sf.setStatus(features[f].getStatus()); + Features feature = features[f]; + SequenceFeature sf = new SequenceFeature(feature.getType(), + feature.getDescription(), feature.getBegin(), + feature.getEnd(), feature.getScore(), + feature.getFeatureGroup()); + sf.setStatus(feature.getStatus()); /* * load any feature attributes - include map-valued attributes */ Map> mapAttributes = new HashMap<>(); - for (int od = 0; od < features[f].getOtherDataCount(); od++) + for (int od = 0; od < feature.getOtherDataCount(); od++) { - OtherData keyValue = features[f].getOtherData(od); + OtherData keyValue = feature.getOtherData(od); String attributeName = keyValue.getKey(); String attributeValue = keyValue.getValue(); if (attributeName.startsWith("LINK")) @@ -3065,16 +3121,15 @@ public class Jalview2XML } // adds feature to datasequence's feature set (since Jalview 2.10) - al.getSequenceAt(i).addSequenceFeature(sf); + alignmentSeq.addSequenceFeature(sf); } } if (vamsasSeq[i].getDBRefCount() > 0) { // adds dbrefs to datasequence's set (since Jalview 2.10) addDBRefs( - al.getSequenceAt(i).getDatasetSequence() == null - ? al.getSequenceAt(i) - : al.getSequenceAt(i).getDatasetSequence(), + alignmentSeq.getDatasetSequence() == null ? alignmentSeq + : alignmentSeq.getDatasetSequence(), vamsasSeq[i]); } if (jseqs[i].getPdbidsCount() > 0) @@ -3122,16 +3177,25 @@ public class Jalview2XML .getStructureSelectionManager(Desktop.instance) .registerPDBEntry(entry); // adds PDBEntry to datasequence's set (since Jalview 2.10) - if (al.getSequenceAt(i).getDatasetSequence() != null) + if (alignmentSeq.getDatasetSequence() != null) { - al.getSequenceAt(i).getDatasetSequence().addPDBId(entry); + alignmentSeq.getDatasetSequence().addPDBId(entry); } else { - al.getSequenceAt(i).addPDBId(entry); + alignmentSeq.addPDBId(entry); } } } + + /* + * load any HMMER profile + */ + String hmmJarFile = jseqs[i].getHmmerProfile(); + if (hmmJarFile != null) + { + loadHmmerProfile(jprovider, hmmJarFile, alignmentSeq); + } } } // end !multipleview @@ -3629,6 +3693,31 @@ public class Jalview2XML } /** + * Loads a HMMER profile from a file stored in the project, and associates it + * with the specified sequence + * + * @param jprovider + * @param hmmJarFile + * @param seq + */ + protected void loadHmmerProfile(jarInputStreamProvider jprovider, + String hmmJarFile, SequenceI seq) + { + try + { + String hmmFile = copyJarEntry(jprovider, hmmJarFile, "hmm", null); + HMMFile parser = new HMMFile(hmmFile, DataSourceType.FILE); + HiddenMarkovModel hmmModel = parser.getHMM(); + hmmModel = new HiddenMarkovModel(hmmModel, seq); + seq.setHMM(hmmModel); + } catch (IOException e) + { + warn("Error loading HMM profile for " + seq.getName() + ": " + + e.getMessage()); + } + } + + /** * Instantiate and link any saved RNA (Varna) viewers. The state of the Varna * panel is restored from separate jar entries, two (gapped and trimmed) per * sequence and secondary structure. @@ -5055,10 +5144,7 @@ public class Jalview2XML id = object.getJalviewModelSequence().getViewport()[0] .getSequenceSetId())) { - if (Cache.log != null && Cache.log.isDebugEnabled()) - { - Cache.log.debug("Skipping seuqence set id " + id); - } + debug("Skipping sequence set id " + id); return true; } return false; @@ -5432,7 +5518,7 @@ public class Jalview2XML seqRefIds.put(sqid, djs); } - jalview.bin.Cache.log.debug("about to recurse on addDBRefs."); + debug("about to recurse on addDBRefs."); addDBRefs(djs, ms); } @@ -5610,7 +5696,7 @@ public class Jalview2XML } else { - Cache.log.debug("Ignoring " + jvobj.getClass() + " (ID = " + id); + debug("Ignoring " + jvobj.getClass() + " (ID = " + id); } } } @@ -5942,7 +6028,10 @@ public class Jalview2XML maxcol = new Color(Integer.parseInt(colourModel.getRGB(), 16)); } catch (Exception e) { - Cache.log.warn("Couldn't parse out graduated feature color.", e); + if (Cache.log != null) + { + Cache.log.warn("Couldn't parse out graduated feature color.", e); + } } NoValueColour noCol = colourModel.getNoValueColour(); diff --git a/src/jalview/io/HMMFile.java b/src/jalview/io/HMMFile.java index 2a17915..07f29c8 100644 --- a/src/jalview/io/HMMFile.java +++ b/src/jalview/io/HMMFile.java @@ -140,7 +140,6 @@ public class HMMFile extends AlignFile * Constructor for HMMFile used for exporting * * @param hmm - * @param exportImmediately */ public HMMFile(HiddenMarkovModel markov) { diff --git a/src/jalview/schemabinding/version2/JSeq.java b/src/jalview/schemabinding/version2/JSeq.java index 7c6308e..8414e28 100644 --- a/src/jalview/schemabinding/version2/JSeq.java +++ b/src/jalview/schemabinding/version2/JSeq.java @@ -7,8 +7,8 @@ package jalview.schemabinding.version2; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ import org.exolab.castor.xml.Marshaller; @@ -19,1079 +19,1048 @@ import org.exolab.castor.xml.Unmarshaller; * * @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 _viewreference. - */ - private boolean _viewreference; - - /** - * keeps track of state for field: _viewreference - */ - private boolean _has_viewreference; - - /** - * Field _featuresList. - */ - private java.util.Vector _featuresList; - - /** - * Field _pdbidsList. - */ - private java.util.Vector _pdbidsList; - - /** - * Field _hiddenSequencesList. - */ - private java.util.Vector _hiddenSequencesList; - - /** - * Reference to a viewer showing RNA structure for this sequence. Schema - * supports one viewer showing multiple annotations for multiple sequences, - * though currently only one annotation for one sequence (gapped or trimmed) - * is used - * - */ - private java.util.Vector _rnaViewerList; - - // ----------------/ - // - Constructors -/ - // ----------------/ - - public JSeq() - { - super(); - this._featuresList = new java.util.Vector(); - this._pdbidsList = new java.util.Vector(); - this._hiddenSequencesList = new java.util.Vector(); - this._rnaViewerList = 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); - } - - /** - * - * - * @param vRnaViewer - * @throws java.lang.IndexOutOfBoundsException - * if the index given is outside the bounds of the collection - */ - public void addRnaViewer( - final jalview.schemabinding.version2.RnaViewer vRnaViewer) - throws java.lang.IndexOutOfBoundsException - { - this._rnaViewerList.addElement(vRnaViewer); - } - - /** - * - * - * @param index - * @param vRnaViewer - * @throws java.lang.IndexOutOfBoundsException - * if the index given is outside the bounds of the collection - */ - public void addRnaViewer(final int index, - final jalview.schemabinding.version2.RnaViewer vRnaViewer) - throws java.lang.IndexOutOfBoundsException - { - this._rnaViewerList.add(index, vRnaViewer); - } - - /** - */ - 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; - } - - /** - */ - public void deleteViewreference() - { - this._has_viewreference = 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(); - } - - /** - * Method enumerateRnaViewer. - * - * @return an Enumeration over all jalview.schemabinding.version2.RnaViewer - * elements - */ - public java.util.Enumeration enumerateRnaViewer() - { - return this._rnaViewerList.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. - *

    - * Note: Just in case the collection contents are changing in another thread, - * we pass a 0-length Array of the correct type into the API call. This way we - * know that the Array returned is of exactly the correct length. - * - * @return this collection as an Array - */ - public jalview.schemabinding.version2.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. - *

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

    - * Note: Just in case the collection contents are changing in another thread, - * we pass a 0-length Array of the correct type into the API call. This way we - * know that the Array returned is of exactly the correct length. - * - * @return this collection as an Array - */ - public jalview.schemabinding.version2.RnaViewer[] getRnaViewer() - { - jalview.schemabinding.version2.RnaViewer[] array = new jalview.schemabinding.version2.RnaViewer[0]; - return (jalview.schemabinding.version2.RnaViewer[]) this._rnaViewerList - .toArray(array); - } - - /** - * Method getRnaViewerCount. - * - * @return the size of this collection - */ - public int getRnaViewerCount() - { - return this._rnaViewerList.size(); - } - - /** - * Returns the value of field 'start'. - * - * @return the value of field 'Start'. - */ - public int getStart() - { - return this._start; - } - - /** - * Returns the value of field 'viewreference'. - * - * @return the value of field 'Viewreference'. - */ - public boolean getViewreference() - { - return this._viewreference; - } - - /** - * 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; - } - - /** - * Method hasViewreference. - * - * @return true if at least one Viewreference has been added - */ - public boolean hasViewreference() - { - return this._has_viewreference; - } - - /** - * 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; - } - - /** - * Returns the value of field 'viewreference'. - * - * @return the value of field 'Viewreference'. - */ - public boolean isViewreference() - { - return this._viewreference; - } - - /** - * - * - * @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(); - } - - /** - */ - public void removeAllRnaViewer() - { - this._rnaViewerList.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; - } - - /** - * Method removeRnaViewer. - * - * @param vRnaViewer - * @return true if the object was removed from the collection. - */ - public boolean removeRnaViewer( - final jalview.schemabinding.version2.RnaViewer vRnaViewer) - { - boolean removed = _rnaViewerList.remove(vRnaViewer); - return removed; - } - - /** - * Method removeRnaViewerAt. - * - * @param index - * @return the element removed from the collection - */ - public jalview.schemabinding.version2.RnaViewer removeRnaViewerAt( - final int index) - { - java.lang.Object obj = this._rnaViewerList.remove(index); - return (jalview.schemabinding.version2.RnaViewer) 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]); - } - } - - /** - * - * - * @param index - * @param vRnaViewer - * @throws java.lang.IndexOutOfBoundsException - * if the index given is outside the bounds of the collection - */ - public void setRnaViewer(final int index, - final jalview.schemabinding.version2.RnaViewer vRnaViewer) - throws java.lang.IndexOutOfBoundsException - { - // check bounds for index - if (index < 0 || index >= this._rnaViewerList.size()) - { - throw new IndexOutOfBoundsException("setRnaViewer: Index value '" - + index + "' not in range [0.." - + (this._rnaViewerList.size() - 1) + "]"); - } - - this._rnaViewerList.set(index, vRnaViewer); - } - - /** - * - * - * @param vRnaViewerArray - */ - public void setRnaViewer( - final jalview.schemabinding.version2.RnaViewer[] vRnaViewerArray) - { - // -- copy array - _rnaViewerList.clear(); - - for (int i = 0; i < vRnaViewerArray.length; i++) - { - this._rnaViewerList.add(vRnaViewerArray[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; - } - - /** - * Sets the value of field 'viewreference'. - * - * @param viewreference - * the value of field 'viewreference'. - */ - public void setViewreference(final boolean viewreference) - { - this._viewreference = viewreference; - this._has_viewreference = 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 _viewreference. + */ + private boolean _viewreference; + + /** + * keeps track of state for field: _viewreference + */ + private boolean _has_viewreference; + + /** + * Field _featuresList. + */ + private java.util.Vector _featuresList; + + /** + * Field _pdbidsList. + */ + private java.util.Vector _pdbidsList; + + /** + * Field _hiddenSequencesList. + */ + private java.util.Vector _hiddenSequencesList; + + /** + * Reference to a viewer showing RNA structure + * for this sequence. Schema supports one viewer showing + * multiple + * annotations for multiple sequences, though currently only + * one + * annotation for one sequence (gapped or trimmed) is used + * + */ + private java.util.Vector _rnaViewerList; + + /** + * name of the project jar entry that holds the HMM file with + * the profile for the sequence + */ + private java.lang.String _hmmerProfile; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public JSeq() { + super(); + this._featuresList = new java.util.Vector(); + this._pdbidsList = new java.util.Vector(); + this._hiddenSequencesList = new java.util.Vector(); + this._rnaViewerList = 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); + } + + /** + * + * + * @param vRnaViewer + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addRnaViewer( + final jalview.schemabinding.version2.RnaViewer vRnaViewer) + throws java.lang.IndexOutOfBoundsException { + this._rnaViewerList.addElement(vRnaViewer); + } + + /** + * + * + * @param index + * @param vRnaViewer + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addRnaViewer( + final int index, + final jalview.schemabinding.version2.RnaViewer vRnaViewer) + throws java.lang.IndexOutOfBoundsException { + this._rnaViewerList.add(index, vRnaViewer); + } + + /** + */ + 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; + } + + /** + */ + public void deleteViewreference( + ) { + this._has_viewreference= 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(); + } + + /** + * Method enumerateRnaViewer. + * + * @return an Enumeration over all + * jalview.schemabinding.version2.RnaViewer elements + */ + public java.util.Enumeration enumerateRnaViewer( + ) { + return this._rnaViewerList.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.

    Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public jalview.schemabinding.version2.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 'hmmerProfile'. The field + * 'hmmerProfile' has the following description: name of the + * project jar entry that holds the HMM file with the profile + * for the sequence + * + * @return the value of field 'HmmerProfile'. + */ + public java.lang.String getHmmerProfile( + ) { + return this._hmmerProfile; + } + + /** + * 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.

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

    Note: Just in case the collection contents + * are changing in another thread, we pass a 0-length Array of + * the correct type into the API call. This way we know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public jalview.schemabinding.version2.RnaViewer[] getRnaViewer( + ) { + jalview.schemabinding.version2.RnaViewer[] array = new jalview.schemabinding.version2.RnaViewer[0]; + return (jalview.schemabinding.version2.RnaViewer[]) this._rnaViewerList.toArray(array); + } + + /** + * Method getRnaViewerCount. + * + * @return the size of this collection + */ + public int getRnaViewerCount( + ) { + return this._rnaViewerList.size(); + } + + /** + * Returns the value of field 'start'. + * + * @return the value of field 'Start'. + */ + public int getStart( + ) { + return this._start; + } + + /** + * Returns the value of field 'viewreference'. + * + * @return the value of field 'Viewreference'. + */ + public boolean getViewreference( + ) { + return this._viewreference; + } + + /** + * 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; + } + + /** + * Method hasViewreference. + * + * @return true if at least one Viewreference has been added + */ + public boolean hasViewreference( + ) { + return this._has_viewreference; + } + + /** + * 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; + } + + /** + * Returns the value of field 'viewreference'. + * + * @return the value of field 'Viewreference'. + */ + public boolean isViewreference( + ) { + return this._viewreference; + } + + /** + * + * + * @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(); + } + + /** + */ + public void removeAllRnaViewer( + ) { + this._rnaViewerList.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; + } + + /** + * Method removeRnaViewer. + * + * @param vRnaViewer + * @return true if the object was removed from the collection. + */ + public boolean removeRnaViewer( + final jalview.schemabinding.version2.RnaViewer vRnaViewer) { + boolean removed = _rnaViewerList.remove(vRnaViewer); + return removed; + } + + /** + * Method removeRnaViewerAt. + * + * @param index + * @return the element removed from the collection + */ + public jalview.schemabinding.version2.RnaViewer removeRnaViewerAt( + final int index) { + java.lang.Object obj = this._rnaViewerList.remove(index); + return (jalview.schemabinding.version2.RnaViewer) 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 'hmmerProfile'. The field + * 'hmmerProfile' has the following description: name of the + * project jar entry that holds the HMM file with the profile + * for the sequence + * + * @param hmmerProfile the value of field 'hmmerProfile'. + */ + public void setHmmerProfile( + final java.lang.String hmmerProfile) { + this._hmmerProfile = hmmerProfile; + } + + /** + * 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]); + } + } + + /** + * + * + * @param index + * @param vRnaViewer + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setRnaViewer( + final int index, + final jalview.schemabinding.version2.RnaViewer vRnaViewer) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._rnaViewerList.size()) { + throw new IndexOutOfBoundsException("setRnaViewer: Index value '" + index + "' not in range [0.." + (this._rnaViewerList.size() - 1) + "]"); + } + + this._rnaViewerList.set(index, vRnaViewer); + } + + /** + * + * + * @param vRnaViewerArray + */ + public void setRnaViewer( + final jalview.schemabinding.version2.RnaViewer[] vRnaViewerArray) { + //-- copy array + _rnaViewerList.clear(); + + for (int i = 0; i < vRnaViewerArray.length; i++) { + this._rnaViewerList.add(vRnaViewerArray[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; + } + + /** + * Sets the value of field 'viewreference'. + * + * @param viewreference the value of field 'viewreference'. + */ + public void setViewreference( + final boolean viewreference) { + this._viewreference = viewreference; + this._has_viewreference = 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); + } } diff --git a/src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java index 28f23b26..b6becc0 100644 --- a/src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/JSeqDescriptor.java @@ -7,8 +7,8 @@ package jalview.schemabinding.version2.descriptors; -//---------------------------------/ -//- Imported classes and packages -/ + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ import jalview.schemabinding.version2.JSeq; @@ -18,697 +18,607 @@ 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; +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); } - 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); + //-- _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); } - } - - 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); + //-- _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); } - 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); + //-- _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"); } - } - - 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; + 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); } - 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()); + desc.setValidator(fieldValidator); + //-- _viewreference + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_viewreference", "viewreference", 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.hasViewreference()) { return null; } + return (target.getViewreference() ? 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.deleteViewreference(); + return; + } + target.setViewreference( ((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: _viewreference + 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: _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()); + 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 } - } - - 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; + 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 } - 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()); + 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); } - } - - 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); - // -- _viewreference - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - java.lang.Boolean.TYPE, "_viewreference", "viewreference", - 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.hasViewreference()) - { - return null; + desc.setValidator(fieldValidator); + //-- _rnaViewerList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(jalview.schemabinding.version2.RnaViewer.class, "_rnaViewerList", "rnaViewer", 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.getRnaViewer(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + target.addRnaViewer( (jalview.schemabinding.version2.RnaViewer) 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.removeAllRnaViewer(); + } catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance(java.lang.Object parent) { + return new jalview.schemabinding.version2.RnaViewer(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("www.jalview.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _rnaViewerList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope } - return (target.getViewreference() ? 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.deleteViewreference(); - return; - } - target.setViewreference(((java.lang.Boolean) value) - .booleanValue()); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); + desc.setValidator(fieldValidator); + //-- _hmmerProfile + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_hmmerProfile", "hmmerProfile", 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 + { + JSeq target = (JSeq) object; + return target.getHmmerProfile(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JSeq target = (JSeq) object; + target.setHmmerProfile( (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: _hmmerProfile + 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: _viewreference - 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); } - 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); + //-----------/ + //- Methods -/ + //-----------/ - // -- validation code for: _featuresList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { // -- local scope + /** + * Method getAccessMode. + * + * @return the access mode specified for this class. + */ + public org.exolab.castor.mapping.AccessMode getAccessMode( + ) { + return null; } - 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 + /** + * Method getIdentity. + * + * @return the identity field, null if this class has no + * identity. + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity( + ) { + return super.getIdentity(); } - 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); + /** + * Method getJavaClass. + * + * @return the Java class represented by this descriptor. + */ + public java.lang.Class getJavaClass( + ) { + return jalview.schemabinding.version2.JSeq.class; } - desc.setValidator(fieldValidator); - // -- _rnaViewerList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( - jalview.schemabinding.version2.RnaViewer.class, - "_rnaViewerList", "rnaViewer", - 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.getRnaViewer(); - } - - public void setValue(java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try - { - JSeq target = (JSeq) object; - target.addRnaViewer((jalview.schemabinding.version2.RnaViewer) 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.removeAllRnaViewer(); - } catch (java.lang.Exception ex) - { - throw new IllegalStateException(ex.toString()); - } - } - - public java.lang.Object newInstance(java.lang.Object parent) - { - return new jalview.schemabinding.version2.RnaViewer(); - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("www.jalview.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - // -- validation code for: _rnaViewerList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { // -- local scope + /** + * Method getNameSpacePrefix. + * + * @return the namespace prefix to use when marshaling as XML. + */ + public java.lang.String getNameSpacePrefix( + ) { + return _nsPrefix; } - 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 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 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 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; - } + /** + * 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; + } }