public interface EditableSequenceDocument extends SequenceDocumentWithEditableAnnotations
SequenceDocument that can be edited.
Also see SequenceDocumentWithEditableAnnotations for
a sequence that only allows its annotations, but not other properties to be edited.
NoteSequenceListDocument implementations may not notice changes to their sequences that are edited
alone using this API. The SequenceListDocument must also be informed about the change using the ExtendedEditableSequenceListDocument API.SequenceDocument.Alphabet, SequenceDocument.TransformerPluginDocument.ReferencedDocumentsAlwaysLoaded, PluginDocument.ReferencedDocumentsNotLoaded, PluginDocument.SizeRequiredToLoadIntoMemoryProviderXMLSerializable.OldVersionCompatible, XMLSerializable.VersionSupportTypeGENOME_SEQUENCE_THRESHOLDFILE_DATA_ATTRIBUTE_NAME, MAXIMUM_HTML_LENGTH, MODIFIED_DATE_FIELDROOT_ELEMENT_NAME| Modifier and Type | Method and Description |
|---|---|
void |
setCircular(boolean circular)
Set whether or not this sequence is circular.
|
void |
setSequenceAndAnnotations(CharSequence sequence,
List<SequenceAnnotation> annotations)
Sets the sequence and annotations of this document.
|
setAnnotationsgetCharSequence, getSequenceAnnotations, getSequenceLength, getSequenceString, isCirculargetCreationDate, getDescription, getDisplayableFields, getFieldValue, getName, getURN, toHTMLfromXML, toXMLvoid setSequenceAndAnnotations(CharSequence sequence, List<SequenceAnnotation> annotations) throws UnsupportedOperationException
SequenceTracks
EditableNucleotideGraphSequenceDocument.setSequenceAndAnnotationsAndGraph(CharSequence, java.util.List, NucleotideGraph).
Hence, it is illegal to change the length of the sequence through this method if
this is instanceof NucleotideGraphSequenceDocument;
Therefore, implementations of this method should start with the following code:
if (this instanceof NucleotideGraphSequenceDocument && sequence.length() != getSequenceLength()) {
throw new IllegalArgumentException("Can't change sequence length without updating graph for " + getClass());
}
sequence - new residues; NOTE: This CharSequence must not change its length or characters after it was passed to this method!annotations - new annotationsUnsupportedOperationExceptionvoid setCircular(boolean circular)
circular - true to set this sequence as circular.SequenceDocument.isCircular()