public static enum XMLSerializable.VersionSupportType extends Enum<XMLSerializable.VersionSupportType>
XMLSerializable.OldVersionCompatible.getVersionSupport(com.biomatters.geneious.publicapi.documents.XMLSerializable.VersionSupportType)| Enum Constant and Description |
|---|
FormatLastChanged
Refers to most recent version of Geneious in which the class last changed its XML format.
If it just extended the format by adding new tags such that an old version can still safely read the new xml,
then associate that version with
FormatLastExtended instead.
FormatLastChanged must not be greater than FormatLastExtended. |
FormatLastExtended
Refers to most recent version of Geneious in which the class last extended its XML format in
such a way that old versions (of at least
FormatLastChanged) can still safely read the XML
It is important that classes return the correct version when they were last extended. |
OldestVersionSerializableTo
Refers to the oldest version of Geneious which the class supports serializing to via
XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener)
This class must support serializing to all major versions between this and the current version (Geneious.getMajorVersion() inclusive
via XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener). |
| Modifier and Type | Method and Description |
|---|---|
Geneious.MajorVersion |
getVersionSupport(XMLSerializable xmlSerializable)
Helper method for implementing
XMLSerializable.OldVersionCompatible.getVersionSupport(com.biomatters.geneious.publicapi.documents.XMLSerializable.VersionSupportType) that
returns that delegates to the given object if it implements OldVersionCompatible or returns Geneious.getMajorVersion() if it doesn't. |
static boolean |
supportsVersionSerialization(XMLSerializable.OldVersionCompatible serializableInstance)
Returns true if the given instance correctly supports version serialization.
|
static XMLSerializable.VersionSupportType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static XMLSerializable.VersionSupportType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final XMLSerializable.VersionSupportType FormatLastChanged
FormatLastExtended instead.
FormatLastChanged must not be greater than FormatLastExtended.
If an implementation of XMLSerializable.OldVersionCompatible makes use of other XMLSerializable classes as part of its serialization, then these
classes must also be OldVersionCompatible and it must use the FormatLastChanged returned by them if
it is higher than its own FormatLastChanged.public static final XMLSerializable.VersionSupportType FormatLastExtended
FormatLastChanged) can still safely read the XML
It is important that classes return the correct version when they were last extended. If they don't older versions of Geneious may think they can safely modify
documents in a server database when in fact they could cause information loss.public static final XMLSerializable.VersionSupportType OldestVersionSerializableTo
XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener)
This class must support serializing to all major versions between this and the current version (Geneious.getMajorVersion() inclusive
via XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener).public static XMLSerializable.VersionSupportType[] values()
for (XMLSerializable.VersionSupportType c : XMLSerializable.VersionSupportType.values()) System.out.println(c);
public static XMLSerializable.VersionSupportType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic Geneious.MajorVersion getVersionSupport(XMLSerializable xmlSerializable)
XMLSerializable.OldVersionCompatible.getVersionSupport(com.biomatters.geneious.publicapi.documents.XMLSerializable.VersionSupportType) that
returns that delegates to the given object if it implements OldVersionCompatible or returns Geneious.getMajorVersion() if it doesn't.xmlSerializable - the object to get the version support type forXMLSerializable.OldVersionCompatible.getVersionSupport(com.biomatters.geneious.publicapi.documents.XMLSerializable.VersionSupportType)public static boolean supportsVersionSerialization(XMLSerializable.OldVersionCompatible serializableInstance)
Version6_0 if possible.serializableInstance - an instance of a OldVersionCompatible to query about version serialization support.