public static interface XMLSerializable.OldVersionCompatible
PluginDocument
implementations that aren't bundled with Geneious (for example
3rd party plugins) need to handle different version support themselves in their XML. This is because those plugins can be installed with any version of Geneious and
users are able to downgrade the version of a non-bundled plugin without downgrading Geneious.Modifier and Type | Method and Description |
---|---|
Geneious.MajorVersion |
getVersionSupport(XMLSerializable.VersionSupportType versionType)
Gets either the latest version this class can serialize to via
toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener)
or the most recent version in which the XML returned from toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener) last changed. |
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.
|
Geneious.MajorVersion getVersionSupport(XMLSerializable.VersionSupportType versionType)
toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener)
or the most recent version in which the XML returned from toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener)
last changed.versionType
- specifies which version property to returnorg.jdom.Element toXML(Geneious.MajorVersion majorVersion, ProgressListener progressListener)
XMLSerializable.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.majorVersion
- 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 cancellingRuntimeException
- whose cause is a XMLSerializationException
if the serializable class is a PluginDocument
and it is unable to serialize to a temporary file using PluginDocument.FILE_DATA_ATTRIBUTE_NAME
.