public static class SequenceSelection.SequenceIndex extends Object implements XMLSerializable.OldVersionCompatible
SequenceListDocuments.
Refer to SequenceSelection for a discussion about what SequenceIndex means.| Modifier and Type | Class and Description |
|---|---|
class |
SequenceSelection.SequenceIndex.SelectionWrongForDocumentsException
Deprecated.
|
| Constructor and Description |
|---|
SequenceSelection.SequenceIndex(org.jdom.Element element)
Reconstruct using results returned from
toXML() |
SequenceSelection.SequenceIndex(int sequenceIndex,
SequenceType sequenceType,
SequenceSelection.SequenceDocumentType sequenceDocumentType)
Creates a new SequenceIndex
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
getContainingDocumentIndex(List<AnnotatedPluginDocument> selectedDocuments)
Given a the List of AnnotatedPluginDocument on which this SequenceIndex was defined, returns the index of the document that this
SequenceIndex refers to, in that list
|
SequenceDocument |
getSequence(List<AnnotatedPluginDocument> selectedDocuments)
Gets the selected sequence corresponding to this sequence index for these documents
|
SequenceSelection.SequenceDocumentType |
getSequenceDocumentType()
returns the type of document the selection applies to.
|
SequenceDocument |
getSequenceFromPluginDocuments(List<PluginDocument> selectedDocuments)
Gets the selected sequence corresponding to this sequence index for these documents
|
int |
getSequenceIndex()
Gets the 0-based index of the sequence in the list.
|
SequenceType |
getSequenceType() |
Geneious.MajorVersion |
getVersionSupport(XMLSerializable.VersionSupportType versionType)
Gets either the latest version this class can serialize to via
XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener)
or the most recent version in which the XML returned from XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener) last changed. |
int |
hashCode() |
String |
toString() |
org.jdom.Element |
toXML() |
org.jdom.Element |
toXML(Geneious.MajorVersion majorVersion,
ProgressListener progressListener)
Serializes this class to XML format, potentially to a format readable by an earlier version of Geneious.
|
public SequenceSelection.SequenceIndex(int sequenceIndex,
SequenceType sequenceType,
SequenceSelection.SequenceDocumentType sequenceDocumentType)
sequenceIndex - the 0-based index of the sequence in the list. May be -1 for the consensus sequence (if it exists)sequenceType - the sequence type (so that we can identify which list the index applies to in SequenceListDocumentssequenceDocumentType - the type of document the selection applies to. Used for example to distinguish between the alignment or the sequence in a CombinedAlignmentAndSequenceDocumentpublic SequenceSelection.SequenceIndex(org.jdom.Element element)
throws XMLSerializationException
toXML()element - an element previously returned from toXML()XMLSerializationException - if XML does not conform to our unpublished specificationpublic int getSequenceIndex()
SequenceSelection for a discussion about what this meanspublic SequenceType getSequenceType()
SequenceListDocumentspublic SequenceSelection.SequenceDocumentType getSequenceDocumentType()
CombinedAlignmentAndSequenceDocumentCombinedAlignmentAndSequenceDocumentpublic org.jdom.Element toXML()
#SequenceIndex(org.jdom.Element)public Geneious.MajorVersion getVersionSupport(XMLSerializable.VersionSupportType versionType)
XMLSerializable.OldVersionCompatibleXMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener)
or the most recent version in which the XML returned from XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener) last changed.getVersionSupport in interface XMLSerializable.OldVersionCompatibleversionType - specifies which version property to returnpublic org.jdom.Element toXML(Geneious.MajorVersion majorVersion, ProgressListener progressListener)
XMLSerializable.OldVersionCompatibleXMLSerializable.toXML() for a more
detailed description of what it means to serialize to XML.
All classes that implement this method must also implement XMLSerializable.toXML() and should delegate back to
this method using Geneious.getMajorVersion() and ProgressListener.EMPTY as parameters.toXML in interface XMLSerializable.OldVersionCompatiblemajorVersion - the major version of Geneious to serialize to XML for. For example "6.0" but not "6.0.0". This must be a version
returned greater or equal to a version returned from
getVersionSupport(VersionSupportType.OldestVersionSerializableTo)
and must never be greater than the current version (Geneious.getMajorVersion())progressListener - for reporting progress and cancellingpublic SequenceDocument getSequence(List<AnnotatedPluginDocument> selectedDocuments) throws DocumentOperationException
selectedDocuments - the documents which this SequenceIndex corresponds toDocumentOperationException - if the document can't be loaded to retrieve the sequence corresponding to this selectionSequenceSelection.SequenceIndex.SelectionWrongForDocumentsException - if this SequenceIndex object was invalid for the given documentsgetSequenceFromPluginDocuments(java.util.List)public SequenceDocument getSequenceFromPluginDocuments(List<PluginDocument> selectedDocuments)
selectedDocuments - the documents which this SequenceIndex corresponds toIllegalArgumentException - if this selection index doesn't correspond to these documents.getSequence(java.util.List)public int getContainingDocumentIndex(List<AnnotatedPluginDocument> selectedDocuments)
selectedDocuments - the original documents for which this SequenceIndex's parent SequenceSelection was createdSequenceSelection.SequenceIndex.SelectionWrongForDocumentsException - if this SequenceIndex object was invalid for the given documents